|
@@ -63,7 +63,10 @@
|
|
</view>
|
|
</view>
|
|
<!-- 订单状态区域END -->
|
|
<!-- 订单状态区域END -->
|
|
<!-- 帮机构下单 -->
|
|
<!-- 帮机构下单 -->
|
|
- <view class="place-order" @click="navigator(`/pages/user/club/club-list?id=${organizeId}`)">
|
|
|
|
|
|
+ <view
|
|
|
|
+ class="place-order"
|
|
|
|
+ @click="navigator(`/pages/user/club/club-list?id=${organizeId}`)"
|
|
|
|
+ >
|
|
<view class="place-left">
|
|
<view class="place-left">
|
|
<text class="iconfont icon-bangjigouxiadan"></text>
|
|
<text class="iconfont icon-bangjigouxiadan"></text>
|
|
<text class="title">帮机构下单</text>
|
|
<text class="title">帮机构下单</text>
|
|
@@ -109,14 +112,14 @@ export default {
|
|
waitShipmentsCount: 0, //待收货角标
|
|
waitShipmentsCount: 0, //待收货角标
|
|
shipmentsCount: 0, //已发货角标
|
|
shipmentsCount: 0, //已发货角标
|
|
salesReturnCount: '', //退货/款角标
|
|
salesReturnCount: '', //退货/款角标
|
|
- organizeId:''
|
|
|
|
|
|
+ organizeId: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
authorize.getSetting().then(res => {
|
|
authorize.getSetting().then(res => {
|
|
//0:为取消授权 1:为已授权 2:为未操作
|
|
//0:为取消授权 1:为已授权 2:为未操作
|
|
if (res == 1) {
|
|
if (res == 1) {
|
|
- this.getWxAuthorize()
|
|
|
|
|
|
+ this.GetWxAuthorize()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -125,11 +128,8 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapMutations(['login', 'logout']),
|
|
...mapMutations(['login', 'logout']),
|
|
- // 获取用户信息
|
|
|
|
- async getWxAuthorize() {
|
|
|
|
- // const wechatCode = await
|
|
|
|
|
|
+ async GetWxAuthorize() {
|
|
const wechatCode = await authorize.getCode('weixin')
|
|
const wechatCode = await authorize.getCode('weixin')
|
|
- // 初始化用户状态
|
|
|
|
this.UserService.userInfoLogin({ code: wechatCode })
|
|
this.UserService.userInfoLogin({ code: wechatCode })
|
|
.then(response => {
|
|
.then(response => {
|
|
// 保存登录信息
|
|
// 保存登录信息
|
|
@@ -147,6 +147,19 @@ export default {
|
|
})
|
|
})
|
|
this.logout()
|
|
this.logout()
|
|
})
|
|
})
|
|
|
|
+ this.UserService.userInfoLogin({ code: wechatCode })
|
|
|
|
+ .then(response => {
|
|
|
|
+ this.login(response.data)
|
|
|
|
+ this.$store.commit('updateStatus', response.data)
|
|
|
|
+ this.GetUserInfoPersonal(response.data.organizeId)
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ uni.setStorage({
|
|
|
|
+ //缓存游客用户openid
|
|
|
|
+ key: 'openid',
|
|
|
|
+ data: error.data.openid
|
|
|
|
+ })
|
|
|
|
+ })
|
|
},
|
|
},
|
|
getUserInfoPersonal(organizeId) {
|
|
getUserInfoPersonal(organizeId) {
|
|
//初始化个人中心数据
|
|
//初始化个人中心数据
|
|
@@ -163,7 +176,6 @@ export default {
|
|
this.$util.msg(error.msg, 2000)
|
|
this.$util.msg(error.msg, 2000)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 客服
|
|
|
|
handleContact(e) {
|
|
handleContact(e) {
|
|
console.log(e.detail.path)
|
|
console.log(e.detail.path)
|
|
console.log(e.detail.query)
|
|
console.log(e.detail.query)
|
|
@@ -204,15 +216,15 @@ export default {
|
|
num = n
|
|
num = n
|
|
}
|
|
}
|
|
return num
|
|
return num
|
|
- }
|
|
|
|
- },
|
|
|
|
- onPullDownRefresh() {
|
|
|
|
- //下拉刷新
|
|
|
|
- if (this.hasLogin) {
|
|
|
|
- this.getWxAuthorize()
|
|
|
|
- uni.stopPullDownRefresh()
|
|
|
|
- } else {
|
|
|
|
- uni.stopPullDownRefresh()
|
|
|
|
|
|
+ },
|
|
|
|
+ onPullDownRefresh() {
|
|
|
|
+ //下拉刷新
|
|
|
|
+ if (this.hasLogin) {
|
|
|
|
+ this.GetWxAuthorize()
|
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
|
+ } else {
|
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|