From 1171acbd275b2d6b3f376cebeb11769baa3db7e2 Mon Sep 17 00:00:00 2001 From: xjs Date: Fri, 25 Apr 2025 10:57:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/home/Banner.vue | 24 +++- src/hooks/useTabbarList.ts | 4 + src/login-sub/components/LoginMask.vue | 63 +++++++-- .../components/check-group/Checkbox.vue | 133 ++++++++++++++++++ .../components/check-group/CheckboxGroup.vue | 72 ++++++++++ src/login-sub/privacyPolicy.vue | 7 + src/login-sub/userAgreement.vue | 7 + .../evaluate/components/AiFooter.vue | 4 + src/pages-sub/home/career/index.vue | 1 - src/pages-sub/home/career/info.vue | 1 + src/pages-sub/home/college/index.vue | 1 - src/pages-sub/home/college/info.vue | 1 + src/pages-sub/home/major/index.vue | 1 - src/pages.json | 32 +++-- .../evaluation/components/EvaluationItem.vue | 6 + src/pages/evaluation/index/index.vue | 1 - src/pages/expert/index/index.vue | 10 +- src/pages/ucenter/index/index.vue | 22 ++- src/store/user.ts | 5 + src/types/app-type.d.ts | 1 + src/types/uni-pages.d.ts | 2 + 21 files changed, 363 insertions(+), 35 deletions(-) create mode 100644 src/login-sub/components/check-group/Checkbox.vue create mode 100644 src/login-sub/components/check-group/CheckboxGroup.vue create mode 100644 src/login-sub/privacyPolicy.vue create mode 100644 src/login-sub/userAgreement.vue diff --git a/src/components/home/Banner.vue b/src/components/home/Banner.vue index 3f27922..c53f664 100644 --- a/src/components/home/Banner.vue +++ b/src/components/home/Banner.vue @@ -4,6 +4,7 @@ class="flex items-center justify-between mx-[34rpx] py-[26rpx]" style="border-bottom: 2rpx solid #ededed" @click="handleChange" + v-if="userStore.userInfo.openid" > {{ @@ -17,7 +18,14 @@ src="https://api.static.ycymedu.com/src/images/home/pen.svg" > - + + + + + @@ -65,4 +81,10 @@ const navigatorToAi = () => { }) } } + +const navigatorToLogin = () => { + uni.navigateTo({ + url: '/login-sub/index', + }) +} diff --git a/src/hooks/useTabbarList.ts b/src/hooks/useTabbarList.ts index 30b2a82..2c25a92 100644 --- a/src/hooks/useTabbarList.ts +++ b/src/hooks/useTabbarList.ts @@ -1,7 +1,9 @@ import { TabesItem } from '@/service/app' import { sysDictType } from '@/service/index/api' +import { useUserStore } from '@/store' const tabbarList = ref([]) +const userStore = useUserStore() sysDictType({ id: 619330547859525 }).then((res) => { const { code, result } = res @@ -52,8 +54,10 @@ sysDictType({ id: 619330547859525 }).then((res) => { if (code === 200) { if (status === 1) { tabbarList.value = _tabbarList.filter((item) => item.id !== 2) + userStore.setIsShowAi(false) } else { tabbarList.value = _tabbarList + userStore.setIsShowAi(true) } } }) diff --git a/src/login-sub/components/LoginMask.vue b/src/login-sub/components/LoginMask.vue index 0e4dedd..ad455e7 100644 --- a/src/login-sub/components/LoginMask.vue +++ b/src/login-sub/components/LoginMask.vue @@ -15,22 +15,30 @@ - - - - + + + + + - 已阅读并同意《服务条款》和《隐私条款》 + 已阅读并同意 + + 《用户协议》 + + 和 + + 《隐私条款》 + @@ -44,6 +52,9 @@ import { useLogin } from '@/login-sub/hooks/useUserInfo' import Overlay from './Overlay.vue' import RadioGroup from './radio-group/RadioGroup.vue' import Radio from './radio-group/Radio.vue' +import Checkbox from './check-group/Checkbox.vue' +import CheckboxGroup from './check-group/CheckboxGroup.vue' + import { getSessionKey, getVolunteerInitialization, @@ -74,9 +85,21 @@ const handleClose = () => { } const phone = ref(true) // 手机号登陆 -const checked = ref(0) // 是否同意条款 +const checked = ref([]) // 是否同意条款 const getPhoneInfo = ref(null) +const handleClickUserAgreement = () => { + uni.navigateTo({ + url: '/login-sub/userAgreement', + }) +} + +const handleClickPrivacyPolicy = () => { + uni.navigateTo({ + url: '/login-sub/privacyPolicy', + }) +} + const getPhoneNumber = async (e: any) => { if (e.detail.errMsg == 'getPhoneNumber:ok') { const detail = e.detail @@ -169,7 +192,27 @@ const getUserInfo = async (code: string) => { diff --git a/src/login-sub/components/check-group/Checkbox.vue b/src/login-sub/components/check-group/Checkbox.vue new file mode 100644 index 0000000..b629a93 --- /dev/null +++ b/src/login-sub/components/check-group/Checkbox.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/login-sub/components/check-group/CheckboxGroup.vue b/src/login-sub/components/check-group/CheckboxGroup.vue new file mode 100644 index 0000000..1c8e836 --- /dev/null +++ b/src/login-sub/components/check-group/CheckboxGroup.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/src/login-sub/privacyPolicy.vue b/src/login-sub/privacyPolicy.vue new file mode 100644 index 0000000..20babbf --- /dev/null +++ b/src/login-sub/privacyPolicy.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/src/login-sub/userAgreement.vue b/src/login-sub/userAgreement.vue new file mode 100644 index 0000000..9fca83e --- /dev/null +++ b/src/login-sub/userAgreement.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/src/pages-evaluation-sub/evaluate/components/AiFooter.vue b/src/pages-evaluation-sub/evaluate/components/AiFooter.vue index 451c6b6..9f87a68 100644 --- a/src/pages-evaluation-sub/evaluate/components/AiFooter.vue +++ b/src/pages-evaluation-sub/evaluate/components/AiFooter.vue @@ -3,6 +3,7 @@ 智能AI顾问 +