|
|
@@ -35,16 +35,36 @@
|
|
|
//拓客端或者技师端扫码用户绑定
|
|
|
let expandParam = uni.getStorageSync('expandParam')
|
|
|
if (expandParam) {
|
|
|
- //用户扫码拓客端进入小程序
|
|
|
- that.$api.userBindMember(
|
|
|
- {
|
|
|
- ...expandParam,
|
|
|
- memberId: res.data.data.userInfo.id
|
|
|
- }
|
|
|
- ).then(res1 => {
|
|
|
- console.log('拓客端推广用户绑定成功!')
|
|
|
+
|
|
|
+ console.log('获取到的拓客端参数',expandParam)
|
|
|
+ if (new Date().getTime() <= expandParam.timestamp){
|
|
|
+
|
|
|
+ //用户扫码拓客端进入小程序
|
|
|
+ that.$api.userBindMember(
|
|
|
+ {
|
|
|
+ ...expandParam,
|
|
|
+ memberId: res.data.data.userInfo.id
|
|
|
+ }
|
|
|
+ ).then(res1 => {
|
|
|
+ console.log('拓客端推广用户绑定成功!')
|
|
|
+ uni.removeStorageSync('expandParam');
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ uni.showModal({
|
|
|
+ title: '温馨提示',
|
|
|
+ content: ' 当前二维码已过期,请重新扫码',
|
|
|
+ showCancel:false,
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ console.log('用户点击确定');
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
uni.removeStorageSync('expandParam');
|
|
|
- })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//用户扫码技师端进入小程序 暂无操作
|