Commit 1bd39260c83af70eff0f20fbb2410d4d502aa6b2
1 parent
e2e52d8f
非分销会员异常情况提示
Showing
2 changed files
with
49 additions
and
35 deletions
pages/distribution/distribution.js
| @@ -50,7 +50,7 @@ Page({ | @@ -50,7 +50,7 @@ Page({ | ||
| 50 | app.request.get(url + '/' + this.data.userInfo.store_id + '/' + this.data.userInfo.user_id, { | 50 | app.request.get(url + '/' + this.data.userInfo.store_id + '/' + this.data.userInfo.user_id, { |
| 51 | success: function(res) { | 51 | success: function(res) { |
| 52 | console.log('success~~`', self.data.userInfo); | 52 | console.log('success~~`', self.data.userInfo); |
| 53 | - if(res.data.code == 0){ | 53 | + if(res.data.code == 0) { |
| 54 | 54 | ||
| 55 | self.setData({ | 55 | self.setData({ |
| 56 | data: res.data.data, | 56 | data: res.data.data, |
| @@ -68,9 +68,16 @@ Page({ | @@ -68,9 +68,16 @@ Page({ | ||
| 68 | isShowLoading: true, | 68 | isShowLoading: true, |
| 69 | }).then(function(res) { | 69 | }).then(function(res) { |
| 70 | console.log('!!!===>', res); | 70 | console.log('!!!===>', res); |
| 71 | - self.setData({ | ||
| 72 | - fenxiao: res.data.data, | ||
| 73 | - }); | 71 | + if(res.data.code == 0) { |
| 72 | + self.setData({ | ||
| 73 | + fenxiao: res.data.data, | ||
| 74 | + }); | ||
| 75 | + } else { | ||
| 76 | + self.setData({ | ||
| 77 | + msg: res.data.msg, | ||
| 78 | + }); | ||
| 79 | + } | ||
| 80 | + | ||
| 74 | }); | 81 | }); |
| 75 | 82 | ||
| 76 | // }; | 83 | // }; |
pages/distribution/distribution.wxml
| @@ -72,44 +72,51 @@ | @@ -72,44 +72,51 @@ | ||
| 72 | <!-- 分销商验证 --> | 72 | <!-- 分销商验证 --> |
| 73 | <!-- <view class="popup" wx:if="{{!1}}"> --> | 73 | <!-- <view class="popup" wx:if="{{!1}}"> --> |
| 74 | <view class="popup" wx:if="{{!data.is_distribut}}"> | 74 | <view class="popup" wx:if="{{!data.is_distribut}}"> |
| 75 | - <view class="t-c pd20 title">分销规则说明<text class="iconfont icon-close" bindtap="goto" data-url="/pages/user/index/index"></text></view> | ||
| 76 | - <!-- <view class="t-c pd20 title">分销规则说明</view> --> | ||
| 77 | - <view wx:if="{{fenxiao}}"> | ||
| 78 | - <block wx:for="{{fenxiao}}"> | ||
| 79 | - <view class="item" wx:if="{{item.type == 1}}"> | ||
| 80 | - <view class="left f1"> | ||
| 81 | - <view class="icon-container"><text class="iconfont icon-huiyuan1"></text></view> | ||
| 82 | - <view>仅限PLUS卡({{item.conditonRemark}})的会员, <text class="c-red" bindtap="goto" data-url="/pages/user/cardinfo/cardinfo">立即升级</text></view> | 75 | + <block wx:if="{{msg}}"> |
| 76 | + <view class="t-c pd20 title">提示<text class="iconfont icon-close" bindtap="goto" data-url="/pages/user/index/index"></text></view> | ||
| 77 | + <view class="t-c pd20">{{msg}}</view> | ||
| 78 | + </block> | ||
| 79 | + <block wx:else> | ||
| 80 | + <view class="t-c pd20 title">分销规则说明<text class="iconfont icon-close" bindtap="goto" data-url="/pages/user/index/index"></text></view> | ||
| 81 | + <view wx:if="{{fenxiao}}"> | ||
| 82 | + <block wx:for="{{fenxiao}}"> | ||
| 83 | + <view class="item" wx:if="{{item.type == 1}}"> | ||
| 84 | + <view class="left f1"> | ||
| 85 | + <view class="icon-container"><text class="iconfont icon-huiyuan1"></text></view> | ||
| 86 | + <view>仅限PLUS卡({{item.conditonRemark}})的会员, <text class="c-red" bindtap="goto" data-url="/pages/user/cardinfo/cardinfo">立即升级</text></view> | ||
| 87 | + </view> | ||
| 88 | + <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text> | ||
| 83 | </view> | 89 | </view> |
| 84 | - <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text> | ||
| 85 | - </view> | ||
| 86 | - <view class="item" wx:if="{{item.type == 2}}"> | ||
| 87 | - <view class="left f1"> | ||
| 88 | - <view class="icon-container"><text class="iconfont icon-renzheng"></text></view> | ||
| 89 | - <view class="flex ali-c"> | ||
| 90 | - <input class="bg-f0 pdh10 input" type="number" value="{{item.inviter ? item.inviter:''}}" placeholder="请输入推荐人手机号码" disabled="{{item.pass}}" bindinput="getInput"/> | ||
| 91 | - <view class="verify" wx:if="{{!item.pass}}" bindtap="verify" data-pass="{{item.pass}}">验证</view> | 90 | + <view class="item" wx:if="{{item.type == 2}}"> |
| 91 | + <view class="left f1"> | ||
| 92 | + <view class="icon-container"><text class="iconfont icon-renzheng"></text></view> | ||
| 93 | + <view class="flex ali-c"> | ||
| 94 | + <input class="bg-f0 pdh10 input" type="number" value="{{item.inviter ? item.inviter:''}}" placeholder="请输入推荐人手机号码" disabled="{{item.pass}}" bindinput="getInput"/> | ||
| 95 | + <view class="verify" wx:if="{{!item.pass}}" bindtap="verify" data-pass="{{item.pass}}">验证</view> | ||
| 96 | + </view> | ||
| 92 | </view> | 97 | </view> |
| 98 | + <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text> | ||
| 93 | </view> | 99 | </view> |
| 94 | - <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text> | ||
| 95 | - </view> | ||
| 96 | - <view class="item" wx:if="{{item.type == 3}}"> | 100 | + <view class="item" wx:if="{{item.type == 3}}"> |
| 101 | + <view class="left f1"> | ||
| 102 | + <view class="icon-container"><text class="iconfont icon-gouwu"></text></view> | ||
| 103 | + <text>{{item.conditonRemark}}</text> | ||
| 104 | + </view> | ||
| 105 | + <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text> | ||
| 106 | + </view> | ||
| 107 | + </block> | ||
| 108 | + <view class="item" data-url="1"> | ||
| 97 | <view class="left f1"> | 109 | <view class="left f1"> |
| 98 | - <view class="icon-container"><text class="iconfont icon-gouwu"></text></view> | ||
| 99 | - <text>{{item.conditonRemark}}</text> | 110 | + <view class="icon-container"><text class="iconfont icon-yongjin"></text></view> |
| 111 | + <text>成功成为分销商,分享商品给好友即可获得相应收益</text> | ||
| 100 | </view> | 112 | </view> |
| 101 | - <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text> | ||
| 102 | - </view> | ||
| 103 | - </block> | ||
| 104 | - <view class="item" data-url="1"> | ||
| 105 | - <view class="left f1"> | ||
| 106 | - <view class="icon-container"><text class="iconfont icon-yongjin"></text></view> | ||
| 107 | - <text>成功成为分销商,分享商品给好友即可获得相应收益</text> | ||
| 108 | </view> | 113 | </view> |
| 114 | + | ||
| 115 | + <view class="t-c pd20 fs30 bdt co-red bold" bindtap="goto" data-url="/pages/index/index/index">去购买</view> | ||
| 109 | </view> | 116 | </view> |
| 110 | - | ||
| 111 | - </view> | ||
| 112 | - <view class="t-c pd20 fs30 bdt co-red bold" bindtap="goto" data-url="/pages/index/index/index">去购买</view> | 117 | + </block> |
| 118 | + | ||
| 119 | + | ||
| 113 | <!-- <view class="t-c pd20 fs30 bdt co-red bold">确定</view> --> | 120 | <!-- <view class="t-c pd20 fs30 bdt co-red bold">确定</view> --> |
| 114 | </view> | 121 | </view> |
| 115 | <!-- 遮罩 --> | 122 | <!-- 遮罩 --> |