Commit b81787faebe67e9db00eff8c43a5d2dbec56cf8a
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
5 changed files
with
132 additions
and
12 deletions
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -28,7 +28,7 @@ Page({ |
28 | 28 | color_type: 0, //线条控制 |
29 | 29 | color_type_one: 0, |
30 | 30 | color_type_two: 1, |
31 | - | |
31 | + is_no_plus:1, | |
32 | 32 | gid: "", |
33 | 33 | stoid: o.stoid, |
34 | 34 | url: o.url, |
... | ... | @@ -359,6 +359,22 @@ Page({ |
359 | 359 | th.data.c_guide_id = c_guide_id; |
360 | 360 | } |
361 | 361 | |
362 | + //调用接口判断商家plus有没有过期 | |
363 | + i.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=3", {}).then(res => { | |
364 | + if (res.data.code == 0) { | |
365 | + var arr = res.data.data.pageData; | |
366 | + if (arr.length > 0) { | |
367 | + var item = arr[0]; | |
368 | + if (item.is_sy == 0) { | |
369 | + var now = Date.parse(new Date()); now = now / 1000; | |
370 | + if (item.end_time < now) { | |
371 | + th.setData({ is_no_plus: 0 }) | |
372 | + } | |
373 | + } | |
374 | + } | |
375 | + } | |
376 | + }) | |
377 | + | |
362 | 378 | getApp().getConfig(function (e) { |
363 | 379 | ee.setData({sto_sele_name_1: e.store_name}) |
364 | 380 | }) |
... | ... | @@ -3799,6 +3815,20 @@ Page({ |
3799 | 3815 | return param < 10 ? '0' + param : param; |
3800 | 3816 | }, |
3801 | 3817 | |
3818 | + // 显示拼单规则 | |
3819 | + showRules: function() { | |
3820 | + this.setData({ | |
3821 | + showRules: true, | |
3822 | + }); | |
3823 | + }, | |
3824 | + | |
3825 | + // 关闭拼单规则 | |
3826 | + closeRules: function() { | |
3827 | + this.setData({ | |
3828 | + showRules: false, | |
3829 | + }); | |
3830 | + }, | |
3831 | + | |
3802 | 3832 | //----倒计时函数----- |
3803 | 3833 | countDown(time, prom_st) { |
3804 | 3834 | if (!this.data.is_timer) return false; | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -6,6 +6,8 @@ |
6 | 6 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> |
7 | 7 | <block wx:if="{{isshow}}"> |
8 | 8 | <view class="container"> |
9 | + <!-- 拼单规则规则 --> | |
10 | + <view wx:if="{{prom_type== 6}}" class="rules" bindtap="showRules">规则</view> | |
9 | 11 | <view class="type-navbar"> |
10 | 12 | <view class="type-box" wx:for="{{categories}}" wx:key="id"> |
11 | 13 | <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> |
... | ... | @@ -324,7 +326,7 @@ |
324 | 326 | </view> |
325 | 327 | <!-- 不是秒杀 --> |
326 | 328 | <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> |
327 | - <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 && prom_type!=2 && prom_type!=4 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> | |
329 | + <view class="flex ai_and" wx:if="{{!card_field && is_no_plus && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 && prom_type!=2 && prom_type!=4 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> | |
328 | 330 | <view class="flex ai-center grade-card-frame card-frame"> |
329 | 331 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
330 | 332 | <view class="fs24 white view card-name ellipsis-1"> |
... | ... | @@ -336,7 +338,7 @@ |
336 | 338 | </view> |
337 | 339 | </view> |
338 | 340 | <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 --> |
339 | - <block wx:if="{{g_filters.is_has_rank(rank_switch,data)}}"> | |
341 | + <block wx:if="{{g_filters.is_has_rank(rank_switch,data) && is_no_plus}}"> | |
340 | 342 | <!-- 不是秒杀,且会员不是等级会员 --> |
341 | 343 | <view wx:if="{{!card_field && prom_type!=1 && prom_type!=2 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}"> |
342 | 344 | <view class="beauty-makeup-frame flex ai-center"> |
... | ... | @@ -1502,6 +1504,7 @@ |
1502 | 1504 | </view> |
1503 | 1505 | </view> |
1504 | 1506 | </view> |
1507 | +<view class="mask" catchtouchmove="true" wx:if="{{showRules}}"></view> | |
1505 | 1508 | <!-- 选择门店的弹框,1.1版最新的 --> |
1506 | 1509 | <block wx:if="{{store==1}}"> |
1507 | 1510 | <view class="mongolia-layer" bindtap="close_popup"></view> |
... | ... | @@ -1691,6 +1694,28 @@ |
1691 | 1694 | </view> |
1692 | 1695 | </view> |
1693 | 1696 | |
1697 | +<view class="rule-pop-container" wx:if="{{showRules}}"> | |
1698 | + <view class="pop-title">规则详情 | |
1699 | + <text class="iconfont icon-guan" bindtap="closeRules"></text> | |
1700 | + </view> | |
1701 | + <view class="pdt40"> | |
1702 | + <view class="pdb20">活动时间</view> | |
1703 | + <view class="">{{filters.format_time(prom_act.start_time,1)}} 至 {{filters.format_time(prom_act.end_time,1)}} | |
1704 | + </view> | |
1705 | + </view> | |
1706 | + <view class="pdt40"> | |
1707 | + <view class="pdb20">活动内容</view> | |
1708 | + <view class="popup-content"> | |
1709 | + <text class="pdb10">{{prom_act.remark}}</text> | |
1710 | + </view> | |
1711 | + </view> | |
1712 | + | |
1713 | + | |
1714 | + <view class="pdv20"> | |
1715 | + <view class="btn" bindtap="closeRules">我知道了</view> | |
1716 | + </view> | |
1717 | + </view> | |
1718 | + | |
1694 | 1719 | <!-- 弹起来,购买预热商品的普通购买 --> |
1695 | 1720 | <view hidden="{{!openSpecModal_flash_normal}}"> |
1696 | 1721 | <include src="buy_flash_normal.wxml" /> | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
... | ... | @@ -9,10 +9,62 @@ |
9 | 9 | image { |
10 | 10 | vertical-align: top; |
11 | 11 | } |
12 | +.rules { | |
13 | + position: fixed; | |
14 | + background-color: rgba(0,0,0,.2); | |
15 | + color: white; | |
16 | + top: 22rpx; | |
17 | + right: 0; | |
18 | + z-index: 100; | |
19 | + font-size: 26rpx; | |
20 | + padding: 0 20rpx; | |
21 | + z-index: 99999; | |
22 | + border-radius: 20rpx 0 0 20rpx; | |
23 | +} | |
24 | + | |
25 | +.rule-pop-container { | |
26 | + position: fixed; | |
27 | + left: 0; | |
28 | + bottom: 0; | |
29 | + width: 100%; | |
30 | + background-color: white; | |
31 | + z-index: 99999; | |
32 | + border-radius: 16rpx 16rpx 0 0; | |
33 | + padding: 0 40rpx; | |
34 | + box-sizing: border-box; | |
35 | + font-size: 28rpx; | |
36 | + color: #444; | |
37 | +} | |
38 | + | |
39 | +.pop-title { | |
40 | + padding: 20rpx 0; | |
41 | + text-align: center; | |
42 | + font-size: 32rpx; | |
43 | + position: relative; | |
44 | +} | |
45 | +.icon-guan { | |
46 | + position: absolute; | |
47 | + right: 0; | |
48 | + font-size: 26rpx; | |
49 | + top: 50%; | |
50 | + transform: translateY(-50%); | |
51 | + color: #ccc; | |
52 | +} | |
53 | +.btn { | |
54 | + color: white; | |
55 | + padding: 20rpx 0; | |
56 | + text-align: center; | |
57 | + border-radius: 40rpx; | |
58 | + background: -webkit-linear-gradient(left,#ff5000,#ff2000) no-repeat; | |
59 | +} | |
12 | 60 | |
13 | 61 | .goods-detail { |
14 | 62 | overflow: hidden |
15 | 63 | } |
64 | +.popup-content { | |
65 | + max-height: 600rpx; | |
66 | + overflow-y: auto; | |
67 | +} | |
16 | 68 | |
17 | 69 | .type-navbar { |
18 | 70 | display: flex; | ... | ... |
pages/goods/search/search.js
... | ... | @@ -18,17 +18,14 @@ Page({ |
18 | 18 | requestUrl: "", |
19 | 19 | //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ] |
20 | 20 | hotWords: null, |
21 | - | |
21 | + is_no_plus:1, | |
22 | 22 | tabname: "sort", //排序的字段 |
23 | 23 | adname: "asc", //升降的字段 |
24 | 24 | rq_data:null, |
25 | - | |
26 | - | |
27 | - searchRecord: [], | |
28 | - keyword: '', | |
29 | - is_his:0, | |
30 | - | |
31 | - hiddenClear: true, | |
25 | + searchRecord: [], | |
26 | + keyword: '', | |
27 | + is_his:0, | |
28 | + hiddenClear: true, | |
32 | 29 | }, |
33 | 30 | |
34 | 31 | onLoad: function(t) { |
... | ... | @@ -45,6 +42,22 @@ Page({ |
45 | 42 | }) |
46 | 43 | } |
47 | 44 | |
45 | + //调用接口判断商家plus有没有过期 | |
46 | + rq.promiseGet("/store/storemoduleendtime/page?store_id=" + oo.stoid + "&type=3", {}).then(res => { | |
47 | + if (res.data.code == 0) { | |
48 | + var arr = res.data.data.pageData; | |
49 | + if (arr.length > 0) { | |
50 | + var item = arr[0]; | |
51 | + if (item.is_sy == 0) { | |
52 | + var now = Date.parse(new Date()); now = now / 1000; | |
53 | + if (item.end_time < now) { | |
54 | + th.setData({ is_no_plus: 0 }) | |
55 | + } | |
56 | + } | |
57 | + } | |
58 | + } | |
59 | + }) | |
60 | + | |
48 | 61 | var th=this; |
49 | 62 | a.getConfig2(function(rs) { |
50 | 63 | var arr=new Array(),arr2=new Array(); | ... | ... |
pages/goods/search/search.wxml
... | ... | @@ -97,7 +97,7 @@ |
97 | 97 | </block> |
98 | 98 | <block wx:else> |
99 | 99 | <!-- 商品价格,先判断下是后又等级价--> |
100 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | |
100 | + <block wx:if="{{g_filter.is_has_rank(rank_switch,item) && is_no_plus}}"> | |
101 | 101 | <!-- 当会员是等级卡的时候 --> |
102 | 102 | <block wx:if="{{card_field}}"> |
103 | 103 | <!-- 等级价>0 --> | ... | ... |