Showing
3 changed files
with
24 additions
and
7 deletions
| @@ -49,9 +49,19 @@ Page({ | @@ -49,9 +49,19 @@ Page({ | ||
| 49 | }else{ | 49 | }else{ |
| 50 | this.islove=await util.cache('islove') | 50 | this.islove=await util.cache('islove') |
| 51 | } | 51 | } |
| 52 | - | ||
| 53 | - //获得商户数据 | ||
| 54 | - this.enter_params=await this.SellerForOpenid(opt.openid); | 52 | + let usi=await App.Invitation.UserIdentity({openid:opt.openid}); |
| 53 | + if(usi.data.identity==1){//商户 | ||
| 54 | + //获得商户数据 | ||
| 55 | + //this.enter_params=await this.SellerForOpenid(opt.openid); | ||
| 56 | + this.enter_params=usi.data.data; | ||
| 57 | + }else if(usi.data.identity==2){//客户经理 | ||
| 58 | + if(this.islove!='customer'){ | ||
| 59 | + wx.redirectTo({ | ||
| 60 | + url:'/pages/manager-invitation/review' | ||
| 61 | + }) | ||
| 62 | + return; | ||
| 63 | + } | ||
| 64 | + } | ||
| 55 | //console.log('this.enter_params',this.enter_params) | 65 | //console.log('this.enter_params',this.enter_params) |
| 56 | let url = '/pages/customer/list'; | 66 | let url = '/pages/customer/list'; |
| 57 | if (opt.id > 0 || opt.sms_code) { | 67 | if (opt.id > 0 || opt.sms_code) { |
| @@ -33,10 +33,10 @@ Page({ | @@ -33,10 +33,10 @@ Page({ | ||
| 33 | }).then(res=>{ | 33 | }).then(res=>{ |
| 34 | if(res.ret==200){ | 34 | if(res.ret==200){ |
| 35 | if(res.data.identity==1){ | 35 | if(res.data.identity==1){ |
| 36 | - // wx.reLaunch({ | ||
| 37 | - // url:'/pages/customer/index' | ||
| 38 | - // }) | ||
| 39 | - // return; | 36 | + wx.reLaunch({ |
| 37 | + url:'/pages/customer/index' | ||
| 38 | + }) | ||
| 39 | + return; | ||
| 40 | } | 40 | } |
| 41 | if(res.data.identity==2){ | 41 | if(res.data.identity==2){ |
| 42 | wx.redirectTo({ | 42 | wx.redirectTo({ |
| @@ -140,6 +140,13 @@ Page({ | @@ -140,6 +140,13 @@ Page({ | ||
| 140 | fromid:openid, | 140 | fromid:openid, |
| 141 | hasSellerShare:1, | 141 | hasSellerShare:1, |
| 142 | },'/pages/manager-invitation/display') | 142 | },'/pages/manager-invitation/display') |
| 143 | + if(!this.data.options.rid){ | ||
| 144 | + return { | ||
| 145 | + title: '一键订,客户经理专用的拓客工具', | ||
| 146 | + path: '/pages/manager-invitation/index', | ||
| 147 | + imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-anpai2.jpg', | ||
| 148 | + } | ||
| 149 | + } | ||
| 143 | return { | 150 | return { |
| 144 | title: '点击查看详情,发邀请函', | 151 | title: '点击查看详情,发邀请函', |
| 145 | path: path, | 152 | path: path, |
-
Please register or login to post a comment