diff --git a/src/login-sub/index.vue b/src/login-sub/index.vue
index 71a1a47..1e915d5 100644
--- a/src/login-sub/index.vue
+++ b/src/login-sub/index.vue
@@ -27,11 +27,34 @@
src="https://api.static.ycymedu.com/images/logo.png"
mode="aspectFit"
>
-
- 立即登录
+ 一键登录
+
+
+
+
+
+
+
+
+
+ 已阅读并同意
+
+ 《用户协议》
+
+ 和
+
+ 《隐私条款》
+
+
+
@@ -41,11 +64,54 @@
+
+
diff --git a/src/login-sub/inviteCode.vue b/src/login-sub/inviteCode.vue
new file mode 100644
index 0000000..9758972
--- /dev/null
+++ b/src/login-sub/inviteCode.vue
@@ -0,0 +1,226 @@
+
+{
+ style: {
+ navigationBarTitleText: '基本信息',
+ },
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 输入邀请码,获取免费AI报告解读
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages-sub/ucenter/setting/userInfo.vue b/src/pages-sub/ucenter/setting/userInfo.vue
new file mode 100644
index 0000000..d1e9021
--- /dev/null
+++ b/src/pages-sub/ucenter/setting/userInfo.vue
@@ -0,0 +1,215 @@
+
+{
+ style: {
+ navigationBarTitleText: '基本信息',
+ },
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages.json b/src/pages.json
index d158f2a..db0b2fc 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -287,6 +287,13 @@
"navigationBarTitleText": "设置"
}
},
+ {
+ "path": "ucenter/setting/userInfo",
+ "type": "page",
+ "style": {
+ "navigationBarTitleText": "基本信息"
+ }
+ },
{
"path": "ucenter/star/myStar",
"type": "page",
@@ -320,6 +327,13 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "inviteCode",
+ "type": "page",
+ "style": {
+ "navigationBarTitleText": "基本信息"
+ }
+ },
{
"path": "privacyPolicy",
"type": "page"
diff --git a/src/pages/ucenter/index/index.vue b/src/pages/ucenter/index/index.vue
index ffe3133..ebb0b69 100644
--- a/src/pages/ucenter/index/index.vue
+++ b/src/pages/ucenter/index/index.vue
@@ -182,10 +182,16 @@ const toSetting = () => {
}
const goLogin = () => {
+ console.log('hhh')
+
if (!userStore.userInfo.openid) {
uni.navigateTo({
url: '/login-sub/index',
})
+ } else {
+ uni.navigateTo({
+ url: '/pages-sub/ucenter/setting/userInfo',
+ })
}
}
diff --git a/src/service/index/api.ts b/src/service/index/api.ts
index 878ebc2..4948cdd 100644
--- a/src/service/index/api.ts
+++ b/src/service/index/api.ts
@@ -219,6 +219,9 @@ export const savePerfectInfo = (params: {
score?: number
sp?: number
year?: number
+ sex?: number
+ nickName?: string
+ inviteCode?: string
}) => {
return http.post('/api/weChatUserEx/perfectInfo', params)
}
@@ -470,3 +473,7 @@ export const sendMessage = (params: { conversation_id: string; user: string; que
export const getAssistant = () => {
return http.get('/api/weChatUserEx/areaExtend', {})
}
+
+export const verifyInviteCode = ({ code }: { code: string }) => {
+ return http.post('/api/weChatUserEx/verifyInviteCode', { code })
+}
diff --git a/src/store/user.ts b/src/store/user.ts
index 7dfc7b4..0e1a706 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -5,6 +5,8 @@ import { ref } from 'vue'
const initState = {
nickname: '',
avatar: '',
+ mobile: '',
+ sex: 0,
city: {
allscore: 0,
code: '0',
@@ -97,6 +99,13 @@ export const useUserStore = defineStore(
userInfo.value.avatar = val
}
+ const setUserBaseInfo = ({ mobile, sex }: { mobile?: string; sex: number }) => {
+ userInfo.value.sex = sex
+ if (mobile) {
+ userInfo.value.mobile = mobile
+ }
+ }
+
// 清除预估成绩
const clearUserEstimatedAchievement = () => {
userInfo.value.estimatedAchievement = Object.assign(userInfo.value.estimatedAchievement, {
@@ -221,6 +230,7 @@ export const useUserStore = defineStore(
setIsVIP,
setVipCode,
setIsShowAi,
+ setUserBaseInfo,
}
},
{
diff --git a/src/types/app-type.d.ts b/src/types/app-type.d.ts
index 35f23de..a484c41 100644
--- a/src/types/app-type.d.ts
+++ b/src/types/app-type.d.ts
@@ -64,6 +64,8 @@ export type ExtraUserInfo = {
batchName: string
wishList: any[]
isShowAi: boolean
+ mobile: string
+ sex: number
} & IUserInfo
export type News = {
diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts
index eb9c0dd..4d6a3d8 100644
--- a/src/types/uni-pages.d.ts
+++ b/src/types/uni-pages.d.ts
@@ -33,10 +33,12 @@ interface NavigateToOptions {
"/pages-sub/ucenter/evaluate/evaluateList" |
"/pages-sub/ucenter/setting/about" |
"/pages-sub/ucenter/setting/index" |
+ "/pages-sub/ucenter/setting/userInfo" |
"/pages-sub/ucenter/star/myStar" |
"/pages-sub/ucenter/vip/openVip" |
"/pages-sub/ucenter/wishList/wishList" |
"/login-sub/index" |
+ "/login-sub/inviteCode" |
"/login-sub/privacyPolicy" |
"/login-sub/userAgreement" |
"/pages-evaluation-sub/aiAutoFill/index" |