Commit b03a4dc6361869c7bdeb89f59676bc1cc89ca7f3
1 parent
bfc2f423
oa单优化
Showing
28 changed files
with
150 additions
and
120 deletions
app.js
... | ... | @@ -430,16 +430,8 @@ App({ |
430 | 430 | //获取场景值 判断是否是单页面 |
431 | 431 | is_Single_page() { |
432 | 432 | let scene = wx.getLaunchOptionsSync().scene; |
433 | - //--先判断会员状态-- | |
434 | - if (scene == 1154) { | |
435 | - wx.showToast({ | |
436 | - title: '请前往小程序', | |
437 | - icon: "error", | |
438 | - duration: 3000, | |
439 | - }) | |
440 | - return false | |
441 | - } | |
442 | - return true; | |
433 | + //--判断是否是单页面-- | |
434 | + return scene == 1154? false:true; | |
443 | 435 | }, |
444 | 436 | |
445 | 437 | ... | ... |
packageA/pages/jfbuy/jfbuy.js
packageA/pages/liveStream/liveStream.js
... | ... | @@ -208,17 +208,15 @@ Page({ |
208 | 208 | * 生命周期函数--监听页面加载 |
209 | 209 | */ |
210 | 210 | onLoad: function (options) { |
211 | - if(!getApp().is_Single_page()){ | |
212 | - return false; | |
213 | - } | |
214 | 211 | self = this; |
215 | - // console.log('ppppp',this.pageTotal(4, 10)); | |
212 | + if(getApp().is_Single_page()){ | |
213 | + app.isLogin().then(function(data) {//进入页面前已经授权登录成功 | |
214 | + self.setData({ | |
215 | + userInfo: data, | |
216 | + }); | |
217 | + }); | |
218 | + } | |
216 | 219 | |
217 | - app.isLogin().then(function(data) {//进入页面前已经授权登录成功 | |
218 | - self.setData({ | |
219 | - userInfo: data, | |
220 | - }); | |
221 | - }); | |
222 | 220 | }, |
223 | 221 | |
224 | 222 | /** | ... | ... |
packageA/pages/quan_list/quan_list.wxml
... | ... | @@ -4,44 +4,46 @@ |
4 | 4 | |
5 | 5 | <block wx:if="{{config2.couponset}}"> |
6 | 6 | <view class="header"> |
7 | - <rich-text nodes="{{config2.couponset}}" class="r_txt fs26"></rich-text> | |
7 | + <rich-text nodes="{{config2.couponset}}" class="r_txt fs26"></rich-text> | |
8 | 8 | </view> |
9 | 9 | </block> |
10 | 10 | <view class="content"> |
11 | - <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}"> | |
11 | + <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}"> | |
12 | 12 | <!-- 左边 --> |
13 | 13 | <view class="left {{tool.get_color(index,dataList)}} flex ai-center jc-center co-w"> |
14 | 14 | <view class="t-c"> |
15 | - <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view> | |
16 | - <view>满{{filters.toFix(item.condition,2)}}可用</view> | |
15 | + <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view> | |
16 | + <view>满{{filters.toFix(item.condition,2)}}可用</view> | |
17 | 17 | </view> |
18 | 18 | </view> |
19 | - <!-- 右边 --> | |
19 | + <!-- 右边 --> | |
20 | 20 | <view class="right fs24 co_g pding" style="background-image:url({{iurl}}/miniapp/images/coupon_img/white.png); position: relative"> |
21 | - <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view> | |
21 | + <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view> | |
22 | 22 | |
23 | - <view class="ellipsis-1" style="margin-top: 5rpx" wx:if="{{item.coupon_remark!=null && item.coupon_remark!=''}}">{{item.coupon_remark}}</view> | |
24 | - <view style="margin-top: 5rpx" wx:else>所有门店通用</view> | |
25 | - <view wx:if="{{item.endtype==0}}">有效期 | |
26 | - <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> | |
27 | - <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至 | |
28 | - <text wx:if="{{item.use_end_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text> | |
29 | - </view> | |
30 | - <view wx:else>有效期 <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> | |
23 | + <view class="ellipsis-1" style="margin-top: 5rpx" wx:if="{{item.coupon_remark!=null && item.coupon_remark!=''}}">{{item.coupon_remark}}</view> | |
24 | + <view style="margin-top: 5rpx" wx:else>所有门店通用</view> | |
25 | + <view wx:if="{{item.endtype==0}}">有效期 | |
26 | + <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> | |
27 | + <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text> | |
28 | + 至 | |
29 | + <text wx:if="{{item.use_end_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text> | |
30 | + </view> | |
31 | + <view wx:else>有效期 | |
32 | + <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> | |
31 | 33 | <text wx:else>{{filters.format_time(getcurday)}}</text> |
32 | 34 | 至 |
33 | - <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days)}}</text> | |
34 | - <text wx:else>不限</text> | |
35 | - | |
36 | - </view> | |
37 | - <view>每人限领:<text wx:if="{{item.everyone_num>0}}">{{item.everyone_num}}</text><text wx:else>不限</text></view> | |
38 | - <!-- 领取按钮 --> | |
39 | - <view data-ind="{{index}}" data-cid="{{item.id}}" catchtap="get_quan"> | |
35 | + <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days+3600*24*item.startdays)}}</text> | |
36 | + <text wx:else>不限</text> | |
37 | + | |
38 | + </view> | |
39 | + <view>每人限领:<text wx:if="{{item.everyone_num>0}}">{{item.everyone_num}}</text><text wx:else>不限</text></view> | |
40 | + <!-- 领取按钮 --> | |
41 | + <view data-ind="{{index}}" data-cid="{{item.id}}" catchtap="get_quan"> | |
40 | 42 | <view wx:if="{{item.everyone_num>0 && item.lqnum>=item.everyone_num}}" class="btn flex jc-center ai-center is_get">已领取</view> |
41 | 43 | <view wx:else class="btn flex jc-center ai-center">立即领取</view> |
42 | - </view> | |
44 | + </view> | |
43 | 45 | </view> |
44 | - </view> | |
46 | + </view> | |
45 | 47 | </view> |
46 | 48 | |
47 | 49 | <view wx:if="{{show_success}}"> |
... | ... | @@ -58,5 +60,4 @@ |
58 | 60 | </view> |
59 | 61 | |
60 | 62 | <warn id="warn"></warn> |
61 | -<nav_box id="nav"></nav_box> | |
62 | - | |
63 | +<nav_box id="nav"></nav_box> | |
63 | 64 | \ No newline at end of file | ... | ... |
packageA/pages/quan_pro/quan_pro.wxml
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 | <view wx:else class="lower fs30">有效期 |
41 | 41 | <text wx:if="{{ q_data.starttype==1}}"> {{filters.format_time(getcurday+3600*24*q_data.startdays)}}</text> |
42 | 42 | <text wx:else>{{filters.format_time(getcurday)}}</text>至 |
43 | - <text wx:if="{{q_data.days>0}}"> {{filters.format_time(getcurday+3600*24*q_data.days)}}</text><text wx:else>不限</text> | |
43 | + <text wx:if="{{q_data.days>0}}"> {{filters.format_time(getcurday+3600*24*q_data.days+3600*24*q_data.startdays)}}</text><text wx:else>不限</text> | |
44 | 44 | </view> |
45 | 45 | </block> |
46 | 46 | ... | ... |
packageB/pages/zuhegou/index/index.js
... | ... | @@ -123,9 +123,7 @@ Page({ |
123 | 123 | * 生命周期函数--监听页面加载 |
124 | 124 | */ |
125 | 125 | onLoad: function (options) { |
126 | - if(!getApp().is_Single_page()){ | |
127 | - return false; | |
128 | - } | |
126 | + | |
129 | 127 | console.log(options, 111); |
130 | 128 | self = this; |
131 | 129 | var the_id = options.id; |
... | ... | @@ -160,8 +158,10 @@ Page({ |
160 | 158 | //如果有会员的时候 |
161 | 159 | var userInfo = getApp().globalData.userInfo; |
162 | 160 | if (!userInfo) { |
163 | - getApp().goto("/pages/togoin/togoin"); | |
164 | - return false; | |
161 | + if(getApp().is_Single_page()){ | |
162 | + getApp().goto("/pages/togoin/togoin"); | |
163 | + return false; | |
164 | + } | |
165 | 165 | } |
166 | 166 | }, |
167 | 167 | ... | ... |
packageB/pages/zuhegou/preindex/index.js
... | ... | @@ -123,9 +123,6 @@ Page({ |
123 | 123 | * 生命周期函数--监听页面加载 |
124 | 124 | */ |
125 | 125 | onLoad: function (options) { |
126 | - if(!getApp().is_Single_page()){ | |
127 | - return false; | |
128 | - } | |
129 | 126 | console.log(options, 111); |
130 | 127 | self = this; |
131 | 128 | var the_id = options.id; |
... | ... | @@ -160,8 +157,10 @@ Page({ |
160 | 157 | //如果有会员的时候 |
161 | 158 | var userInfo = getApp().globalData.userInfo; |
162 | 159 | if (!userInfo) { |
163 | - getApp().goto("/pages/togoin/togoin"); | |
164 | - return false; | |
160 | + if(getApp().is_Single_page()){ | |
161 | + getApp().goto("/pages/togoin/togoin"); | |
162 | + return false; | |
163 | + } | |
165 | 164 | } |
166 | 165 | }, |
167 | 166 | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | |
6 | 6 | <!-- 商品名称 --> |
7 | 7 | <view class="spec-goods"> |
8 | - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
8 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
9 | 9 | <view class="spec-goods-info"> |
10 | 10 | <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> |
11 | 11 | <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" > | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... | ... | @@ -285,9 +285,7 @@ Page({ |
285 | 285 | |
286 | 286 | //------初始化加载---------- |
287 | 287 | onLoad: function (t) { |
288 | - if(!getApp().is_Single_page()){ | |
289 | - return false; | |
290 | - } | |
288 | + | |
291 | 289 | // console.log('onload'); |
292 | 290 | if(t && t.group_id) { |
293 | 291 | this.data.group_id = t.group_id; |
... | ... | @@ -534,10 +532,13 @@ Page({ |
534 | 532 | //--先判断会员登陆状态-- |
535 | 533 | var user_info = getApp().globalData.userInfo; |
536 | 534 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
535 | + | |
536 | + if(getApp().is_Single_page()){ | |
537 | 537 | wx.navigateTo({ |
538 | - url: '/pages/togoin/togoin', | |
539 | - }) | |
538 | + url: '/pages/togoin/togoin', | |
539 | + }) | |
540 | 540 | return false; |
541 | + } | |
541 | 542 | } |
542 | 543 | |
543 | 544 | }, | ... | ... |
pages/activity/pind_list/pind_list.js
pages/activity/seckill_list/seckill_list.js
pages/giftpack/buygiftpack/giftpackbuy.js
... | ... | @@ -29,9 +29,7 @@ Page({ |
29 | 29 | first_leader: e.globalData.first_leader || 0, // 推荐人ID |
30 | 30 | }, |
31 | 31 | onLoad: function (options) { |
32 | - if(!getApp().is_Single_page()){ | |
33 | - return false; | |
34 | - } | |
32 | + | |
35 | 33 | var th = this; |
36 | 34 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id |
37 | 35 | my_confirm.open_cancel(0); |
... | ... | @@ -73,15 +71,17 @@ Page({ |
73 | 71 | }); |
74 | 72 | } |
75 | 73 | }) |
76 | - | |
74 | + | |
77 | 75 | |
78 | 76 | }, |
79 | 77 | onShow: function () { |
80 | 78 | //--先判断会员状态-- |
81 | 79 | var user_info = getApp().globalData.userInfo; |
82 | 80 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
83 | - getApp().goto('/pages/togoin/togoin'); | |
84 | - return false; | |
81 | + if(getApp().is_Single_page()){ | |
82 | + getApp().goto('/pages/togoin/togoin'); | |
83 | + return false; | |
84 | + } | |
85 | 85 | } |
86 | 86 | this.getList(); |
87 | 87 | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.js
... | ... | @@ -32,9 +32,6 @@ Page({ |
32 | 32 | first_leader: e.globalData.first_leader || 0, // 推荐人ID |
33 | 33 | }, |
34 | 34 | onLoad: function (options) { |
35 | - if(!getApp().is_Single_page()){ | |
36 | - return false; | |
37 | - } | |
38 | 35 | var th = this; |
39 | 36 | th.setData({ |
40 | 37 | isBuy: options.isBuy, |
... | ... | @@ -65,13 +62,11 @@ Page({ |
65 | 62 | onShow: function () { |
66 | 63 | //--先判断会员状态-- |
67 | 64 | var user_info = getApp().globalData.userInfo; |
68 | - | |
69 | - if(!getApp().is_Single_page()){ | |
70 | - return false; | |
71 | - } | |
72 | 65 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
73 | - getApp().goto('/pages/togoin/togoin'); | |
74 | - return false; | |
66 | + if(getApp().is_Single_page()){ | |
67 | + getApp().goto('/pages/togoin/togoin'); | |
68 | + return false; | |
69 | + } | |
75 | 70 | } |
76 | 71 | if (this.data.isBuy == 0) { |
77 | 72 | this.GetMyGiftList(); | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.js
... | ... | @@ -30,9 +30,6 @@ Page({ |
30 | 30 | }, |
31 | 31 | |
32 | 32 | onLoad: function(options) { |
33 | - if(!getApp().is_Single_page()){ | |
34 | - return false; | |
35 | - } | |
36 | 33 | var th = this; |
37 | 34 | th.setData({ |
38 | 35 | getStorageID: a.stoid, |
... | ... | @@ -79,8 +76,12 @@ Page({ |
79 | 76 | //--先判断会员状态-- |
80 | 77 | var user_info = getApp().globalData.userInfo; |
81 | 78 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
82 | - getApp().goto('/pages/togoin/togoin'); | |
83 | - return false; | |
79 | + if(getApp().is_Single_page()){ | |
80 | + getApp().goto('/pages/togoin/togoin'); | |
81 | + return false; | |
82 | + } | |
83 | + // getApp().goto('/pages/togoin/togoin'); | |
84 | + // return false; | |
84 | 85 | } |
85 | 86 | this.getList(); |
86 | 87 | ... | ... |
pages/goods/categoryList/categoryList.js
pages/goods/goodsInfo/buy_flash_normal.wxml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <view class="pding"> |
4 | 4 | <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> |
5 | 5 | <view class="spec-goods"> |
6 | - <image class="wh100 spec-img xc-distance-bottom" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
7 | 7 | <view class="spec-goods-info"> |
8 | 8 | <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> |
9 | 9 | <view class="flex ai_end xc-val-money"> | ... | ... |
pages/goods/goodsInfo/buy_integral.wxml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <view class="pding"> |
4 | 4 | <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon> |
5 | 5 | <view class="spec-goods"> |
6 | - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
7 | 7 | <view class="spec-goods-info"> |
8 | 8 | <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> |
9 | 9 | <view class="flex ai_end xc-val-money"> | ... | ... |
pages/goods/goodsInfo/buy_integral_normal.wxml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <view class="pding"> |
4 | 4 | <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> |
5 | 5 | <view class="spec-goods"> |
6 | - <image class="wh100 spec-img xc-distance-bottom" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
7 | 7 | <view class="spec-goods-info"> |
8 | 8 | <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> |
9 | 9 | <view class="flex ai_end xc-val-money"> | ... | ... |
pages/goods/goodsInfo/buy_pt.wxml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | |
6 | 6 | <!-- 商品名称 --> |
7 | 7 | <view class="spec-goods"> |
8 | - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
8 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
9 | 9 | <view class="spec-goods-info"> |
10 | 10 | <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> |
11 | 11 | <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" > | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -4519,12 +4519,44 @@ Page({ |
4519 | 4519 | if (quan_list) { |
4520 | 4520 | for (var ind in quan_list) { |
4521 | 4521 | var ep = quan_list[ind]; |
4522 | - var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd"); | |
4523 | - var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd"); | |
4524 | - start = start.replace("00:00:00", ""); | |
4525 | - end = end.replace("00:00:00", ""); | |
4522 | + var start = ""; | |
4523 | + var end = ""; | |
4524 | + if(ep.endtype == 1){ | |
4525 | + if(ep.starttype == 1) { | |
4526 | + start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd"); | |
4527 | + }else{ | |
4528 | + start = ut.formatTime(ut.gettimestamp(),"yyyy-MM-dd"); | |
4529 | + } | |
4530 | + if(ep.days > 0) { | |
4531 | + end = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays+3600*24*ep.days,"yyyy-MM-dd"); | |
4532 | + }else{ | |
4533 | + end = "不限"; | |
4534 | + } | |
4535 | + }else { | |
4536 | + if(ep.starttype == 1 ){ | |
4537 | + start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd"); | |
4538 | + }else{ | |
4539 | + if(ep.starttype == 0 && ep.use_start_time >0) { | |
4540 | + start = ut.formatTime(ep.use_start_time ,"yyyy-MM-dd"); | |
4541 | + }else{ | |
4542 | + start = "不限" | |
4543 | + } | |
4544 | + } | |
4545 | + | |
4546 | + if(ep.use_end_time > 0 ) { | |
4547 | + end = ut.formatTime(ep.use_end_time ,"yyyy-MM-dd"); | |
4548 | + }else{ | |
4549 | + end = "不限" | |
4550 | + } | |
4551 | + } | |
4526 | 4552 | quan_list[ind].start = start; |
4527 | 4553 | quan_list[ind].end = end; |
4554 | + // var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd"); | |
4555 | + // var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd"); | |
4556 | + // start = start.replace("00:00:00", ""); | |
4557 | + // end = end.replace("00:00:00", ""); | |
4558 | + // quan_list[ind].start = start; | |
4559 | + // quan_list[ind].end = end; | |
4528 | 4560 | } |
4529 | 4561 | } |
4530 | 4562 | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -295,7 +295,7 @@ |
295 | 295 | <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}"> |
296 | 296 | |
297 | 297 | <view class="market-price flex" style="align-items: baseline;"> |
298 | - <block wx:if="{{card_field && data[card_field]>0}}"> | |
298 | + <block wx:if="{{card_field && data[card_field]>0 && is_no_plus}}"> | |
299 | 299 | <view class="flex ai-center grade-card-frame"> |
300 | 300 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
301 | 301 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> |
... | ... | @@ -1470,7 +1470,7 @@ |
1470 | 1470 | <view class="top-frame"> |
1471 | 1471 | <view class="xc-coupon-frame "> |
1472 | 1472 | <!-- -单张的券- --> |
1473 | - <view class="rel" wx:for="{{quan_list}}" wx:key="{{index}}"> | |
1473 | + <view class="rel" wx:for="{{quan_list}}" wx:key="id"> | |
1474 | 1474 | <view class="coupon flex"> |
1475 | 1475 | <view class="circle xc-circular-one"></view> |
1476 | 1476 | <view class="xc-coupon-left "> | ... | ... |
pages/index/index/index.js
pages/template/index.js
pages/user/assistance/assistance.js
... | ... | @@ -39,9 +39,6 @@ Page({ |
39 | 39 | * 生命周期函数--监听页面加载 |
40 | 40 | */ |
41 | 41 | onLoad: function(options) { |
42 | - if(!getApp().is_Single_page()){ | |
43 | - return false; | |
44 | - } | |
45 | 42 | var th = this; |
46 | 43 | var nav_b = th.selectComponent("#nav_b"); //组件的id |
47 | 44 | nav_b.set_name("助力", "/pages/user/assistance/assistance"); |
... | ... | @@ -56,8 +53,10 @@ Page({ |
56 | 53 | //--先判断会员状态-- |
57 | 54 | var user_info = getApp().globalData.userInfo; |
58 | 55 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
59 | - getApp().goto('/pages/togoin/togoin'); | |
60 | - return false; | |
56 | + if(getApp().is_Single_page()){ | |
57 | + getApp().goto('/pages/togoin/togoin'); | |
58 | + return false; | |
59 | + } | |
61 | 60 | } |
62 | 61 | |
63 | 62 | var th = this; | ... | ... |
pages/user/index/index.js
... | ... | @@ -25,6 +25,7 @@ Page({ |
25 | 25 | txmon: 0, |
26 | 26 | byquan: 0, |
27 | 27 | yuer: 0, |
28 | + is_no_plus:1, | |
28 | 29 | currentPage: 1, |
29 | 30 | recommend_list: [], |
30 | 31 | tc_hide: true, |
... | ... | @@ -134,7 +135,21 @@ Page({ |
134 | 135 | } |
135 | 136 | }) |
136 | 137 | |
137 | - | |
138 | + //调用接口判断商家plus有没有过期 | |
139 | + rq.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=3", {}).then(res => { | |
140 | + if (res.data.code == 0) { | |
141 | + var arr = res.data.data.pageData; | |
142 | + if (arr.length > 0) { | |
143 | + var item = arr[0]; | |
144 | + if (item.is_sy == 0) { | |
145 | + var now = Date.parse(new Date()); now = now / 1000; | |
146 | + if (item.end_time < now) { | |
147 | + th.setData({ is_no_plus: 0 }) | |
148 | + } | |
149 | + } | |
150 | + } | |
151 | + } | |
152 | + }) | |
138 | 153 | var th=this; |
139 | 154 | |
140 | 155 | // 判断是否开启美业 | ... | ... |
pages/user/index/index.wxml
... | ... | @@ -69,7 +69,7 @@ |
69 | 69 | </image> |
70 | 70 | |
71 | 71 | </view> |
72 | - <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2 && show_buy_plus}}"> | |
72 | + <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2 && show_buy_plus && is_no_plus}}"> | |
73 | 73 | <view class="xc-add-member flex-center-around "> |
74 | 74 | <view class="flex jc-center ai-center"> |
75 | 75 | <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image> | ... | ... |
pages/user/userinfo/userinfo.js
... | ... | @@ -49,6 +49,7 @@ Page({ |
49 | 49 | fir_pick_index: 0, |
50 | 50 | sec_pick_index: 0, |
51 | 51 | is_gps: 1, |
52 | + is_no_plus:1, | |
52 | 53 | lon: 0, |
53 | 54 | only_pk: 0, |
54 | 55 | open_ind_store: 0, //哪里打开的门店列表的控制属性 |
... | ... | @@ -608,6 +609,7 @@ Page({ |
608 | 609 | }, |
609 | 610 | //------初始化加载---------- |
610 | 611 | onLoad: function(t) { |
612 | + let th= this; | |
611 | 613 | var user = getApp().globalData.userInfo; |
612 | 614 | if (user.card_field != '' && user.card_field != null && user.card_field != undefined && user.card_expiredate) { |
613 | 615 | var now = ut.gettimestamp(); |
... | ... | @@ -618,6 +620,21 @@ Page({ |
618 | 620 | this.puls_user(); |
619 | 621 | } |
620 | 622 | } |
623 | + //调用接口判断商家plus有没有过期 | |
624 | + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + r.stoid + "&type=3", {}).then(res => { | |
625 | + if (res.data.code == 0) { | |
626 | + var arr = res.data.data.pageData; | |
627 | + if (arr.length > 0) { | |
628 | + var item = arr[0]; | |
629 | + if (item.is_sy == 0) { | |
630 | + var now = Date.parse(new Date()); now = now / 1000; | |
631 | + if (item.end_time < now) { | |
632 | + th.setData({ is_no_plus: 0 }) | |
633 | + } | |
634 | + } | |
635 | + } | |
636 | + } | |
637 | + }) | |
621 | 638 | this.initial_user(); |
622 | 639 | |
623 | 640 | // 获取用户昵称 | ... | ... |
pages/user/userinfo/userinfo.wxml
... | ... | @@ -11,17 +11,15 @@ |
11 | 11 | |
12 | 12 | <view class="flex-center vipmax"> |
13 | 13 | <view> |
14 | - | |
15 | 14 | <view> |
16 | 15 | <view class="ellipsis-2 Nickname" style="font-size: 31rpx"> |
17 | 16 | <view style="float:left;">{{user.nickname}}</view> |
18 | 17 | <button bindtap="getUserProfile" style="margin-left:10rpx;float:left;width: 200rpx;height:50rpx;font-size:20rpx;" class="flex-center fs30 confirmtext"> 点击更新头像昵称 </button> |
19 | 18 | </view> |
20 | - | |
21 | 19 | </view> |
22 | 20 | |
23 | 21 | <view class="flex fs22 vip"> |
24 | - <block wx:if="{{isBool&&gradename}}"> | |
22 | + <block wx:if="{{isBool && gradename}}"> | |
25 | 23 | <navigator url="/pages/user/userqy/userqy"> |
26 | 24 | <view class="flex-center AncrownMax"> |
27 | 25 | <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image> |
... | ... | @@ -29,7 +27,7 @@ |
29 | 27 | </view> |
30 | 28 | </navigator> |
31 | 29 | </block> |
32 | - <block wx:if="{{pulscardname && rank_switch > 0 }}"> | |
30 | + <block wx:if="{{pulscardname && rank_switch > 0 && is_no_plus}}"> | |
33 | 31 | <navigator url="/pages/user/plus/plus"> |
34 | 32 | <view class="flex-center plusMax"> |
35 | 33 | <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ... | ... |