Commit 81667ca6e61552056d1f99d1a16fdd9d2e4156f4

Authored by wangfan
1 parent cb89bfbc

manager-invitation

... ... @@ -9,16 +9,21 @@ Page({
*/
data: {
hasSellerBook:false,
hasManagerInvitation:false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
App.Reserve.SellerForOpenid({openid:getApp().openid}).then(res=>{
if(res.data && res.data.seller_id) {
App.Invitation.UserIdentity({openid:getApp().openid}).then(res=>{
if(res.data.identity==1) {//商户
this.setData({
hasSellerBook: res.data,
})
}else if(res.data.identity==2){//客户经理
this.setData({
hasManagerInvitation: true,
})
}
})
},
... ...
... ... @@ -39,5 +39,13 @@
</view>
</view>
</formids>
<formids bindclick="gotoSellerBook" wx:if="{{hasManagerInvitation}}">
<view class="item flex-lr">
<view class="left">切换到客户经理</view>
<view class="right">
<image src="http://qn.colorcun.com/custom/lite-yd/image/click.png"></image>
</view>
</view>
</formids>
</view>
</view>
... ...