Commit 4621df77015bf2efb2d835b775d3c58c4251eed8

Authored by yvan.ni
1 parent 3fe575bf

幸运大转盘的优化

packageB/pages/luckactivity/luckinfo/luckinfo.js
... ... @@ -1161,8 +1161,7 @@ Page({
1161 1161 // 'list.pageData': this.data.record,
1162 1162 // // record: self.data.list.pageData,
1163 1163 // });
1164   -
1165   -
  1164 +
1166 1165 },
1167 1166  
1168 1167 closePopup() {
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
... ... @@ -187,7 +187,6 @@
187 187 </view>
188 188 </view>
189 189  
190   -
191 190 <!-- 海报 -->
192 191 <view class="poster-container" wx:if="{{showPoster}}">
193 192 <view class="t-r pdb20 white2"><text class="iconfont icon-close fs40" bindtap="closePoster"></text></view>
... ...
pages/user/index/index.js
... ... @@ -47,6 +47,9 @@ Page({
47 47 add_card_data: '', //等级卡的内容
48 48 getusercode_vailtime:10,//会员二维码时效
49 49 hiddenCS: true,
  50 +
  51 + is_show_recommend:false
  52 +
50 53 },
51 54 goto_nav: function (e) {
52 55 var th = this;
... ... @@ -152,24 +155,7 @@ Page({
152 155 })
153 156 var th = this;
154 157  
155   - // 判断是否开启美业
156   - getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => {
157   - if (res.data.code == 0) {
158   - th.setData({
159   - enableMeiye: res.data.data.EnableMeiye,
160   - });
161   - };
162   - });
163   -
164 158  
165   - getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + os.stoid, {}).then(res => {
166   - if (res.data.code == 0) {
167   - var plusCard = res.data.data;
168   - for (var i = 0; i < plusCard.length; i++) {
169   - if (!plusCard[i].IsStopBuy) { th.setData({ show_buy_plus: 1 }); break; }
170   - }
171   - }
172   - })
173 159  
174 160 if (typeof this.getTabBar === 'function' && this.getTabBar()) {
175 161 var index = getApp().getPageIndex(this);
... ... @@ -189,6 +175,26 @@ Page({
189 175 var e = getApp().globalData.userInfo;
190 176 if (e != undefined && e != null && e.mobile) {
191 177  
  178 +
  179 + // 判断是否开启美业
  180 + getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => {
  181 + if (res.data.code == 0) {
  182 + th.setData({
  183 + enableMeiye: res.data.data.EnableMeiye,
  184 + });
  185 + };
  186 + });
  187 +
  188 + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + os.stoid, {}).then(res => {
  189 + if (res.data.code == 0) {
  190 + var plusCard = res.data.data;
  191 + for (var i = 0; i < plusCard.length; i++) {
  192 + if (!plusCard[i].IsStopBuy) { th.setData({ show_buy_plus: 1 }); break; }
  193 + }
  194 + }
  195 + })
  196 +
  197 +
192 198 this.birthday();
193 199 this.is_assistance();
194 200  
... ... @@ -451,15 +457,22 @@ Page({
451 457 }
452 458 })
453 459 //th.requestRecommend();
  460 +
  461 + //自定义组件一定要等到页面加载完了,才来调用selectComponnent
  462 + setTimeout(function () {
  463 +
  464 + th.setData({ is_show_recommend:true })
  465 +
  466 + if (getApp().globalData.user_id) getApp().requestCardNum(th);
  467 + var goods_list = th.selectComponent("#goods_recommend"); //组件的id
  468 + goods_list.init();
  469 + goods_list.get_list();
  470 + }, 800)
454 471 }
455 472  
456   - //自定义组件一定要等到页面加载完了,才来调用selectComponnent
457   - setTimeout(function () {
458   - if (getApp().globalData.user_id) getApp().requestCardNum(th);
459   - var goods_list = th.selectComponent("#goods_recommend"); //组件的id
460   - goods_list.init();
461   - goods_list.get_list();
462   - }, 800)
  473 +
  474 +
  475 +
463 476 },
464 477  
465 478 //判断会员是后有改服务项目
... ... @@ -498,11 +511,14 @@ Page({
498 511 */
499 512 onReachBottom: function () {
500 513 //!this.nomore && this.requestRecommend();
501   - var goods_list = this.selectComponent("#goods_recommend"); //组件的id
502   - goods_list.init();
503   - setTimeout(function () {
504   - goods_list.get_list();
505   - }, 300)
  514 + var e = getApp().globalData.userInfo;
  515 + if (e != undefined && e != null && e.mobile) {
  516 + var goods_list = this.selectComponent("#goods_recommend"); //组件的id
  517 + goods_list.init();
  518 + setTimeout(function () {
  519 + goods_list.get_list();
  520 + }, 300)
  521 + }
506 522 },
507 523  
508 524 /**
... ...
pages/user/index/index.wxml
... ... @@ -296,7 +296,9 @@
296 296  
297 297 </view>
298 298 </view>
299   - <view style='width:100%;height:73rpx;'>
  299 +
  300 + <!-- 显示推荐 -->
  301 + <view style='width:100%;height:73rpx;' wx:if="{{is_show_recommend}}">
300 302 <view class="xc-recommend-goods flex-center">
301 303  
302 304 <view class="circle xc-small">
... ... @@ -318,7 +320,9 @@
318 320  
319 321 <!-- 显示商品 -->
320 322 <!-- 好物推荐 -->
  323 + <block wx:if="{{is_show_recommend}}">
321 324 <goods_recommend id="goods_recommend"></goods_recommend>
  325 + </block>
322 326  
323 327 <!-- 技术支持 -->
324 328 <view class="logo-container t-c">
... ...