|
@@ -9,16 +9,21 @@ Page({ |
|
@@ -9,16 +9,21 @@ Page({ |
|
9
|
*/
|
9
|
*/
|
|
10
|
data: {
|
10
|
data: {
|
|
11
|
hasSellerBook:false,
|
11
|
hasSellerBook:false,
|
|
|
|
12
|
+ hasManagerInvitation:false,
|
|
12
|
},
|
13
|
},
|
|
13
|
/**
|
14
|
/**
|
|
14
|
* 生命周期函数--监听页面加载
|
15
|
* 生命周期函数--监听页面加载
|
|
15
|
*/
|
16
|
*/
|
|
16
|
onLoad: function (options) {
|
17
|
onLoad: function (options) {
|
|
17
|
- App.Reserve.SellerForOpenid({openid:getApp().openid}).then(res=>{
|
|
|
|
18
|
- if(res.data && res.data.seller_id) {
|
18
|
+ App.Invitation.UserIdentity({openid:getApp().openid}).then(res=>{
|
|
|
|
19
|
+ if(res.data.identity==1) {//商户
|
|
19
|
this.setData({
|
20
|
this.setData({
|
|
20
|
hasSellerBook: res.data,
|
21
|
hasSellerBook: res.data,
|
|
21
|
})
|
22
|
})
|
|
|
|
23
|
+ }else if(res.data.identity==2){//客户经理
|
|
|
|
24
|
+ this.setData({
|
|
|
|
25
|
+ hasManagerInvitation: true,
|
|
|
|
26
|
+ })
|
|
22
|
}
|
27
|
}
|
|
23
|
})
|
28
|
})
|
|
24
|
},
|
29
|
},
|