作者 lihongjuan

1

@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 } 50 }
51 51
52 .real_goods_bottom { 52 .real_goods_bottom {
53 - padding: 16rpx 16rpx 28rpx 16rpx; 53 + padding: 16rpx 32rpx 28rpx 32rpx;
54 box-sizing: border-box; 54 box-sizing: border-box;
55 background: #fff; 55 background: #fff;
56 } 56 }
@@ -75,8 +75,11 @@ Page({ @@ -75,8 +75,11 @@ Page({
75 }, 75 },
76 76
77 bindRegionChange(e) { 77 bindRegionChange(e) {
  78 + // this.setData({
  79 + // area: e.detail.value[0] + e.detail.value[1] + e.detail.value[2]
  80 + // })
78 this.setData({ 81 this.setData({
79 - area: e.detail.value[0] + e.detail.value[1] + e.detail.value[2] 82 + area: e.detail.value[0] + ' ' + e.detail.value[1] + ' ' + e.detail.value[2]
80 }) 83 })
81 }, 84 },
82 85
@@ -185,7 +185,7 @@ image { @@ -185,7 +185,7 @@ image {
185 /* width: 686rpx; 185 /* width: 686rpx;
186 height: 304rpx; */ 186 height: 304rpx; */
187 width: 750rpx; 187 width: 750rpx;
188 - height: 260rpx; 188 + height: 320rpx;
189 position: relative; 189 position: relative;
190 } 190 }
191 191
@@ -234,7 +234,7 @@ image { @@ -234,7 +234,7 @@ image {
234 height: 88rpx; 234 height: 88rpx;
235 width: 100%; 235 width: 100%;
236 background: #fff; 236 background: #fff;
237 - padding: 0 40rpx 0 32rpx; 237 + padding: 0 50rpx 0 42rpx;
238 box-sizing: border-box; 238 box-sizing: border-box;
239 display: flex; 239 display: flex;
240 align-items: center; 240 align-items: center;
@@ -285,7 +285,7 @@ image { @@ -285,7 +285,7 @@ image {
285 285
286 .notice { 286 .notice {
287 width: 100%; 287 width: 100%;
288 - padding: 10rpx 32rpx; 288 + padding: 24rpx 32rpx;
289 box-sizing: border-box; 289 box-sizing: border-box;
290 background: #fff; 290 background: #fff;
291 display: flex; 291 display: flex;
@@ -358,8 +358,8 @@ image { @@ -358,8 +358,8 @@ image {
358 } 358 }
359 359
360 .activeitem { 360 .activeitem {
361 - width: 140rpx;  
362 - height: 155rpx; 361 + width: 215rpx;
  362 + height: 220rpx;
363 font-size: 0; 363 font-size: 0;
364 display: flex; 364 display: flex;
365 justify-content: center; 365 justify-content: center;
@@ -396,7 +396,7 @@ image { @@ -396,7 +396,7 @@ image {
396 396
397 .actity { 397 .actity {
398 width: 750rpx; 398 width: 750rpx;
399 - padding: 2rpx 30rpx; 399 + padding: 8rpx 30rpx;
400 box-sizing: border-box; 400 box-sizing: border-box;
401 background: #fff; 401 background: #fff;
402 border-bottom: 16rpx solid #f5f5f5; 402 border-bottom: 16rpx solid #f5f5f5;
@@ -466,13 +466,13 @@ image { @@ -466,13 +466,13 @@ image {
466 flex-direction: column; 466 flex-direction: column;
467 justify-content: center; 467 justify-content: center;
468 align-items: center; 468 align-items: center;
469 - margin-right: 31rpx; 469 + margin-right: 32rpx;
470 box-sizing: border-box; 470 box-sizing: border-box;
471 } 471 }
472 472
473 .goodimg { 473 .goodimg {
474 - width: 63rpx;  
475 - height: 63rpx; 474 + width:75rpx;
  475 + height: 75rpx;
476 font-size: 0; 476 font-size: 0;
477 border-radius: 10rpx; 477 border-radius: 10rpx;
478 } 478 }
@@ -511,7 +511,7 @@ image { @@ -511,7 +511,7 @@ image {
511 511
512 .xianshi { 512 .xianshi {
513 width: 750rpx; 513 width: 750rpx;
514 - padding: 10rpx 30rpx; 514 + padding: 8rpx 30rpx;
515 box-sizing: border-box; 515 box-sizing: border-box;
516 background: #fff; 516 background: #fff;
517 border-bottom:16rpx solid #f5f5f5; 517 border-bottom:16rpx solid #f5f5f5;
@@ -40,7 +40,14 @@ Page({ @@ -40,7 +40,14 @@ Page({
40 }, 40 },
41 //添加购物车 41 //添加购物车
42 addshop() { 42 addshop() {
43 - let that = this 43 + let that = this;
  44 + if(that.data.info.sold==0){
  45 + wx.showToast({
  46 + title: '库存不足,不能加入购物车',
  47 + icon:"none"
  48 + })
  49 + return false
  50 + }
44 let url = app.interface.addshop 51 let url = app.interface.addshop
45 let params = { 52 let params = {
46 num: that.data.num, 53 num: that.data.num,
@@ -59,7 +66,15 @@ Page({ @@ -59,7 +66,15 @@ Page({
59 }, 66 },
60 // 立即购买 67 // 立即购买
61 purchaseNow() { 68 purchaseNow() {
62 - let that = this 69 + let that = this;
  70 + if (that.data.info.sold==0){
  71 + wx.showToast({
  72 + title: '库存不足,不能下单',
  73 + icon:'none'
  74 + })
  75 + return false
  76 + }
  77 + console.log(that.data.info)
63 let info = { 78 let info = {
64 shop_id: that.data.info.id, 79 shop_id: that.data.info.id,
65 num: that.data.num 80 num: that.data.num
1 { 1 {
2 - "navigationBarTitleText": "限时抢购" 2 + "navigationBarTitleText": "限量特卖"
3 } 3 }
@@ -14,11 +14,11 @@ @@ -14,11 +14,11 @@
14 14
15 <view class="empty" wx:if="{{xianshilist.length==0}}">暂无数据</view> 15 <view class="empty" wx:if="{{xianshilist.length==0}}">暂无数据</view>
16 <view class="searchgood commnonpadding" wx:else> 16 <view class="searchgood commnonpadding" wx:else>
17 - <view class="searchgooditem flextwo boxsizing" wx:for="{{xianshilist}}" wx:key=""> 17 + <view class="searchgooditem flextwo boxsizing" wx:for="{{xianshilist}}" wx:key="" data-id="{{item.id}}" bindtap="{{item.sold==0?'':'look_more'}}">
18 <view class="gooditemleft"> 18 <view class="gooditemleft">
19 <image src="{{item.images[0]}}" mode="widthFix"></image> 19 <image src="{{item.images[0]}}" mode="widthFix"></image>
20 </view> 20 </view>
21 - <view class="gooditemright "> 21 + <view class="gooditemright " >
22 <view class="goodsouname morehidden">{{item.name}}</view> 22 <view class="goodsouname morehidden">{{item.name}}</view>
23 23
24 <view class="miaogood flextwo"> 24 <view class="miaogood flextwo">
@@ -34,23 +34,15 @@ @@ -34,23 +34,15 @@
34 </view> 34 </view>
35 <view class="buynow buyactive" wx:if="{{status==1}}">未开始</view> 35 <view class="buynow buyactive" wx:if="{{status==1}}">未开始</view>
36 <view class="buynow buyactive" wx:if="{{status==2}}">已结束</view> 36 <view class="buynow buyactive" wx:if="{{status==2}}">已结束</view>
37 - <view class="buynow" wx:if="{{status==3&&item.sold!=0}}" data-id="{{item.id}}" bindtap="{{item.sold==0?'':'look_more'}}">立即抢购</view> 37 + <view class="buynow" wx:if="{{status==3&&item.sold!=0}}">立即抢购</view>
38 <view class="buynow" wx:if="{{status==3&&item.sold==0}}">已抢光</view> 38 <view class="buynow" wx:if="{{status==3&&item.sold==0}}">已抢光</view>
39 </view> 39 </view>
40 -  
41 <view class="miaojindu flextwo"> 40 <view class="miaojindu flextwo">
42 <view class="miaojinduleft"> 41 <view class="miaojinduleft">
43 <view class="miaojinnei" style="width:{{item.rob}}%"></view> 42 <view class="miaojinnei" style="width:{{item.rob}}%"></view>
44 </view> 43 </view>
45 <view class="miaojinduright">已抢{{item.rob}}%</view> 44 <view class="miaojinduright">已抢{{item.rob}}%</view>
46 </view> 45 </view>
47 -  
48 -  
49 -  
50 </view> 46 </view>
51 </view> 47 </view>
52 -  
53 -  
54 -  
55 -  
56 </view> 48 </view>