#6 fox

Merged
Fox merged 2 commits from fox into master 1 week ago
  1. +2
    -0
      components/center/popupActivate.vue
  2. +7
    -2
      pages/index/center.vue
  3. +8
    -0
      pages/index/index.vue
  4. +8
    -0
      pages/index/record.vue
  5. +16
    -3
      pages_order/auth/wxUserInfo.vue
  6. +2
    -2
      pages_order/mine/team.vue
  7. +1
    -1
      pages_order/record/articleSharing.vue
  8. +1
    -1
      pages_order/record/groupSharing.vue
  9. +1
    -1
      pages_order/record/personalSharing.vue
  10. +2
    -2
      pages_order/sharing/group.vue
  11. +2
    -2
      pages_order/sharing/personal.vue
  12. +1
    -1
      store/store.js

+ 2
- 0
components/center/popupActivate.vue View File

@ -77,6 +77,8 @@
try { try {
await this.$fetch('openVip', { code: this.code }) await this.$fetch('openVip', { code: this.code })
this.$store.commit('getUserInfo')
uni.showToast({ uni.showToast({
title: '激活成功', title: '激活成功',


+ 7
- 2
pages/index/center.vue View File

@ -4,11 +4,11 @@
<navbar title="个人中心" bgColor="#001B3C" color="#FFFFFF" /> <navbar title="个人中心" bgColor="#001B3C" color="#FFFFFF" />
<view class="head"> <view class="head">
<view class="headImage">
<view class="headImage" @click="goToEditUserInfo">
<image :src="userInfo.headImage" mode=""></image> <image :src="userInfo.headImage" mode=""></image>
</view> </view>
<view class="info"> <view class="info">
<view class="name">
<view class="name" @click="goToEditUserInfo">
{{ userInfo.nickName }} {{ userInfo.nickName }}
</view> </view>
<view class="tags"> <view class="tags">
@ -192,6 +192,11 @@
url: `/pages_order/mine/news?id=${id}` url: `/pages_order/mine/news?id=${id}`
}) })
}, },
goToEditUserInfo() {
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo?mode=edit'
})
},
} }
} }
</script> </script>


+ 8
- 0
pages/index/index.vue View File

@ -21,6 +21,8 @@
<popupAuditMsg ref="popupAuditMsgRef"></popupAuditMsg> <popupAuditMsg ref="popupAuditMsgRef"></popupAuditMsg>
<popupActivate ref="popupActivate"></popupActivate>
<tabber select="home"/> <tabber select="home"/>
</view> </view>
@ -30,11 +32,13 @@
import { mapState } from 'vuex' import { mapState } from 'vuex'
import tabber from '@/components/base/tabbar.vue' import tabber from '@/components/base/tabbar.vue'
import popupAuditMsg from '@/components/home/popupAuditMsg.vue' import popupAuditMsg from '@/components/home/popupAuditMsg.vue'
import popupActivate from '@/components/center/popupActivate.vue'
export default { export default {
components : { components : {
tabber, tabber,
popupAuditMsg, popupAuditMsg,
popupActivate,
}, },
data() { data() {
return { return {
@ -98,6 +102,10 @@
return return
} }
if (!this.userInfo.isPay) {
this.$refs.popupActivate.open()
return
}
this.$utils.navigateTo(url) this.$utils.navigateTo(url)
} }
}, },


+ 8
- 0
pages/index/record.vue View File

@ -67,6 +67,8 @@
<!-- todo: empty --> <!-- todo: empty -->
</view> </view>
<popupActivate ref="popupActivate"></popupActivate>
<tabber select="record"/> <tabber select="record"/>
</view> </view>
@ -78,6 +80,7 @@
import tabber from '@/components/base/tabbar.vue' import tabber from '@/components/base/tabbar.vue'
import suspendDropdown from '@/components/base/suspendDropdown.vue' import suspendDropdown from '@/components/base/suspendDropdown.vue'
import popupActivate from '@/components/center/popupActivate.vue'
const URL_MAPPING = { // state -> url const URL_MAPPING = { // state -> url
'0': '/pages_order/record/personalSharing', '0': '/pages_order/record/personalSharing',
@ -91,6 +94,7 @@
components : { components : {
tabber, tabber,
suspendDropdown, suspendDropdown,
popupActivate,
}, },
computed : { computed : {
...mapGetters(['userShop']), ...mapGetters(['userShop']),
@ -167,6 +171,10 @@
}, },
// //
toSharingDetail(id) { toSharingDetail(id) {
if (!this.userInfo.isPay) {
this.$refs.popupActivate.open()
return
}
uni.navigateTo({ uni.navigateTo({
url: `${URL_MAPPING[this.queryParams.state]}?id=${id}` url: `${URL_MAPPING[this.queryParams.state]}?id=${id}`
}) })


+ 16
- 3
pages_order/auth/wxUserInfo.vue View File

@ -91,18 +91,23 @@
nickName: '', nickName: '',
phone : '', phone : '',
wxCode : '', wxCode : '',
}
},
mode: 'add',
}; };
}, },
computed: { computed: {
...mapState(['configList']) ...mapState(['configList'])
}, },
onShow() {}, onShow() {},
onLoad() {
onLoad(option) {
const { mode } = option || {}
this.userInfoForm.phone = this.userInfo.phone || '' this.userInfoForm.phone = this.userInfo.phone || ''
this.userInfoForm.nickName = this.userInfo.nickName || '' this.userInfoForm.nickName = this.userInfo.nickName || ''
this.userInfoForm.headImage = this.userInfo.headImage || '' this.userInfoForm.headImage = this.userInfo.headImage || ''
this.userInfoForm.wxCode = this.userInfo.wxCode || '' this.userInfoForm.wxCode = this.userInfo.wxCode || ''
this.mode = mode
}, },
computed: {}, computed: {},
methods: { methods: {
@ -144,7 +149,6 @@
if (self.$utils.verificationAll(self.userInfoForm, { if (self.$utils.verificationAll(self.userInfoForm, {
headImage: '请选择头像', headImage: '请选择头像',
nickName: '请填写昵称', nickName: '请填写昵称',
phone: '请填写手机号',
wxCode: '请填写微信号', wxCode: '请填写微信号',
})) { })) {
return return
@ -157,6 +161,15 @@
wxCode : self.userInfoForm.wxCode, wxCode : self.userInfoForm.wxCode,
}, res => { }, res => {
if (res.code == 200) { if (res.code == 200) {
if (this.mode === 'edit') {
uni.showToast({
title: '提交成功',
icon: 'none'
})
setTimeout(uni.navigateBack, 1000, -1)
return
}
uni.navigateBack({ uni.navigateBack({
delta: 2, delta: 2,
fail: () => { fail: () => {


+ 2
- 2
pages_order/mine/team.vue View File

@ -10,9 +10,9 @@
<view class="referrer-info"> <view class="referrer-info">
<view> <view>
<view class="nick-name">{{ userInfoVip.pidInfo.nickName }}</view> <view class="nick-name">{{ userInfoVip.pidInfo.nickName }}</view>
<view>{{ `ID:${userInfoVip.pidInfo.id}` }}</view>
<view>{{ `ID:${userInfoVip.pidInfo.intentionCode}` }}</view>
</view> </view>
<view>
<view v-if="userInfoVip.pidInfo.phone">
<view class="phone-label">手机号</view> <view class="phone-label">手机号</view>
<view>{{ userInfoVip.pidInfo.phone }}</view> <view>{{ userInfoVip.pidInfo.phone }}</view>
</view> </view>


+ 1
- 1
pages_order/record/articleSharing.vue View File

@ -150,7 +150,7 @@
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
userId() { userId() {
return this.form.userId || this.userInfo?.id
return this.form.userId || this.userInfo?.intentionCode
}, },
}, },
onLoad(option) { onLoad(option) {


+ 1
- 1
pages_order/record/groupSharing.vue View File

@ -208,7 +208,7 @@
computed: { computed: {
...mapState(['configList', 'userInfo']), ...mapState(['configList', 'userInfo']),
userId() { userId() {
return this.form.userId || this.userInfo?.id
return this.form.userId || this.userInfo?.intentionCode
}, },
}, },
onLoad(option) { onLoad(option) {


+ 1
- 1
pages_order/record/personalSharing.vue View File

@ -195,7 +195,7 @@
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
userId() { userId() {
return this.form.userId || this.userInfo?.id
return this.form.userId || this.userInfo?.intentionCode
}, },
disabled() { disabled() {
// todo // todo


+ 2
- 2
pages_order/sharing/group.vue View File

@ -79,12 +79,12 @@
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
const { const {
headTitle,
textDetails,
indexImage, indexImage,
} = this.detail } = this.detail
let o = { let o = {
title : headTitle,
title : textDetails,
imageUrl: indexImage, imageUrl: indexImage,
query: `id=${this.id}&state=2&shareId=${this.userInfo.id}`, query: `id=${this.id}&state=2&shareId=${this.userInfo.id}`,
} }


+ 2
- 2
pages_order/sharing/personal.vue View File

@ -79,12 +79,12 @@
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
const { const {
headTitle,
textDetails,
indexImage, indexImage,
} = this.detail } = this.detail
let o = { let o = {
title : headTitle,
title : textDetails,
imageUrl: indexImage, imageUrl: indexImage,
query: `id=${this.id}&state=0&shareId=${this.userInfo.id}`, query: `id=${this.id}&state=0&shareId=${this.userInfo.id}`,
} }


+ 1
- 1
store/store.js View File

@ -85,7 +85,7 @@ const store = new Vuex.Store({
if(!state.userInfo.nickName || !state.userInfo.headImage){ if(!state.userInfo.nickName || !state.userInfo.headImage){
uni.navigateTo({ uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
url: '/pages_order/auth/wxUserInfo?mode=add'
}) })
}else{ }else{
uni.navigateBack({ uni.navigateBack({


Loading…
Cancel
Save