Commit 1e666e8cb8a6a94574761652e6b8781a9dd6faea
1 parent
da80e8bf
瘦身日记的优化
Showing
3 changed files
with
44 additions
and
5 deletions
pages/user/index/filter.wxs
pages/user/index/index.js
| ... | ... | @@ -42,13 +42,15 @@ Page({ |
| 42 | 42 | actId: "", //生日活动的id |
| 43 | 43 | actImg: "", |
| 44 | 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 | 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 | 56 | goto_nav: function (e) { |
| ... | ... | @@ -176,6 +178,34 @@ Page({ |
| 176 | 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 | 210 | getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => { |
| 181 | 211 | if (res.data.code == 0) { | ... | ... |
pages/user/index/index.wxml
| ... | ... | @@ -252,6 +252,14 @@ |
| 252 | 252 | <view class="fs26">套盒商品</view> |
| 253 | 253 | </view> |
| 254 | 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 | 263 | <block wx:else> |
| 256 | 264 | <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> |
| 257 | 265 | <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image> | ... | ... |