Commit 1e666e8cb8a6a94574761652e6b8781a9dd6faea
1 parent
da80e8bf
瘦身日记的优化
Showing
3 changed files
with
44 additions
and
5 deletions
pages/user/index/filter.wxs
| @@ -22,6 +22,7 @@ var is_close = function (name,c_list) { | @@ -22,6 +22,7 @@ var is_close = function (name,c_list) { | ||
| 22 | map['AI测肤']="20"; | 22 | map['AI测肤']="20"; |
| 23 | map['附近门店']="21"; | 23 | map['附近门店']="21"; |
| 24 | map['积分签到']="22"; | 24 | map['积分签到']="22"; |
| 25 | + map['瘦身日记']="23"; | ||
| 25 | var index=map[name]; | 26 | var index=map[name]; |
| 26 | 27 | ||
| 27 | //我的权益要判断5,和11 | 28 | //我的权益要判断5,和11 |
pages/user/index/index.js
| @@ -42,13 +42,15 @@ Page({ | @@ -42,13 +42,15 @@ Page({ | ||
| 42 | actId: "", //生日活动的id | 42 | actId: "", //生日活动的id |
| 43 | actImg: "", | 43 | actImg: "", |
| 44 | is_assistance: 0, //助力活动 | 44 | is_assistance: 0, //助力活动 |
| 45 | - ad_img: "", | ||
| 46 | - usertop_ad: [],//会员顶部配置 | ||
| 47 | - add_card_data: '', //等级卡的内容 | ||
| 48 | - getusercode_vailtime:10,//会员二维码时效 | 45 | + ad_img: "", |
| 46 | + usertop_ad: [],//会员顶部配置 | ||
| 47 | + add_card_data: '', //等级卡的内容 | ||
| 48 | + getusercode_vailtime:10,//会员二维码时效 | ||
| 49 | hiddenCS: true, | 49 | hiddenCS: true, |
| 50 | 50 | ||
| 51 | - is_show_recommend:false | 51 | + is_show_recommend:false, |
| 52 | + | ||
| 53 | + has_rj:0 | ||
| 52 | 54 | ||
| 53 | }, | 55 | }, |
| 54 | goto_nav: function (e) { | 56 | goto_nav: function (e) { |
| @@ -176,6 +178,34 @@ Page({ | @@ -176,6 +178,34 @@ Page({ | ||
| 176 | if (e != undefined && e != null && e.mobile) { | 178 | if (e != undefined && e != null && e.mobile) { |
| 177 | 179 | ||
| 178 | 180 | ||
| 181 | + if(this.data.has_rj==0){ | ||
| 182 | + var portrait_req = { | ||
| 183 | + ApiName:'api.slimming.member.portrait', | ||
| 184 | + store_id: e.store_id, | ||
| 185 | + //StaffId: that.idd, | ||
| 186 | + vipid: e.erpvipid, | ||
| 187 | + }; | ||
| 188 | + | ||
| 189 | + | ||
| 190 | + var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid; | ||
| 191 | + getApp().request.promiseGet(url, { | ||
| 192 | + data: portrait_req | ||
| 193 | + }) | ||
| 194 | + .then((res) => { | ||
| 195 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | ||
| 196 | + this.setData({has_rj:1}) | ||
| 197 | + }else { | ||
| 198 | + this.setData({has_rj:-1}) | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + }) | ||
| 202 | + | ||
| 203 | + | ||
| 204 | + | ||
| 205 | + | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + | ||
| 179 | // 判断是否开启美业 | 209 | // 判断是否开启美业 |
| 180 | getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => { | 210 | getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => { |
| 181 | if (res.data.code == 0) { | 211 | if (res.data.code == 0) { |
pages/user/index/index.wxml
| @@ -252,6 +252,14 @@ | @@ -252,6 +252,14 @@ | ||
| 252 | <view class="fs26">套盒商品</view> | 252 | <view class="fs26">套盒商品</view> |
| 253 | </view> | 253 | </view> |
| 254 | </block> | 254 | </block> |
| 255 | + <block wx:elif="{{item.name=='瘦身日记'}} "> | ||
| 256 | + <view wx:if="{{has_rj>0}}" class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> | ||
| 257 | + <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image> | ||
| 258 | + <view class="fs26">{{item.name}}</view> | ||
| 259 | + </view> | ||
| 260 | + </block> | ||
| 261 | + | ||
| 262 | + | ||
| 255 | <block wx:else> | 263 | <block wx:else> |
| 256 | <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> | 264 | <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> |
| 257 | <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image> | 265 | <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image> |