Commit 2d0b1b67f32c32657d351fdc5e29654f0cd155a2
Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp
Showing
35 changed files
with
835 additions
and
290 deletions
app.json
components/diy_public/diy_public.js
1 | 1 | // var e = function(e) { |
2 | 2 | // return e && e.__esModule ? e : { |
3 | 3 | // default: e |
4 | -// }; | |
4 | +// }; | |
5 | 5 | // }(require("../../utils/LoadMore3.js")), |
6 | 6 | // n = new e.default(), |
7 | 7 | var t = getApp(), |
... | ... | @@ -48,7 +48,8 @@ Component({ |
48 | 48 | imgobj:{ |
49 | 49 | '1':"/miniapp/images/component/seckill.png", |
50 | 50 | '2':"/miniapp/images/component/pingd/pingd.png", |
51 | - '6':"/miniapp/images/component/pingd/pingd.png" | |
51 | + '6':"/miniapp/images/component/pingd/pingd.png", | |
52 | + '8':"/miniapp/images/component/presale.png", | |
52 | 53 | }, |
53 | 54 | nav1:'/packageA/pages/goodsInfo/goodsInfo?', |
54 | 55 | nav2:'/pages/goods/goodsInfo/goodsInfo?', |
... | ... | @@ -99,6 +100,13 @@ Component({ |
99 | 100 | nav2:'/pages/goods/goodsInfo/goodsInfo?' |
100 | 101 | }) |
101 | 102 | } |
103 | + if (this.data.prom_type==8) { //预售 | |
104 | + this.setData({ | |
105 | + prom_text:'已售', | |
106 | + nav1:'/packageC/pages/presell/goodsInfo/goodsInfo?', | |
107 | + nav2:'/packageC/pages/presell/goodsInfo/goodsInfo?' | |
108 | + }) | |
109 | + } | |
102 | 110 | var g_id = this.data.object; |
103 | 111 | |
104 | 112 | this.init(g_id); |
... | ... | @@ -153,12 +161,21 @@ Component({ |
153 | 161 | +os.stoid+"&aidlist="+goodsidlist + "&user_id="+user_id; |
154 | 162 | } |
155 | 163 | |
164 | + if (th.data.prom_type==8) { //预售 | |
165 | + gUrl="/api/weshop/marketing/marketingPresellList/page?store_id=" | |
166 | + +os.stoid+"&goodsidlist="+goodsidlist + "&user_id="+user_id+'&is_end=0&timetype=3&isuse=1'; | |
167 | + } | |
156 | 168 | |
157 | 169 | |
158 | - app.request.promiseGet(gUrl, {}).then(res => { | |
159 | 170 | |
171 | + app.request.promiseGet(gUrl, {}).then(res => { | |
172 | + | |
160 | 173 | //如果秒杀的数组为空的时候 |
161 | 174 | var goodslist = res.data.data; |
175 | + if (th.data.prom_type==8) { //预售 | |
176 | + goodslist = res.data.data ? res.data.data.pageData : [] | |
177 | + } | |
178 | + | |
162 | 179 | //就算是添加的活动已经过期,就要用最新的进行中活动 |
163 | 180 | if (goodslist && goodslist.length > 0) { |
164 | 181 | th.set_goods_list(g_id.data, goodslist); |
... | ... | @@ -197,6 +214,18 @@ Component({ |
197 | 214 | timetype: 2, |
198 | 215 | } |
199 | 216 | } |
217 | + if (this.data.prom_type==8) { //预售 | |
218 | + gUrl="/api/weshop/marketing/marketingPresellList/page?page=1&pageSize=9" | |
219 | + req={ | |
220 | + store_id:os.stoid, | |
221 | + is_end:0, | |
222 | + timetype:3, | |
223 | + isuse:1, | |
224 | + page:1, | |
225 | + user_id:user_id, | |
226 | + pageSize:9 | |
227 | + } | |
228 | + } | |
200 | 229 | |
201 | 230 | getApp().request.promiseGet(gUrl, |
202 | 231 | { isShowLoading: 1, data:req } |
... | ... | @@ -211,6 +240,7 @@ Component({ |
211 | 240 | |
212 | 241 | //就算是添加的活动已经过期,就要用最新的活动 |
213 | 242 | set_goods_list(g_id, goodslist) { |
243 | + | |
214 | 244 | let prom_type=this.data.prom_type |
215 | 245 | goodslist.forEach(function (vy, indy) { |
216 | 246 | if(!vy.id) vy.id=vy.prom_id; |
... | ... | @@ -240,29 +270,30 @@ Component({ |
240 | 270 | let item=all_array[i]; |
241 | 271 | if(item.user_price) item.price=item.user_price; |
242 | 272 | if(item.start_time > newTime) { |
243 | - item.status = 0; | |
273 | + item.status = 0; //活动没开始 | |
244 | 274 | } else if(item.end_time > newTime) { |
245 | - item.status = 1; | |
275 | + item.status = 1; // 活动进行中 | |
246 | 276 | }; |
247 | 277 | |
248 | 278 | } |
249 | 279 | |
250 | 280 | |
251 | - var promisies = []; | |
252 | - for (const key in all_array) { | |
253 | - if (Object.hasOwnProperty.call(all_array, key)) { | |
254 | - const val = all_array[key]; | |
255 | - | |
256 | - promisies[key] = getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | |
257 | - os.stoid + "/"+prom_type+"/" + val.id, | |
258 | - {} | |
259 | - ).then(res => { | |
260 | - if (res.data.code == 0) { | |
261 | - if (res.data.data <= 0) all_array[key].status = 2; | |
262 | - }; | |
263 | - }); | |
264 | - } | |
265 | - } | |
281 | + var promisies = []; | |
282 | + if (th.data.prom_type !=8) { | |
283 | + for (const key in all_array) { | |
284 | + if (Object.hasOwnProperty.call(all_array, key)) { | |
285 | + const val = all_array[key]; | |
286 | + promisies[key] = getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | |
287 | + os.stoid + "/"+prom_type+"/" + val.id, | |
288 | + {} | |
289 | + ).then(res => { | |
290 | + if (res.data.code == 0) { | |
291 | + if (res.data.data <= 0) all_array[key].status = 2;//已售完 | |
292 | + }; | |
293 | + }); | |
294 | + } | |
295 | + } | |
296 | + } | |
266 | 297 | |
267 | 298 | |
268 | 299 | Promise.all(promisies).then(() => { |
... | ... | @@ -271,10 +302,24 @@ Component({ |
271 | 302 | for(let i in all_array){ |
272 | 303 | let item=all_array[i]; |
273 | 304 | if(newTime > item.end_time) { |
274 | - all_array[i].status = 3; | |
305 | + all_array[i].status = 3; //活动结束 | |
275 | 306 | }; |
276 | 307 | // let price=all_array[i].price.toFixed(2) |
277 | 308 | let price=all_array[i].price + '' |
309 | + if (th.data.prom_type==8) { //预售 | |
310 | + price = all_array[i].presell_price + '' | |
311 | + if (all_array[i].status ===0) { | |
312 | + all_array[i].goods_num=all_array[i].presell_sumqty*1 + all_array[i].virtual_qty*1 | |
313 | + all_array[i].buy_num=all_array[i].buy_goodnum | |
314 | + }else{ | |
315 | + all_array[i].goods_num=all_array[i].presell_sumqty*1 + all_array[i].virtual_qty*1 | |
316 | + all_array[i].buy_num=all_array[i].buy_goodnum + all_array[i].virtual_qty*1 | |
317 | + } | |
318 | + | |
319 | + | |
320 | + } | |
321 | + | |
322 | + | |
278 | 323 | if (price && price.indexOf('.') > -1) { |
279 | 324 | let priceArr = price.split(".") |
280 | 325 | all_array[i].price_n = priceArr[0] |
... | ... | @@ -416,6 +461,9 @@ Component({ |
416 | 461 | if (this.data.prom_type==2) { //团购 |
417 | 462 | url="/packageC/pages/group_list/group_list"; |
418 | 463 | } |
464 | + if (this.data.prom_type==8) { //预售 | |
465 | + url="/packageC/pages/presell/list/list"; | |
466 | + } | |
419 | 467 | |
420 | 468 | wx.navigateTo({ |
421 | 469 | url | ... | ... |
components/diy_public/diy_public.wxml
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> |
17 | 17 | <block wx:for="{{goods_array}}"> |
18 | 18 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> |
19 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | |
19 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | |
20 | 20 | <view class="topBox"> |
21 | 21 | <view class="imgBox"> |
22 | 22 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> |
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | </view> |
44 | 44 | </block> |
45 | 45 | </view> |
46 | - <view class="ellipsis-2n new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | |
46 | + <view class="ellipsis-2n new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}"><text class="lucky" wx:if="{{prom_type==9}}">{{aitem.group_num}}人团</text>{{aitem.goods_name}}</view> | |
47 | 47 | <view class="buy_box pricefs28" style="{{(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> |
48 | 48 | <view class="mgr10" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> |
49 | 49 | <view wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | <view class="flex" style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
58 | 58 | <view class="clor" > |
59 | 59 | <text wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></text> |
60 | - <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</text> | |
60 | + <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</text> | |
61 | 61 | </view> |
62 | 62 | </view> |
63 | 63 | </view> |
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') }}"> |
77 | 77 | <block wx:for="{{goods_array}}"> |
78 | 78 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')+ (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> |
79 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | |
79 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | |
80 | 80 | <view class="topBox"> |
81 | 81 | <view class="imgBox"> |
82 | 82 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> |
... | ... | @@ -97,7 +97,7 @@ |
97 | 97 | </view> |
98 | 98 | </block> |
99 | 99 | </view> |
100 | - <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; '+ (prom_type==2 ? 'margin-bottom:10rpx;':'') + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | |
100 | + <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; '+ (prom_type==2 ? 'margin-bottom:10rpx;':'') + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}"><text class="lucky" wx:if="{{prom_type==9}}">{{aitem.group_num}}人团</text>{{aitem.goods_name}}</view> | |
101 | 101 | <view class="buy_box fs24" style="{{'margin-bottom:10rpx;'+(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> |
102 | 102 | <view class="mgr10 lineh24" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> |
103 | 103 | <view class="lineh24" wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> |
... | ... | @@ -112,7 +112,7 @@ |
112 | 112 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
113 | 113 | <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
114 | 114 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
115 | - <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</view> | |
115 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view> | |
116 | 116 | </view> |
117 | 117 | </view> |
118 | 118 | <view> |
... | ... | @@ -130,7 +130,7 @@ |
130 | 130 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> |
131 | 131 | <block wx:for="{{goods_array}}"> |
132 | 132 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}"> |
133 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | |
133 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | |
134 | 134 | <view class="topBox"> |
135 | 135 | <view class="imgBox"> |
136 | 136 | <!-- <image mode="{{object.picture_fill==1 ? 'aspectFill' : 'scaleToFill'}}" class="{{'new_item1_image '+ 'aspect_ratio'+object.picture_scale}}" style="{{'width:'+img_width+';height:'+img_height}}" src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> --> |
... | ... | @@ -151,7 +151,7 @@ |
151 | 151 | </view> |
152 | 152 | </block> |
153 | 153 | </view> |
154 | - <view class="ellipsis-2 new_item1_goods_name " style="{{'height:88rpx;font-size:24rpx;' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | |
154 | + <view class="ellipsis-2 new_item1_goods_name " style="{{'height:88rpx;font-size:24rpx;' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}"><text class="lucky" wx:if="{{prom_type==9}}">{{aitem.group_num}}人团</text>{{aitem.goods_name}}</view> | |
155 | 155 | <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price clor7b" style="{{'display:block;font-size:20rpx; '+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
156 | 156 | <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> |
157 | 157 | <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text> |
... | ... | @@ -160,7 +160,7 @@ |
160 | 160 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
161 | 161 | <view style="{{'font-size: 20rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
162 | 162 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs38">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
163 | - <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price || aitem.market_price}}</view> | |
163 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view> | |
164 | 164 | </view> |
165 | 165 | </view> |
166 | 166 | <view> |
... | ... | @@ -178,7 +178,7 @@ |
178 | 178 | <view style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'}}" class="{{'flex2 new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') }}"> |
179 | 179 | <block wx:for="{{goods_array}}"> |
180 | 180 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> |
181 | - <navigator style="display: flex;" url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | |
181 | + <navigator style="display: flex;" url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+prom_type+'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | |
182 | 182 | <view style="width: 33%;" class="topBox"> |
183 | 183 | <view class="imgBox"> |
184 | 184 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
... | ... | @@ -198,7 +198,7 @@ |
198 | 198 | </block> |
199 | 199 | </view> |
200 | 200 | <view style="{{'width: 67%;display: flex;flex-wrap: wrap;padding-left: 10rpx;' + (object.text_align==2 ? 'justify-content:center;' :'' )}}"> |
201 | - <view class="ellipsis-2 new_item1_goods_name" style="{{'font-size:28rpx;height:100rpx;'+(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | |
201 | + <view class="ellipsis-2 new_item1_goods_name" style="{{'font-size:28rpx;height:100rpx;'+(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}"><text class="lucky" wx:if="{{prom_type==9}}">{{aitem.group_num}}人团</text>{{aitem.goods_name}}</view> | |
202 | 202 | <!-- <view class="buy_box fs24" style="{{'margin-bottom:10rpx;' +(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> |
203 | 203 | <view class="mgr10" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> |
204 | 204 | <view wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> |
... | ... | @@ -210,7 +210,7 @@ |
210 | 210 | <view class="new_item1_price clor7b" style="{{'width:100%;' + (object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> |
211 | 211 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
212 | 212 | <view style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
213 | - <view class="clor" style="margin-right: 5rpx;" ><text wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></text><text style="color: #7b7b7b;margin-left: 5rpx;" wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price || aitem.market_price}}</text></view> | |
213 | + <view class="clor" style="margin-right: 5rpx;" ><text wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></text><text style="color: #7b7b7b;margin-left: 5rpx;" wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</text></view> | |
214 | 214 | |
215 | 215 | </view> |
216 | 216 | </view> |
... | ... | @@ -231,7 +231,7 @@ |
231 | 231 | <block wx:for="{{goods_array}}"> |
232 | 232 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
233 | 233 | <view wx:if="{{aind==0}}" class="{{'new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px;'}}"> |
234 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | |
234 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | |
235 | 235 | <view class="topBox"> |
236 | 236 | <view class="imgBox"> |
237 | 237 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
... | ... | @@ -255,7 +255,7 @@ |
255 | 255 | </view> |
256 | 256 | </block> |
257 | 257 | </view> |
258 | - <view class="ellipsis-2n new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | |
258 | + <view class="ellipsis-2n new_item1_goods_name" style="{{(object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}"><text class="lucky" wx:if="{{prom_type==9}}">{{aitem.group_num}}人团</text>{{aitem.goods_name}}</view> | |
259 | 259 | <view class="buy_box pricefs28" style="{{(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> |
260 | 260 | <view class="mgr10" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> |
261 | 261 | <view wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> |
... | ... | @@ -269,7 +269,7 @@ |
269 | 269 | <view class="flex" style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
270 | 270 | <view class="clor" > |
271 | 271 | <text wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></text> |
272 | - <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</text> | |
272 | + <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</text> | |
273 | 273 | </view> |
274 | 274 | </view> |
275 | 275 | </view> |
... | ... | @@ -281,7 +281,7 @@ |
281 | 281 | </navigator> |
282 | 282 | </view> |
283 | 283 | <view wx:if="{{aind==1}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'')}}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> |
284 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | |
284 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | |
285 | 285 | <view class="topBox"> |
286 | 286 | <view class="imgBox"> |
287 | 287 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
... | ... | @@ -299,7 +299,7 @@ |
299 | 299 | </view> |
300 | 300 | </block> |
301 | 301 | </view> |
302 | - <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; '+ (prom_type==2 ? 'margin-bottom:10rpx;':'') + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | |
302 | + <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; '+ (prom_type==2 ? 'margin-bottom:10rpx;':'') + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}"><text class="lucky" wx:if="{{prom_type==9}}">{{aitem.group_num}}人团</text>{{aitem.goods_name}}</view> | |
303 | 303 | <view class="buy_box fs24" style="{{'margin-bottom:10rpx;' +(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> |
304 | 304 | <view class="mgr10 lineh24" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> |
305 | 305 | <view class="lineh24" wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> |
... | ... | @@ -312,7 +312,7 @@ |
312 | 312 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
313 | 313 | <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
314 | 314 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
315 | - <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</view> | |
315 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view> | |
316 | 316 | </view> |
317 | 317 | </view> |
318 | 318 | <view> |
... | ... | @@ -323,7 +323,7 @@ |
323 | 323 | </navigator> |
324 | 324 | </view> |
325 | 325 | <view wx:if="{{aind==2}}" class="{{'boxpad new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/2 - ' + object.product_spacing/2+'px)')}}"> |
326 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | |
326 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | |
327 | 327 | <view class="topBox"> |
328 | 328 | <view class="imgBox"> |
329 | 329 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
... | ... | @@ -341,7 +341,7 @@ |
341 | 341 | </view> |
342 | 342 | </block> |
343 | 343 | </view> |
344 | - <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; '+ (prom_type==2 ? 'margin-bottom:10rpx;':'') + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | |
344 | + <view class="ellipsis-2 new_item1_goods_name" style="{{'height:88rpx;font-size:24rpx; '+ (prom_type==2 ? 'margin-bottom:10rpx;':'') + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}"><text class="lucky" wx:if="{{prom_type==9}}">{{aitem.group_num}}人团</text>{{aitem.goods_name}}</view> | |
345 | 345 | <view class="buy_box fs24" style="{{'margin-bottom:10rpx;' +(object.text_align==2 ? ' justify-content: center;' :'' )}}" wx:if="{{prom_type==6 && (object.group_size || object.group_type)}}"> |
346 | 346 | <view class="mgr10 lineh24" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view> |
347 | 347 | <view class="lineh24" wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view> |
... | ... | @@ -354,7 +354,7 @@ |
354 | 354 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
355 | 355 | <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
356 | 356 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
357 | - <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price || aitem.market_price}}</view> | |
357 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price || aitem.shop_price }}</view> | |
358 | 358 | </view> |
359 | 359 | </view> |
360 | 360 | <view> |
... | ... | @@ -401,7 +401,7 @@ |
401 | 401 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
402 | 402 | <view style="{{'font-size: 28rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
403 | 403 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text style="font-size:42rpx;">{{aitem.price}}</text></view> |
404 | - <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price || aitem.market_price}}</view> | |
404 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view> | |
405 | 405 | </view> |
406 | 406 | </view> |
407 | 407 | <view> |
... | ... | @@ -422,7 +422,7 @@ |
422 | 422 | <swiper indicator-dots style="{{'padding-left:'+object.page_margins+'px;padding-right:'+object.page_margins+'px;'+(swiperHeight ? ('height:'+swiperHeight+';'):'' )}}" class="{{' new_item1_box '+ ((object.product_style==1 || object.product_style==3 )? ' bgf ':'')}}"> |
423 | 423 | <swiper-item wx:for="{{goods_array}}" class="flex2" style="padding: 5rpx;"> |
424 | 424 | <view wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" class="{{'boxpad swiper_h new_item1 ' + (object.product_style==2 ? ' boxsha ':'') + (object.product_style==3 ? ' aborder ':'') + ((object.product_style==1 || object.product_style==3 )? ' bgf ':'') + (object.chamfer_of_main_drawing==2 ? ' but_radius5 ':'') }}" style="{{'margin-bottom:'+object.product_spacing+'px; '+('width:calc(100%/3 - ' + (object.product_spacing*2)/3+'px)')}}"> |
425 | - <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id)}}" class="s1_gk_a1"> | |
425 | + <navigator url="{{aitem.goods_type == 1 ? ( nav1 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=' + prom_type + '&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id ) : ( nav2 + 'goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type='+ prom_type +'&prom_id=' + aitem.id +'&pre_id=' + aitem.id + '&group_id=' + aitem.id )}}" class="s1_gk_a1"> | |
426 | 426 | <view class="topBox"> |
427 | 427 | <view class="imgBox"> |
428 | 428 | <view class="{{'container'+object.picture_scale}}" style="{{object.picture_fill==1 ? 'background-color: #fff;' : ''}}"> |
... | ... | @@ -440,7 +440,7 @@ |
440 | 440 | </view> |
441 | 441 | </block> |
442 | 442 | </view> |
443 | - <view class="ellipsis-2 new_item1_goods_name " style="{{'height:88rpx;font-size:24rpx;' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}">{{aitem.goods_name}}</view> | |
443 | + <view class="ellipsis-2 new_item1_goods_name " style="{{'height:88rpx;font-size:24rpx;' + (object.text_style==2 ? 'font-weight: bold;':'') + (object.text_align==2 ? 'text-align:center;' :'' )}}" wx:if="{{object.trade_name}}"><text class="lucky" wx:if="{{prom_type==9}}">{{aitem.group_num}}人团</text>{{aitem.goods_name}}</view> | |
444 | 444 | <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price clor7b" style="{{'display:block;font-size:20rpx; '+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
445 | 445 | <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text> |
446 | 446 | <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text> |
... | ... | @@ -449,7 +449,7 @@ |
449 | 449 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
450 | 450 | <view style="{{'font-size: 20rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
451 | 451 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs38">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
452 | - <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price || aitem.market_price}}</view> | |
452 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price || aitem.shop_price }}</view> | |
453 | 453 | </view> |
454 | 454 | </view> |
455 | 455 | <view> | ... | ... |
components/diy_seckill/diy_seckill.js
... | ... | @@ -217,7 +217,28 @@ Component({ |
217 | 217 | all_array[i].price_n = price |
218 | 218 | } |
219 | 219 | |
220 | - all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 | |
220 | + let virtual = all_array[i].virtual ? all_array[i].virtual : 0 | |
221 | + if (all_array[i].status) { | |
222 | + if (all_array[i].is_virtual_count ) { | |
223 | + // all_array[i].goods_num -= all_array[i].virtual | |
224 | + all_array[i].buy_num += virtual*1 | |
225 | + all_array[i].residue = all_array[i].goods_num*1 - all_array[i].buy_num*1 | |
226 | + }else{ | |
227 | + all_array[i].buy_num += virtual*1 | |
228 | + all_array[i].residue=all_array[i].goods_num*1 + virtual*1 - all_array[i].buy_num*1 | |
229 | + } | |
230 | + }else{ | |
231 | + if (all_array[i].is_virtual_count ) { | |
232 | + // all_array[i].goods_num -= all_array[i].virtual | |
233 | + all_array[i].buy_num = 0 | |
234 | + all_array[i].residue = all_array[i].goods_num*1 - all_array[i].buy_num*1 | |
235 | + }else{ | |
236 | + all_array[i].buy_num = 0 | |
237 | + all_array[i].residue=all_array[i].goods_num*1 + virtual*1 - all_array[i].buy_num*1 | |
238 | + } | |
239 | + } | |
240 | + | |
241 | + // all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 | |
221 | 242 | if (all_array[i].residue && all_array[i].residue > 0 && all_array[i].status !=2) { |
222 | 243 | empty.push(all_array[i]) |
223 | 244 | } | ... | ... |
components/diy_seckill/diy_seckill.wxml
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | <view class="flex" style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
53 | 53 | <view class="clor" > |
54 | 54 | <text wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></text> |
55 | - <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price}}</text> | |
55 | + <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</text> | |
56 | 56 | </view> |
57 | 57 | </view> |
58 | 58 | </view> |
... | ... | @@ -101,7 +101,7 @@ |
101 | 101 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
102 | 102 | <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
103 | 103 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
104 | - <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price}}</view> | |
104 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> | |
105 | 105 | </view> |
106 | 106 | </view> |
107 | 107 | <view> |
... | ... | @@ -149,7 +149,7 @@ |
149 | 149 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
150 | 150 | <view style="{{'font-size: 20rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
151 | 151 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs38">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
152 | - <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price}}</view> | |
152 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> | |
153 | 153 | </view> |
154 | 154 | </view> |
155 | 155 | <view> |
... | ... | @@ -195,7 +195,7 @@ |
195 | 195 | <view class="new_item1_price clor7b" style="{{'width:100%;' + (object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}"> |
196 | 196 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
197 | 197 | <view style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
198 | - <view class="clor" style="margin-right: 5rpx;" ><text wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></text><text style="color: #7b7b7b;margin-left: 5rpx;" wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price}}</text></view> | |
198 | + <view class="clor" style="margin-right: 5rpx;" ><text wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></text><text style="color: #7b7b7b;margin-left: 5rpx;" wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</text></view> | |
199 | 199 | |
200 | 200 | </view> |
201 | 201 | </view> |
... | ... | @@ -250,7 +250,7 @@ |
250 | 250 | <view class="flex" style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
251 | 251 | <view class="clor" > |
252 | 252 | <text wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></text> |
253 | - <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price}}</text> | |
253 | + <text style="margin-left: 5rpx;" wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</text> | |
254 | 254 | </view> |
255 | 255 | </view> |
256 | 256 | </view> |
... | ... | @@ -289,7 +289,7 @@ |
289 | 289 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
290 | 290 | <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
291 | 291 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
292 | - <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price}}</view> | |
292 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> | |
293 | 293 | </view> |
294 | 294 | </view> |
295 | 295 | <view> |
... | ... | @@ -327,7 +327,7 @@ |
327 | 327 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
328 | 328 | <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
329 | 329 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs42">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
330 | - <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.shop_price}}</view> | |
330 | + <view wx:if="{{object.wholesale_price}}" class="clor7b">¥{{aitem.market_price}}</view> | |
331 | 331 | </view> |
332 | 332 | </view> |
333 | 333 | <view> |
... | ... | @@ -374,7 +374,7 @@ |
374 | 374 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
375 | 375 | <view style="{{'font-size: 28rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
376 | 376 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text style="font-size:42rpx;">{{aitem.price}}</text></view> |
377 | - <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price}}</view> | |
377 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> | |
378 | 378 | </view> |
379 | 379 | </view> |
380 | 380 | <view> |
... | ... | @@ -422,7 +422,7 @@ |
422 | 422 | <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}"> |
423 | 423 | <view style="{{'font-size: 20rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}"> |
424 | 424 | <view class="clor" style="margin-right: 5rpx;" wx:if="{{object.commodity_price}}">¥<text class="pricefs38">{{aitem.price_n}}</text><text wx:if="{{aitem.price_xs}}">.{{aitem.price_xs}}</text></view> |
425 | - <view wx:if="{{object.wholesale_price}}">¥{{aitem.shop_price}}</view> | |
425 | + <view wx:if="{{object.wholesale_price}}">¥{{aitem.market_price}}</view> | |
426 | 426 | </view> |
427 | 427 | </view> |
428 | 428 | <view> | ... | ... |
packageA/pages/details_serviceCard/details_serviceCard.js
... | ... | @@ -747,10 +747,24 @@ Page({ |
747 | 747 | return false; |
748 | 748 | } |
749 | 749 | |
750 | + //指定门店的控制 | |
751 | + if (act_details.pick_up_lists) { | |
752 | + var idx0=act_details.pick_up_lists.findIndex(function (e){ | |
753 | + return e.pickup_id==it.pickup_id; | |
754 | + }) | |
755 | + if(idx0<0){ | |
756 | + getApp().confirmBox(it.service_name + "拼团活动的门店不可售"); | |
757 | + th.setData({ paying: 0 }); | |
758 | + flag = false; | |
759 | + return false; | |
760 | + } | |
761 | + } | |
762 | + | |
763 | + | |
750 | 764 | }; |
751 | 765 | }); |
752 | 766 | |
753 | - if(act_details.buy_limit>0){ | |
767 | + if(act_details.buy_limit>0 && flag){ | |
754 | 768 | await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { |
755 | 769 | data: { |
756 | 770 | store_id: store_id, | ... | ... |
packageA/pages/goodsInfo/goodsInfo.wxml
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | <block wx:if="{{prom_type==1}}"> |
115 | 115 | <view class="goods-num"> |
116 | 116 | <block> |
117 | - <view class="stock">总数量:{{prom_act.goods_num+prom_act.virtual}}件</view> | |
117 | + <view class="stock">总数量:{{prom_act.is_virtual_count ? prom_act.goods_num : (prom_act.goods_num+prom_act.virtual)}}件</view> | |
118 | 118 | |
119 | 119 | <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> |
120 | 120 | <view class="stock" wx:else>限购:不限</view> | ... | ... |
packageA/pages/quan_pro/quan_pro.js
... | ... | @@ -52,6 +52,8 @@ Page({ |
52 | 52 | th.setData({getcurday:ut.gettimestamp()}); |
53 | 53 | |
54 | 54 | var rs=await getApp().request.promiseGet("/api/weshop/prom/coupon/get/"+th.data.id, {}) |
55 | + // console.error('分享请求数据'); | |
56 | + // console.error(rs); | |
55 | 57 | if(!rs){ |
56 | 58 | th.setData({is_get:1}); |
57 | 59 | return false; |
... | ... | @@ -64,6 +66,17 @@ Page({ |
64 | 66 | //如果只限定链接的时候,要取消分享按钮 |
65 | 67 | if(r_data.is_share){ |
66 | 68 | wx.hideShareMenu(); |
69 | + wx.offCopyUrl() | |
70 | + //替换掉复制链接 | |
71 | + wx.onCopyUrl(() => { | |
72 | + setTimeout(()=>{ | |
73 | + wx.setClipboardData({ | |
74 | + data: '暂不支持分享', | |
75 | + success (res) { } | |
76 | + }) | |
77 | + },500) | |
78 | + return { query: 'a=1&b=2' } | |
79 | + }) | |
67 | 80 | } |
68 | 81 | |
69 | 82 | if(r_data.store_id!=os.stoid){ | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/buy_pt.wxml
... | ... | @@ -54,7 +54,8 @@ |
54 | 54 | |
55 | 55 | <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> |
56 | 56 | </view> |
57 | - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
57 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(该店不可售)</view> | |
58 | + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act && !is_normal}}">(该店不可售)</view> | |
58 | 59 | <view class="no_store" wx:elif="{{is_normal && def_pick_store && def_pick_store.CanOutQty<=0}}">(库存不足)</view> |
59 | 60 | <view class="fs24 xc-ash-9f xc-distance-top" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">地址:{{def_pick_store.fulladdress}}</view> |
60 | 61 | </view> |
... | ... | @@ -146,7 +147,7 @@ |
146 | 147 | <view class="spec-cart-btns"> |
147 | 148 | <!-- 根本就找不到门店 --> |
148 | 149 | <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> |
149 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
150 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
150 | 151 | </block> |
151 | 152 | <block wx:else> |
152 | 153 | |
... | ... | @@ -182,14 +183,16 @@ |
182 | 183 | </block> |
183 | 184 | </block> |
184 | 185 | </view> |
185 | - | |
186 | 186 | </block> |
187 | 187 | <block wx:else> |
188 | 188 | <!-- 根本就找不到门店 --> |
189 | 189 | <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> |
190 | - <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
191 | - </block> | |
192 | - <block wx:else> | |
190 | + <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
191 | + </block> | |
192 | + <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}"> | |
193 | + <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
194 | + </block> | |
195 | + <block wx:else> | |
193 | 196 | <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> |
194 | 197 | </block> |
195 | 198 | </block> | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
... | ... | @@ -354,17 +354,17 @@ Page({ |
354 | 354 | if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) |
355 | 355 | var ee = JSON.parse(JSON.stringify(e)); |
356 | 356 | //--定时器推迟一下-- |
357 | - setTimeout(function () { | |
358 | - if (!th.data.data) return false; | |
359 | - var ser_card = th.data.data; | |
360 | - //--如果默认门店不在等级卡的默认们店以内 | |
361 | - if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(ee.keyid) == -1) { | |
362 | - ee.is_no_dis = 1; | |
363 | - } | |
364 | 357 | |
365 | 358 | var appd = getApp().globalData; |
366 | 359 | var w_time = setInterval(function () { |
367 | 360 | if (that.data.is_get_local_ok == 0) return false; |
361 | + if (!th.data.data) return false; | |
362 | + var ser_card = th.data.data; | |
363 | + //--如果默认门店不在等级卡的默认们店以内 | |
364 | + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(ee.keyid) == -1) { | |
365 | + ee.is_no_dis = 1; | |
366 | + } | |
367 | + | |
368 | 368 | clearInterval(w_time); |
369 | 369 | var distance = null; |
370 | 370 | var e = JSON.parse(JSON.stringify(ee)); |
... | ... | @@ -429,7 +429,7 @@ Page({ |
429 | 429 | } |
430 | 430 | } |
431 | 431 | }, 500) |
432 | - }, 700) | |
432 | + | |
433 | 433 | |
434 | 434 | }); |
435 | 435 | |
... | ... | @@ -992,9 +992,6 @@ Page({ |
992 | 992 | |
993 | 993 | } |
994 | 994 | |
995 | - | |
996 | - | |
997 | - | |
998 | 995 | }, |
999 | 996 | |
1000 | 997 | |
... | ... | @@ -1003,6 +1000,7 @@ Page({ |
1003 | 1000 | openSpecModal: !1, |
1004 | 1001 | openSpecModal_pt: !1, |
1005 | 1002 | openSpecModal_flash_normal: !1, |
1003 | + is_normal:0 | |
1006 | 1004 | }); |
1007 | 1005 | }, |
1008 | 1006 | |
... | ... | @@ -1216,9 +1214,23 @@ Page({ |
1216 | 1214 | |
1217 | 1215 | //---------拿出门店分类和门店------------ |
1218 | 1216 | get_sto(e) { |
1217 | + var is_normal=e; | |
1219 | 1218 | var th = this, that = this; |
1219 | + | |
1220 | + if (e == 1) { | |
1221 | + th.setData({ | |
1222 | + is_normal: 1 | |
1223 | + }) | |
1224 | + } else { | |
1225 | + th.setData({ | |
1226 | + is_normal: 0 | |
1227 | + }) | |
1228 | + } | |
1229 | + | |
1220 | 1230 | var timer_get = setInterval(function () { |
1221 | 1231 | if (th.data.is_get_local_ok == 0) return false; |
1232 | + if (!th.data.fir_def_store) return false; | |
1233 | + | |
1222 | 1234 | var i = getApp().request; |
1223 | 1235 | if (!th.data.data) return false; |
1224 | 1236 | var dd = { |
... | ... | @@ -1240,7 +1252,8 @@ Page({ |
1240 | 1252 | } |
1241 | 1253 | |
1242 | 1254 | wx.showLoading({ |
1243 | - title: '加载中.' | |
1255 | + title: '加载中.', | |
1256 | + mask:true | |
1244 | 1257 | }); |
1245 | 1258 | //----------获取门店---------------- |
1246 | 1259 | getApp().request.promiseGet("/api/weshop/pickup/list", { |
... | ... | @@ -1249,16 +1262,6 @@ Page({ |
1249 | 1262 | var e = res; |
1250 | 1263 | if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { |
1251 | 1264 | |
1252 | - var his_cate_num = 0; | |
1253 | - for (let i in e.data.data.pageData) { | |
1254 | - let item = e.data.data.pageData[i]; | |
1255 | - if (item.category_id > 0) { | |
1256 | - his_cate_num = 1; | |
1257 | - break; | |
1258 | - } | |
1259 | - } | |
1260 | - e.his_cate_num = his_cate_num; | |
1261 | - | |
1262 | 1265 | //--普通门店排版,服务卡项有指定门店才能使用,所以要筛选一下-- |
1263 | 1266 | setTimeout(function () { |
1264 | 1267 | var sto_list = th.data.data.storageId; |
... | ... | @@ -1272,31 +1275,80 @@ Page({ |
1272 | 1275 | } |
1273 | 1276 | } |
1274 | 1277 | |
1275 | - //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
1276 | - if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
1277 | - th.setData({ | |
1278 | - def_pick_store: e.data.data.pageData[0], | |
1279 | - sto_sele_name: e.data.data.pageData[0].pickup_name, | |
1280 | - sto_sele_id: e.data.data.pageData[0].pickup_id, | |
1281 | - sto_sele_distr: e.data.data.pageData[0].distr_type, | |
1282 | - sto_sele_keyid: e.data.data.pageData[0].keyid, | |
1283 | - }); | |
1284 | - th.data.fir_def_store = e.data.data.pageData[0]; | |
1278 | + //如果有秒杀的指定门店 | |
1279 | + if(th.data.prom_type==6 && th.data.prom_act && th.data.prom_act.pick_up_lists && e.data.data.pageData.length && !is_normal){ | |
1280 | + var pick_up_lists=th.data.prom_act.pick_up_lists; | |
1281 | + for (var kq = 0; kq < e.data.data.pageData.length; kq++) { | |
1282 | + var it0=e.data.data.pageData[kq]; | |
1283 | + var idx0=pick_up_lists.findIndex(function (e){ | |
1284 | + return e.pickup_id==it0.pickup_id; | |
1285 | + }) | |
1286 | + if (idx0<0) { | |
1287 | + //删除 | |
1288 | + e.data.data.pageData.splice(kq--, 1); | |
1289 | + } | |
1290 | + } | |
1291 | + | |
1292 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | |
1293 | + //-- 查找一下门店有没有在 -- | |
1294 | + var idx1=pick_up_lists.findIndex(function (e){ | |
1295 | + return e.pickup_id==th.data.def_pick_store.pickup_id; | |
1296 | + }) | |
1297 | + if(idx1<0){ | |
1298 | + //如果是秒杀的指定门店,就要设置秒杀的 | |
1299 | + th.data.def_pick_store.is_no_dis_act=1; | |
1300 | + that.setData({ | |
1301 | + def_pick_store: th.data.def_pick_store | |
1302 | + }) | |
1303 | + } | |
1304 | + } | |
1305 | + | |
1285 | 1306 | } |
1286 | 1307 | |
1287 | - //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | |
1288 | - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
1289 | - for (var k = 0; k < e.data.data.pageData.length; k++) { | |
1290 | - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
1291 | - e.data.data.pageData.splice(k, 1); //删除 | |
1308 | + //-- 如果门店过滤后,还会是数量 -- | |
1309 | + if(e.data.data.pageData.length) { | |
1310 | + | |
1311 | + var his_cate_num = 0; | |
1312 | + for (let i in e.data.data.pageData) { | |
1313 | + let item = e.data.data.pageData[i]; | |
1314 | + if (item.category_id > 0) { | |
1315 | + his_cate_num = 1; | |
1292 | 1316 | break; |
1293 | 1317 | } |
1294 | 1318 | } |
1295 | - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
1296 | - } | |
1319 | + e.his_cate_num = his_cate_num; | |
1320 | + | |
1321 | + | |
1322 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
1323 | + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
1324 | + th.setData({ | |
1325 | + def_pick_store: e.data.data.pageData[0], | |
1326 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
1327 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
1328 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | |
1329 | + sto_sele_keyid: e.data.data.pageData[0].keyid, | |
1330 | + }); | |
1331 | + th.data.fir_def_store = e.data.data.pageData[0]; | |
1332 | + } | |
1333 | + | |
1334 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | |
1335 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
1336 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
1337 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
1338 | + e.data.data.pageData.splice(k, 1); //删除 | |
1339 | + break; | |
1340 | + } | |
1341 | + } | |
1342 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
1343 | + } | |
1297 | 1344 | |
1298 | - th.setData({all_pick_list: e.data.data.pageData}); | |
1299 | - th.deal_pickup(e); | |
1345 | + th.setData({all_pick_list: e.data.data.pageData}); | |
1346 | + th.deal_pickup(e); | |
1347 | + }else{ | |
1348 | + th.setData({all_pick_list: null, only_pk:null,def_pickpu_list:null }); | |
1349 | + | |
1350 | + wx.hideLoading(); | |
1351 | + } | |
1300 | 1352 | }, 800) |
1301 | 1353 | |
1302 | 1354 | } |
... | ... | @@ -3366,15 +3418,17 @@ Page({ |
3366 | 3418 | getApp().goto("/pages/team/team_success/team_success?ordersn=" + odr.order_sn); |
3367 | 3419 | |
3368 | 3420 | } else { |
3421 | + th.get_sto(); | |
3369 | 3422 | th.setData({ |
3370 | - is_normal: ind, | |
3423 | + is_normal: 0, | |
3371 | 3424 | openSpecModal_pt: 1 |
3372 | 3425 | }); |
3373 | 3426 | } |
3374 | 3427 | } |
3375 | 3428 | else { |
3429 | + th.get_sto(); | |
3376 | 3430 | th.setData({ |
3377 | - is_normal: ind, | |
3431 | + is_normal: 0, | |
3378 | 3432 | openSpecModal_pt: 1 |
3379 | 3433 | }); |
3380 | 3434 | } | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxml
... | ... | @@ -224,7 +224,8 @@ |
224 | 224 | <block wx:else> |
225 | 225 | <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(未找到门店)</view> |
226 | 226 | <block wx:else> |
227 | - <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
227 | + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(该店不可售)</view> | |
228 | + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}">(该店不可售)</view> | |
228 | 229 | </block> |
229 | 230 | </block> |
230 | 231 | |
... | ... | @@ -670,8 +671,9 @@ |
670 | 671 | <view class="flex xc-ash" style="flex-shrink:0;max-width: 62%;" > |
671 | 672 | <view class="fs30 xc-black3 address_name">{{item.pickup_name}} |
672 | 673 | <block wx:if="{{tool.is_no_dis(sele_g.storageId,item.keyid)}}"> |
673 | - <text class="no_store">(配送不匹配)</text> | |
674 | + <text class="no_store">(该店不可售)</text> | |
674 | 675 | </block> |
676 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
675 | 677 | </view> |
676 | 678 | </view> |
677 | 679 | <view> |
... | ... | @@ -700,8 +702,9 @@ |
700 | 702 | <view class="flex xc-ash"> |
701 | 703 | <view class="fs30 xc-black3 address_name">{{item.pickup_name}} |
702 | 704 | <block wx:if="{{tool.is_no_dis(sele_g.storageId,item.keyid)}}"> |
703 | - <text class="no_store">(配送不匹配)</text> | |
705 | + <text class="no_store">(该店不可售)</text> | |
704 | 706 | </block> |
707 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
705 | 708 | </view> |
706 | 709 | </view> |
707 | 710 | <view> |
... | ... | @@ -732,8 +735,9 @@ |
732 | 735 | <view class="flex xc-ash"> |
733 | 736 | <view class="fs28 xc-black3 address_name">{{item.pickup_name}} |
734 | 737 | <block wx:if="{{tool.is_no_dis(sele_g.storageId,item.keyid)}}"> |
735 | - <text class="no_store">(配送不匹配)</text> | |
738 | + <text class="no_store">(该店不可售)</text> | |
736 | 739 | </block> |
740 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
737 | 741 | </view> |
738 | 742 | </view> |
739 | 743 | <view> | ... | ... |
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.wxss
packageA/pages/serviceCard_pd/team_show/team_show.js
... | ... | @@ -608,6 +608,12 @@ Page({ |
608 | 608 | // if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ |
609 | 609 | // ee.is_no_dis=1; |
610 | 610 | // } |
611 | + var ser_card = th.data.goods; | |
612 | + //--如果默认门店不在等级卡的默认们店以内 | |
613 | + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(ee.keyid) == -1) { | |
614 | + ee.is_no_dis = 1; | |
615 | + } | |
616 | + | |
611 | 617 | |
612 | 618 | var appd=getApp().globalData; |
613 | 619 | var w_time = setInterval(function() { |
... | ... | @@ -1153,7 +1159,9 @@ Page({ |
1153 | 1159 | var timer_get = setInterval(function() { |
1154 | 1160 | if (th.data.is_get_local_ok == 0) return false; |
1155 | 1161 | if (!th.data.goods) return false; |
1156 | - var dd = null, i = getApp().request; | |
1162 | + if (!th.data.fir_def_store) return false; | |
1163 | + | |
1164 | + var dd = null, i = getApp().request; | |
1157 | 1165 | var g_distr_type = th.data.goods.distr_type; |
1158 | 1166 | |
1159 | 1167 | dd = { |
... | ... | @@ -1179,45 +1187,87 @@ Page({ |
1179 | 1187 | var e = res; |
1180 | 1188 | if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { |
1181 | 1189 | |
1182 | - var his_cate_num=0; | |
1183 | - for(let i in e.data.data.pageData){ | |
1190 | + var sto_list = th.data.goods.storageId; | |
1191 | + if (sto_list) { | |
1192 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
1193 | + var it = e.data.data.pageData[k]; | |
1194 | + if (sto_list.indexOf(it.keyid) == -1) { | |
1195 | + //删除 | |
1196 | + e.data.data.pageData.splice(k--, 1); | |
1197 | + } | |
1198 | + } | |
1199 | + } | |
1200 | + | |
1201 | + //如果有秒杀的指定门店 | |
1202 | + if( th.data.teamlist && th.data.teamlist.pick_up_lists && e.data.data.pageData.length){ | |
1203 | + var pick_up_lists=th.data.teamlist.pick_up_lists; | |
1204 | + for (var kq = 0; kq < e.data.data.pageData.length; kq++) { | |
1205 | + var it0=e.data.data.pageData[kq]; | |
1206 | + var idx0=pick_up_lists.findIndex(function (e){ | |
1207 | + return e.pickup_id==it0.pickup_id; | |
1208 | + }) | |
1209 | + if (idx0<0) { | |
1210 | + //删除 | |
1211 | + e.data.data.pageData.splice(kq--, 1); | |
1212 | + } | |
1213 | + } | |
1214 | + | |
1215 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | |
1216 | + //-- 查找一下门店有没有在 -- | |
1217 | + var idx1=pick_up_lists.findIndex(function (e){ | |
1218 | + return e.pickup_id==th.data.def_pick_store.pickup_id; | |
1219 | + }) | |
1220 | + if(idx1<0){ | |
1221 | + //如果是秒杀的指定门店,就要设置秒杀的 | |
1222 | + th.data.def_pick_store.is_no_dis_act=1; | |
1223 | + that.setData({ | |
1224 | + def_pick_store: th.data.def_pick_store | |
1225 | + }) | |
1226 | + } | |
1227 | + } | |
1228 | + | |
1229 | + } | |
1230 | + | |
1231 | + if(e.data.data.pageData.length){ | |
1232 | + var his_cate_num=0; | |
1233 | + for(let i in e.data.data.pageData){ | |
1184 | 1234 | let item=e.data.data.pageData[i]; |
1185 | 1235 | if(item.category_id>0){ |
1186 | - his_cate_num=1;break; | |
1236 | + his_cate_num=1;break; | |
1237 | + } | |
1238 | + } | |
1239 | + e.his_cate_num=his_cate_num; | |
1240 | + | |
1241 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
1242 | + if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){ | |
1243 | + th.setData({ | |
1244 | + def_pick_store:e.data.data.pageData[0], | |
1245 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
1246 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
1247 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
1248 | + }); | |
1249 | + th.data.fir_def_store=e.data.data.pageData[0]; | |
1250 | + } | |
1251 | + | |
1252 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位 -- | |
1253 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | |
1254 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
1255 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
1256 | + e.data.data.pageData.splice(k, 1); //删除 | |
1257 | + break; | |
1258 | + } | |
1187 | 1259 | } |
1260 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
1261 | + } | |
1262 | + | |
1263 | + | |
1264 | + th.setData({all_pick_list:e.data.data.pageData}); | |
1265 | + | |
1266 | + setTimeout(function(){ | |
1267 | + th.deal_pickup(e); //--普通门店排版-- | |
1268 | + },800) | |
1188 | 1269 | } |
1189 | - e.his_cate_num=his_cate_num; | |
1190 | - | |
1191 | - //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
1192 | - if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){ | |
1193 | - th.setData({ | |
1194 | - def_pick_store:e.data.data.pageData[0], | |
1195 | - sto_sele_name: e.data.data.pageData[0].pickup_name, | |
1196 | - sto_sele_id: e.data.data.pageData[0].pickup_id, | |
1197 | - sto_sele_distr: e.data.data.pageData[0].distr_type | |
1198 | - }); | |
1199 | - th.data.fir_def_store=e.data.data.pageData[0]; | |
1200 | - } | |
1201 | - | |
1202 | - //-- 如果有默认选择门店的时候,要把默认门店放在第一位 -- | |
1203 | - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | |
1204 | - for (var k = 0; k < e.data.data.pageData.length; k++) { | |
1205 | - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
1206 | - e.data.data.pageData.splice(k, 1); //删除 | |
1207 | - break; | |
1208 | - } | |
1209 | - } | |
1210 | - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
1211 | - } | |
1212 | - | |
1213 | - | |
1214 | - th.setData({all_pick_list:e.data.data.pageData}); | |
1215 | - | |
1216 | - | |
1217 | - setTimeout(function(){ | |
1218 | - th.deal_pickup(e); //--普通门店排版-- | |
1219 | - },800) | |
1220 | - | |
1270 | + | |
1221 | 1271 | } |
1222 | 1272 | }) |
1223 | 1273 | }, 200) | ... | ... |
packageA/pages/serviceCard_pd/team_show/team_show.wxml
... | ... | @@ -227,6 +227,7 @@ |
227 | 227 | |
228 | 228 | </view> |
229 | 229 | <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(配送不匹配)</view> |
230 | + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}">(该店不可售)</view> | |
230 | 231 | <view class="fs24 xc-ash-9f xc-distance-top " wx:elif="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> |
231 | 232 | |
232 | 233 | </view> |
... | ... | @@ -247,7 +248,8 @@ |
247 | 248 | </view> |
248 | 249 | |
249 | 250 | <view class="pt_qd"> |
250 | - <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn spec-buy w100" data-action="buy" style="background-color: #dcdcdc;color: #999;">确定</view> | |
251 | + <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn spec-buy w100" data-action="buy" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
252 | + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}" class="spec-cart-btn spec-buy w100" data-action="buy" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
251 | 253 | <view wx:else bindtap="go_pay" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> |
252 | 254 | </view> |
253 | 255 | |
... | ... | @@ -292,7 +294,10 @@ |
292 | 294 | <view class="address-frame xc-ash"> |
293 | 295 | <view class="flex-vertical-between butttem5"> |
294 | 296 | <view class="flex xc-ash"> |
295 | - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
297 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | |
298 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | |
299 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | |
300 | + </view> | |
296 | 301 | </view> |
297 | 302 | <view> |
298 | 303 | <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> |
... | ... | @@ -318,7 +323,10 @@ |
318 | 323 | <view class="address-frame xc-ash"> |
319 | 324 | <view class="flex-vertical-between "> |
320 | 325 | <view class="flex xc-ash"> |
321 | - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
326 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | |
327 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | |
328 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | |
329 | + </view> | |
322 | 330 | </view> |
323 | 331 | <view> |
324 | 332 | <view class="distance fs24 address-val" |
... | ... | @@ -346,7 +354,10 @@ |
346 | 354 | <view class="address-frame xc-ash"> |
347 | 355 | <view class="flex-vertical-between "> |
348 | 356 | <view class="flex xc-ash"> |
349 | - <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | |
357 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}} | |
358 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | |
359 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | |
360 | + </view> | |
350 | 361 | </view> |
351 | 362 | <view> |
352 | 363 | <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> | ... | ... |
packageA/pages/serviceCard_pd/team_show/team_show.wxss
packageF/pages/xcxServiceChat/xcxServiceChat.js
0 → 100644
1 | +// packageF/pages/xcxServiceChat/xcxServiceChat.js | |
2 | +var t = getApp(), | |
3 | +a = t.request, | |
4 | +o = t.globalData.setting | |
5 | +Page({ | |
6 | + | |
7 | + /** | |
8 | + * 页面的初始数据 | |
9 | + */ | |
10 | + data: { | |
11 | + url: o.imghost, | |
12 | + imgUrl:'', | |
13 | + userinfo:{}, | |
14 | + window_info:{}, | |
15 | + imgBoxOffw:true, | |
16 | + imgBoxOffh:true, | |
17 | + }, | |
18 | + | |
19 | + /** | |
20 | + * 生命周期函数--监听页面加载 | |
21 | + */ | |
22 | + onLoad(options) { | |
23 | + let window_info = wx.getWindowInfo() | |
24 | + console.error(window_info); | |
25 | + console.log(window_info); | |
26 | + this.getad() | |
27 | + wx.setNavigationBarTitle({ | |
28 | + title: '联系客服' | |
29 | + }) | |
30 | + this.setData({ | |
31 | + userinfo: getApp().globalData.userInfo, | |
32 | + window_info, | |
33 | + }); | |
34 | + | |
35 | + }, | |
36 | + //获取客服广告 | |
37 | + async getad(){ | |
38 | + //---首页广告------- | |
39 | + await getApp().request.promiseGet("/api/weshop/ad/page?pids=1209&store_id=" + o.stoid, { | |
40 | + data: {} | |
41 | + }).then(res => { | |
42 | + if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
43 | + let a = res.data.data.pageData[0]; | |
44 | + let imgUrl = this.data.url + a.ad_code | |
45 | + wx.getImageInfo({ | |
46 | + src: imgUrl, | |
47 | + success: res=>{ | |
48 | + let imgBoxOffw = true | |
49 | + let imgBoxOffh = true | |
50 | + if (res.width > this.data.window_info.screenWidth) { | |
51 | + imgBoxOffw = false | |
52 | + } | |
53 | + if (res.height > this.data.window_info.screenWidth) { | |
54 | + imgBoxOffh = false | |
55 | + } | |
56 | + | |
57 | + this.setData({ | |
58 | + imgUrl, | |
59 | + imgBoxOffw, | |
60 | + imgBoxOffh | |
61 | + }) | |
62 | + } | |
63 | + }) | |
64 | + | |
65 | + } | |
66 | + }) | |
67 | + }, | |
68 | + //联系客服 | |
69 | + con_weixin () { | |
70 | + console.log(123456); | |
71 | + console.log(this.data.sys_switch); | |
72 | + // getApp().con_wx(this); | |
73 | + var url=this.data.sys_switch.weapp_customertype_url; | |
74 | + var id=this.data.sys_switch.weapp_customertype_appid; | |
75 | + wx.openCustomerServiceChat({ | |
76 | + extInfo: {url: url}, | |
77 | + corpId: id, | |
78 | + success(res) {} | |
79 | + }) | |
80 | + }, | |
81 | + /** | |
82 | + * 生命周期函数--监听页面初次渲染完成 | |
83 | + */ | |
84 | + onReady() { | |
85 | + | |
86 | + }, | |
87 | + | |
88 | + /** | |
89 | + * 生命周期函数--监听页面显示 | |
90 | + */ | |
91 | + onShow() { | |
92 | + | |
93 | + }, | |
94 | + | |
95 | + /** | |
96 | + * 生命周期函数--监听页面隐藏 | |
97 | + */ | |
98 | + onHide() { | |
99 | + | |
100 | + }, | |
101 | + | |
102 | + /** | |
103 | + * 生命周期函数--监听页面卸载 | |
104 | + */ | |
105 | + onUnload() { | |
106 | + | |
107 | + }, | |
108 | + | |
109 | + /** | |
110 | + * 页面相关事件处理函数--监听用户下拉动作 | |
111 | + */ | |
112 | + onPullDownRefresh() { | |
113 | + | |
114 | + }, | |
115 | + | |
116 | + /** | |
117 | + * 页面上拉触底事件的处理函数 | |
118 | + */ | |
119 | + onReachBottom() { | |
120 | + | |
121 | + }, | |
122 | + | |
123 | + /** | |
124 | + * 用户点击右上角分享 | |
125 | + */ | |
126 | + onShareAppMessage() { | |
127 | + | |
128 | + } | |
129 | +}) | |
0 | 130 | \ No newline at end of file | ... | ... |
packageF/pages/xcxServiceChat/xcxServiceChat.json
0 → 100644
packageF/pages/xcxServiceChat/xcxServiceChat.wxml
0 → 100644
1 | +<!--packageF/pages/xcxServiceChat/xcxServiceChat.wxml--> | |
2 | +<button open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}" class="imgBox" style="background-image: url({{imgUrl}});{{(imgBoxOffw && imgBoxOffh) ? ' object-fit: cover;' : ((!imgBoxOffw && !imgBoxOffh) ? 'background-size: 100% 100%;' : (!imgBoxOffw ? 'background-size: 100% ;' :'background-size: auto 100% ' ) ) }}"> | |
3 | + | |
4 | +</button> | ... | ... |
packageF/pages/xcxServiceChat/xcxServiceChat.wxss
0 → 100644
1 | +/* packageF/pages/xcxServiceChat/xcxServiceChat.wxss */ | |
2 | + | |
3 | +.mainBox{ | |
4 | + width: 100vw; | |
5 | + height: 100vh; | |
6 | + position: absolute; | |
7 | + left: 0; | |
8 | + right: 0; | |
9 | + top: 0; | |
10 | + bottom: 0; | |
11 | +} | |
12 | +.imgBox{ | |
13 | + height: 100vh; | |
14 | + width: 100vw; | |
15 | + background-position: 50%; | |
16 | + background-repeat: no-repeat; | |
17 | + background-attachment: fixed; | |
18 | + position: relative; | |
19 | + /* object-fit: contain; */ | |
20 | + | |
21 | + /* object-fit: cover; */ | |
22 | +} | |
23 | +image{ | |
24 | + margin: auto; | |
25 | +} | |
0 | 26 | \ No newline at end of file | ... | ... |
pages/activity/seckill_list/seckill_list.wxml
... | ... | @@ -46,9 +46,9 @@ |
46 | 46 | <view class="xc-strip-blank rel"> |
47 | 47 | |
48 | 48 | <view class="flex-vertical rel total"> |
49 | - <view class="t-c abs xc-fill"style="width:{{type==1?(100-(item.buy_num+item.virtual) /(item.goods_num+item.virtual)*100)>3?(100-(item.buy_num+item.virtual) /(item.goods_num+item.virtual)*100):'3':'100'}}%;background:{{type==1?'#f23030':'#059de5'}};"> | |
49 | + <view class="t-c abs xc-fill"style="width:{{type==1?(100-(item.buy_num+item.virtual) /((item.is_virtual_count ? item.goods_num : item.goods_num+item.virtual))*100)>3?(100-(item.buy_num+item.virtual) /((item.is_virtual_count ? item.goods_num : item.goods_num+item.virtual))*100):'3':'100'}}%;background:{{type==1?'#f23030':'#059de5'}};"> | |
50 | 50 | </view> |
51 | - <text class="fs20 white abs xc-fill-text" style="">剩余{{type==1?filters.toFix(100-(item.buy_num+item.virtual)/(item.goods_num+item.virtual)*100,0):'100'}}%</text> | |
51 | + <text class="fs20 white abs xc-fill-text" style="">剩余{{type==1?filters.toFix(100-(item.buy_num+item.virtual)/((item.is_virtual_count ? item.goods_num : item.goods_num+item.virtual))*100,0):'100'}}%</text> | |
52 | 52 | </view> |
53 | 53 | |
54 | 54 | </view> | ... | ... |
pages/goods/goodsInfo/buy_com_pop.wxml
... | ... | @@ -129,7 +129,7 @@ |
129 | 129 | <block wx:else> |
130 | 130 | |
131 | 131 | |
132 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
132 | + <block wx:if="{{only_pk && !only_pk.length}}"> | |
133 | 133 | <view class="spec-cart-btn fs32" data-action="add" |
134 | 134 | style="background-color: #dcdcdc;color: #999;">库存不足 |
135 | 135 | </view> | ... | ... |
pages/goods/goodsInfo/buy_integral.wxml
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | <block wx:else> |
94 | 94 | |
95 | 95 | |
96 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
96 | + <block wx:if="{{only_pk && !only_pk.length}}"> | |
97 | 97 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> |
98 | 98 | </block> |
99 | 99 | <block wx:else> | ... | ... |
pages/goods/goodsInfo/buy_pt.wxml
... | ... | @@ -73,6 +73,7 @@ |
73 | 73 | <block wx:else> |
74 | 74 | <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> |
75 | 75 | <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor && is_normal}}">(该店不可售)</view> |
76 | + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act && !is_normal}}">(该店不可售)</view> | |
76 | 77 | <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && is_normal}}">(库存不足)</view> |
77 | 78 | </block> |
78 | 79 | </block> |
... | ... | @@ -173,7 +174,7 @@ |
173 | 174 | <block wx:else> |
174 | 175 | |
175 | 176 | |
176 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
177 | + <block wx:if="{{only_pk && !only_pk.length}}"> | |
177 | 178 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> |
178 | 179 | </block> |
179 | 180 | <block wx:else> |
... | ... | @@ -220,7 +221,10 @@ |
220 | 221 | <!-- 根本就找不到门店 --> |
221 | 222 | <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> |
222 | 223 | <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> |
223 | - </block> | |
224 | + </block> | |
225 | + <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}"> | |
226 | + <view class="spec-cart-btn spec-buy w100" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
227 | + </block> | |
224 | 228 | <block wx:else> |
225 | 229 | <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> |
226 | 230 | </block> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -2598,9 +2598,7 @@ Page({ |
2598 | 2598 | sele_g: this.data.data, |
2599 | 2599 | gid: this.data.data.goods_id |
2600 | 2600 | }) |
2601 | - | |
2602 | - this.sele_spec_chech_activity(); | |
2603 | - | |
2601 | + this.sele_spec_chech_activity(1); | |
2604 | 2602 | } |
2605 | 2603 | |
2606 | 2604 | this.setData({ |
... | ... | @@ -3517,6 +3515,16 @@ Page({ |
3517 | 3515 | prom_id: prom.id |
3518 | 3516 | }) |
3519 | 3517 | |
3518 | + var pro_null=null; | |
3519 | + if(goodsinfo.prom_type==1){ | |
3520 | + var rs= await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/1/" + prom.id, {}); | |
3521 | + if(rs && rs.data.code == 0 && rs.data.data <= 0 ){ | |
3522 | + pro_null=1; | |
3523 | + } | |
3524 | + } | |
3525 | + th.setData({pro_null}); | |
3526 | + | |
3527 | + | |
3520 | 3528 | //却换图片 |
3521 | 3529 | th.init(goodsinfo.goods_id); |
3522 | 3530 | var newTime = ut.gettimestamp(); |
... | ... | @@ -3635,9 +3643,11 @@ Page({ |
3635 | 3643 | if(!is_normal && th.data.prom_type>0){ |
3636 | 3644 | pickup_ids=null; |
3637 | 3645 | } |
3638 | - | |
3646 | + | |
3647 | + | |
3648 | + | |
3639 | 3649 | //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店 |
3640 | - if(!is_normal && th.data.prom_type==1 && th.data.prom_act.pick_up_lists){ | |
3650 | + if(!is_normal && (th.data.prom_type==1 || th.data.prom_type==6) && th.data.prom_act.pick_up_lists){ | |
3641 | 3651 | pickup_ids=th.data.prom_act.pick_up_lists |
3642 | 3652 | } |
3643 | 3653 | |
... | ... | @@ -3658,7 +3668,6 @@ Page({ |
3658 | 3668 | |
3659 | 3669 | //判断会员的默认的门店是不是匹配指定的门店 |
3660 | 3670 | if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ |
3661 | - | |
3662 | 3671 | //-- 查找一下门店有没有在 -- |
3663 | 3672 | var idx1=pickup_ids.findIndex(function (e){ |
3664 | 3673 | return e.pickup_id==th.data.def_pick_store.pickup_id; |
... | ... | @@ -3666,12 +3675,11 @@ Page({ |
3666 | 3675 | |
3667 | 3676 | if(idx1<0){ |
3668 | 3677 | //如果是秒杀的指定门店,就要设置秒杀的 |
3669 | - if(!is_normal && th.data.prom_type==1){ | |
3678 | + if(!is_normal && (th.data.prom_type==1 || th.data.prom_type==6) ){ | |
3670 | 3679 | th.data.def_pick_store.is_no_dis_act=1; |
3671 | 3680 | }else{ |
3672 | 3681 | th.data.def_pick_store.is_no_dis_nor=1; |
3673 | 3682 | } |
3674 | - | |
3675 | 3683 | }else{ |
3676 | 3684 | th.data.def_pick_store.is_no_dis_nor=0; |
3677 | 3685 | th.data.def_pick_store.is_no_dis_act=0; |
... | ... | @@ -3682,80 +3690,84 @@ Page({ |
3682 | 3690 | }) |
3683 | 3691 | |
3684 | 3692 | } |
3685 | - | |
3686 | - | |
3687 | 3693 | e.data.data.pageData=ok_arr; //数组重新赋值 |
3688 | 3694 | e.data.data.total=ok_arr.length; //数组的长度 |
3689 | 3695 | } |
3690 | 3696 | else{ |
3691 | 3697 | //-- 多规格指定门店优化 -- |
3692 | 3698 | if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ |
3693 | - th.data.def_pick_store.is_no_dis_nor=0; | |
3694 | - th.data.def_pick_store.is_no_dis_act=0; | |
3695 | - that.setData({ | |
3696 | - def_pick_store: th.data.def_pick_store | |
3697 | - }) | |
3698 | - } | |
3699 | 3699 | |
3700 | + th.data.def_pick_store.is_no_dis_nor=0; | |
3701 | + th.data.def_pick_store.is_no_dis_act=0; | |
3702 | + that.setData({ | |
3703 | + def_pick_store: th.data.def_pick_store | |
3704 | + }) | |
3705 | + } | |
3700 | 3706 | } |
3701 | 3707 | |
3702 | - var his_cate_num = 0; | |
3703 | - for (let i in e.data.data.pageData) { | |
3704 | - let item = e.data.data.pageData[i]; | |
3705 | - if (item.category_id > 0) { | |
3706 | - his_cate_num = 1; | |
3707 | - } | |
3708 | - if (getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2) { | |
3709 | - e.data.data.pageData[i].CanOutQty = 100000; | |
3708 | + //过滤后门店数量还是要大于0 | |
3709 | + if(e.data.data.pageData.length > 0) { | |
3710 | + | |
3711 | + var his_cate_num = 0; | |
3712 | + for (let i in e.data.data.pageData) { | |
3713 | + let item = e.data.data.pageData[i]; | |
3714 | + if (item.category_id > 0) { | |
3715 | + his_cate_num = 1; | |
3716 | + } | |
3717 | + if (getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2) { | |
3718 | + e.data.data.pageData[i].CanOutQty = 100000; | |
3719 | + } | |
3710 | 3720 | } |
3711 | - } | |
3712 | 3721 | |
3713 | - e.his_cate_num = his_cate_num; | |
3722 | + e.his_cate_num = his_cate_num; | |
3714 | 3723 | |
3715 | - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}' && | |
3716 | - getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2) { | |
3717 | - th.setData({ | |
3718 | - 'def_pick_store.CanOutQty': 100000 | |
3719 | - }) | |
3720 | - } | |
3724 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}' && | |
3725 | + getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2) { | |
3726 | + th.setData({ | |
3727 | + 'def_pick_store.CanOutQty': 100000 | |
3728 | + }) | |
3729 | + } | |
3721 | 3730 | |
3722 | - //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
3723 | - if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
3724 | - th.setData({ | |
3725 | - def_pick_store: e.data.data.pageData[0], | |
3726 | - sto_sele_name: e.data.data.pageData[0].pickup_name, | |
3727 | - sto_sele_id: e.data.data.pageData[0].pickup_id, | |
3728 | - sto_sele_distr: e.data.data.pageData[0].distr_type | |
3729 | - }); | |
3730 | - th.data.fir_def_store = e.data.data.pageData[0]; | |
3731 | - } | |
3731 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
3732 | + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
3733 | + th.setData({ | |
3734 | + def_pick_store: e.data.data.pageData[0], | |
3735 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
3736 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
3737 | + sto_sele_distr: e.data.data.pageData[0].distr_type | |
3738 | + }); | |
3739 | + th.data.fir_def_store = e.data.data.pageData[0]; | |
3740 | + } | |
3732 | 3741 | |
3733 | - //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | |
3734 | - if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
3735 | - for (var k = 0; k < e.data.data.pageData.length; k++) { | |
3736 | - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
3737 | - e.data.data.pageData.splice(k, 1); //删除 | |
3738 | - break; | |
3742 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | |
3743 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
3744 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
3745 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
3746 | + e.data.data.pageData.splice(k, 1); //删除 | |
3747 | + break; | |
3748 | + } | |
3739 | 3749 | } |
3750 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
3740 | 3751 | } |
3741 | - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
3742 | - } | |
3743 | 3752 | |
3744 | 3753 | |
3745 | - th.setData({ | |
3746 | - all_pick_list: e.data.data.pageData | |
3747 | - }); | |
3754 | + th.setData({ | |
3755 | + all_pick_list: e.data.data.pageData | |
3756 | + }); | |
3748 | 3757 | |
3749 | - //--获取线下库存,而且不是新的门店规则, 同时是普通购买的时候,或者同时不能是活动,秒杀,拼团,积分购-- | |
3750 | - if (!getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2 && !th.data.is_newsales_rules | |
3751 | - && !th.data.sele_g.whsle_id && ([1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) == -1 || is_normal == 1)) { | |
3752 | - setTimeout(function () { | |
3753 | - th.deal_pickup_dline(e); | |
3754 | - }, 800) | |
3755 | - } else { | |
3756 | - setTimeout(function () { | |
3757 | - th.deal_pickup(e); //--普通门店排版-- | |
3758 | - }, 800) | |
3758 | + //--获取线下库存,而且不是新的门店规则, 同时是普通购买的时候,或者同时不能是活动,秒杀,拼团,积分购-- | |
3759 | + if (!getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2 && !th.data.is_newsales_rules | |
3760 | + && !th.data.sele_g.whsle_id && ([1, 2, 4, 6, 8, 9].indexOf(th.data.prom_type) == -1 || is_normal == 1)) { | |
3761 | + setTimeout(function () { | |
3762 | + th.deal_pickup_dline(e); | |
3763 | + }, 800) | |
3764 | + } else { | |
3765 | + setTimeout(function () { | |
3766 | + th.deal_pickup(e); //--普通门店排版-- | |
3767 | + }, 800) | |
3768 | + } | |
3769 | + }else{ | |
3770 | + wx.hideLoading(); | |
3759 | 3771 | } |
3760 | 3772 | } else { |
3761 | 3773 | wx.hideLoading(); |
... | ... | @@ -4535,7 +4547,7 @@ Page({ |
4535 | 4547 | if (em.data.code == 0) { |
4536 | 4548 | |
4537 | 4549 | if (em.data.data <= 0) ee.setData({ |
4538 | - prom_r_null: 1 | |
4550 | + prom_r_null: 1,pro_null:1 | |
4539 | 4551 | }); |
4540 | 4552 | //拿取价格并且判断时间-- |
4541 | 4553 | getApp().request.get("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, { |
... | ... | @@ -4643,6 +4655,7 @@ Page({ |
4643 | 4655 | |
4644 | 4656 | ee.setData({ |
4645 | 4657 | sku_g: list, |
4658 | + is_more_flash:1 | |
4646 | 4659 | }); |
4647 | 4660 | |
4648 | 4661 | } |
... | ... | @@ -8574,11 +8587,19 @@ Page({ |
8574 | 8587 | if (arr.length == 1) { |
8575 | 8588 | th.data.prom_type = arr[0].prom_type; |
8576 | 8589 | th.data.prom_id = arr[0].act_id; |
8590 | + //-- 基础的活动类型 -- | |
8591 | + th.data.base_nor_prom_type = arr[0].prom_type; | |
8592 | + th.data.base_nor_prom_id = arr[0].act_id; | |
8593 | + | |
8577 | 8594 | } |
8578 | 8595 | //-- 如果只有一个进行中的活动的话 -- |
8579 | 8596 | else if (arr2.length == 1) { |
8580 | 8597 | th.data.prom_type = arr2[0].prom_type; |
8581 | 8598 | th.data.prom_id = arr2[0].act_id; |
8599 | + | |
8600 | + //-- 基础的活动类型 -- | |
8601 | + th.data.base_nor_prom_type = arr[0].prom_type; | |
8602 | + th.data.base_nor_prom_id = arr[0].act_id; | |
8582 | 8603 | } |
8583 | 8604 | |
8584 | 8605 | if (arr4.length > 0) { | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -456,7 +456,7 @@ |
456 | 456 | <view wx:if="{{prom_type==1}}"> |
457 | 457 | <view class="goods-num"> |
458 | 458 | <block wx:if="prom_st>0"> |
459 | - <view class="stock">总数量:{{prom_act.goods_num+prom_act.virtual}}件</view> | |
459 | + <view class="stock">总数量:{{prom_act.is_virtual_count ? prom_act.goods_num : (prom_act.goods_num+prom_act.virtual)}}件</view> | |
460 | 460 | <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> |
461 | 461 | <view class="stock" wx:else>限购:不限</view> |
462 | 462 | |
... | ... | @@ -1115,19 +1115,40 @@ |
1115 | 1115 | |
1116 | 1116 | |
1117 | 1117 | <block wx:if="{{prom_r_null}}"> |
1118 | + <block wx:if="{{prom_type==1}}"> | |
1119 | + | |
1120 | + <!-- 多个秒杀的时候 --> | |
1121 | + <block wx:if="{{is_more_flash}}"> | |
1122 | + <block wx:if="{{prom_act.is_shop_buy}}"> | |
1123 | + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn">单独购买</view> | |
1124 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即抢购</view> | |
1125 | + </block> | |
1126 | + <block wx:else> | |
1127 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | |
1128 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即抢购</view> | |
1129 | + </block> | |
1130 | + </block> | |
1131 | + <block wx:else> | |
1132 | + <block wx:if="{{prom_act.is_shop_buy}}"> | |
1133 | + <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn">单独购买</view> | |
1134 | + <view class="buy-btn cart-btn huise">已抢光</view> | |
1135 | + </block> | |
1136 | + <block wx:else> | |
1137 | + <view class="buy-btn cart-btn huise">已抢光</view> | |
1138 | + </block> | |
1139 | + </block> | |
1140 | + | |
1118 | 1141 | |
1119 | - <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> | |
1120 | - <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn">单独购买</view> | |
1121 | - <view class="buy-btn cart-btn huise">已抢光</view> | |
1122 | 1142 | </block> |
1143 | + | |
1123 | 1144 | <view wx:else class="buy-btn cart-btn cart-btn-lg huise set_width">已抢光</view> |
1145 | + | |
1124 | 1146 | </block> |
1125 | 1147 | <block wx:if="{{prom_st==3 && !prom_r_null}}"> |
1126 | 1148 | <block wx:if="{{prom_type==1 && prom_act.is_shop_buy}}"> |
1127 | 1149 | <view bindtap="openSpecModel_Nor" data-nor="1" class="join-btn cart-btn">单独购买</view> |
1128 | 1150 | <view class="buy-btn cart-btn huise">活动已经结束</view> |
1129 | 1151 | </block> |
1130 | - | |
1131 | 1152 | <view wx:else class="buy-btn cart-btn cart-btn-lg lanse set_width">活动已经结束</view> |
1132 | 1153 | </block> |
1133 | 1154 | </block> |
... | ... | @@ -1266,8 +1287,8 @@ |
1266 | 1287 | 券后¥ |
1267 | 1288 | <text class="fs32">{{sele_g.offline_price}}</text> |
1268 | 1289 | </view> |
1269 | - | |
1270 | 1290 | </view> |
1291 | + | |
1271 | 1292 | <block wx:if="{{prom_type==0}}"> |
1272 | 1293 | <view class="flex"> |
1273 | 1294 | <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> |
... | ... | @@ -1295,7 +1316,7 @@ |
1295 | 1316 | 已售:{{prom_act.buy_num+prom_act.virtual}} |
1296 | 1317 | </view> |
1297 | 1318 | <view class="spec-goods-stock" wx:else>已售:{{prom_act.buy_num}}</view> |
1298 | - <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | |
1319 | + <view class="spec-goods-stock">可售:{{(prom_act.is_virtual_count && prom_act.virtual) ? (prom_act.goods_num - prom_act.buy_num - prom_act.virtual) : (prom_act.goods_num-prom_act.buy_num)}}</view> | |
1299 | 1320 | </view> |
1300 | 1321 | </block> |
1301 | 1322 | <block wx:if="{{prom_type==2}}"> |
... | ... | @@ -1405,7 +1426,7 @@ |
1405 | 1426 | </view> |
1406 | 1427 | </block> |
1407 | 1428 | <block wx:else> |
1408 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
1429 | + <block wx:if="{{only_pk && !only_pk.length}}"> | |
1409 | 1430 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> |
1410 | 1431 | 库存不足 |
1411 | 1432 | </view> |
... | ... | @@ -1424,8 +1445,6 @@ |
1424 | 1445 | </block> |
1425 | 1446 | <block wx:else> |
1426 | 1447 | |
1427 | - | |
1428 | - | |
1429 | 1448 | <!-- 如果是线下库存购买的时候,且是普通商品购买的时候 --> |
1430 | 1449 | <block wx:if="{{sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}"> |
1431 | 1450 | |
... | ... | @@ -1445,7 +1464,13 @@ |
1445 | 1464 | </block> |
1446 | 1465 | <!-- 线上销售 --> |
1447 | 1466 | <block wx:else> |
1448 | - <block wx:if="{{ sele_g.store_count<1 && is_no_new}}"> | |
1467 | + | |
1468 | + <block wx:if="{{prom_type==1 && !is_normal && pro_null}}"> | |
1469 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
1470 | + 已抢光 | |
1471 | + </view> | |
1472 | + </block> | |
1473 | + <block wx:elif="{{ sele_g.store_count<1 && is_no_new}}"> | |
1449 | 1474 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> |
1450 | 1475 | 库存不足 |
1451 | 1476 | </view> | ... | ... |
pages/index/index/index.js
... | ... | @@ -208,8 +208,9 @@ Page({ |
208 | 208 | getApp().request.promiseGet('/api/weshop/redmoney/redConfig/get/' + getApp().globalData.setting.stoid, { |
209 | 209 | data: {} |
210 | 210 | }).then(function (data) { |
211 | - let code = data.data.code; | |
212 | - if (code == 0) { | |
211 | + let code = data.data.code; | |
212 | + let resdata = data.data.data; | |
213 | + if (code == 0 && resdata.is_index) { | |
213 | 214 | |
214 | 215 | th.setData({ |
215 | 216 | showHongbao: true, | ... | ... |
pages/index/index/index.wxml
... | ... | @@ -516,6 +516,9 @@ |
516 | 516 | <block wx:if="{{item.ename=='presale'}}"> |
517 | 517 | <presell object="{{item.content}}"></presell> |
518 | 518 | </block> |
519 | + <block wx:if="{{item.ename=='presaleNew'}}"> | |
520 | + <diy_public object="{{item.content}}" prom_type="8"></diy_public> | |
521 | + </block> | |
519 | 522 | <!-- 团购 --> |
520 | 523 | <block wx:if="{{item.ename=='groupbuy'}}"> |
521 | 524 | <groupbuy object="{{item.content}}"></groupbuy> | ... | ... |
pages/team/team_ping/team_ping.js
... | ... | @@ -104,6 +104,8 @@ Page({ |
104 | 104 | if(order && order.length){ |
105 | 105 | for (i = 0; i < order.length; i++) { |
106 | 106 | |
107 | + //编号空,就进入下个循环 | |
108 | + if(!order[i].pt_listno) continue; | |
107 | 109 | //获取teamgroup中的值 |
108 | 110 | await getApp().request.promiseGet("/api/weshop/teamgroup/page", { |
109 | 111 | data: { store_id: os.stoid, listno: order[i].pt_listno,pageSize:1,page:1} | ... | ... |
pages/team/team_show/team_show.js
... | ... | @@ -433,6 +433,12 @@ Page({ |
433 | 433 | } |
434 | 434 | }) |
435 | 435 | |
436 | + if(!teamgroup || !teamgroup.listno){ | |
437 | + ut.m_toast('未找到团号'); | |
438 | + th.go_back(); | |
439 | + return false; | |
440 | + } | |
441 | + | |
436 | 442 | //判断是不是要继续的开关 |
437 | 443 | var is_ok=1; |
438 | 444 | |
... | ... | @@ -609,27 +615,28 @@ Page({ |
609 | 615 | |
610 | 616 | //-- 获取用户的默认门店 -- |
611 | 617 | getApp().get_user_store(function(ee) { |
612 | - if(!ee) { | |
613 | - th.data.fir_def_store={}; //赋值空对象 | |
614 | - return false; | |
615 | - } | |
616 | - | |
617 | - if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) | |
618 | - //--定时器推迟一下-- | |
619 | - setTimeout(function () { | |
620 | - if(!th.data.goods) return false; | |
621 | - var g_distr_type=th.data.goods.distr_type; | |
622 | - //--如果默认门店的配送方式不对,就不能被选择-- | |
623 | - if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ | |
624 | - //th.data.fir_def_store={}; //赋值空对象 | |
625 | - //return false; | |
626 | - ee.is_no_dis=1; | |
618 | + if(!ee) { | |
619 | + th.data.fir_def_store={}; //赋值空对象 | |
620 | + return false; | |
627 | 621 | } |
628 | 622 | |
623 | + if(getApp().globalData.is_dj_pk) th.setData({has_def:1}) | |
624 | + //--定时器推迟一下-- | |
625 | + | |
629 | 626 | var appd=getApp().globalData; |
630 | 627 | var w_time = setInterval(function() { |
631 | 628 | if (that.data.is_get_local_ok == 0) return false; |
629 | + if(!th.data.goods) return false; | |
630 | + var g_distr_type=th.data.goods.distr_type; | |
631 | + //--如果默认门店的配送方式不对,就不能被选择-- | |
632 | + if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ | |
633 | + //th.data.fir_def_store={}; //赋值空对象 | |
634 | + //return false; | |
635 | + ee.is_no_dis=1; | |
636 | + } | |
637 | + | |
632 | 638 | clearInterval(w_time); |
639 | + | |
633 | 640 | var distance = null; |
634 | 641 | var e=JSON.parse(JSON.stringify(ee)); |
635 | 642 | |
... | ... | @@ -684,7 +691,7 @@ Page({ |
684 | 691 | } |
685 | 692 | |
686 | 693 | }, 500) |
687 | - },1000) | |
694 | + | |
688 | 695 | }); |
689 | 696 | |
690 | 697 | //获取下redis长度,如果团已经弄完,或者拼单已经卖完 |
... | ... | @@ -1192,6 +1199,59 @@ Page({ |
1192 | 1199 | var e = res; |
1193 | 1200 | if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { |
1194 | 1201 | |
1202 | + var pickup_ids=null; | |
1203 | + //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店 | |
1204 | + if( th.data.teamlist.pick_up_lists){ | |
1205 | + pickup_ids=th.data.teamlist.pick_up_lists | |
1206 | + } | |
1207 | + | |
1208 | + //-- 如果有指定门店的时候 -- | |
1209 | + if(pickup_ids){ | |
1210 | + var ok_arr=[]; | |
1211 | + for (let i in e.data.data.pageData) { | |
1212 | + let ite = e.data.data.pageData[i]; | |
1213 | + //-- 查找一下门店有没有在 -- | |
1214 | + var idx=pickup_ids.findIndex(function (e){ | |
1215 | + return e.pickup_id==ite.pickup_id; | |
1216 | + }) | |
1217 | + if(idx>-1){ | |
1218 | + ok_arr.push(ite) | |
1219 | + } | |
1220 | + } | |
1221 | + | |
1222 | + //判断会员的默认的门店是不是匹配指定的门店 | |
1223 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ | |
1224 | + //-- 查找一下门店有没有在 -- | |
1225 | + var idx1=pickup_ids.findIndex(function (e){ | |
1226 | + return e.pickup_id==th.data.def_pick_store.pickup_id; | |
1227 | + }) | |
1228 | + | |
1229 | + if(idx1<0){ | |
1230 | + th.data.def_pick_store.is_no_dis_act=1; | |
1231 | + }else{ | |
1232 | + th.data.def_pick_store.is_no_dis_act=0; | |
1233 | + } | |
1234 | + | |
1235 | + that.setData({ | |
1236 | + def_pick_store: th.data.def_pick_store | |
1237 | + }) | |
1238 | + | |
1239 | + } | |
1240 | + e.data.data.pageData=ok_arr; //数组重新赋值 | |
1241 | + e.data.data.total=ok_arr.length; //数组的长度 | |
1242 | + } | |
1243 | + else{ | |
1244 | + //-- 多规格指定门店优化 -- | |
1245 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ | |
1246 | + th.data.def_pick_store.is_no_dis_act=0; | |
1247 | + that.setData({ | |
1248 | + def_pick_store: th.data.def_pick_store | |
1249 | + }) | |
1250 | + } | |
1251 | + } | |
1252 | + | |
1253 | + | |
1254 | + | |
1195 | 1255 | var his_cate_num=0; |
1196 | 1256 | for(let i in e.data.data.pageData){ |
1197 | 1257 | let item=e.data.data.pageData[i]; | ... | ... |
pages/team/team_show/team_show.wxml
... | ... | @@ -234,6 +234,7 @@ |
234 | 234 | |
235 | 235 | </view> |
236 | 236 | <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(配送不匹配)</view> |
237 | + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}">(该店不可售)</view> | |
237 | 238 | <view class="fs24 xc-ash-9f xc-distance-top " wx:elif="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> |
238 | 239 | |
239 | 240 | </view> |
... | ... | @@ -266,7 +267,8 @@ |
266 | 267 | </view> |
267 | 268 | |
268 | 269 | <view class="pt_qd"> |
269 | - <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn spec-buy w100" data-action="buy" style="background-color: #dcdcdc;color: #999;">确定</view> | |
270 | + <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn spec-buy w100" data-action="buy" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
271 | + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}" class="spec-cart-btn spec-buy w100" data-action="buy" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
270 | 272 | <view wx:else bindtap="go_pay" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> |
271 | 273 | </view> |
272 | 274 | |
... | ... | @@ -312,7 +314,10 @@ |
312 | 314 | <view class="address-frame xc-ash"> |
313 | 315 | <view class="flex-vertical-between butttem5"> |
314 | 316 | <view class="flex xc-ash"> |
315 | - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
317 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | |
318 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | |
319 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | |
320 | + </view> | |
316 | 321 | </view> |
317 | 322 | <view> |
318 | 323 | <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> |
... | ... | @@ -338,7 +343,10 @@ |
338 | 343 | <view class="address-frame xc-ash"> |
339 | 344 | <view class="flex-vertical-between "> |
340 | 345 | <view class="flex xc-ash"> |
341 | - <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | |
346 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | |
347 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | |
348 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | |
349 | + </view> | |
342 | 350 | </view> |
343 | 351 | <view> |
344 | 352 | <view class="distance fs24 address-val" |
... | ... | @@ -366,7 +374,10 @@ |
366 | 374 | <view class="address-frame xc-ash"> |
367 | 375 | <view class="flex-vertical-between "> |
368 | 376 | <view class="flex xc-ash"> |
369 | - <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | |
377 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}} | |
378 | + <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> | |
379 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act}}">(该店不可售)</text> | |
380 | + </view> | |
370 | 381 | </view> |
371 | 382 | <view> |
372 | 383 | <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> | ... | ... |
pages/team/team_show/team_show.wxss
pages/team/team_success/team_success.js
... | ... | @@ -171,6 +171,8 @@ Page({ |
171 | 171 | pt_listno = order.pt_listno; |
172 | 172 | }) |
173 | 173 | |
174 | + | |
175 | + | |
174 | 176 | if (this.data.payf || order.pt_status == 3) p_status = 3; //失败 |
175 | 177 | if (order.pt_status == 2 || order.pt_status == 4 || order.pt_status == 5) |
176 | 178 | p_status = 2; //成功 |
... | ... | @@ -178,21 +180,22 @@ Page({ |
178 | 180 | p_status = 1; //正在进行 |
179 | 181 | if ( order.pt_status == 6) p_status = 4; //支付尾款失败 |
180 | 182 | |
181 | - //多少人参团头像 | |
182 | - await getApp().request.promiseGet("/api/weshop/order/pagePtList", { | |
183 | - data: { store_id: o.stoid, pt_listno: pt_listno, } | |
184 | - }).then(res => { | |
185 | - ordertx = res.data.data.pageData; | |
186 | - }) | |
187 | - | |
188 | 183 | var team_g=null; |
189 | - //获取teamgroup中的值 | |
190 | - await getApp().request.promiseGet("/api/weshop/teamgroup/page", { | |
191 | - data: { store_id: os.stoid, listno: pt_listno,pageSize:1,page:1} | |
192 | - }).then(res => { | |
193 | - team_g = res.data.data.pageData[0] | |
194 | - | |
195 | - }) | |
184 | + if(pt_listno) { | |
185 | + //多少人参团头像 | |
186 | + await getApp().request.promiseGet("/api/weshop/order/pagePtList", { | |
187 | + data: {store_id: o.stoid, pt_listno: pt_listno,} | |
188 | + }).then(res => { | |
189 | + ordertx = res.data.data.pageData; | |
190 | + }) | |
191 | + | |
192 | + //获取teamgroup中的值 | |
193 | + await getApp().request.promiseGet("/api/weshop/teamgroup/page", { | |
194 | + data: { store_id: os.stoid, listno: pt_listno,pageSize:1,page:1} | |
195 | + }).then(res => { | |
196 | + team_g = res.data.data.pageData[0] | |
197 | + }) | |
198 | + } | |
196 | 199 | |
197 | 200 | |
198 | 201 | var min_price=0; |
... | ... | @@ -239,21 +242,25 @@ Page({ |
239 | 242 | |
240 | 243 | }) |
241 | 244 | |
242 | - //只装5个 | |
243 | - var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num; | |
244 | - if(max_num && !team_g.is_xuni_ct){ | |
245 | - ct_nun=parseInt(max_num); | |
246 | - if (ct_nun < ordertx.length) ct_nun = ordertx.length; | |
247 | - } | |
245 | + if(ordertx && ordertx.length){ | |
246 | + //只装5个 | |
247 | + var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num; | |
248 | + if(max_num && !team_g.is_xuni_ct){ | |
249 | + ct_nun=parseInt(max_num); | |
250 | + if (ct_nun < ordertx.length) ct_nun = ordertx.length; | |
251 | + } | |
248 | 252 | |
249 | - if(ct_nun>5) ct_nun=5; | |
250 | - for(var i=0;i<ct_nun;i++){ | |
251 | - if (i >= ordertx.length) sf_num++ | |
252 | - else | |
253 | - ordertx2.push(ordertx[i]); | |
253 | + if(ct_nun>5) ct_nun=5; | |
254 | + for(var i=0;i<ct_nun;i++){ | |
255 | + if (i >= ordertx.length) sf_num++ | |
256 | + else | |
257 | + ordertx2.push(ordertx[i]); | |
258 | + } | |
254 | 259 | } |
255 | 260 | |
256 | 261 | |
262 | + | |
263 | + | |
257 | 264 | var head=[]; |
258 | 265 | if(team_g.is_xuni_ct) { |
259 | 266 | head=team_g.xuni_head_id.split(","); |
... | ... | @@ -287,8 +294,8 @@ Page({ |
287 | 294 | }) |
288 | 295 | |
289 | 296 | |
290 | - var ct_price = 0, | |
291 | - num_0 = ordertx.length; | |
297 | + var ct_price = 0; | |
298 | + var num_0 = ordertx?ordertx.length:0; | |
292 | 299 | if (teamlist.kttype == 3){ |
293 | 300 | var js_data = JSON.parse(teamlist.ct_rylist); |
294 | 301 | js_data.forEach(function (val,ind) { | ... | ... |
pages/template/index.wxml
... | ... | @@ -69,6 +69,9 @@ |
69 | 69 | <block wx:if="{{item.ename=='presale'}}"> |
70 | 70 | <presell object="{{item.content}}"></presell> |
71 | 71 | </block> |
72 | + <block wx:if="{{item.ename=='presaleNew'}}"> | |
73 | + <diy_public object="{{item.content}}" prom_type="8"></diy_public> | |
74 | + </block> | |
72 | 75 | <!-- 团购 --> |
73 | 76 | <block wx:if="{{item.ename=='groupbuy'}}"> |
74 | 77 | <groupbuy object="{{item.content}}"></groupbuy> | ... | ... |
pages/user/order_detail/order_detail.js
... | ... | @@ -978,14 +978,19 @@ Page({ |
978 | 978 | } |
979 | 979 | //----------如果有活动,并且在进行中,就不计算线下库存--------------- |
980 | 980 | if (prom) { |
981 | - | |
981 | + let c_type=parseInt(goodsinfo.prom_type+''); | |
982 | + var act_type=''; | |
983 | + switch (c_type){ | |
984 | + case 1:act_type='秒杀';break; | |
985 | + case 6:act_type='拼团';break; | |
986 | + } | |
982 | 987 | //指定门店的控制 |
983 | - if (goodsinfo.prom_type == 1 && prom.pick_up_lists) { | |
988 | + if ([1,6].indexOf(c_type)>-1 && prom.pick_up_lists) { | |
984 | 989 | var idx0=prom.pick_up_lists.findIndex(function (e){ |
985 | 990 | return e.pickup_id==order.pickup_id; |
986 | 991 | }) |
987 | 992 | if(idx0<0){ |
988 | - getApp().confirmBox(goodsinfo.goods_name + "秒杀活动的门店不可售"); | |
993 | + getApp().confirmBox(goodsinfo.goods_name +act_type+"活动的门店不可售"); | |
989 | 994 | th.setData({ paying: 0 }); |
990 | 995 | return false; |
991 | 996 | } | ... | ... |
pages/user/order_list/order_list.js
... | ... | @@ -1031,8 +1031,7 @@ Page({ |
1031 | 1031 | } |
1032 | 1032 | if (prom) { |
1033 | 1033 | var t_now = ut.gettimestamp(); |
1034 | - if (prom.is_end == 0 && prom.start_time < t_now && prom.end_time > t_now) { | |
1035 | - | |
1034 | + if (prom.is_end == 0 && prom.start_time < t_now && prom.end_time > t_now ) { | |
1036 | 1035 | var content = gg.goods_name + '商品的活动发生了变化,请取消订单重新购买'; |
1037 | 1036 | th.toast(content); |
1038 | 1037 | th.setData({ paying: 0 }); |
... | ... | @@ -1292,20 +1291,25 @@ Page({ |
1292 | 1291 | } |
1293 | 1292 | //----------如果有活动,并且在进行中,就不计算线下库存--------------- |
1294 | 1293 | if (prom) { |
1294 | + let c_type=parseInt(goodsinfo.prom_type+''); | |
1295 | + var act_type=''; | |
1296 | + switch (c_type){ | |
1297 | + case 1:act_type='秒杀';break; | |
1298 | + case 6:act_type='拼团';break; | |
1299 | + } | |
1295 | 1300 | |
1296 | 1301 | //指定门店的控制 |
1297 | - if (goodsinfo.prom_type == 1 && prom.pick_up_lists) { | |
1302 | + if ([1,6].indexOf(c_type)>-1 && prom.pick_up_lists) { | |
1298 | 1303 | var idx0=prom.pick_up_lists.findIndex(function (e){ |
1299 | 1304 | return e.pickup_id==order.pickup_id; |
1300 | 1305 | }) |
1301 | 1306 | if(idx0<0){ |
1302 | - getApp().confirmBox(goodsinfo.goods_name + "秒杀活动的门店不可售"); | |
1307 | + getApp().confirmBox(goodsinfo.goods_name +act_type+ "活动的门店不可售"); | |
1303 | 1308 | th.setData({ paying: 0 }); |
1304 | 1309 | return false; |
1305 | 1310 | } |
1306 | 1311 | } |
1307 | 1312 | |
1308 | - | |
1309 | 1313 | var now = ut.gettimestamp(); |
1310 | 1314 | if (prom.is_end == 1 && prom.end_time < now) { |
1311 | 1315 | var content = goodsinfo.goods_name + '商品的活动已经结束,请取消订单' |
... | ... | @@ -2951,6 +2955,21 @@ Page({ |
2951 | 2955 | flag = false; |
2952 | 2956 | return false; |
2953 | 2957 | } |
2958 | + | |
2959 | + //指定门店的控制 | |
2960 | + if (act_details.pick_up_lists) { | |
2961 | + var idx0=act_details.pick_up_lists.findIndex(function (e){ | |
2962 | + return e.pickup_id==it.pickup_id; | |
2963 | + }) | |
2964 | + if(idx0<0){ | |
2965 | + getApp().confirmBox(it.service_name + "拼团活动的门店不可售"); | |
2966 | + th.setData({ paying: 0 }); | |
2967 | + flag = false; | |
2968 | + return false; | |
2969 | + } | |
2970 | + } | |
2971 | + | |
2972 | + | |
2954 | 2973 | } |
2955 | 2974 | }); |
2956 | 2975 | ... | ... |