Commit 1a078c7ea1b7c12c8a5f0c4ca1ad88e753f715be
1 parent
22911483
自定义组件
Showing
6 changed files
with
88 additions
and
29 deletions
components/diy_public/diy_public.js
... | ... | @@ -50,6 +50,7 @@ Component({ |
50 | 50 | '2':"/miniapp/images/component/pingd/pingd.png", |
51 | 51 | '6':"/miniapp/images/component/pingd/pingd.png", |
52 | 52 | '8':"/miniapp/images/component/presale.png", |
53 | + '9':"/miniapp/images/component/luckyactivity.png", | |
53 | 54 | }, |
54 | 55 | nav1:'/packageA/pages/goodsInfo/goodsInfo?', |
55 | 56 | nav2:'/pages/goods/goodsInfo/goodsInfo?', |
... | ... | @@ -98,7 +99,7 @@ Component({ |
98 | 99 | prom_text:'已团', |
99 | 100 | nav1:'/pages/goods/goodsInfo/goodsInfo?', |
100 | 101 | nav2:'/pages/goods/goodsInfo/goodsInfo?' |
101 | - }) | |
102 | + }) | |
102 | 103 | } |
103 | 104 | if (this.data.prom_type==8) { //预售 |
104 | 105 | this.setData({ |
... | ... | @@ -107,6 +108,14 @@ Component({ |
107 | 108 | nav2:'/packageC/pages/presell/goodsInfo/goodsInfo?' |
108 | 109 | }) |
109 | 110 | } |
111 | + if (this.data.prom_type==9) { //幸运购 | |
112 | + this.setData({ | |
113 | + prom_text:'已售', | |
114 | + nav1:'/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?', | |
115 | + nav2:'/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?' | |
116 | + }) | |
117 | + } | |
118 | + | |
110 | 119 | var g_id = this.data.object; |
111 | 120 | |
112 | 121 | this.init(g_id); |
... | ... | @@ -165,6 +174,10 @@ Component({ |
165 | 174 | gUrl="/api/weshop/marketing/marketingPresellList/page?store_id=" |
166 | 175 | +os.stoid+"&goodsidlist="+goodsidlist + "&user_id="+user_id+'&is_end=0&timetype=3&isuse=1'; |
167 | 176 | } |
177 | + if (th.data.prom_type==9) { //幸运购 | |
178 | + gUrl="/api/weshop/prom/luckyActivity/getGoodsList?store_id=" | |
179 | + +os.stoid+"&goodsidlist="+goodsidlist + "&user_id="+user_id+'&is_end=0&timetype=1&type=1'; | |
180 | + } | |
168 | 181 | |
169 | 182 | |
170 | 183 | |
... | ... | @@ -226,6 +239,18 @@ Component({ |
226 | 239 | pageSize:9 |
227 | 240 | } |
228 | 241 | } |
242 | + if (this.data.prom_type==9) { //幸运购 | |
243 | + gUrl="/api/weshop/prom/luckyActivity/page" | |
244 | + req={ | |
245 | + store_id:os.stoid, | |
246 | + is_end:0, | |
247 | + timetype:1, | |
248 | + // isuse:1, | |
249 | + // page:1, | |
250 | + // user_id:user_id, | |
251 | + // pageSize:9 | |
252 | + } | |
253 | + } | |
229 | 254 | |
230 | 255 | getApp().request.promiseGet(gUrl, |
231 | 256 | { isShowLoading: 1, data:req } |
... | ... | @@ -244,6 +269,7 @@ Component({ |
244 | 269 | let prom_type=this.data.prom_type |
245 | 270 | goodslist.forEach(function (vy, indy) { |
246 | 271 | if(!vy.id) vy.id=vy.prom_id; |
272 | + if(vy.title && !vy.goods_name) vy.goods_name=vy.title; | |
247 | 273 | }) |
248 | 274 | |
249 | 275 | // 判断火热,预热 |
... | ... | @@ -279,7 +305,7 @@ Component({ |
279 | 305 | |
280 | 306 | |
281 | 307 | var promisies = []; |
282 | - if (th.data.prom_type !=8) { | |
308 | + if (th.data.prom_type !=8 && th.data.prom_type !=9) { | |
283 | 309 | for (const key in all_array) { |
284 | 310 | if (Object.hasOwnProperty.call(all_array, key)) { |
285 | 311 | const val = all_array[key]; |
... | ... | @@ -306,6 +332,7 @@ Component({ |
306 | 332 | }; |
307 | 333 | // let price=all_array[i].price.toFixed(2) |
308 | 334 | let price=all_array[i].price + '' |
335 | + | |
309 | 336 | if (th.data.prom_type==8) { //预售 |
310 | 337 | price = all_array[i].presell_price + '' |
311 | 338 | if (all_array[i].status ===0) { |
... | ... | @@ -315,8 +342,11 @@ Component({ |
315 | 342 | all_array[i].goods_num=all_array[i].presell_sumqty*1 + all_array[i].virtual_qty*1 |
316 | 343 | all_array[i].buy_num=all_array[i].buy_goodnum + all_array[i].virtual_qty*1 |
317 | 344 | } |
318 | - | |
319 | - | |
345 | + } | |
346 | + if (th.data.prom_type==9) { //幸运购 | |
347 | + price = (all_array[i].group_price / 100) + '' | |
348 | + all_array[i].buy_num = all_array[i].group_joined | |
349 | + all_array[i].goods_name = all_array[i].title | |
320 | 350 | } |
321 | 351 | |
322 | 352 | |
... | ... | @@ -329,6 +359,8 @@ Component({ |
329 | 359 | } |
330 | 360 | |
331 | 361 | all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 |
362 | + all_array[i].residue = (all_array[i].residue >= 0) ? all_array[i].residue : 0 | |
363 | + console.error(all_array[i].residue); | |
332 | 364 | if (all_array[i].residue && all_array[i].residue > 0 && all_array[i].status !=2) { |
333 | 365 | empty.push(all_array[i]) |
334 | 366 | } |
... | ... | @@ -464,6 +496,9 @@ Component({ |
464 | 496 | if (this.data.prom_type==8) { //预售 |
465 | 497 | url="/packageC/pages/presell/list/list"; |
466 | 498 | } |
499 | + if (this.data.prom_type==9) { //幸运购 | |
500 | + url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList"; | |
501 | + } | |
467 | 502 | |
468 | 503 | wx.navigateTo({ |
469 | 504 | 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 +'&pre_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 )}}" 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 +'&pre_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 )}}" 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 +'&pre_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 )}}" 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 +'&pre_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 )}}" 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 +'&pre_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 )}}" 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 +'&pre_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 )}}" 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 +'&pre_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 )}}" 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 +'&pre_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 )}}" 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_public/diy_public.wxss
... | ... | @@ -555,4 +555,14 @@ swiper { |
555 | 555 | border-radius: 10rpx; |
556 | 556 | margin-right: 10rpx; |
557 | 557 | opacity: .8; |
558 | + } | |
559 | + .lucky{ | |
560 | + display: inline-block; | |
561 | + font-size: 24rpx; | |
562 | + padding: 0 10rpx; | |
563 | + background-color: #f23023; | |
564 | + opacity: .8; | |
565 | + color: #fff; | |
566 | + margin-right: 10rpx; | |
567 | + border-radius: 10rpx; | |
558 | 568 | } |
559 | 569 | \ No newline at end of file | ... | ... |
pages/index/index/index.wxml
... | ... | @@ -530,6 +530,10 @@ |
530 | 530 | <block wx:if="{{item.ename=='luckyactivity'}}"> |
531 | 531 | <luckyGo object="{{item.content}}"></luckyGo> |
532 | 532 | </block> |
533 | + <block wx:if="{{item.ename=='luckyactivityNew'}}"> | |
534 | + <!-- <luckyGo object="{{item.content}}"></luckyGo> --> | |
535 | + <diy_public object="{{item.content}}" prom_type="9"></diy_public> | |
536 | + </block> | |
533 | 537 | |
534 | 538 | <!-- 服务卡项 --> |
535 | 539 | <block wx:if="{{item.ename=='servicecategory'}}"> | ... | ... |
pages/template/index.json
... | ... | @@ -11,6 +11,7 @@ |
11 | 11 | "searchbox":"/components/diy_searchbox/diy_searchbox", |
12 | 12 | "shopname": "/components/diy_shopname/diy_shopname", |
13 | 13 | "pingd_buy": "/components/diy_pingd_buy/diy_pingd_buy", |
14 | + "luckyGo": "/components/diy_luckyGo/diy_luckyGo", | |
14 | 15 | "diy_public": "/components/diy_public/diy_public", |
15 | 16 | "title": "/components/diy_title/diy_title", |
16 | 17 | "notice": "/components/diy_notice/diy_notice", | ... | ... |
pages/template/index.wxml
... | ... | @@ -79,6 +79,15 @@ |
79 | 79 | <block wx:if="{{item.ename=='groupbuyNew'}}"> |
80 | 80 | <diy_public object="{{item.content}}" prom_type="2"></diy_public> |
81 | 81 | </block> |
82 | + | |
83 | + <!-- 幸运购 --> | |
84 | + <block wx:if="{{item.ename=='luckyactivity'}}"> | |
85 | + <luckyGo object="{{item.content}}"></luckyGo> | |
86 | + </block> | |
87 | + <block wx:if="{{item.ename=='luckyactivityNew'}}"> | |
88 | + <!-- <luckyGo object="{{item.content}}"></luckyGo> --> | |
89 | + <diy_public object="{{item.content}}" prom_type="9"></diy_public> | |
90 | + </block> | |
82 | 91 | </view> |
83 | 92 | </block> |
84 | 93 | </view> | ... | ... |