Commit 81667ca6e61552056d1f99d1a16fdd9d2e4156f4

Authored by wangfan
1 parent cb89bfbc

manager-invitation

@@ -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 },
@@ -39,5 +39,13 @@ @@ -39,5 +39,13 @@
39 </view> 39 </view>
40 </view> 40 </view>
41 </formids> 41 </formids>
  42 + <formids bindclick="gotoSellerBook" wx:if="{{hasManagerInvitation}}">
  43 + <view class="item flex-lr">
  44 + <view class="left">切换到客户经理</view>
  45 + <view class="right">
  46 + <image src="http://qn.colorcun.com/custom/lite-yd/image/click.png"></image>
  47 + </view>
  48 + </view>
  49 + </formids>
42 </view> 50 </view>
43 </view> 51 </view>