Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-10 16:57:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2b40580e37a73c429e232b963a6cbcefa3474b5c
2b40580e
1 parent
f7070855
✨ feat(上传隐私显示): 新增cookie判断
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
7 deletions
package-lock.json
package.json
src/views/client/bookDetail.vue
src/views/client/privacyNotice.vue
yarn.lock
package-lock.json
View file @
2b40580
...
...
@@ -10,6 +10,7 @@
"dependencies"
:
{
"html2canvas"
:
"^1.4.1"
,
"jquery"
:
"^3.6.0"
,
"js-cookie"
:
"^3.0.1"
,
"lodash"
:
"^4.17.21"
,
"moment"
:
"^2.29.1"
,
"mui-player"
:
"^1.6.0"
,
...
...
@@ -878,6 +879,14 @@
"integrity"
:
"sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
,
"license"
:
"MIT"
},
"node_modules/js-cookie"
:
{
"version"
:
"3.0.1"
,
"resolved"
:
"https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz"
,
"integrity"
:
"sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
,
"engines"
:
{
"node"
:
">=12"
}
},
"node_modules/js-tokens"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
,
...
...
@@ -2353,6 +2362,11 @@
"resolved"
:
"https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz"
,
"integrity"
:
"sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
},
"js-cookie"
:
{
"version"
:
"3.0.1"
,
"resolved"
:
"https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz"
,
"integrity"
:
"sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
},
"js-tokens"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
,
...
...
package.json
View file @
2b40580
...
...
@@ -16,6 +16,7 @@
"dependencies"
:
{
"html2canvas"
:
"^1.4.1"
,
"jquery"
:
"^3.6.0"
,
"js-cookie"
:
"^3.0.1"
,
"lodash"
:
"^4.17.21"
,
"moment"
:
"^2.29.1"
,
"mui-player"
:
"^1.6.0"
,
...
...
src/views/client/bookDetail.vue
View file @
2b40580
...
...
@@ -94,6 +94,7 @@
</template>
<script setup>
import Cookies from 'js-cookie'
import { useVideoList } from '@/composables/useVideoList.js'
import MyButton from '@/components/MyButton/index.vue'
...
...
@@ -194,7 +195,13 @@ const uploadVideo = () => {
if (res.data.data.can_upload) {
// TODO: 上传视频直接跳转?不需要表示判断是上传哪个幼儿园吗?
// 实名认证之后直接跳转上传页面
location.href = 'https://jinshuju.net/f/NAGn1D';
if (Cookies.get('privacy_notice')) { // 已读隐私条例,直接跳转上传页面
location.href = 'https://jinshuju.net/f/NAGn1D';
} else {
$router.push({
path: '/client/privacyNotice'
})
}
} else {
// 如果没有实名认证需要提示用户实名认证
showNotice.value = true;
...
...
src/views/client/privacyNotice.vue
View file @
2b40580
...
...
@@ -24,6 +24,7 @@
</template>
<script setup>
import Cookies from 'js-cookie'
import MyButton from '@/components/MyButton/index.vue'
import { ref, reactive, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
...
...
@@ -34,15 +35,12 @@ const $route = useRoute();
const $router = useRouter();
const disagree = () => {
console.warn('不同意');
$router.go(-1)
}
const agree = () => {
console.warn('同意');
Cookies.set('privacy_notice', '1');
location.href = 'https://jinshuju.net/f/NAGn1D';
}
onMounted(() => {
})
</script>
<script>
...
...
yarn.lock
View file @
2b40580
...
...
@@ -536,6 +536,11 @@
"resolved" "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz"
"version" "3.6.0"
"js-cookie@^3.0.1":
"integrity" "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
"resolved" "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz"
"version" "3.0.1"
"js-tokens@^4.0.0":
"integrity" "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
"resolved" "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
...
...
Please
register
or
login
to post a comment