Commit 85e8740f1b41d8fd7da753ee4868cf2dc98d0243
1 parent
d0f44009
1、 微信小程序OA处理
2、 微信小程序超包处理
Showing
27 changed files
with
257 additions
and
614 deletions
app.json
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | "pages/user/grow_value/grow_value", | 37 | "pages/user/grow_value/grow_value", |
38 | "pages/payment/pay_success/pay_success", | 38 | "pages/payment/pay_success/pay_success", |
39 | "pages/user/plus/plus", | 39 | "pages/user/plus/plus", |
40 | - "pages/user/cardinfo/cardinfo", | 40 | + |
41 | "pages/user/my_service/appment_main", | 41 | "pages/user/my_service/appment_main", |
42 | "pages/user/my_service/i_service", | 42 | "pages/user/my_service/i_service", |
43 | "pages/user/my_service/cosmetology_list", | 43 | "pages/user/my_service/cosmetology_list", |
@@ -209,7 +209,8 @@ | @@ -209,7 +209,8 @@ | ||
209 | "pages": [ | 209 | "pages": [ |
210 | "pages/togoin/togoin", | 210 | "pages/togoin/togoin", |
211 | "pages/user/Detailed/Detailed", | 211 | "pages/user/Detailed/Detailed", |
212 | - "pages/user/user_fw/user_fw" | 212 | + "pages/user/user_fw/user_fw", |
213 | + "pages/user/cardinfo/cardinfo" | ||
213 | ] | 214 | ] |
214 | } | 215 | } |
215 | 216 |
components/diy_goodsGroup/diy_goodsGroup.js
@@ -320,50 +320,10 @@ Component({ | @@ -320,50 +320,10 @@ Component({ | ||
320 | getApp().getConfig2(function (e) { | 320 | getApp().getConfig2(function (e) { |
321 | var swithc_list = e.switch_list; | 321 | var swithc_list = e.switch_list; |
322 | var sw_arr = JSON.parse(swithc_list); | 322 | var sw_arr = JSON.parse(swithc_list); |
323 | - | ||
324 | if(sw_arr.is_retail_price){ | 323 | if(sw_arr.is_retail_price){ |
325 | th.setData({is_retail_price:1}); | 324 | th.setData({is_retail_price:1}); |
326 | } | 325 | } |
327 | - | ||
328 | - | ||
329 | - //---如果后台又开等级卡的开关--- | ||
330 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
331 | - th.setData({ | ||
332 | - rank_switch: true | ||
333 | - }); | ||
334 | - //---回调卡的列表--- | ||
335 | - th.getPlusCardType(function (ob) { | ||
336 | - th.setData({ | ||
337 | - card_list: ob.card_list | ||
338 | - }); | ||
339 | - var ti = setInterval(function () { | ||
340 | - var user = getApp().globalData.userInfo; | ||
341 | - if (!user) return false; | ||
342 | - clearInterval(ti); | ||
343 | - | ||
344 | - if (user.card_field && user['card_expiredate']) { | ||
345 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
346 | - var end = new Date(str); | ||
347 | - end = Date.parse(end) / 1000; | ||
348 | - var now = ut.gettimestamp(); | ||
349 | - | ||
350 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
351 | - if (user.card_field && now < end) { | ||
352 | - var card_name = ob.name_map.get(user.card_field); | ||
353 | - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 4); | ||
354 | - th.setData({ | ||
355 | - card_field: user.card_field, | ||
356 | - card_name: card_name, | ||
357 | - card_list: ob.card_list | ||
358 | - }); | ||
359 | - } | ||
360 | - | ||
361 | - } | ||
362 | - | ||
363 | - }, 500) | ||
364 | - }) | ||
365 | - | ||
366 | - } | 326 | + ut.get_plus_name_price(sw_arr,th); |
367 | }) | 327 | }) |
368 | } | 328 | } |
369 | }) | 329 | }) |
components/goods_list/goods_list.js
@@ -63,40 +63,7 @@ Component({ | @@ -63,40 +63,7 @@ Component({ | ||
63 | getApp().getConfig2(function (e) { | 63 | getApp().getConfig2(function (e) { |
64 | var swithc_list = e.switch_list; | 64 | var swithc_list = e.switch_list; |
65 | var sw_arr = JSON.parse(swithc_list); | 65 | var sw_arr = JSON.parse(swithc_list); |
66 | - //---如果后台有开等级卡的开关--- | ||
67 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
68 | - th.setData({ | ||
69 | - rank_switch: true | ||
70 | - }); | ||
71 | - //---回调卡的列表--- | ||
72 | - th.getPlusCardType(function (ob) { | ||
73 | - th.setData({ | ||
74 | - card_list: ob.card_list | ||
75 | - }); | ||
76 | - var ti = setInterval(function () { | ||
77 | - var user = getApp().globalData.userInfo; | ||
78 | - if (!user) return false; | ||
79 | - clearInterval(ti); | ||
80 | - if (user.card_field && user['card_expiredate']) { | ||
81 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
82 | - var end = new Date(str); | ||
83 | - end = Date.parse(end) / 1000; | ||
84 | - var now = ut.gettimestamp(); | ||
85 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
86 | - if (user.card_field && now < end) { | ||
87 | - var card_name = ob.name_map.get(user.card_field); | ||
88 | - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8); | ||
89 | - th.setData({ | ||
90 | - card_field: user.card_field, | ||
91 | - card_name: card_name, | ||
92 | - card_list: ob.card_list | ||
93 | - }); | ||
94 | - } | ||
95 | - } | ||
96 | - }, 500) | ||
97 | - }) | ||
98 | - } | ||
99 | - | 66 | + ut.get_plus_name_price(sw_arr,th); |
100 | }) | 67 | }) |
101 | 68 | ||
102 | } | 69 | } |
components/serviceCard_list/serviceCard_list.js
@@ -45,48 +45,7 @@ Component({ | @@ -45,48 +45,7 @@ Component({ | ||
45 | success: function (e) { | 45 | success: function (e) { |
46 | if (e.data.code == 0 && e.data && e.data.data) { | 46 | if (e.data.code == 0 && e.data && e.data.data) { |
47 | getApp().globalData.userInfo = e.data.data; | 47 | getApp().globalData.userInfo = e.data.data; |
48 | - getApp().getConfig2(function (e) { | ||
49 | - var swithc_list = e.switch_list; | ||
50 | - var sw_arr = JSON.parse(swithc_list); | ||
51 | - //---如果后台有开等级卡的开关--- | ||
52 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
53 | - th.setData({ | ||
54 | - rank_switch: true | ||
55 | - }); | ||
56 | - //---回调卡的列表--- | ||
57 | - th.getPlusCardType(function (ob) { | ||
58 | - th.setData({ | ||
59 | - card_list: ob.card_list | ||
60 | - }); | ||
61 | - var ti = setInterval(function () { | ||
62 | - var user = getApp().globalData.userInfo; | ||
63 | - if (!user) return false; | ||
64 | - clearInterval(ti); | ||
65 | - if (user.card_field && user['card_expiredate']) { | ||
66 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
67 | - var end = new Date(str); | ||
68 | - end = Date.parse(end) / 1000; | ||
69 | - var now = ut.gettimestamp(); | ||
70 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
71 | - if (user.card_field && now < end) { | ||
72 | - var card_name = ob.name_map.get(user.card_field); | ||
73 | - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8); | ||
74 | - th.setData({ | ||
75 | - card_field: user.card_field, | ||
76 | - card_name: card_name, | ||
77 | - card_list: ob.card_list | ||
78 | - }); | ||
79 | - } | ||
80 | - } | ||
81 | - }, 500) | ||
82 | - }) | ||
83 | - } | ||
84 | - }) | ||
85 | - | ||
86 | } | 48 | } |
87 | - | ||
88 | - | ||
89 | - | ||
90 | } | 49 | } |
91 | }) | 50 | }) |
92 | }, | 51 | }, |
components/serviceCard_list/serviceCard_list.wxml
@@ -37,95 +37,8 @@ | @@ -37,95 +37,8 @@ | ||
37 | 37 | ||
38 | </block> | 38 | </block> |
39 | <block wx:else> | 39 | <block wx:else> |
40 | - <!-- 商品价格,先判断下是后⼜等级价--> | ||
41 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | ||
42 | - <!-- 当会员是等级卡的时候 --> | ||
43 | - <block wx:if="{{card_field}}"> | ||
44 | - <!-- 等级价>0 --> | ||
45 | - <block wx:if="{{item[card_field]>0}}"> | ||
46 | - <view class="money flex"> | ||
47 | - <!-- 办卡价 --> | ||
48 | - <view class="flex xc-wc ai_and"> | ||
49 | - <view class="fs24">¥</view> | ||
50 | - <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | ||
51 | - <view class="card_bg ellipsis-1"> | ||
52 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | ||
53 | - <text class="card_name">{{card_name}}</text> | ||
54 | - </view> | ||
55 | - </view> | ||
56 | - </view> | ||
57 | - <view class="flex"> | ||
58 | - <!-- 原价 --> | ||
59 | - <view class="price flex xc-ash line_th"> | ||
60 | - <view class="fs22">¥</view> | ||
61 | - <view class="fs22">{{item.market_price}}</view> | ||
62 | - </view> | ||
63 | - </view> | ||
64 | - </block> | ||
65 | - <blocK wx:else> | ||
66 | - <view class="money flex"> | ||
67 | - <!-- 办卡价 --> | ||
68 | - <view class="flex xc-wc"> | ||
69 | - <view class="fs24">¥</view> | ||
70 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | ||
71 | - </view> | ||
72 | - </view> | ||
73 | - <view class="flex"> | ||
74 | - <!-- 原价 --> | ||
75 | - <view class="price flex xc-ash line_th"> | ||
76 | - <view class="fs22">¥</view> | ||
77 | - <view class="fs22">{{item.market_price}}</view> | ||
78 | - </view> | ||
79 | - </view> | ||
80 | - </blocK> | ||
81 | - </block> | ||
82 | - <block wx:else> | ||
83 | - <!-- 如果商品有设置等级价⼤于0的 --> | ||
84 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | ||
85 | - <view class="money flex"> | ||
86 | - <!-- 办卡价 --> | ||
87 | - <view class="flex xc-wc"> | ||
88 | - <view class="fs24">¥</view> | ||
89 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | ||
90 | - </view> | ||
91 | - <!-- 原价 --> | ||
92 | - <view class="price flex xc-ash line_th"> | ||
93 | - <view class="fs22">¥</view> | ||
94 | - <view class="fs22">{{item.market_price}}</view> | ||
95 | - </view> | ||
96 | - </view> | ||
97 | - <view class="flexr" style=""> | ||
98 | - <!-- 等级价 --> | ||
99 | - <view class="price flex ai-center"> | ||
100 | - <view class="fs22">¥</view> | ||
101 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | ||
102 | - <view class="card_bg ellipsis-1"> | ||
103 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image> | ||
104 | - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | ||
105 | - </view> | ||
106 | - </view> | ||
107 | - </view> | ||
108 | - </block> | ||
109 | - <block wx:else> | ||
110 | - <view class="money flex"> | ||
111 | - <!-- 办卡价 --> | ||
112 | - <view class="flex xc-wc"> | ||
113 | - <view class="fs24">¥</view> | ||
114 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | ||
115 | - </view> | ||
116 | - </view> | ||
117 | - <view class="flex"> | ||
118 | - <!-- 原价 --> | ||
119 | - <view class="price flex xc-ash line_th"> | ||
120 | - <view class="fs22">¥</view> | ||
121 | - <view class="fs22">{{item.market_price}}</view> | ||
122 | - </view> | ||
123 | - </view> | ||
124 | - </block> | ||
125 | - </block> | ||
126 | - </block> | ||
127 | <!-- 商品压根就没有等级价 --> | 40 | <!-- 商品压根就没有等级价 --> |
128 | - <view class="pdt10" wx:else> | 41 | + <view class="pdt10"> |
129 | <view class="money flex"> | 42 | <view class="money flex"> |
130 | <!-- 办卡价 --> | 43 | <!-- 办卡价 --> |
131 | <view class="flex xc-wc"> | 44 | <view class="flex xc-wc"> |
packageA/pages/distribution/goods/goods.wxml
@@ -83,7 +83,7 @@ | @@ -83,7 +83,7 @@ | ||
83 | <view class="ellipsis-2">{{item.goods_name}}</view> | 83 | <view class="ellipsis-2">{{item.goods_name}}</view> |
84 | <view> | 84 | <view> |
85 | <!-- 判断是否有活动价 --> | 85 | <!-- 判断是否有活动价 --> |
86 | - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}"> | 86 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}"> |
87 | <view class="flex xc-wc ai-center"> | 87 | <view class="flex xc-wc ai-center"> |
88 | <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text> | 88 | <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text> |
89 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | 89 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
packageA/pages/distribution/shop/shop.wxml
@@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
76 | <view class="flex fdc jc_sb"> | 76 | <view class="flex fdc jc_sb"> |
77 | <view class="ellipsis-2 h68 mgb20">{{item.goods_name}}</view> | 77 | <view class="ellipsis-2 h68 mgb20">{{item.goods_name}}</view> |
78 | <!-- 判断是否有活动价 --> | 78 | <!-- 判断是否有活动价 --> |
79 | - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}"> | 79 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}"> |
80 | <view class="flex xc-wc pdt20"> | 80 | <view class="flex xc-wc pdt20"> |
81 | <text wx:if="{{item.prom_integral}}"> | 81 | <text wx:if="{{item.prom_integral}}"> |
82 | <text class="fs30">{{item.prom_integral}}</text> | 82 | <text class="fs30">{{item.prom_integral}}</text> |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -6018,7 +6018,7 @@ Page({ | @@ -6018,7 +6018,7 @@ Page({ | ||
6018 | }, | 6018 | }, |
6019 | 6019 | ||
6020 | go_card_info: function () { | 6020 | go_card_info: function () { |
6021 | - getApp().goto("/pages/user/cardinfo/cardinfo"); | 6021 | + getApp().goto("/packageE/pages/user/cardinfo/cardinfo"); |
6022 | }, | 6022 | }, |
6023 | 6023 | ||
6024 | //-- 根据ID拿出门店 -- | 6024 | //-- 根据ID拿出门店 -- |
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -4531,7 +4531,7 @@ Page({ | @@ -4531,7 +4531,7 @@ Page({ | ||
4531 | getApp().goto("/pages/user/plus/plus"); | 4531 | getApp().goto("/pages/user/plus/plus"); |
4532 | }, | 4532 | }, |
4533 | go_card_info: function () { | 4533 | go_card_info: function () { |
4534 | - getApp().goto("/pages/user/cardinfo/cardinfo"); | 4534 | + getApp().goto("/packageE/pages/user/cardinfo/cardinfo"); |
4535 | }, | 4535 | }, |
4536 | //-- 根据ID拿出门店 -- | 4536 | //-- 根据ID拿出门店 -- |
4537 | get_pick_from_list(pid) { | 4537 | get_pick_from_list(pid) { |
packageC/pages/presell/pregoodsInfo/goodsInfo.js
@@ -3694,7 +3694,7 @@ Page({ | @@ -3694,7 +3694,7 @@ Page({ | ||
3694 | getApp().goto("/pages/user/plus/plus"); | 3694 | getApp().goto("/pages/user/plus/plus"); |
3695 | }, | 3695 | }, |
3696 | go_card_info: function () { | 3696 | go_card_info: function () { |
3697 | - getApp().goto("/pages/user/cardinfo/cardinfo"); | 3697 | + getApp().goto("/packageE/pages/user/cardinfo/cardinfo"); |
3698 | }, | 3698 | }, |
3699 | //-- 根据ID拿出门店 -- | 3699 | //-- 根据ID拿出门店 -- |
3700 | get_pick_from_list(pid) { | 3700 | get_pick_from_list(pid) { |
pages/user/cardinfo/cardinfo.js renamed to packageE/pages/user/cardinfo/cardinfo.js
@@ -2,11 +2,11 @@ var t = getApp(), | @@ -2,11 +2,11 @@ var t = getApp(), | ||
2 | a = t.request, | 2 | a = t.request, |
3 | o = t.globalData.setting, | 3 | o = t.globalData.setting, |
4 | os = o, | 4 | os = o, |
5 | - i = require("../../../utils/util.js"), | 5 | + i = require("../../../../utils/util.js"), |
6 | ut = i, | 6 | ut = i, |
7 | - s = require("../../../utils/common.js"),t_pay = require("../../../utils/pay2.js"), | ||
8 | - w = require("../../../utils/wxParse/wxParse.js"); | ||
9 | -var regeneratorRuntime = require('../../../utils/runtime.js'); | 7 | + s = require("../../../../utils/common.js"),t_pay = require("../../../../utils/pay2.js"), |
8 | + w = require("../../../../utils/wxParse/wxParse.js"); | ||
9 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | ||
10 | //wx.downloadFile把线上地址设为本地地址 | 10 | //wx.downloadFile把线上地址设为本地地址 |
11 | Page({ | 11 | Page({ |
12 | 12 |
pages/user/cardinfo/cardinfo.json renamed to packageE/pages/user/cardinfo/cardinfo.json
pages/user/cardinfo/cardinfo.wxml renamed to packageE/pages/user/cardinfo/cardinfo.wxml
pages/user/cardinfo/cardinfo.wxss renamed to packageE/pages/user/cardinfo/cardinfo.wxss
pages/distribution/distribution.wxml
@@ -95,7 +95,7 @@ | @@ -95,7 +95,7 @@ | ||
95 | <view class="left f1"> | 95 | <view class="left f1"> |
96 | <view class="icon-container"><text class="iconfont icon-huiyuan1"></text></view> | 96 | <view class="icon-container"><text class="iconfont icon-huiyuan1"></text></view> |
97 | <view>仅限PLUS卡({{item.conditonRemark}})的会员, | 97 | <view>仅限PLUS卡({{item.conditonRemark}})的会员, |
98 | - <text wx:if="{{item.pass}}" class="c-red" bindtap="goto" data-url="/pages/user/cardinfo/cardinfo">PLUS详情</text> | 98 | + <text wx:if="{{item.pass}}" class="c-red" bindtap="goto" data-url="/packageE/pages/user/cardinfo/cardinfo">PLUS详情</text> |
99 | <text wx:else class="c-red" bindtap="goto" data-url="/pages/user/plus/plus">立即升级</text> | 99 | <text wx:else class="c-red" bindtap="goto" data-url="/pages/user/plus/plus">立即升级</text> |
100 | </view> | 100 | </view> |
101 | </view> | 101 | </view> |
pages/goods/categoryList/categoryList.js
@@ -168,32 +168,6 @@ Page({ | @@ -168,32 +168,6 @@ Page({ | ||
168 | //计算等级价相关 | 168 | //计算等级价相关 |
169 | var swithc_list = rs.switch_list; | 169 | var swithc_list = rs.switch_list; |
170 | var sw_arr = JSON.parse(swithc_list); | 170 | var sw_arr = JSON.parse(swithc_list); |
171 | - //---如果后台又开等级卡的开关--- | ||
172 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
173 | - th.setData({ rank_switch: true }); | ||
174 | - var user = getApp().globalData.userInfo; | ||
175 | - var ti = setInterval(function () { | ||
176 | - if (!user) return false; | ||
177 | - clearInterval(ti); | ||
178 | - //---回调卡的列表--- | ||
179 | - th.getPlusCardType(function (ob) { | ||
180 | - th.setData({ card_list: ob.card_list }); | ||
181 | - if (user.card_field && user['card_expiredate']) { | ||
182 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
183 | - var end = new Date(str); | ||
184 | - end = Date.parse(end) / 1000; | ||
185 | - var now = ut.gettimestamp(); | ||
186 | - | ||
187 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
188 | - if (user.card_field && now < end) { | ||
189 | - var card_name = ob.name_map.get(user.card_field); | ||
190 | - //if (card_name.length > 4) card_name = card_name.substring(0, 4); | ||
191 | - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list }); | ||
192 | - } | ||
193 | - } | ||
194 | - }) | ||
195 | - }, 500) | ||
196 | - } | ||
197 | 171 | ||
198 | if(sw_arr.is_retail_price){ | 172 | if(sw_arr.is_retail_price){ |
199 | th.setData({is_retail_price:1}); | 173 | th.setData({is_retail_price:1}); |
@@ -228,6 +202,11 @@ Page({ | @@ -228,6 +202,11 @@ Page({ | ||
228 | var data = e; | 202 | var data = e; |
229 | var switch_list_data = data.switch_list; | 203 | var switch_list_data = data.switch_list; |
230 | var switch_list = JSON.parse(switch_list_data); | 204 | var switch_list = JSON.parse(switch_list_data); |
205 | + | ||
206 | + //---如果后台又开等级卡的开关--- | ||
207 | + ut.get_plus_name_price(switch_list,that); | ||
208 | + | ||
209 | + | ||
231 | var is_newsgoodstype = switch_list.is_newsgoodstype; | 210 | var is_newsgoodstype = switch_list.is_newsgoodstype; |
232 | if (is_newsgoodstype == undefined) { | 211 | if (is_newsgoodstype == undefined) { |
233 | is_newsgoodstype = 0; | 212 | is_newsgoodstype = 0; |
pages/goods/categoryList/categoryList.wxml
@@ -584,7 +584,8 @@ | @@ -584,7 +584,8 @@ | ||
584 | <view class="item-cont"> | 584 | <view class="item-cont"> |
585 | <view class="title">{{item.goods_name}}</view> | 585 | <view class="title">{{item.goods_name}}</view> |
586 | <!-- 判断是否有活动价 --> | 586 | <!-- 判断是否有活动价 --> |
587 | - <block wx:if="{{item.prom_price>0 || item.prom_integral}}"> | 587 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}"> |
588 | + | ||
588 | <view class="flex ai-center"> | 589 | <view class="flex ai-center"> |
589 | <!-- 活动价 --> | 590 | <!-- 活动价 --> |
590 | <view class="price"> | 591 | <view class="price"> |
@@ -605,12 +606,14 @@ | @@ -605,12 +606,14 @@ | ||
605 | </block> | 606 | </block> |
606 | <block wx:else> | 607 | <block wx:else> |
607 | 608 | ||
609 | + | ||
608 | <!-- 商品价格,先判断下是后又等级价--> | 610 | <!-- 商品价格,先判断下是后又等级价--> |
609 | <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | 611 | <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> |
610 | 612 | ||
611 | 613 | ||
612 | <!-- 当会员是等级卡的时候 --> | 614 | <!-- 当会员是等级卡的时候 --> |
613 | <block wx:if="{{card_field}}"> | 615 | <block wx:if="{{card_field}}"> |
616 | + | ||
614 | <!-- 等级价>0 --> | 617 | <!-- 等级价>0 --> |
615 | <block wx:if="{{item[card_field]>0}}"> | 618 | <block wx:if="{{item[card_field]>0}}"> |
616 | <view class="flex ai_and"> | 619 | <view class="flex ai_and"> |
@@ -683,6 +686,7 @@ | @@ -683,6 +686,7 @@ | ||
683 | </block> | 686 | </block> |
684 | </block> | 687 | </block> |
685 | <block wx:else> | 688 | <block wx:else> |
689 | + | ||
686 | <view class="flex ai-center"> | 690 | <view class="flex ai-center"> |
687 | <view class="price rmb">{{item.shop_price}}</view> | 691 | <view class="price rmb">{{item.shop_price}}</view> |
688 | <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> | 692 | <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> |
pages/goods/goodsInfo/buy_com_pop.wxml
0 → 100644
1 | +<view class="spec-goods"> | ||
2 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" | ||
3 | + binderror="pop_err_img" data-errorimg="data.original_img"></image> | ||
4 | + <view class="spec-goods-info"> | ||
5 | + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | ||
6 | + <view class="flex ai_end xc-val-money"> | ||
7 | + <text class="fs20">¥</text> | ||
8 | + <!-- 如果是等级会员,且有等级价 --> | ||
9 | + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}}</block> | ||
10 | + <block wx:else>{{sele_g.shop_price}}</block> | ||
11 | + </view> | ||
12 | + | ||
13 | + <view class="flex"> | ||
14 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
15 | + <block wx:if="{{sales_rules==2}}"> | ||
16 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}"> | ||
17 | + 可售:{{def_pick_store.CanOutQty}} | ||
18 | + </view> | ||
19 | + <view class="spec-goods-stock" wx:else>可售:0</view> | ||
20 | + </block> | ||
21 | + <block wx:else> | ||
22 | + <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | ||
23 | + </block> | ||
24 | + </view> | ||
25 | + | ||
26 | + | ||
27 | + </view> | ||
28 | + | ||
29 | + <!-- 选择门店模块 --> | ||
30 | + <view class="flex-space-between address ai_end xc-width "> | ||
31 | + | ||
32 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
33 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
34 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | ||
35 | + 距离:{{def_pick_store.distance > 1000 ? filters.toFix(def_pick_store.distance / 1000, 2) + "km" : filters.toFix(def_pick_store.distance, 0) + "m"}} | ||
36 | + | ||
37 | + </view> | ||
38 | + </view> | ||
39 | + | ||
40 | + <!-- 没有门店的时候 --> | ||
41 | + <view class="flex" bindtap="choice_store" wx:else> | ||
42 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
43 | + <view class="fs30" style="color:black;">选择门店</view> | ||
44 | + </view> | ||
45 | + | ||
46 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" | ||
47 | + bindtap="choice_store">更多门店<text class="right-arrow"></text> | ||
48 | + </view> | ||
49 | + </view> | ||
50 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
51 | + <block wx:else> | ||
52 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
53 | + <block wx:else> | ||
54 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
55 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}"> | ||
56 | + (库存不足) | ||
57 | + </view> | ||
58 | + </block> | ||
59 | + </block> | ||
60 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}"> | ||
61 | + 地址:{{def_pick_store.fulladdress}} | ||
62 | + </view> | ||
63 | + | ||
64 | + | ||
65 | + <!--商品的属性项目--> | ||
66 | + <view class="xc-goods-attribute"> | ||
67 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | ||
68 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
69 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" | ||
70 | + data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | ||
71 | + {{item.gg}} | ||
72 | + </view> | ||
73 | + </view> | ||
74 | + </view> | ||
75 | + | ||
76 | + <view class="b_num"> | ||
77 | + <view>购买数量</view> | ||
78 | + <view class="count"> | ||
79 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" | ||
80 | + class="sub {{goodsInputNum <= 1 ? 'active':''}}">- | ||
81 | + </view> | ||
82 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | ||
83 | + <view bindtap="addCartNum" class="add">+</view> | ||
84 | + </view> | ||
85 | + </view> | ||
86 | +</view> | ||
87 | +<!-- 提示再买多少优惠 --> | ||
88 | +<view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | ||
89 | + 再买{{hui_condition.need}} | ||
90 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | ||
91 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | ||
92 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | ||
93 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | ||
94 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | ||
95 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | ||
96 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | ||
97 | + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | ||
98 | +</view> | ||
99 | +<!-- 按钮部分 --> | ||
100 | +<view class="spec-cart-btns"> | ||
101 | + | ||
102 | + <!-- 根本就找不到门店 --> | ||
103 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
104 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | ||
105 | + 配送不匹配 | ||
106 | + </view> | ||
107 | + </block> | ||
108 | + <block wx:else> | ||
109 | + <!-- 根本就找不到门店 --> | ||
110 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
111 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | ||
112 | + 库存不足 | ||
113 | + </view> | ||
114 | + </block> | ||
115 | + <block wx:else> | ||
116 | + | ||
117 | + | ||
118 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
119 | + <view class="spec-cart-btn fs32" data-action="add" | ||
120 | + style="background-color: #dcdcdc;color: #999;">库存不足 | ||
121 | + </view> | ||
122 | + </block> | ||
123 | + <block wx:else> | ||
124 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
125 | + <view class="spec-cart-btn fs32" data-action="add" | ||
126 | + style="background-color: #dcdcdc;color: #999">库存不足 | ||
127 | + </view> | ||
128 | + </block> | ||
129 | + <block wx:else> | ||
130 | + <block wx:if="{{!def_pick_store}}"> | ||
131 | + <view class="spec-cart-btn fs32" data-action="add" | ||
132 | + style="background-color: #dcdcdc;color: #999">请先选择门店 | ||
133 | + </view> | ||
134 | + </block> | ||
135 | + <block wx:else> | ||
136 | + <block wx:if="{{data.store_count<=0}}"> | ||
137 | + <view class="spec-cart-btn fs32" data-action="add" | ||
138 | + style="background-color: #dcdcdc;color: #999">库存不足 | ||
139 | + </view> | ||
140 | + </block> | ||
141 | + <block wx:else> | ||
142 | + <view class="flex jc_sb"> | ||
143 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
144 | + data-action="add" style="background-color: #ffb03f;">加入购物车 | ||
145 | + </view> | ||
146 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
147 | + data-action="buy">立即购买 | ||
148 | + </view> | ||
149 | + </view> | ||
150 | + </block> | ||
151 | + | ||
152 | + </block> | ||
153 | + </block> | ||
154 | + </block> | ||
155 | + </block> | ||
156 | + </block> | ||
157 | +</view> | ||
158 | + |
pages/goods/goodsInfo/buy_flash_normal.wxml
1 | <view bindtap="closeSpecModal_flash_normal" class="cover-layer"></view> | 1 | <view bindtap="closeSpecModal_flash_normal" class="cover-layer"></view> |
2 | - <view class="spec-model"> | ||
3 | - <view class="pding"> | ||
4 | - <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
5 | - <view class="spec-goods"> | ||
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 | - <view class="spec-goods-info"> | ||
8 | - <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | ||
9 | - <view class="flex ai_end xc-val-money"> | ||
10 | - <text class="fs20">¥</text> | ||
11 | - <!-- 如果是等级会员,且有等级价 --> | ||
12 | - <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> | ||
13 | - <block wx:else>{{sele_g.shop_price}}</block> | ||
14 | - </view> | ||
15 | - | ||
16 | - <view class="flex"> | ||
17 | - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
18 | - <block wx:if="{{sales_rules==2}}"> | ||
19 | - <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | ||
20 | - <view class="spec-goods-stock" wx:else>可售:0</view> | ||
21 | - </block> | ||
22 | - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | ||
23 | - </view> | ||
24 | - | ||
25 | - | ||
26 | - </view> | ||
27 | - | ||
28 | - <!-- 选择门店模块 --> | ||
29 | - <view class="flex-space-between address ai_end xc-width "> | ||
30 | - | ||
31 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
32 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
33 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
34 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
35 | - | ||
36 | - </view> | ||
37 | - </view> | ||
38 | - | ||
39 | - <!-- 没有门店的时候 --> | ||
40 | - <view class="flex" bindtap="choice_store" wx:else> | ||
41 | - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
42 | - <view class="fs30" style="color:black;">选择门店</view> | ||
43 | - </view> | ||
44 | - | ||
45 | - <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | ||
46 | - </view> | ||
47 | - <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
48 | - <block wx:else> | ||
49 | - <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
50 | - <block wx:else> | ||
51 | - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
52 | - <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | ||
53 | - </block> | ||
54 | - </block> | ||
55 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | ||
56 | - | ||
57 | - | ||
58 | - <!--商品的属性项目--> | ||
59 | - <view class="xc-goods-attribute"> | ||
60 | - <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | ||
61 | - <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
62 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | ||
63 | - {{item.gg}} | ||
64 | - </view> | ||
65 | - </view> | ||
66 | - </view> | ||
67 | - | ||
68 | - <view class="b_num"> | ||
69 | - <view>购买数量</view> | ||
70 | - <view class="count"> | ||
71 | - <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | ||
72 | - <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | ||
73 | - <view bindtap="addCartNum" class="add">+</view> | ||
74 | - </view> | ||
75 | - </view> | ||
76 | - </view> | ||
77 | - | ||
78 | - | ||
79 | - <!-- 提示再买多少优惠 --> | ||
80 | - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | ||
81 | - 再买{{hui_condition.need}} | ||
82 | - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | ||
83 | - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | ||
84 | - <text wx:if="{{hui_condition.past==1}}">,包邮</text> | ||
85 | - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | ||
86 | - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | ||
87 | - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | ||
88 | - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | ||
89 | - <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | ||
90 | - </view> | ||
91 | - | ||
92 | - | ||
93 | - <!-- 按钮部分 --> | ||
94 | - <view class="spec-cart-btns"> | ||
95 | - | ||
96 | - <!-- 根本就找不到门店 --> | ||
97 | - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
98 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | ||
99 | - </block> | ||
100 | - <block wx:else> | ||
101 | - <!-- 根本就找不到门店 --> | ||
102 | - <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
103 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
104 | - </block> | ||
105 | - <block wx:else> | ||
106 | - | ||
107 | - | ||
108 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
109 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
110 | - </block> | ||
111 | - <block wx:else> | ||
112 | - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
113 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
114 | - </block> | ||
115 | - <block wx:else> | ||
116 | - <block wx:if="{{!def_pick_store}}"> | ||
117 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | ||
118 | - </block> | ||
119 | - <block wx:else> | ||
120 | - <block wx:if="{{data.store_count<=0}}"> | ||
121 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
122 | - </block> | ||
123 | - <block wx:else> | ||
124 | - <view class="flex jc_sb"> | ||
125 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
126 | - data-action="add" style="background-color: #ffb03f;">加入购物车</view> | ||
127 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
128 | - data-action="buy">立即购买</view> | ||
129 | - </view> | ||
130 | - </block> | ||
131 | - | ||
132 | - </block> | ||
133 | - </block> | ||
134 | - </block> | ||
135 | - </block> | ||
136 | - </block> | ||
137 | - </view> | ||
138 | - | ||
139 | - </view> | ||
140 | - </view> | ||
141 | - <view class="clear"></view> | ||
142 | \ No newline at end of file | 2 | \ No newline at end of file |
3 | +<view class="spec-model"> | ||
4 | + <view class="pding"> | ||
5 | + <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
6 | + <include src="buy_com_pop.wxml"></include> | ||
7 | + </view> | ||
8 | +</view> | ||
9 | +<view class="clear"></view> | ||
143 | \ No newline at end of file | 10 | \ No newline at end of file |
pages/goods/goodsInfo/buy_integral_normal.wxml
1 | -<view bindtap="closeSpecModal_inte_normal" class="cover-layer"></view> | ||
2 | - <view class="spec-model"> | ||
3 | - <view class="pding"> | ||
4 | - <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
5 | - <view class="spec-goods"> | ||
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 | - <view class="spec-goods-info"> | ||
8 | - <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | ||
9 | - <view class="flex ai_end xc-val-money"> | ||
10 | - <text class="fs20">¥</text> | ||
11 | - <!-- 如果是等级会员,且有等级价 --> | ||
12 | - <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> | ||
13 | - <block wx:else>{{sele_g.shop_price}}</block> | ||
14 | - </view> | ||
15 | - | ||
16 | - <view class="flex"> | ||
17 | - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
18 | - <block wx:if="{{sales_rules==2}}"> | ||
19 | - <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | ||
20 | - <view class="spec-goods-stock" wx:else>可售:0</view> | ||
21 | - </block> | ||
22 | - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | ||
23 | - </view> | ||
24 | - | ||
25 | - | ||
26 | - </view> | ||
27 | - | ||
28 | - <!-- 选择门店模块 --> | ||
29 | - <view class="flex-space-between address ai_end xc-width "> | ||
30 | - | ||
31 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
32 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
33 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
34 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
35 | - | ||
36 | - </view> | ||
37 | - </view> | ||
38 | - | ||
39 | - <!-- 没有门店的时候 --> | ||
40 | - <view class="flex" bindtap="choice_store" wx:else> | ||
41 | - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
42 | - <view class="fs30" style="color:black;">选择门店</view> | ||
43 | - </view> | ||
44 | - | ||
45 | - <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | ||
46 | - </view> | ||
47 | - <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
48 | - <block wx:else> | ||
49 | - <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
50 | - <block wx:else> | ||
51 | - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
52 | - <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2}}">(库存不足)</view> | ||
53 | - </block> | ||
54 | - </block> | ||
55 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | ||
56 | - | ||
57 | - | ||
58 | - <!--商品的属性项目--> | ||
59 | - <view class="xc-goods-attribute"> | ||
60 | - <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | ||
61 | - <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
62 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | ||
63 | - {{item.gg}} | ||
64 | - </view> | ||
65 | - </view> | ||
66 | - </view> | ||
67 | - | ||
68 | - <view class="b_num"> | ||
69 | - <view>购买数量</view> | ||
70 | - <view class="count"> | ||
71 | - <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | ||
72 | - <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | ||
73 | - <view bindtap="addCartNum" class="add">+</view> | ||
74 | - </view> | ||
75 | - </view> | ||
76 | - </view> | ||
77 | - | ||
78 | - | ||
79 | - <!-- 提示再买多少优惠 --> | ||
80 | - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | ||
81 | - 再买{{hui_condition.need}} | ||
82 | - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | ||
83 | - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | ||
84 | - <text wx:if="{{hui_condition.past==1}}">,包邮</text> | ||
85 | - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | ||
86 | - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | ||
87 | - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | ||
88 | - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | ||
89 | - <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | ||
90 | - </view> | ||
91 | - | ||
92 | - | ||
93 | - <!-- 按钮部分 --> | ||
94 | - <view class="spec-cart-btns"> | ||
95 | - | ||
96 | - | ||
97 | - <!-- 根本就找不到门店 --> | ||
98 | - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
99 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | ||
100 | - </block> | ||
101 | - <block wx:else> | ||
102 | - <!-- 根本就找不到门店 --> | ||
103 | - <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
104 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
105 | - </block> | ||
106 | - <block wx:else> | ||
107 | - | ||
108 | - | ||
109 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
110 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
111 | - </block> | ||
112 | - <block wx:else> | ||
113 | - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
114 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
115 | - </block> | ||
116 | - <block wx:else> | ||
117 | - <block wx:if="{{!def_pick_store}}"> | ||
118 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | ||
119 | - </block> | ||
120 | - <block wx:else> | ||
121 | - <!-- 线下库存 --> | ||
122 | - <block wx:if="{{sales_rules==2 && prom_type==0 && !sele_g.whsle_id}}"> | ||
123 | - <block wx:if="{{def_pick_store && !def_pick_store.CanOutQty}}"> | ||
124 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
125 | - </block> | ||
126 | - <block wx:else> | ||
127 | - <view class="flex jc_sb"> | ||
128 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
129 | - data-action="add" style="background-color: #ffb03f;">加入购物车</view> | ||
130 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
131 | - data-action="buy">立即购买</view> | ||
132 | - </view> | ||
133 | - </block> | ||
134 | - </block> | ||
135 | - <!-- 线上库存 --> | ||
136 | - <block wx:else> | ||
137 | - <block wx:if="{{sele_g.store_count<=0}}"> | ||
138 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | ||
139 | - 库存不足5 | ||
140 | - </view> | ||
141 | - </block> | ||
142 | - <block wx:else> | ||
143 | - <view class="flex jc_sb"> | ||
144 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
145 | - data-action="add" style="background-color: #ffb03f;">加入购物车</view> | ||
146 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
147 | - data-action="buy">立即购买</view> | ||
148 | - </view> | ||
149 | - </block> | ||
150 | - | ||
151 | - </block> | ||
152 | - | ||
153 | - </block> | ||
154 | - </block> | ||
155 | - </block> | ||
156 | - </block> | ||
157 | - </block> | ||
158 | - </view> | ||
159 | - | ||
160 | - | ||
161 | - </view> | ||
162 | - </view> | ||
163 | - <view class="clear"></view> | ||
164 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +<view bindtap="closeSpecModal_inte_normal" class="cover-layer"></view> | ||
3 | +<view class="spec-model"> | ||
4 | + <view class="pding"> | ||
5 | + <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
6 | + <include src="buy_com_pop.wxml"></include> | ||
7 | + </view> | ||
8 | +</view> | ||
9 | +<view class="clear"></view> | ||
165 | \ No newline at end of file | 10 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.js
@@ -441,38 +441,7 @@ Page({ | @@ -441,38 +441,7 @@ Page({ | ||
441 | var swithc_list = e.switch_list; | 441 | var swithc_list = e.switch_list; |
442 | var sw_arr = JSON.parse(swithc_list); | 442 | var sw_arr = JSON.parse(swithc_list); |
443 | //---如果后台又开等级卡的开关--- | 443 | //---如果后台又开等级卡的开关--- |
444 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
445 | - th.setData({rank_switch: true}); | ||
446 | - //---回调卡的列表--- | ||
447 | - th.getPlusCardType(function (ob) { | ||
448 | - th.setData({card_list: ob.card_list}); | ||
449 | - var ti = setInterval(function () { | ||
450 | - var user = getApp().globalData.userInfo; | ||
451 | - if (!user) return false; | ||
452 | - clearInterval(ti); | ||
453 | - if (user.card_field && user['card_expiredate']) { | ||
454 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
455 | - var end = new Date(str); | ||
456 | - end = Date.parse(end) / 1000; | ||
457 | - var now = ut.gettimestamp(); | ||
458 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
459 | - if (user.card_field && now < end) { | ||
460 | - var card_name = ob.name_map.get(user.card_field); | ||
461 | - //if(card_name.length>6) card_name=card_name.substring(0,6); | ||
462 | - | ||
463 | - var is_near_date = 0; | ||
464 | - if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天 | ||
465 | - th.setData({ | ||
466 | - card_field: user.card_field, | ||
467 | - card_name: card_name, | ||
468 | - card_list: ob.card_list, | ||
469 | - is_near_date: is_near_date | ||
470 | - }); | ||
471 | - } | ||
472 | - } | ||
473 | - }, 500) | ||
474 | - }) | ||
475 | - } | 444 | + ut.get_plus_name_price(sw_arr,th); |
476 | 445 | ||
477 | }, 1); | 446 | }, 1); |
478 | 447 | ||
@@ -1427,6 +1396,8 @@ Page({ | @@ -1427,6 +1396,8 @@ Page({ | ||
1427 | }; | 1396 | }; |
1428 | 1397 | ||
1429 | 1398 | ||
1399 | + | ||
1400 | + | ||
1430 | //-- 代发商品不参加优惠 -- | 1401 | //-- 代发商品不参加优惠 -- |
1431 | if(th.data.sele_g.whsle_id && newd.prom_type==3){ | 1402 | if(th.data.sele_g.whsle_id && newd.prom_type==3){ |
1432 | newd.prom_type=0; | 1403 | newd.prom_type=0; |
@@ -1474,6 +1445,7 @@ Page({ | @@ -1474,6 +1445,7 @@ Page({ | ||
1474 | 1445 | ||
1475 | newd.prom_type = 0; | 1446 | newd.prom_type = 0; |
1476 | newd.prom_id = 0; | 1447 | newd.prom_id = 0; |
1448 | + newd.is_pd_normal=1; | ||
1477 | 1449 | ||
1478 | //---如果是线下门店销售的时候--- | 1450 | //---如果是线下门店销售的时候--- |
1479 | if (th.data.sales_rules == 2) { | 1451 | if (th.data.sales_rules == 2) { |
@@ -2016,7 +1988,7 @@ Page({ | @@ -2016,7 +1988,7 @@ Page({ | ||
2016 | getApp().goto(url); | 1988 | getApp().goto(url); |
2017 | } else { | 1989 | } else { |
2018 | //要判断积分购的普通购买有没有参加优惠活动 | 1990 | //要判断积分购的普通购买有没有参加优惠活动 |
2019 | - if (e.is_integral_normal == 1) { | 1991 | + if (e.is_integral_normal == 1 || e.is_pd_normal == 1 ) { |
2020 | this.check_nor_promgood(e.goods_id, function (res) { | 1992 | this.check_nor_promgood(e.goods_id, function (res) { |
2021 | if (res && res.cat_id) { | 1993 | if (res && res.cat_id) { |
2022 | e.prom_type = 3; | 1994 | e.prom_type = 3; |
@@ -6372,7 +6344,7 @@ Page({ | @@ -6372,7 +6344,7 @@ Page({ | ||
6372 | getApp().goto("/pages/user/plus/plus"); | 6344 | getApp().goto("/pages/user/plus/plus"); |
6373 | }, | 6345 | }, |
6374 | go_card_info: function () { | 6346 | go_card_info: function () { |
6375 | - getApp().goto("/pages/user/cardinfo/cardinfo"); | 6347 | + getApp().goto("/packageE/pages/user/cardinfo/cardinfo"); |
6376 | }, | 6348 | }, |
6377 | //-- 根据ID拿出门店 -- | 6349 | //-- 根据ID拿出门店 -- |
6378 | get_pick_from_list(pid) { | 6350 | get_pick_from_list(pid) { |
pages/goods/goodsList/goodsList.wxml
@@ -82,7 +82,7 @@ | @@ -82,7 +82,7 @@ | ||
82 | <view class="item-cont"> | 82 | <view class="item-cont"> |
83 | <view class="title ellipsis-2">{{item.goods_name}}</view> | 83 | <view class="title ellipsis-2">{{item.goods_name}}</view> |
84 | <!-- 判断是否有活动价 --> | 84 | <!-- 判断是否有活动价 --> |
85 | - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 }}"> | 85 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}"> |
86 | <view class="flex on"> | 86 | <view class="flex on"> |
87 | <!-- 活动价 --> | 87 | <!-- 活动价 --> |
88 | <view class="price"> | 88 | <view class="price"> |
pages/goods/search/search.js
@@ -99,38 +99,11 @@ Page({ | @@ -99,38 +99,11 @@ Page({ | ||
99 | var swithc_list = rs.switch_list; | 99 | var swithc_list = rs.switch_list; |
100 | var sw_arr = JSON.parse(swithc_list); | 100 | var sw_arr = JSON.parse(swithc_list); |
101 | //---如果后台又开等级卡的开关--- | 101 | //---如果后台又开等级卡的开关--- |
102 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
103 | - th.setData({ rank_switch: true }); | ||
104 | - var user = getApp().globalData.userInfo; | ||
105 | - var ti = setInterval(function () { | ||
106 | - if (!user) return false; | ||
107 | - clearInterval(ti); | ||
108 | - //---回调卡的列表--- | ||
109 | - th.getPlusCardType(function (ob) { | ||
110 | - th.setData({ card_list: ob.card_list }); | ||
111 | - if (user.card_field) { | ||
112 | - var str = user['card_expiredate'].replace(/-/g, '/'); | ||
113 | - var end = new Date(str); | ||
114 | - end = Date.parse(end) / 1000; | ||
115 | - var now = ut.gettimestamp(); | ||
116 | - | ||
117 | - //--- 判断是等级会员,且在有效期范围内 --- | ||
118 | - if (user.card_field && now < end) { | ||
119 | - var card_name = ob.name_map.get(user.card_field); | ||
120 | - if (card_name && card_name.length > 7) card_name = card_name.substring(0, 8); | ||
121 | - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list }); | ||
122 | - } | ||
123 | - } | ||
124 | - }) | ||
125 | - }, 500) | ||
126 | - } | ||
127 | - | 102 | + ut.get_plus_name_price(sw_arr,th); |
128 | if(sw_arr.is_retail_price){ | 103 | if(sw_arr.is_retail_price){ |
129 | th.setData({is_retail_price:1}); | 104 | th.setData({is_retail_price:1}); |
130 | } | 105 | } |
131 | 106 | ||
132 | - | ||
133 | - | ||
134 | }) | 107 | }) |
135 | //e.init(this, "", "requestData"); | 108 | //e.init(this, "", "requestData"); |
136 | var url = this.data.baseUrl; | 109 | var url = this.data.baseUrl; |
pages/goods/search/search.wxml
@@ -87,7 +87,7 @@ | @@ -87,7 +87,7 @@ | ||
87 | <view class="item-cont"> | 87 | <view class="item-cont"> |
88 | <view class="title ellipsis-2">{{item.goods_name}}</view> | 88 | <view class="title ellipsis-2">{{item.goods_name}}</view> |
89 | <!-- 判断是否有活动价,小程序没有有团购和拼单 --> | 89 | <!-- 判断是否有活动价,小程序没有有团购和拼单 --> |
90 | - <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7}}"> | 90 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}"> |
91 | <!-- 活动价 --> | 91 | <!-- 活动价 --> |
92 | <view class="price"> | 92 | <view class="price"> |
93 | <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> | 93 | <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> |
pages/user/index/index.wxml
@@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
90 | <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image> | 90 | <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image> |
91 | <view class="member fs28 "> 加入plus会员预计可省3031元</view> | 91 | <view class="member fs28 "> 加入plus会员预计可省3031元</view> |
92 | </view> | 92 | </view> |
93 | - <view class="xc-opening-button t-c" data-url="/pages/user/cardinfo/cardinfo" bindtap="goto"> | 93 | + <view class="xc-opening-button t-c" data-url="/packageE/pages/user/cardinfo/cardinfo" bindtap="goto"> |
94 | <view class="xc-opening fs28">立即续费</view> | 94 | <view class="xc-opening fs28">立即续费</view> |
95 | </view> | 95 | </view> |
96 | </view> | 96 | </view> |
pages/user/plus/plus.js
@@ -174,7 +174,7 @@ Page({ | @@ -174,7 +174,7 @@ Page({ | ||
174 | success: function (e) { | 174 | success: function (e) { |
175 | var userInfo = e.data.data; | 175 | var userInfo = e.data.data; |
176 | if (userInfo['card_field'] && !getApp().globalData.is_card_back) { | 176 | if (userInfo['card_field'] && !getApp().globalData.is_card_back) { |
177 | - var u_url = "/pages/user/cardinfo/cardinfo"; | 177 | + var u_url = "/packageE/pages/user/cardinfo/cardinfo"; |
178 | wx.reLaunch({ | 178 | wx.reLaunch({ |
179 | url: u_url | 179 | url: u_url |
180 | }) | 180 | }) |
@@ -501,7 +501,7 @@ Page({ | @@ -501,7 +501,7 @@ Page({ | ||
501 | }); | 501 | }); |
502 | return false; | 502 | return false; |
503 | } else { | 503 | } else { |
504 | - var u_url = "/pages/user/cardinfo/cardinfo"; | 504 | + var u_url = "/packageE/pages/user/cardinfo/cardinfo"; |
505 | wx.reLaunch({ | 505 | wx.reLaunch({ |
506 | url: u_url | 506 | url: u_url |
507 | }) | 507 | }) |
utils/util.js
@@ -697,7 +697,52 @@ module.exports = { | @@ -697,7 +697,52 @@ module.exports = { | ||
697 | } | 697 | } |
698 | }) | 698 | }) |
699 | }, | 699 | }, |
700 | + //检验等级价格 | ||
701 | + get_plus_name_price:function(sw_arr,th){ | ||
702 | + var that=this; | ||
703 | + //---如果后台又开等级卡的开关--- | ||
704 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | ||
705 | + th.setData({ | ||
706 | + rank_switch: true | ||
707 | + }); | ||
708 | + //---回调卡的列表--- | ||
709 | + th.getPlusCardType(function (ob) { | ||
710 | + th.setData({ | ||
711 | + card_list: ob.card_list | ||
712 | + }); | ||
713 | + var ti = setInterval(function () { | ||
714 | + var user = getApp().globalData.userInfo; | ||
715 | + if (!user) return false; | ||
716 | + clearInterval(ti); | ||
717 | + | ||
718 | + if (user.card_field && user['card_expiredate']) { | ||
719 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
720 | + var end = new Date(str); | ||
721 | + end = Date.parse(end) / 1000; | ||
722 | + var now = that.gettimestamp(); | ||
723 | + | ||
724 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
725 | + if (user.card_field && now < end) { | ||
726 | + var card_name = ob.name_map.get(user.card_field); | ||
727 | + if (card_name && card_name.length > 6) card_name = card_name.substring(0, 6); | ||
728 | + var is_near_date = 0; | ||
729 | + if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天 | ||
730 | + | ||
731 | + th.setData({ | ||
732 | + card_field: user.card_field, | ||
733 | + card_name: card_name, | ||
734 | + card_list: ob.card_list, | ||
735 | + is_near_date:is_near_date | ||
736 | + }); | ||
737 | + } | ||
738 | + | ||
739 | + } | ||
740 | + | ||
741 | + }, 500) | ||
742 | + }) | ||
700 | 743 | ||
744 | + } | ||
745 | + }, | ||
701 | 746 | ||
702 | unserialize: unserialize, | 747 | unserialize: unserialize, |
703 | _throttle:_throttle, | 748 | _throttle:_throttle, |