Commit a532468fbfc0d60c3a0d576bfd430e5801a8773c

Authored by abson
1 parent 04ad5f0e

116018 重新传

pages/goods/goodsInfo/goodsInfo.js
@@ -28,7 +28,7 @@ Page({ @@ -28,7 +28,7 @@ Page({
28 color_type: 0, //线条控制 28 color_type: 0, //线条控制
29 color_type_one: 0, 29 color_type_one: 0,
30 color_type_two: 1, 30 color_type_two: 1,
31 - 31 + is_no_plus:1,
32 gid: "", 32 gid: "",
33 stoid: o.stoid, 33 stoid: o.stoid,
34 url: o.url, 34 url: o.url,
@@ -359,6 +359,22 @@ Page({ @@ -359,6 +359,22 @@ Page({
359 th.data.c_guide_id = c_guide_id; 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 getApp().getConfig(function (e) { 378 getApp().getConfig(function (e) {
363 ee.setData({sto_sele_name_1: e.store_name}) 379 ee.setData({sto_sele_name_1: e.store_name})
364 }) 380 })
@@ -3799,6 +3815,20 @@ Page({ @@ -3799,6 +3815,20 @@ Page({
3799 return param < 10 ? '0' + param : param; 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 countDown(time, prom_st) { 3833 countDown(time, prom_st) {
3804 if (!this.data.is_timer) return false; 3834 if (!this.data.is_timer) return false;
pages/goods/goodsInfo/goodsInfo.wxml
@@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
6 <!-- 商品内容区域,普通商品,秒杀,拼团 --> 6 <!-- 商品内容区域,普通商品,秒杀,拼团 -->
7 <block wx:if="{{isshow}}"> 7 <block wx:if="{{isshow}}">
8 <view class="container"> 8 <view class="container">
  9 + <!-- 拼单规则规则 -->
  10 + <view wx:if="{{prom_type== 6}}" class="rules" bindtap="showRules">规则</view>
9 <view class="type-navbar"> 11 <view class="type-navbar">
10 <view class="type-box" wx:for="{{categories}}" wx:key="id"> 12 <view class="type-box" wx:for="{{categories}}" wx:key="id">
11 <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}">{{item.name}}</view> 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,7 +326,7 @@
324 </view> 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 <view class="flex ai-center grade-card-frame card-frame"> 330 <view class="flex ai-center grade-card-frame card-frame">
329 <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> 331 <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
330 <view class="fs24 white view card-name ellipsis-1"> 332 <view class="fs24 white view card-name ellipsis-1">
@@ -336,7 +338,7 @@ @@ -336,7 +338,7 @@
336 </view> 338 </view>
337 </view> 339 </view>
338 <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 --> 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 <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)!=''}}"> 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 <view class="beauty-makeup-frame flex ai-center"> 344 <view class="beauty-makeup-frame flex ai-center">
@@ -1502,6 +1504,7 @@ @@ -1502,6 +1504,7 @@
1502 </view> 1504 </view>
1503 </view> 1505 </view>
1504 </view> 1506 </view>
  1507 +<view class="mask" catchtouchmove="true" wx:if="{{showRules}}"></view>
1505 <!-- 选择门店的弹框,1.1版最新的 --> 1508 <!-- 选择门店的弹框,1.1版最新的 -->
1506 <block wx:if="{{store==1}}"> 1509 <block wx:if="{{store==1}}">
1507 <view class="mongolia-layer" bindtap="close_popup"></view> 1510 <view class="mongolia-layer" bindtap="close_popup"></view>
@@ -1690,6 +1693,28 @@ @@ -1690,6 +1693,28 @@
1690 </view> 1693 </view>
1691 </view> 1694 </view>
1692 1695
  1696 +<view class="rule-pop-container" wx:if="{{showRules}}">
  1697 + <view class="pop-title">规则详情
  1698 + <text class="iconfont icon-guan" bindtap="closeRules"></text>
  1699 + </view>
  1700 + <view class="pdt40">
  1701 + <view class="pdb20">活动时间</view>
  1702 + <view class="">{{filters.format_time(prom_act.start_time,1)}} 至 {{filters.format_time(prom_act.end_time,1)}}
  1703 + </view>
  1704 + </view>
  1705 + <view class="pdt40">
  1706 + <view class="pdb20">活动内容</view>
  1707 + <view class="popup-content">
  1708 + <text class="pdb10">{{prom_act.remark}}</text>
  1709 + </view>
  1710 + </view>
  1711 +
  1712 +
  1713 + <view class="pdv20">
  1714 + <view class="btn" bindtap="closeRules">我知道了</view>
  1715 + </view>
  1716 + </view>
  1717 +
1693 <!-- 弹起来,购买预热商品的普通购买 --> 1718 <!-- 弹起来,购买预热商品的普通购买 -->
1694 <view hidden="{{!openSpecModal_flash_normal}}"> 1719 <view hidden="{{!openSpecModal_flash_normal}}">
1695 <include src="buy_flash_normal.wxml" /> 1720 <include src="buy_flash_normal.wxml" />
pages/goods/goodsInfo/goodsInfo.wxss
@@ -9,10 +9,62 @@ @@ -9,10 +9,62 @@
9 image { 9 image {
10 vertical-align: top; 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 .goods-detail { 61 .goods-detail {
14 overflow: hidden 62 overflow: hidden
15 } 63 }
  64 +.popup-content {
  65 + max-height: 600rpx;
  66 + overflow-y: auto;
  67 +}
16 68
17 .type-navbar { 69 .type-navbar {
18 display: flex; 70 display: flex;
pages/goods/search/search.js
@@ -18,17 +18,14 @@ Page({ @@ -18,17 +18,14 @@ Page({
18 requestUrl: "", 18 requestUrl: "",
19 //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ] 19 //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ]
20 hotWords: null, 20 hotWords: null,
21 - 21 + is_no_plus:1,
22 tabname: "sort", //排序的字段 22 tabname: "sort", //排序的字段
23 adname: "asc", //升降的字段 23 adname: "asc", //升降的字段
24 rq_data:null, 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 onLoad: function(t) { 31 onLoad: function(t) {
@@ -45,6 +42,22 @@ Page({ @@ -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 var th=this; 61 var th=this;
49 a.getConfig2(function(rs) { 62 a.getConfig2(function(rs) {
50 var arr=new Array(),arr2=new Array(); 63 var arr=new Array(),arr2=new Array();
pages/goods/search/search.wxml
@@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
98 </block> 98 </block>
99 <block wx:else> 99 <block wx:else>
100 <!-- 商品价格,先判断下是后又等级价--> 100 <!-- 商品价格,先判断下是后又等级价-->
101 - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> 101 + <block wx:if="{{g_filter.is_has_rank(rank_switch,item) && is_no_plus}}">
102 <!-- 当会员是等级卡的时候 --> 102 <!-- 当会员是等级卡的时候 -->
103 <block wx:if="{{card_field}}"> 103 <block wx:if="{{card_field}}">
104 <!-- 等级价>0 --> 104 <!-- 等级价>0 -->