|
...
|
...
|
@@ -17,6 +17,7 @@ Page({ |
|
|
|
*/
|
|
|
|
islove:'',//用户在哪端
|
|
|
|
enter_params:'',//商户入口参数
|
|
|
|
isInvitation:false,//客户经理
|
|
|
|
async onLoad(opt) {
|
|
|
|
console.log('onLoad', opt,mta);
|
|
|
|
//转化场景值到opt
|
|
...
|
...
|
@@ -50,18 +51,13 @@ Page({ |
|
|
|
this.islove=await util.cache('islove')
|
|
|
|
}
|
|
|
|
let usi=await App.Invitation.UserIdentity({openid:opt.openid});
|
|
|
|
if(usi.data.identity==1){//商户
|
|
|
|
if(usi.data.seller.flag){//商户
|
|
|
|
//获得商户数据
|
|
|
|
//this.enter_params=await this.SellerForOpenid(opt.openid);
|
|
|
|
this.enter_params=usi.data.data;
|
|
|
|
}
|
|
|
|
if(usi.data.invitation.flag){//已是客户经理
|
|
|
|
if(this.islove=='invitation'){
|
|
|
|
wx.redirectTo({
|
|
|
|
url:'/pages/manager-invitation/review'
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.isInvitation=true;
|
|
|
|
}
|
|
|
|
//console.log('this.enter_params',this.enter_params)
|
|
|
|
let url = '/pages/reserve/index';
|
|
...
|
...
|
@@ -123,13 +119,20 @@ Page({ |
|
|
|
this.redirectTo({url: url});
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
if(this.enter_params && this.islove!='customer'){
|
|
|
|
//商户且未手动切换到顾客端
|
|
|
|
if(this.enter_params && this.islove!='customer' && this.islove!='invitation'){
|
|
|
|
//商户且未手动切换到顾客端或客户经理
|
|
|
|
wx.reLaunch({
|
|
|
|
url:util.http_build_query(this.enter_params,'/pages/book/b_index')
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(this.isInvitation && this.islove!='customer' && this.islove!='book'){
|
|
|
|
//客户经理且未手动切换到顾客端或商户
|
|
|
|
wx.reLaunch({
|
|
|
|
url:'/pages/manager-invitation/review'
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
console.log('url',url);
|
|
|
|
this.redirectTo({url: url});
|
|
|
|
}
|
...
|
...
|
|