|
@@ -16,6 +16,7 @@
|
|
|
console.log('++++++++++登录返回了++++++++++++++++', res)
|
|
console.log('++++++++++登录返回了++++++++++++++++', res)
|
|
|
uni.setStorageSync('userInfo', res.data.data.userInfo)
|
|
uni.setStorageSync('userInfo', res.data.data.userInfo)
|
|
|
uni.setStorageSync('accessToken', res.data.data.access_token)
|
|
uni.setStorageSync('accessToken', res.data.data.access_token)
|
|
|
|
|
+ let isNew = res.data.data.isNew
|
|
|
uni.removeStorageSync('parent_member_id');
|
|
uni.removeStorageSync('parent_member_id');
|
|
|
|
|
|
|
|
|
|
|
|
@@ -39,18 +40,24 @@
|
|
|
console.log('获取到的拓客端参数',expandParam)
|
|
console.log('获取到的拓客端参数',expandParam)
|
|
|
if (new Date().getTime() <= expandParam.timestamp){
|
|
if (new Date().getTime() <= expandParam.timestamp){
|
|
|
|
|
|
|
|
- //用户扫码拓客端进入小程序
|
|
|
|
|
- that.$api.userBindMember(
|
|
|
|
|
- {
|
|
|
|
|
- ...expandParam,
|
|
|
|
|
- memberId: res.data.data.userInfo.id
|
|
|
|
|
- }
|
|
|
|
|
- ).then(res1 => {
|
|
|
|
|
- console.log('拓客端推广用户绑定成功!')
|
|
|
|
|
- uni.removeStorageSync('expandParam');
|
|
|
|
|
- }).catch(err=>{
|
|
|
|
|
|
|
+ if (isNew){
|
|
|
|
|
+ //用户扫码拓客端进入小程序
|
|
|
|
|
+ that.$api.userBindMember(
|
|
|
|
|
+ {
|
|
|
|
|
+ ...expandParam,
|
|
|
|
|
+ memberId: res.data.data.userInfo.id
|
|
|
|
|
+ }
|
|
|
|
|
+ ).then(res1 => {
|
|
|
|
|
+ console.log('拓客端推广用户绑定成功!')
|
|
|
|
|
+ uni.removeStorageSync('expandParam');
|
|
|
|
|
+ }).catch(err=>{
|
|
|
|
|
+ uni.removeStorageSync('expandParam');
|
|
|
|
|
+ })
|
|
|
|
|
+ }else {
|
|
|
|
|
+ console.log("老用户,删除拓客端携带的参数")
|
|
|
uni.removeStorageSync('expandParam');
|
|
uni.removeStorageSync('expandParam');
|
|
|
- })
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}else {
|
|
}else {
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: '温馨提示',
|
|
title: '温馨提示',
|