Commit 241d6d065d0ecdff4588340b1651c7937097aee5

Authored by WXD-SEASON\season
2 parents 4da76168 c35b5219

Merge branch 'dev_group_luo' into dev

components/diy_public/diy_public.js
... ... @@ -3,7 +3,7 @@
3 3 // default: e
4 4 // };
5 5 // }(require("../../utils/LoadMore3.js")),
6   -// n = new e.default(),
  6 +// n = new e.default(),
7 7 var t = getApp(),
8 8 a = t.request,
9 9 o = t.globalData.setting,
... ... @@ -47,6 +47,7 @@ Component({
47 47 kttypeArr:['','商家','会员','阶梯'],
48 48 imgobj:{
49 49 '1':"/miniapp/images/component/seckill.png",
  50 + '2':"/miniapp/images/component/pingd/pingd.png",
50 51 '6':"/miniapp/images/component/pingd/pingd.png"
51 52 },
52 53 nav1:'/packageA/pages/goodsInfo/goodsInfo?',
... ... @@ -84,13 +85,20 @@ Component({
84 85 },
85 86  
86 87 ready: function () {
87   - if (this.data.prom_type==6) {
  88 + if (this.data.prom_type==6) { //天天拼单
88 89 this.setData({
89 90 prom_text:'已团',
90 91 nav1:'/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?',
91 92 nav2:'/pages/goods/goodsInfo/goodsInfo?'
92 93 })
93 94 }
  95 + if (this.data.prom_type==2) { //团购
  96 + this.setData({
  97 + prom_text:'已团',
  98 + nav1:'/pages/goods/goodsInfo/goodsInfo?',
  99 + nav2:'/pages/goods/goodsInfo/goodsInfo?'
  100 + })
  101 + }
94 102 var g_id = this.data.object;
95 103  
96 104 this.init(g_id);
... ... @@ -140,6 +148,12 @@ Component({
140 148 +os.stoid+"&goodsidlist="+goodsidlist;
141 149 }
142 150  
  151 + if (th.data.prom_type==2) { //团购
  152 + gUrl="/api/weshop/goods/groupBuy/getGoodsList?store_id="
  153 + +os.stoid+"&aidlist="+goodsidlist + "&user_id="+user_id;
  154 + }
  155 +
  156 +
143 157  
144 158 app.request.promiseGet(gUrl, {}).then(res => {
145 159  
... ... @@ -173,6 +187,16 @@ Component({
173 187 user_id:user_id,
174 188 }
175 189 }
  190 + if (this.data.prom_type==2) { //团购
  191 + gUrl="/api/weshop/goods/groupBuy/page?page=1&pageSize=9"
  192 + req={
  193 + store_id:os.stoid,
  194 + is_end: 0,
  195 + is_show: 1,
  196 + user_id:user_id,
  197 + timetype: 2,
  198 + }
  199 + }
176 200  
177 201 getApp().request.promiseGet(gUrl,
178 202 { isShowLoading: 1, data:req }
... ... @@ -389,6 +413,10 @@ Component({
389 413 if (this.data.prom_type==6) { //天天拼单
390 414 url="/pages/activity/pind_list/pind_list"
391 415 }
  416 + if (this.data.prom_type==2) { //团购
  417 + url="/packageC/pages/group_list/group_list";
  418 + }
  419 +
392 420 wx.navigateTo({
393 421 url
394 422 });
... ...
components/diy_public/diy_public.wxml
... ... @@ -51,7 +51,7 @@
51 51 <view class="new_item1_price" style="{{'padding:10rpx 10rpx;'+(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
52 52 <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}">
53 53 <view class="clor7b">
54   - <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
  54 + <text class="{{prom_type==2 ? 'group':'' }}" wx:if="{{object.seconds_num}}">{{prom_text}}<text class="{{prom_type==2 ? '':'clor'}}">{{aitem.buy_num}}</text>件</text>
55 55 <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.status==2 ? '0' : aitem.residue}}</text>件</text>
56 56 </view>
57 57 <view class="flex" style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}">
... ... @@ -97,15 +97,17 @@
97 97 </view>
98 98 </block>
99 99 </view>
100   - <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>
  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>
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>
104 104 </view>
  105 +
105 106 <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price pdlf10 clor7b" style="{{'font-size:20rpx;' + 'display:block;'+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}">
106   - <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
  107 + <text class="{{prom_type==2 ? 'group':'' }}" wx:if="{{object.seconds_num}}">{{prom_text}}<text class="{{prom_type==2 ? '':'clor'}}">{{aitem.buy_num}}</text>件</text>
107 108 <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text>
108 109 </view>
  110 +
109 111 <view class="new_item1_price pdlf10" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
110 112 <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}">
111 113 <view style="{{(object.text_align==2 ? 'justify-content:center;' :'' ) }}">
... ... @@ -151,7 +153,7 @@
151 153 </view>
152 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>
153 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;':'')}}">
154   - <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
  156 + <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
155 157 <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text>
156 158 </view>
157 159 <view class="new_item1_price clor7b" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
... ... @@ -202,7 +204,7 @@
202 204 <view wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view>
203 205 </view> -->
204 206 <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price clor7b" style="{{'font-size:24rpx;'+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}">
205   - <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
  207 + <text class="{{prom_type==2 ? 'group':'' }}" wx:if="{{object.seconds_num}}">{{prom_text}}<text class="{{prom_type==2 ? '':'clor'}}">{{aitem.buy_num}}</text>件</text>
206 208 <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text>
207 209 </view>
208 210 <view class="new_item1_price clor7b" style="{{'width:100%;' + (object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
... ... @@ -261,7 +263,7 @@
261 263 <view class="new_item1_price" style="{{'padding:10rpx 10rpx;'+(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
262 264 <view style="{{(object.text_style==2 ? 'font-weight: bold;':'')}}">
263 265 <view class="clor7b">
264   - <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
  266 + <text class="{{prom_type==2 ? 'group':'' }}" wx:if="{{object.seconds_num}}">{{prom_text}}<text class="{{prom_type==2 ? '':'clor'}}">{{aitem.buy_num}}</text>件</text>
265 267 <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.status==2 ? '0' : aitem.residue}}</text>件</text>
266 268 </view>
267 269 <view class="flex" style="{{'font-size: 24rpx; ' +(object.text_align==2 ? 'justify-content:center;' :'' ) }}">
... ... @@ -297,13 +299,13 @@
297 299 </view>
298 300 </block>
299 301 </view>
300   - <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>
  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>
301 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)}}">
302 304 <view class="mgr10 lineh24" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view>
303 305 <view class="lineh24" wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view>
304 306 </view>
305 307 <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price pdlf10 clor7b" style="{{'font-size:20rpx;' + 'display:block;'+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}">
306   - <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
  308 + <text class="{{prom_type==2 ? 'group':'' }}" wx:if="{{object.seconds_num}}">{{prom_text}}<text class="{{prom_type==2 ? '':'clor'}}">{{aitem.buy_num}}</text>件</text>
307 309 <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text>
308 310 </view>
309 311 <view class="new_item1_price pdlf10" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
... ... @@ -339,13 +341,13 @@
339 341 </view>
340 342 </block>
341 343 </view>
342   - <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>
  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>
343 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)}}">
344 346 <view class="mgr10 lineh24" wx:if="{{object.group_size}}">{{aitem.ct_num}}人团</view>
345 347 <view class="lineh24" wx:if="{{object.group_type}}">{{kttypeArr[aitem.kttype]}}团</view>
346 348 </view>
347 349 <view wx:if="{{object.seconds_num || object.remaining_inventory}}" class="new_item1_price pdlf10 clor7b" style="{{'font-size:20rpx;' + 'display:block;'+(object.text_align==2 ?'text-align:center;':'')+(object.text_style==2 ? 'font-weight: bold;':'')}}">
348   - <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
  350 + <text class="{{prom_type==2 ? 'group':'' }}" wx:if="{{object.seconds_num}}">{{prom_text}}<text class="{{prom_type==2 ? '':'clor'}}">{{aitem.buy_num}}</text>件</text>
349 351 <text wx:if="{{object.remaining_inventory}}">还剩余<text class="clor">{{aitem.residue}}</text>件</text>
350 352 </view>
351 353 <view class="new_item1_price pdlf10" style="{{(object.text_align==2 ? 'justify-content:center;flex-direction:column;' :'' )}}">
... ... @@ -438,7 +440,7 @@
438 440 </view>
439 441 </block>
440 442 </view>
441   - <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}}">{{aitem.goods_name}}</view>
442 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;':'')}}">
443 445 <text wx:if="{{object.seconds_num}}">{{prom_text}}<text class="clor">{{aitem.buy_num}}</text>件</text>
444 446 <text wx:if="{{object.remaining_inventory}}">剩<text class="clor">{{aitem.residue}}</text>件</text>
... ...
components/diy_public/diy_public.wxss
... ... @@ -545,4 +545,14 @@ swiper {
545 545 }
546 546 .lineh24{
547 547 line-height: 24rpx !important;
  548 + }
  549 + .group{
  550 + padding: 10rpx;
  551 + background-color:#f23030;
  552 + color: #fff;
  553 + /* margin-top: 10rpx; */
  554 + line-height: 28rpx;
  555 + border-radius: 10rpx;
  556 + margin-right: 10rpx;
  557 + opacity: .8;
548 558 }
549 559 \ No newline at end of file
... ...
pages/index/index/index.json
... ... @@ -9,7 +9,7 @@
9 9 "searchbox":"/components/diy_searchbox/diy_searchbox",
10 10 "shopname": "/components/diy_shopname/diy_shopname",
11 11 "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy",
12   - "div_public": "/components/diy_public/diy_public",
  12 + "diy_public": "/components/diy_public/diy_public",
13 13 "title": "/components/diy_title/diy_title",
14 14 "notice": "/components/diy_notice/diy_notice",
15 15 "voice": "/components/diy_voice/diy_voice",
... ...
pages/index/index/index.wxml
... ... @@ -481,7 +481,7 @@
481 481 <pingd_buy object="{{item.content}}"></pingd_buy>
482 482 </block>
483 483 <block wx:if="{{item.ename=='pingd_buyNew'}}">
484   - <div_public object="{{item.content}}" prom_type="6"></div_public>
  484 + <diy_public object="{{item.content}}" prom_type="6"></diy_public>
485 485 </block>
486 486 <!--秒杀-->
487 487 <block wx:if="{{item.ename=='seckill' || item.ename=='seckillNew'}}">
... ... @@ -520,6 +520,9 @@
520 520 <block wx:if="{{item.ename=='groupbuy'}}">
521 521 <groupbuy object="{{item.content}}"></groupbuy>
522 522 </block>
  523 + <block wx:if="{{item.ename=='groupbuyNew'}}">
  524 + <diy_public object="{{item.content}}" prom_type="2"></diy_public>
  525 + </block>
523 526 <!-- 幸运购 -->
524 527 <block wx:if="{{item.ename=='luckyactivity'}}">
525 528 <luckyGo object="{{item.content}}"></luckyGo>
... ...
pages/template/index.wxml
... ... @@ -52,7 +52,7 @@
52 52 <block wx:if="{{item.ename=='white'}}">
53 53 <assist object="{{item.content}}"></assist>
54 54 </block>
55   - <!--图片组合-->
  55 + <!--图片组合-->
56 56 <block wx:if="{{item.ename=='picMix'}}">
57 57 <picMax object="{{item.content}}"></picMax>
58 58 </block>
... ... @@ -73,7 +73,9 @@
73 73 <block wx:if="{{item.ename=='groupbuy'}}">
74 74 <groupbuy object="{{item.content}}"></groupbuy>
75 75 </block>
76   -
  76 + <block wx:if="{{item.ename=='groupbuyNew'}}">
  77 + <diy_public object="{{item.content}}" prom_type="2"></diy_public>
  78 + </block>
77 79 </view>
78 80 </block>
79 81 </view>
... ...