From 3697c3062e7f17bf1e833575e1d0de7741488b3a Mon Sep 17 00:00:00 2001 From: Fox-33 <1466778434@qq.com> Date: Wed, 16 Apr 2025 00:21:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/center/popupActivate.vue | 2 ++ pages/index/center.vue | 9 +++++++-- pages/index/index.vue | 8 ++++++++ pages/index/record.vue | 8 ++++++++ pages_order/auth/wxUserInfo.vue | 19 ++++++++++++++++--- pages_order/mine/team.vue | 4 ++-- pages_order/record/articleSharing.vue | 2 +- pages_order/record/groupSharing.vue | 2 +- pages_order/record/personalSharing.vue | 2 +- pages_order/sharing/group.vue | 4 ++-- pages_order/sharing/personal.vue | 4 ++-- store/store.js | 2 +- 12 files changed, 51 insertions(+), 15 deletions(-) diff --git a/components/center/popupActivate.vue b/components/center/popupActivate.vue index 2634898..4fb4ca4 100644 --- a/components/center/popupActivate.vue +++ b/components/center/popupActivate.vue @@ -77,6 +77,8 @@ try { await this.$fetch('openVip', { code: this.code }) + + this.$store.commit('getUserInfo') uni.showToast({ title: '激活成功', diff --git a/pages/index/center.vue b/pages/index/center.vue index c0c334a..7225687 100644 --- a/pages/index/center.vue +++ b/pages/index/center.vue @@ -4,11 +4,11 @@ - + - + {{ userInfo.nickName }} @@ -192,6 +192,11 @@ url: `/pages_order/mine/news?id=${id}` }) }, + goToEditUserInfo() { + uni.navigateTo({ + url: '/pages_order/auth/wxUserInfo?mode=edit' + }) + }, } } diff --git a/pages/index/index.vue b/pages/index/index.vue index 23001bd..de90eb9 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -21,6 +21,8 @@ + + @@ -30,11 +32,13 @@ import { mapState } from 'vuex' import tabber from '@/components/base/tabbar.vue' import popupAuditMsg from '@/components/home/popupAuditMsg.vue' + import popupActivate from '@/components/center/popupActivate.vue' export default { components : { tabber, popupAuditMsg, + popupActivate, }, data() { return { @@ -98,6 +102,10 @@ return } + if (!this.userInfo.isPay) { + this.$refs.popupActivate.open() + return + } this.$utils.navigateTo(url) } }, diff --git a/pages/index/record.vue b/pages/index/record.vue index 595e7d1..fde38f6 100644 --- a/pages/index/record.vue +++ b/pages/index/record.vue @@ -67,6 +67,8 @@ + + @@ -78,6 +80,7 @@ import tabber from '@/components/base/tabbar.vue' import suspendDropdown from '@/components/base/suspendDropdown.vue' + import popupActivate from '@/components/center/popupActivate.vue' const URL_MAPPING = { // state -> url '0': '/pages_order/record/personalSharing', @@ -91,6 +94,7 @@ components : { tabber, suspendDropdown, + popupActivate, }, computed : { ...mapGetters(['userShop']), @@ -167,6 +171,10 @@ }, //跳转分享详情页面 toSharingDetail(id) { + if (!this.userInfo.isPay) { + this.$refs.popupActivate.open() + return + } uni.navigateTo({ url: `${URL_MAPPING[this.queryParams.state]}?id=${id}` }) diff --git a/pages_order/auth/wxUserInfo.vue b/pages_order/auth/wxUserInfo.vue index fd4f4e3..e754fd9 100644 --- a/pages_order/auth/wxUserInfo.vue +++ b/pages_order/auth/wxUserInfo.vue @@ -91,18 +91,23 @@ nickName: '', phone : '', wxCode : '', - } + }, + mode: 'add', }; }, computed: { ...mapState(['configList']) }, onShow() {}, - onLoad() { + onLoad(option) { + const { mode } = option || {} + this.userInfoForm.phone = this.userInfo.phone || '' this.userInfoForm.nickName = this.userInfo.nickName || '' this.userInfoForm.headImage = this.userInfo.headImage || '' this.userInfoForm.wxCode = this.userInfo.wxCode || '' + + this.mode = mode }, computed: {}, methods: { @@ -144,7 +149,6 @@ if (self.$utils.verificationAll(self.userInfoForm, { headImage: '请选择头像', nickName: '请填写昵称', - phone: '请填写手机号', wxCode: '请填写微信号', })) { return @@ -157,6 +161,15 @@ wxCode : self.userInfoForm.wxCode, }, res => { if (res.code == 200) { + if (this.mode === 'edit') { + uni.showToast({ + title: '提交成功', + icon: 'none' + }) + + setTimeout(uni.navigateBack, 1000, -1) + return + } uni.navigateBack({ delta: 2, fail: () => { diff --git a/pages_order/mine/team.vue b/pages_order/mine/team.vue index e2a11f0..b9876e4 100644 --- a/pages_order/mine/team.vue +++ b/pages_order/mine/team.vue @@ -10,9 +10,9 @@ {{ userInfoVip.pidInfo.nickName }} - {{ `ID:${userInfoVip.pidInfo.id}` }} + {{ `ID:${userInfoVip.pidInfo.intentionCode}` }} - + 手机号 {{ userInfoVip.pidInfo.phone }} diff --git a/pages_order/record/articleSharing.vue b/pages_order/record/articleSharing.vue index 0aa7608..ec00d34 100644 --- a/pages_order/record/articleSharing.vue +++ b/pages_order/record/articleSharing.vue @@ -150,7 +150,7 @@ computed: { ...mapState(['userInfo']), userId() { - return this.form.userId || this.userInfo?.id + return this.form.userId || this.userInfo?.intentionCode }, }, onLoad(option) { diff --git a/pages_order/record/groupSharing.vue b/pages_order/record/groupSharing.vue index 2401e92..c684b2f 100644 --- a/pages_order/record/groupSharing.vue +++ b/pages_order/record/groupSharing.vue @@ -208,7 +208,7 @@ computed: { ...mapState(['configList', 'userInfo']), userId() { - return this.form.userId || this.userInfo?.id + return this.form.userId || this.userInfo?.intentionCode }, }, onLoad(option) { diff --git a/pages_order/record/personalSharing.vue b/pages_order/record/personalSharing.vue index df497c4..b032df7 100644 --- a/pages_order/record/personalSharing.vue +++ b/pages_order/record/personalSharing.vue @@ -195,7 +195,7 @@ computed: { ...mapState(['userInfo']), userId() { - return this.form.userId || this.userInfo?.id + return this.form.userId || this.userInfo?.intentionCode }, disabled() { // todo diff --git a/pages_order/sharing/group.vue b/pages_order/sharing/group.vue index b66ca87..653466e 100644 --- a/pages_order/sharing/group.vue +++ b/pages_order/sharing/group.vue @@ -79,12 +79,12 @@ }, onShareAppMessage(res) { const { - headTitle, + textDetails, indexImage, } = this.detail let o = { - title : headTitle, + title : textDetails, imageUrl: indexImage, query: `id=${this.id}&state=2&shareId=${this.userInfo.id}`, } diff --git a/pages_order/sharing/personal.vue b/pages_order/sharing/personal.vue index da0f8fd..3a3a326 100644 --- a/pages_order/sharing/personal.vue +++ b/pages_order/sharing/personal.vue @@ -79,12 +79,12 @@ }, onShareAppMessage(res) { const { - headTitle, + textDetails, indexImage, } = this.detail let o = { - title : headTitle, + title : textDetails, imageUrl: indexImage, query: `id=${this.id}&state=0&shareId=${this.userInfo.id}`, } diff --git a/store/store.js b/store/store.js index 7aed578..9a70d7e 100644 --- a/store/store.js +++ b/store/store.js @@ -85,7 +85,7 @@ const store = new Vuex.Store({ if(!state.userInfo.nickName || !state.userInfo.headImage){ uni.navigateTo({ - url: '/pages_order/auth/wxUserInfo' + url: '/pages_order/auth/wxUserInfo?mode=add' }) }else{ uni.navigateBack({