|
@@ -275,7 +275,7 @@ export default {
|
|
|
console.log('7777777777777777777777777777777',scene)
|
|
console.log('7777777777777777777777777777777',scene)
|
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
|
let userInfo = uni.getStorageSync('userInfo');
|
|
let userInfo = uni.getStorageSync('userInfo');
|
|
|
- this.updateMemberMsg(userInfo.otherId,scene);
|
|
|
|
|
|
|
+ this.scanCode(userInfo.otherId,scene);
|
|
|
},5000)
|
|
},5000)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -306,32 +306,16 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
|
|
- updateMemberMsg(otherId,reference){
|
|
|
|
|
- this.$api.updateMemberMsg({
|
|
|
|
|
|
|
+ scanCode(otherId,memberId){
|
|
|
|
|
+ this.$api.scanCode({
|
|
|
openId:otherId,
|
|
openId:otherId,
|
|
|
- reference:reference
|
|
|
|
|
|
|
+ memberId:memberId
|
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
|
console.log('用户绑定成功')
|
|
console.log('用户绑定成功')
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- scanCode(memberId){
|
|
|
|
|
- setTimeout(res=>{
|
|
|
|
|
- this.$api.scanCode({
|
|
|
|
|
- openId:this.userInfo.otherId,
|
|
|
|
|
- memberId:memberId
|
|
|
|
|
- }).then(res=>{
|
|
|
|
|
- console.log('++++++++++++++用户绑定结果+++++++++++++++',res)
|
|
|
|
|
- })
|
|
|
|
|
- },5000)
|
|
|
|
|
|
|
|
|
|
- // scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
|
|
|
|
|
- // 小程序码方式
|
|
|
|
|
- if (memberId){
|
|
|
|
|
- //写入缓存
|
|
|
|
|
- uni.setStorageSync('parent_member_id', memberId);
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
goRights(){
|
|
goRights(){
|
|
@@ -342,12 +326,46 @@ export default {
|
|
|
|
|
|
|
|
// 去服务点单页面
|
|
// 去服务点单页面
|
|
|
gotoServiceOrder() {
|
|
gotoServiceOrder() {
|
|
|
|
|
+
|
|
|
|
|
+ this.userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
+ if (!this.userInfo.phone){
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title:'温馨提示',
|
|
|
|
|
+ content:'请绑定手机号,以便为你提供服务',
|
|
|
|
|
+ success:res=>{
|
|
|
|
|
+ if (res.confirm){
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/myPages/setting/setting-telphone',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: '/orderPages/storeService/index'
|
|
url: '/orderPages/storeService/index'
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
goBookService() {
|
|
goBookService() {
|
|
|
|
|
+
|
|
|
|
|
+ this.userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
+ if (!this.userInfo.phone){
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title:'温馨提示',
|
|
|
|
|
+ content:'请绑定手机号,以便为你提供服务',
|
|
|
|
|
+ success:res=>{
|
|
|
|
|
+ if (res.confirm){
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/myPages/setting/setting-telphone',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: '/orderPages/bookService/index'
|
|
url: '/orderPages/bookService/index'
|
|
|
})
|
|
})
|