Commit aaba766a366bcdd18145cdb13b71dc73c6f52c72
Merge branch 'dev' into 'test'
Dev See merge request !215
Showing
11 changed files
with
430 additions
and
369 deletions
components/diy_goodsGroup/diy_goodsGroup.wxss
| @@ -262,6 +262,9 @@ | @@ -262,6 +262,9 @@ | ||
| 262 | float: left; | 262 | float: left; |
| 263 | background: #fff; | 263 | background: #fff; |
| 264 | margin-left: 1%; | 264 | margin-left: 1%; |
| 265 | + border:1rpx solid rgb(214, 214, 214); | ||
| 266 | + border-radius: 25rpx; | ||
| 267 | + margin-top: 10rpx; | ||
| 265 | } | 268 | } |
| 266 | 269 | ||
| 267 | .zs_goods_2l { | 270 | .zs_goods_2l { |
components/diy_pingd_buy/diy_pingd_buy.wxml
| 1 | <!--pages/wp/wp.wxml--> | 1 | <!--pages/wp/wp.wxml--> |
| 2 | <block wx:if="goods_array.length>0"> | 2 | <block wx:if="goods_array.length>0"> |
| 3 | <!--拼单--> | 3 | <!--拼单--> |
| 4 | - <view class='top_p'> | 4 | + <view class='top_p' bindtap="go_to_pindlist"> |
| 5 | <view class="top"> | 5 | <view class="top"> |
| 6 | <view class='t_left_p'></view> | 6 | <view class='t_left_p'></view> |
| 7 | <view class='t_ms_p'>拼单</view> | 7 | <view class='t_ms_p'>拼单</view> |
| 8 | </view> | 8 | </view> |
| 9 | - <view class='right_p' bindtap="go_to_pindlist"> | 9 | + <view class='right_p'> |
| 10 | <image src="{{iurl}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | 10 | <image src="{{iurl}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> |
| 11 | </view> | 11 | </view> |
| 12 | </view> | 12 | </view> |
components/diy_pingd_buy/diy_pingd_buy.wxss
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | .top{ | 2 | .top{ |
| 3 | display: flex; | 3 | display: flex; |
| 4 | align-items: center; | 4 | align-items: center; |
| 5 | + font-size: 32rpx; | ||
| 5 | } | 6 | } |
| 6 | .top_p { | 7 | .top_p { |
| 7 | padding:0rpx 20rpx; | 8 | padding:0rpx 20rpx; |
| @@ -227,7 +228,7 @@ swiper { | @@ -227,7 +228,7 @@ swiper { | ||
| 227 | } | 228 | } |
| 228 | 229 | ||
| 229 | .o1_right_p .sp_wzi_p { | 230 | .o1_right_p .sp_wzi_p { |
| 230 | - font-size: 36rpx; | 231 | + font-size: 30rpx; |
| 231 | margin-bottom: 6rpx; | 232 | margin-bottom: 6rpx; |
| 232 | width: 100%; | 233 | width: 100%; |
| 233 | text-align: left; | 234 | text-align: left; |
| @@ -240,7 +241,7 @@ swiper { | @@ -240,7 +241,7 @@ swiper { | ||
| 240 | 241 | ||
| 241 | .o1_right_p .o1_sj_p { | 242 | .o1_right_p .o1_sj_p { |
| 242 | height: 60rpx; | 243 | height: 60rpx; |
| 243 | - font-size: 28rpx; | 244 | + font-size: 26rpx; |
| 244 | line-height: 40rpx; | 245 | line-height: 40rpx; |
| 245 | } | 246 | } |
| 246 | 247 | ||
| @@ -254,7 +255,7 @@ swiper { | @@ -254,7 +255,7 @@ swiper { | ||
| 254 | 255 | ||
| 255 | .o1_right_p .sp_jg_p { | 256 | .o1_right_p .sp_jg_p { |
| 256 | color: #c4182e; | 257 | color: #c4182e; |
| 257 | - font-size: 36rpx; | 258 | + font-size: 30rpx; |
| 258 | overflow: hidden; | 259 | overflow: hidden; |
| 259 | display: inline-block; | 260 | display: inline-block; |
| 260 | margin-right: 10rpx; | 261 | margin-right: 10rpx; |
| @@ -277,12 +278,12 @@ swiper { | @@ -277,12 +278,12 @@ swiper { | ||
| 277 | 278 | ||
| 278 | .o1_right_p .wo_p { | 279 | .o1_right_p .wo_p { |
| 279 | background-color: #c4182e; | 280 | background-color: #c4182e; |
| 280 | - width: 160rpx; | ||
| 281 | - height: 60rpx; | ||
| 282 | - line-height: 60rpx; | 281 | + width: 150rpx; |
| 282 | + height: 55rpx; | ||
| 283 | + line-height: 55rpx; | ||
| 283 | color: white; | 284 | color: white; |
| 284 | text-align: center; | 285 | text-align: center; |
| 285 | - font-size: 32rpx; | 286 | + font-size: 30rpx; |
| 286 | border-radius: 14rpx; | 287 | border-radius: 14rpx; |
| 287 | position: absolute; | 288 | position: absolute; |
| 288 | right: 0; | 289 | right: 0; |
| @@ -341,23 +342,24 @@ swiper { | @@ -341,23 +342,24 @@ swiper { | ||
| 341 | } | 342 | } |
| 342 | 343 | ||
| 343 | .o1_sj_p .time_img { | 344 | .o1_sj_p .time_img { |
| 344 | - width: 40rpx; | ||
| 345 | - height: 40rpx; | 345 | + width: 35rpx; |
| 346 | + height: 35rpx; | ||
| 346 | vertical-align: top; | 347 | vertical-align: top; |
| 347 | margin-right: 10rpx; | 348 | margin-right: 10rpx; |
| 348 | } | 349 | } |
| 349 | 350 | ||
| 350 | .o1_right_p .co-red2 { | 351 | .o1_right_p .co-red2 { |
| 351 | - font-size: 30rpx; | 352 | + font-size: 26rpx; |
| 352 | color: #999; | 353 | color: #999; |
| 353 | } | 354 | } |
| 354 | 355 | ||
| 355 | .o1_right_p .co-red2 .yituan_num { | 356 | .o1_right_p .co-red2 .yituan_num { |
| 356 | - font-size: 30rpx; | 357 | + font-size: 26rpx; |
| 357 | margin-right: 10rpx; | 358 | margin-right: 10rpx; |
| 358 | color: #333; | 359 | color: #333; |
| 359 | } | 360 | } |
| 360 | .money{ | 361 | .money{ |
| 361 | display: flex; | 362 | display: flex; |
| 362 | align-items: center; | 363 | align-items: center; |
| 364 | + margin:5rpx 0rpx; | ||
| 363 | } | 365 | } |
| 364 | \ No newline at end of file | 366 | \ No newline at end of file |
components/diy_seckill/diy_seckill.wxml
| 1 | <block wx:if="goods_array.length>0"> | 1 | <block wx:if="goods_array.length>0"> |
| 2 | <!--秒杀--> | 2 | <!--秒杀--> |
| 3 | - <view class='top'> | 3 | + <view class='top' bindtap="go_to_skill"> |
| 4 | <view class="flex"> | 4 | <view class="flex"> |
| 5 | <view class='t_left'></view> | 5 | <view class='t_left'></view> |
| 6 | <view class='t_ms'>秒杀</view> | 6 | <view class='t_ms'>秒杀</view> |
| 7 | - </view> | ||
| 8 | - <view class='right_k' bindtap="go_to_skill"> | ||
| 9 | - <image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | ||
| 10 | - </view> | ||
| 11 | - </view> | ||
| 12 | - | ||
| 13 | - <!--商品展示--> | ||
| 14 | - <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}"> | ||
| 15 | - <view class='sp' wx:if="{{object.style==1}}"> | ||
| 16 | - <swiper-item class="s_it" wx:for="{{goods_array}}"> | ||
| 17 | - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | ||
| 18 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1"> | ||
| 19 | - <view class='one'> | ||
| 20 | - <view class='sp_top'> | ||
| 21 | - <view class='po'></view> | ||
| 22 | - <block wx:if="{{aitem.start_time>newTime}}"> | ||
| 23 | - <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span> | ||
| 24 | - </block> | ||
| 25 | - <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | ||
| 26 | - <span class='s_top_kill'>火热进行</span> | ||
| 27 | - </block> | ||
| 28 | - <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | ||
| 29 | - <span class='s_top_kill gray'>已抢光</span> | ||
| 30 | - </block> | ||
| 31 | - | ||
| 32 | - <view class='clear'></view> | ||
| 33 | - | ||
| 34 | - <view class='s_img'> | ||
| 35 | - <image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
| 36 | - </view> | ||
| 37 | - | ||
| 38 | - <view class='s_foot_kill'> | ||
| 39 | - <text>{{aitem.djs.day}}天</text> | ||
| 40 | - <text>{{aitem.djs.hou}}时</text> | ||
| 41 | - <text>{{aitem.djs.min}}分</text> | ||
| 42 | - <text>{{aitem.djs.sec}}秒</text> | ||
| 43 | - </view> | ||
| 44 | - <view class='clear'></view> | ||
| 45 | - | 7 | + </view> |
| 8 | + <view class='right_k'> | ||
| 9 | + <image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image> | ||
| 10 | + </view> | ||
| 11 | + </view> | ||
| 12 | + | ||
| 13 | + <!--商品展示--> | ||
| 14 | + <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}"> | ||
| 15 | + <view class='sp' wx:if="{{object.style==1}}"> | ||
| 16 | + <swiper-item class="s_it" wx:for="{{goods_array}}"> | ||
| 17 | + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | ||
| 18 | + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1"> | ||
| 19 | + <view class='one'> | ||
| 20 | + <view class='sp_top'> | ||
| 21 | + <view class='po'></view> | ||
| 22 | + <block wx:if="{{aitem.start_time>newTime}}"> | ||
| 23 | + <view class="rob"> | ||
| 24 | + <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span> | ||
| 46 | </view> | 25 | </view> |
| 47 | - | ||
| 48 | - <view class='sp_wz'> | ||
| 49 | - <view class='sp_wzi'>{{aitem.goods_name}}</view> | ||
| 50 | - <view class='sp_jg'>¥{{aitem.price}}</view> | ||
| 51 | - <view class='sp_jgx'>¥{{aitem.market_price}}</view> | 26 | + </block> |
| 27 | + <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | ||
| 28 | + <view class="rob"> | ||
| 29 | + <span class='s_top_kill'>火热进行</span> | ||
| 30 | + </view> | ||
| 31 | + </block> | ||
| 32 | + <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | ||
| 33 | + <view class="rob"> | ||
| 34 | + <span class='s_top_kill gray'>已抢光</span> | ||
| 52 | </view> | 35 | </view> |
| 36 | + </block> | ||
| 53 | 37 | ||
| 54 | - </view> | ||
| 55 | - </navigator> | ||
| 56 | - </block> | ||
| 57 | - </swiper-item> | ||
| 58 | - </view> | ||
| 59 | - </swiper> | ||
| 60 | - | ||
| 61 | - <view class="sp2" wx:if="{{object.style==2}}"> | ||
| 62 | - <block wx:for="{{goods_array}}"> | ||
| 63 | - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | ||
| 64 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1"> | ||
| 65 | - <view class='one1'> | ||
| 66 | - | ||
| 67 | - <view class="o1_img"> | 38 | + <view class='clear'></view> |
| 39 | + | ||
| 40 | + <view class='s_img'> | ||
| 68 | <image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | 41 | <image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> |
| 69 | </view> | 42 | </view> |
| 70 | 43 | ||
| 71 | - <view class="o1_right"> | ||
| 72 | - <view class="sp_wzi">{{aitem.goods_name}}</view> | ||
| 73 | - <view class="o1_sj_kill"> | ||
| 74 | - <text>{{aitem.djs.day}}</text> 天 | ||
| 75 | - <text>{{aitem.djs.hou}}</text> : | ||
| 76 | - <text>{{aitem.djs.min}}</text> : | ||
| 77 | - <text>{{aitem.djs.sec}}</text> | 44 | + <view class='s_foot_kill'> |
| 45 | + <text>{{aitem.djs.day}}天</text> | ||
| 46 | + <text>{{aitem.djs.hou}}时</text> | ||
| 47 | + <text>{{aitem.djs.min}}分</text> | ||
| 48 | + <text>{{aitem.djs.sec}}秒</text> | ||
| 49 | + </view> | ||
| 50 | + <view class='clear'></view> | ||
| 78 | 51 | ||
| 79 | - </view> | ||
| 80 | - <view class="money"> | ||
| 81 | - <view class='sp_jg'>¥{{aitem.price}}</view> | ||
| 82 | - <view class='sp_jgx'>¥{{aitem.market_price}}</view> | ||
| 83 | - </view> | ||
| 84 | - <block wx:if="{{aitem.start_time>newTime}}"> | ||
| 85 | - <view class="wo" style="background-color: #adadad">正在预热</view> | ||
| 86 | - </block> | ||
| 87 | - <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | ||
| 88 | - <view class="rob"> | ||
| 89 | - <view class="wo">我要抢</view> | ||
| 90 | - </view> | ||
| 91 | - </block> | 52 | + </view> |
| 53 | + | ||
| 54 | + <view class='sp_wz'> | ||
| 55 | + <view class='sp_wzi'>{{aitem.goods_name}}</view> | ||
| 56 | + <view class='sp_jg'>¥{{aitem.price}}</view> | ||
| 57 | + <view class='sp_jgx'>¥{{aitem.market_price}}</view> | ||
| 58 | + </view> | ||
| 92 | 59 | ||
| 93 | - <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | ||
| 94 | - <view class="wo" style="background-color: #adadad">已抢光</view> | ||
| 95 | - </block> | 60 | + </view> |
| 61 | + </navigator> | ||
| 62 | + </block> | ||
| 63 | + </swiper-item> | ||
| 64 | + </view> | ||
| 65 | + </swiper> | ||
| 66 | + | ||
| 67 | + <view class="sp2" wx:if="{{object.style==2}}"> | ||
| 68 | + <block wx:for="{{goods_array}}"> | ||
| 69 | + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | ||
| 70 | + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1"> | ||
| 71 | + <view class='one1'> | ||
| 72 | + | ||
| 73 | + <view class="o1_img"> | ||
| 74 | + <image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image> | ||
| 75 | + </view> | ||
| 76 | + | ||
| 77 | + <view class="o1_right"> | ||
| 78 | + <view class="sp_wzi">{{aitem.goods_name}}</view> | ||
| 79 | + <view class="o1_sj_kill"> | ||
| 80 | + <text>{{aitem.djs.day}}</text> 天 | ||
| 81 | + <text>{{aitem.djs.hou}}</text> : | ||
| 82 | + <text>{{aitem.djs.min}}</text> : | ||
| 83 | + <text>{{aitem.djs.sec}}</text> | ||
| 96 | 84 | ||
| 85 | + </view> | ||
| 86 | + <view class="money"> | ||
| 87 | + <view class='sp_jg'>¥{{aitem.price}}</view> | ||
| 88 | + <view class='sp_jgx'>¥{{aitem.market_price}}</view> | ||
| 89 | + </view> | ||
| 90 | + <block wx:if="{{aitem.start_time>newTime}}"> | ||
| 91 | + <view class="rob"> | ||
| 92 | + <view class="wo" style="background-color: #adadad">正在预热</view> | ||
| 93 | + </view> | ||
| 94 | + </block> | ||
| 95 | + <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | ||
| 96 | + <view class="rob"> | ||
| 97 | + <view class="wo">我要抢</view> | ||
| 98 | + </view> | ||
| 99 | + </block> | ||
| 97 | 100 | ||
| 101 | + <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | ||
| 102 | + <view class="rob"> | ||
| 103 | + <view class="wo" style="background-color: #adadad">已抢光</view> | ||
| 98 | </view> | 104 | </view> |
| 99 | - </view> | ||
| 100 | - </navigator> | ||
| 101 | - </block> | ||
| 102 | - </block> | 105 | + </block> |
| 106 | + | ||
| 107 | + | ||
| 108 | + </view> | ||
| 109 | + </view> | ||
| 110 | + </navigator> | ||
| 111 | + </block> | ||
| 112 | + </block> | ||
| 103 | 113 | ||
| 104 | - </view> | ||
| 105 | - <view class='clear'></view> | 114 | + </view> |
| 115 | + <view class='clear'></view> | ||
| 106 | 116 | ||
| 107 | </block> | 117 | </block> |
| 108 | \ No newline at end of file | 118 | \ No newline at end of file |
components/diy_seckill/diy_seckill.wxss
| @@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
| 11 | padding:0rpx 20rpx; | 11 | padding:0rpx 20rpx; |
| 12 | display: flex; | 12 | display: flex; |
| 13 | justify-content: space-between; | 13 | justify-content: space-between; |
| 14 | + font-size: 32rpx; | ||
| 14 | } | 15 | } |
| 15 | 16 | ||
| 16 | .s_it { | 17 | .s_it { |
| @@ -220,7 +221,7 @@ swiper { | @@ -220,7 +221,7 @@ swiper { | ||
| 220 | } | 221 | } |
| 221 | 222 | ||
| 222 | .o1_right .sp_wzi { | 223 | .o1_right .sp_wzi { |
| 223 | - font-size: 36rpx; | 224 | + font-size: 30rpx; |
| 224 | margin-bottom: 6rpx; | 225 | margin-bottom: 6rpx; |
| 225 | text-align: left; | 226 | text-align: left; |
| 226 | padding: 4rpx 0; | 227 | padding: 4rpx 0; |
| @@ -233,6 +234,7 @@ swiper { | @@ -233,6 +234,7 @@ swiper { | ||
| 233 | .o1_right .o1_sj_kill { | 234 | .o1_right .o1_sj_kill { |
| 234 | height: 60rpx; | 235 | height: 60rpx; |
| 235 | margin-bottom: 10rpx; | 236 | margin-bottom: 10rpx; |
| 237 | + font-size: 28rpx; | ||
| 236 | } | 238 | } |
| 237 | 239 | ||
| 238 | .o1_right .o1_sj_kill text { | 240 | .o1_right .o1_sj_kill text { |
| @@ -245,7 +247,7 @@ swiper { | @@ -245,7 +247,7 @@ swiper { | ||
| 245 | 247 | ||
| 246 | .o1_right .sp_jg { | 248 | .o1_right .sp_jg { |
| 247 | color: #c4182e; | 249 | color: #c4182e; |
| 248 | - font-size: 36rpx; | 250 | + font-size: 30rpx; |
| 249 | overflow: hidden; | 251 | overflow: hidden; |
| 250 | display: inline-block; | 252 | display: inline-block; |
| 251 | margin-right: 10rpx; | 253 | margin-right: 10rpx; |
| @@ -268,17 +270,18 @@ swiper { | @@ -268,17 +270,18 @@ swiper { | ||
| 268 | } | 270 | } |
| 269 | .o1_right .wo { | 271 | .o1_right .wo { |
| 270 | background-color: #c4182e; | 272 | background-color: #c4182e; |
| 271 | - width: 160rpx; | ||
| 272 | - height: 60rpx; | ||
| 273 | - line-height: 60rpx; | 273 | + width: 150rpx; |
| 274 | + height: 50rpx; | ||
| 275 | + line-height: 50rpx; | ||
| 274 | color: white; | 276 | color: white; |
| 275 | text-align: center; | 277 | text-align: center; |
| 276 | - font-size: 32rpx; | 278 | + font-size: 30rpx; |
| 277 | border-radius: 14rpx; | 279 | border-radius: 14rpx; |
| 278 | } | 280 | } |
| 279 | .rob{ | 281 | .rob{ |
| 280 | display: flex; | 282 | display: flex; |
| 281 | justify-content: flex-end; | 283 | justify-content: flex-end; |
| 284 | + font-size: 30rpx; | ||
| 282 | } | 285 | } |
| 283 | .money{ | 286 | .money{ |
| 284 | display: flex; | 287 | display: flex; |
pages/giftpack/buygiftpack/giftpackbuy.js
| @@ -27,18 +27,22 @@ Page({ | @@ -27,18 +27,22 @@ Page({ | ||
| 27 | my_confirm.open_cancel(0); | 27 | my_confirm.open_cancel(0); |
| 28 | th.setData({ | 28 | th.setData({ |
| 29 | getStorageID: a.stoid, | 29 | getStorageID: a.stoid, |
| 30 | - getUserID: d.user_id | ||
| 31 | - }) | ||
| 32 | - }, | ||
| 33 | - onShow: function() { | ||
| 34 | - var th = this; | ||
| 35 | - th.setData({ | 30 | + getUserID: d.user_id, |
| 36 | pages: 1, | 31 | pages: 1, |
| 37 | pageSize: 10, | 32 | pageSize: 10, |
| 38 | loadingType: 0 | 33 | loadingType: 0 |
| 39 | }) | 34 | }) |
| 40 | th.getList(); | 35 | th.getList(); |
| 41 | }, | 36 | }, |
| 37 | + onShow: function() { | ||
| 38 | + // var th = this; | ||
| 39 | + // th.setData({ | ||
| 40 | + // pages: 1, | ||
| 41 | + // pageSize: 10, | ||
| 42 | + // loadingType: 0 | ||
| 43 | + // }) | ||
| 44 | + // th.getList(); | ||
| 45 | + }, | ||
| 42 | 46 | ||
| 43 | GetBuyPrice: function(e) { | 47 | GetBuyPrice: function(e) { |
| 44 | var that = this.data; | 48 | var that = this.data; |
pages/giftpack/buygiftpack/giftpackbuy.wxml
| 1 | <view class="top_img"> | 1 | <view class="top_img"> |
| 2 | - <view class="top_img"> | ||
| 3 | - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg'}}" lazy-load="true"></image> | 2 | + <view class="top_img"> |
| 3 | + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg'}}" lazy-load="true"></image> | ||
| 4 | + </view> | ||
| 5 | + <view class="top_title"> | ||
| 6 | + <view class="top_title_box"> | ||
| 7 | + <text class="top_title_redtext">礼包列表</text> | ||
| 4 | </view> | 8 | </view> |
| 5 | - <view class="top_title"> | ||
| 6 | - <view class="top_title_box"> | ||
| 7 | - <text class="top_title_redtext">礼包列表</text> | ||
| 8 | - </view> | ||
| 9 | - <view class="top_title_box_S"></view> | ||
| 10 | - <view class="top_title_box"> | ||
| 11 | - <a class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/mygiftpack/mygiftpack">我的礼包</a> | ||
| 12 | - </view> | 9 | + <view class="top_title_box_S"></view> |
| 10 | + <view class="top_title_box"> | ||
| 11 | + <a class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/mygiftpack/mygiftpack">我的礼包</a> | ||
| 13 | </view> | 12 | </view> |
| 14 | - <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index"> | ||
| 15 | - <view class="content_box"> | ||
| 16 | - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn={{items.orderSn}}"> | ||
| 17 | - <view class="content_box_img"> | ||
| 18 | - <image src="{{iurl+items.lbUrl}}" lazy-load="true"></image> | ||
| 19 | - </view> | ||
| 20 | - <view class="content_box_title"> | ||
| 21 | - <view class="content_ware_title"> | ||
| 22 | - <text bindtap="__e">{{items.giftTitle}}</text> | ||
| 23 | - </view> | ||
| 24 | - <view class="content_ware_type"> | ||
| 25 | - <block wx:if="{{items.payMoney>0}}"> | ||
| 26 | - <text>{{"¥"+items.payMoney}}</text> | ||
| 27 | - </block> | ||
| 28 | - <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}"> | ||
| 29 | - <text>/</text> | ||
| 30 | - </block> | ||
| 31 | - <block wx:if="{{items.payIntegral>0}}"> | ||
| 32 | - <text>{{items.payIntegral+"积分"}}</text> | ||
| 33 | - </block> | ||
| 34 | - </view> | ||
| 35 | - <view class="content_ware_price"> | ||
| 36 | - <text>{{"原价:¥"+items.giftPosPrice}}</text> | ||
| 37 | - </view> | ||
| 38 | - <view class="content_ware_time"> | ||
| 39 | - <text>{{"活动时间:"+items.endTime}}</text> | ||
| 40 | - </view> | ||
| 41 | - </view> | 13 | + </view> |
| 14 | + <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index"> | ||
| 15 | + <view class="content_box"> | ||
| 16 | + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn={{items.orderSn}}"> | ||
| 17 | + <view class="content_box_img"> | ||
| 18 | + <image src="{{iurl+items.lbUrl}}" lazy-load="true"></image> | ||
| 19 | + </view> | ||
| 20 | + <view class="content_box_title"> | ||
| 21 | + <view class="content_ware_title"> | ||
| 22 | + <text bindtap="__e">{{items.giftTitle}}</text> | ||
| 23 | + </view> | ||
| 24 | + <view class="content_ware_type"> | ||
| 25 | + <block wx:if="{{items.payMoney>0}}"> | ||
| 26 | + <text>{{"¥"+items.payMoney}}</text> | ||
| 27 | + </block> | ||
| 28 | + <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}"> | ||
| 29 | + <text>/</text> | ||
| 30 | + </block> | ||
| 31 | + <block wx:if="{{items.payIntegral>0}}"> | ||
| 32 | + <view class="flex"> | ||
| 33 | + <text class="ellipsis-1">{{items.payIntegral}}</text> | ||
| 34 | + <view>积分</view> | ||
| 35 | + </view> | ||
| 36 | + </block> | ||
| 42 | </view> | 37 | </view> |
| 43 | - <view class="content_box_button"> | ||
| 44 | - <view class="box_button_remark"> | ||
| 45 | - <text>{{"已售:"+items.giftQty+"件"}}</text> | ||
| 46 | - </view> | ||
| 47 | - <block wx:if="{{items.payMoney>0}}"> | ||
| 48 | - <view class="box_button_buy" bindtap="GetBuyPrice" data-id="{{items.lbId}}"> | ||
| 49 | - <button>立即购买</button> | ||
| 50 | - </view> | ||
| 51 | - </block> | ||
| 52 | - <block wx:if="{{items.payIntegral>0}}"> | ||
| 53 | - <view class="box_button_dui" bindtap="GetBuyIntegral" data-id="{{items.lbId}}"> | ||
| 54 | - <button>立即兑换</button> | ||
| 55 | - </view> | ||
| 56 | - </block> | 38 | + <view class="content_ware_price"> |
| 39 | + <text class="ellipsis-1">{{"原价:¥"+items.giftPosPrice}}</text> | ||
| 57 | </view> | 40 | </view> |
| 58 | - </view> | ||
| 59 | - </block> | ||
| 60 | - <block wx:if="{{isEmpty==true && wareCard.length<2}}"> | ||
| 61 | - <view class="foot_empty"> | ||
| 62 | - <view> | ||
| 63 | - <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image> | 41 | + <view class="content_ware_time"> |
| 42 | + <text class="ellipsis-1">{{"活动时间:"+items.endTime}}</text> | ||
| 64 | </view> | 43 | </view> |
| 65 | - <view> | ||
| 66 | - <text>当前暂无礼包</text> | 44 | + </view> |
| 45 | + </view> | ||
| 46 | + <view class="content_box_button"> | ||
| 47 | + <view class="box_button_remark"> | ||
| 48 | + <text>{{"已售:"+items.giftQty+"件"}}</text> | ||
| 49 | + </view> | ||
| 50 | + <block wx:if="{{items.payMoney>0}}"> | ||
| 51 | + <view class="box_button_buy" bindtap="GetBuyPrice" data-id="{{items.lbId}}"> | ||
| 52 | + <button>立即购买</button> | ||
| 67 | </view> | 53 | </view> |
| 68 | - <view class="foot_empty_button"> | ||
| 69 | - <text bindtap="__e">去获取</text> | 54 | + </block> |
| 55 | + <block wx:if="{{items.payIntegral>0}}"> | ||
| 56 | + <view class="box_button_dui" bindtap="GetBuyIntegral" data-id="{{items.lbId}}"> | ||
| 57 | + <button>立即兑换</button> | ||
| 70 | </view> | 58 | </view> |
| 59 | + </block> | ||
| 71 | </view> | 60 | </view> |
| 72 | - </block> | ||
| 73 | - <view wx:if="{{is_read}}" class="foot_box"> | ||
| 74 | - <text>———— 到底了 ————</text> | 61 | + </view> |
| 62 | + </block> | ||
| 63 | + <block wx:if="{{isEmpty==true && wareCard.length<2}}"> | ||
| 64 | + <view class="foot_empty"> | ||
| 65 | + <view> | ||
| 66 | + <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image> | ||
| 67 | + </view> | ||
| 68 | + <view> | ||
| 69 | + <text>当前暂无礼包</text> | ||
| 70 | + </view> | ||
| 71 | + <view class="foot_empty_button"> | ||
| 72 | + <text bindtap="__e">去获取</text> | ||
| 73 | + </view> | ||
| 75 | </view> | 74 | </view> |
| 76 | -</view> | ||
| 77 | -<!-- 引入提示组件 --> | ||
| 78 | -<warn id="warn"></warn> | ||
| 79 | -<my_confirm id="my_confirm"></my_confirm> | ||
| 80 | \ No newline at end of file | 75 | \ No newline at end of file |
| 76 | + </block> | ||
| 77 | + <view wx:if="{{is_read}}" class="foot_box"> | ||
| 78 | + <text>———— 到底了 ————</text> | ||
| 79 | + </view> | ||
| 80 | + </view> | ||
| 81 | + <!-- 引入提示组件 --> | ||
| 82 | + <warn id="warn"></warn> | ||
| 83 | + <my_confirm id="my_confirm"></my_confirm> | ||
| 81 | \ No newline at end of file | 84 | \ No newline at end of file |
pages/giftpack/giftpacklist/giftpacklist.js
| @@ -22,6 +22,7 @@ Page({ | @@ -22,6 +22,7 @@ Page({ | ||
| 22 | getUrl: '', | 22 | getUrl: '', |
| 23 | wareCard: [], | 23 | wareCard: [], |
| 24 | orderSn: "", //订单编号 | 24 | orderSn: "", //订单编号 |
| 25 | + lbId:"" | ||
| 25 | }, | 26 | }, |
| 26 | onLoad: function(options) { | 27 | onLoad: function(options) { |
| 27 | var th = this; | 28 | var th = this; |
| @@ -46,79 +47,109 @@ Page({ | @@ -46,79 +47,109 @@ Page({ | ||
| 46 | giftRemark: th.data.giftRemark.replace(/<p><img/gi, "<p class='img'><img") | 47 | giftRemark: th.data.giftRemark.replace(/<p><img/gi, "<p class='img'><img") |
| 47 | }) | 48 | }) |
| 48 | }, | 49 | }, |
| 49 | - GetBuyPrice: function() { | ||
| 50 | - var that = this; | ||
| 51 | - var th = this.data; | ||
| 52 | - uni.showModal({ | ||
| 53 | - title: '', | ||
| 54 | - content: '是否确定购买该礼包', | ||
| 55 | - success: function success(res) { | ||
| 56 | - if (res.confirm) { | ||
| 57 | - getApp().request.post('/api/weshop/marketing/buy/receive/gift/record/insert', { | ||
| 58 | - data: { | ||
| 59 | - "actId": '', //活动Id | ||
| 60 | - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
| 61 | - "buyType": '2', //1=积分兑换 2=余额购买 | ||
| 62 | - "lbId": th.getGiftID, //礼包Id | ||
| 63 | - "storeId": th.getStorageID, //商家Id | ||
| 64 | - "userId": th.getUserID //用户ID | ||
| 65 | - }, | ||
| 66 | - success: function success(res) { | ||
| 67 | - if (res.data.code == 0) { | ||
| 68 | - getApp().my_warnning("购买成功!", 0, that); | ||
| 69 | - | ||
| 70 | - } else { | ||
| 71 | - getApp().my_warnning(res.data.msg, 0, that); | ||
| 72 | - } | ||
| 73 | - } | ||
| 74 | - }); | 50 | + GetBuyPrice: function (e) { |
| 51 | + var that = this.data; | ||
| 52 | + var th = this; | ||
| 53 | + // var id = e.currentTarget.dataset.id;//活动id | ||
| 54 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | ||
| 55 | + my_confirm.open( | ||
| 56 | + "是否确定购买该礼包", | ||
| 57 | + "取消", | ||
| 58 | + "确定", | ||
| 59 | + function () { | ||
| 60 | + my_confirm.open_cancel(0); | ||
| 61 | + }, | ||
| 62 | + function () { | ||
| 63 | + my_confirm.open_cancel(0); | ||
| 64 | + var json = { | ||
| 65 | + "actId": '', //活动Id | ||
| 66 | + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
| 67 | + "buyType": '2', //1=积分兑换 2=余额购买 | ||
| 68 | + "lbId": that.getGiftID, //礼包Id | ||
| 69 | + "storeId": that.getStorageID, //商家Id | ||
| 70 | + "userId": that.getUserID, //用户ID | ||
| 71 | + "buyFrom": 2 | ||
| 72 | + }; | ||
| 73 | + var data = JSON.stringify(json); | ||
| 74 | + var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; | ||
| 75 | + wx.request({ | ||
| 76 | + url: url, | ||
| 77 | + data: data, | ||
| 78 | + method: 'post', | ||
| 79 | + header: { | ||
| 80 | + 'content-type': 'application/json' | ||
| 81 | + }, // 设置请求的 header | ||
| 82 | + success: function (res) { | ||
| 83 | + if (res.data.code == 0) { | ||
| 84 | + res = res.data.data; | ||
| 85 | + wx.requestPayment({ | ||
| 86 | + timeStamp: String(res.timeStamp), | ||
| 87 | + nonceStr: res.nonceStr, | ||
| 88 | + package: res.packageValue, | ||
| 89 | + signType: res.signType, | ||
| 90 | + paySign: res.paySign, | ||
| 91 | + success: function (n) { | ||
| 75 | 92 | ||
| 76 | - } else if (res.cancel) { | 93 | + }, |
| 94 | + fail: function (n) { | ||
| 95 | + | ||
| 96 | + } | ||
| 97 | + }); | ||
| 98 | + } else { | ||
| 99 | + getApp().my_warnning(res.data.msg, 0, th); | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + }) | ||
| 77 | 103 | ||
| 78 | - } | ||
| 79 | } | 104 | } |
| 80 | - }); | 105 | + |
| 106 | + | ||
| 107 | + ) | ||
| 81 | 108 | ||
| 82 | 109 | ||
| 83 | }, | 110 | }, |
| 84 | - GetBuyIntegral: function() { | 111 | + GetBuyIntegral: function (e) { |
| 85 | var that = this.data; | 112 | var that = this.data; |
| 86 | - uni.showModal({ | ||
| 87 | - title: '', | ||
| 88 | - content: '是否确定兑换该礼包', | ||
| 89 | - success: function success(res) { | ||
| 90 | - if (res.confirm) { | ||
| 91 | - getApp().request.promisepost('/api/weshop/marketing/buy/receive/gift/record/insert', { | ||
| 92 | - data: { | ||
| 93 | - "actId": '', //活动Id | ||
| 94 | - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
| 95 | - "buyType": '1', //1=积分兑换 2=余额购买 | ||
| 96 | - "lbId": that.getGiftID, //礼包Id | ||
| 97 | - "storeId": that.getStorageID, //商家Id | ||
| 98 | - "userId": that.getUserID //用户ID | ||
| 99 | - }, | ||
| 100 | - success: function success(res) { | ||
| 101 | - if (res.data.code == 0) { | ||
| 102 | - // uni.showToast({ | ||
| 103 | - // icon: 'none', | ||
| 104 | - // title: '兑换成功!' | ||
| 105 | - // }); | ||
| 106 | - getApp().my_warnning("兑换成功!"); | ||
| 107 | - | ||
| 108 | - } else { | ||
| 109 | - uni.showToast({ | ||
| 110 | - icon: 'none', | ||
| 111 | - title: res.data.msg | ||
| 112 | - }); | ||
| 113 | - | ||
| 114 | - } | 113 | + var th = this; |
| 114 | + // var id = e.currentTarget.dataset.id;//活动id | ||
| 115 | + var my_confirm = th.selectComponent("#my_confirm"); //组件的id | ||
| 116 | + my_confirm.open( | ||
| 117 | + "是否确定兑换该礼包", | ||
| 118 | + "取消", | ||
| 119 | + "确定", | ||
| 120 | + function () { | ||
| 121 | + my_confirm.open_cancel(0); | ||
| 122 | + }, | ||
| 123 | + function () { | ||
| 124 | + my_confirm.open_cancel(0); | ||
| 125 | + var json = { | ||
| 126 | + "actId": '', //活动Id | ||
| 127 | + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
| 128 | + "buyType": '1', //1=积分兑换 2=余额购买 | ||
| 129 | + "lbId": that.getGiftID, //礼包Id | ||
| 130 | + "storeId": that.getStorageID, //商家Id | ||
| 131 | + "userId": that.getUserID //用户ID | ||
| 132 | + }; | ||
| 133 | + var data = JSON.stringify(json); | ||
| 134 | + var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; | ||
| 135 | + wx.request({ | ||
| 136 | + url: url, | ||
| 137 | + data: data, | ||
| 138 | + method: 'post', | ||
| 139 | + header: { | ||
| 140 | + 'content-type': 'application/json' | ||
| 141 | + }, // 设置请求的 header | ||
| 142 | + success: function (res) { | ||
| 143 | + if (res.data.code == 0) { | ||
| 144 | + getApp().my_warnning("兑换成功!", 1, th); | ||
| 145 | + } else { | ||
| 146 | + getApp().my_warnning(res.data.msg, 0, th); | ||
| 115 | } | 147 | } |
| 116 | - }); | 148 | + } |
| 149 | + }) | ||
| 117 | 150 | ||
| 151 | + }) | ||
| 118 | 152 | ||
| 119 | - } else if (res.cancel) {} | ||
| 120 | - } | ||
| 121 | - }); | ||
| 122 | 153 | ||
| 123 | }, | 154 | }, |
| 124 | GetMyGiftList: function() { | 155 | GetMyGiftList: function() { |
| @@ -154,7 +185,8 @@ Page({ | @@ -154,7 +185,8 @@ Page({ | ||
| 154 | giftPrice: res.data.data.payMoney, | 185 | giftPrice: res.data.data.payMoney, |
| 155 | giftType: res.data.data.actType, | 186 | giftType: res.data.data.actType, |
| 156 | actTitle: res.data.data.actTitle, | 187 | actTitle: res.data.data.actTitle, |
| 157 | - wareCard: res.data.data.wareCard | 188 | + wareCard: res.data.data.wareCard, |
| 189 | + lbId: res.data.data.lbId | ||
| 158 | }) | 190 | }) |
| 159 | } else { | 191 | } else { |
| 160 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | 192 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); |
| @@ -198,7 +230,7 @@ Page({ | @@ -198,7 +230,7 @@ Page({ | ||
| 198 | giftPrice: res.data.data.payMoney, | 230 | giftPrice: res.data.data.payMoney, |
| 199 | giftType: res.data.data.actType, | 231 | giftType: res.data.data.actType, |
| 200 | actTitle: res.data.data.actTitle, | 232 | actTitle: res.data.data.actTitle, |
| 201 | - wareCard: res.data.data.wareCard | 233 | + wareCard: res.data.data.wareCard, |
| 202 | }) | 234 | }) |
| 203 | } else { | 235 | } else { |
| 204 | getApp().my_warnning("系统繁忙,请稍后再试", 0, _this2); | 236 | getApp().my_warnning("系统繁忙,请稍后再试", 0, _this2); |
pages/giftpack/giftpacklist/giftpacklist.wxml
| 1 | <view class="box data-v-3a5b7e36"> | 1 | <view class="box data-v-3a5b7e36"> |
| 2 | - <view class="box_top data-v-3a5b7e36"> | ||
| 3 | - <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true"></image> | 2 | + <view class="box_top data-v-3a5b7e36"> |
| 3 | + <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 4 | + </view> | ||
| 5 | + <view class="box_title data-v-3a5b7e36"> | ||
| 6 | + <view class="top_title data-v-3a5b7e36"> | ||
| 7 | + <text class="data-v-3a5b7e36 ellipsis-2">{{giftTitle}}</text> | ||
| 4 | </view> | 8 | </view> |
| 5 | - <view class="box_title data-v-3a5b7e36"> | ||
| 6 | - <view class="top_title data-v-3a5b7e36"> | ||
| 7 | - <text class="data-v-3a5b7e36 ellipsis-2">{{giftTitle}}</text> | ||
| 8 | - </view> | ||
| 9 | - <view class="top_time data-v-3a5b7e36"> | ||
| 10 | - <text class="data-v-3a5b7e36">{{"兑换截至时间:"+giftDate}}</text> | 9 | + <view class="top_time data-v-3a5b7e36"> |
| 10 | + <text class="data-v-3a5b7e36">{{"兑换截至时间:"+giftDate}}</text> | ||
| 11 | + </view> | ||
| 12 | + <view class="top_price data-v-3a5b7e36"> | ||
| 13 | + <block wx:if="{{giftPrice>0}}"> | ||
| 14 | + <text class="data-v-3a5b7e36">{{"¥"+giftPrice}}</text> | ||
| 15 | + </block> | ||
| 16 | + <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | ||
| 17 | + <text class="data-v-3a5b7e36">/</text> | ||
| 18 | + </block> | ||
| 19 | + <block wx:if="{{giftIntegral>0}}"> | ||
| 20 | + <text class="data-v-3a5b7e36">{{giftIntegral+"积分"}}</text> | ||
| 21 | + </block> | ||
| 22 | + <block wx:if="{{giftType>0}}"> | ||
| 23 | + <text class="data-v-3a5b7e36">{{actTitle}}</text> | ||
| 24 | + </block> | ||
| 25 | + </view> | ||
| 26 | + <view class="top_foot data-v-3a5b7e36"> | ||
| 27 | + <view class="top_foot_price data-v-3a5b7e36"> | ||
| 28 | + <text class="data-v-3a5b7e36">{{"原价:"+giftPosPrice+"元"}}</text> | ||
| 29 | + </view> | ||
| 30 | + <view class="top_foot_qty data-v-3a5b7e36"> | ||
| 31 | + <text class="data-v-3a5b7e36">{{"已售:"+giftQty+"件"}}</text> | ||
| 32 | + </view> | ||
| 33 | + </view> | ||
| 34 | + </view> | ||
| 35 | + <view class="box_ware data-v-3a5b7e36"> | ||
| 36 | + <view class="box_ware_title data-v-3a5b7e36"> | ||
| 37 | + <text class="data-v-3a5b7e36">礼包内容</text> | ||
| 38 | + </view> | ||
| 39 | + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
| 40 | + <view class="box_ware_box data-v-3a5b7e36"> | ||
| 41 | + <view class="box_ware_img data-v-3a5b7e36"> | ||
| 42 | + <block wx:if="{{item.lbType==1}}"> | ||
| 43 | + <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 44 | + </block> | ||
| 45 | + <block wx:if="{{item.lbType==2}}"> | ||
| 46 | + <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 47 | + </block> | ||
| 48 | + <block wx:if="{{item.lbType==3}}"> | ||
| 49 | + <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 50 | + </block> | ||
| 51 | + <block wx:if="{{item.lbType==4}}"> | ||
| 52 | + <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 53 | + </block> | ||
| 54 | + <block wx:if="{{item.lbType==5}}"> | ||
| 55 | + <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 56 | + </block> | ||
| 11 | </view> | 57 | </view> |
| 12 | - <view class="top_price data-v-3a5b7e36"> | ||
| 13 | - <block wx:if="{{giftPrice>0}}"> | ||
| 14 | - <text class="data-v-3a5b7e36">{{"¥"+giftPrice}}</text> | 58 | + <view class="box_ware_item data-v-3a5b7e36"> |
| 59 | + <view class="box_ware_item_title data-v-3a5b7e36"> | ||
| 60 | + <text class="data-v-3a5b7e36">{{item.couponName}}</text> | ||
| 61 | + </view> | ||
| 62 | + <view class="box_ware_item_price data-v-3a5b7e36"> | ||
| 63 | + <text class="data-v-3a5b7e36"></text> | ||
| 64 | + </view> | ||
| 65 | + <view class="box_ware_item_qty data-v-3a5b7e36"> | ||
| 66 | + <text class="data-v-3a5b7e36">{{"数量:"+item.num}}</text> | ||
| 67 | + </view> | ||
| 68 | + <view class="box_ware_code data-v-3a5b7e36"> | ||
| 69 | + <block wx:if="{{isBuy==0&item.lbType==1}}"> | ||
| 70 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="__e" class="data-v-3a5b7e36"></image> | ||
| 15 | </block> | 71 | </block> |
| 16 | - <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | ||
| 17 | - <text class="data-v-3a5b7e36">/</text> | 72 | + <block wx:if="{{isBuy==0&item.lbType==2}}"> |
| 73 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 18 | </block> | 74 | </block> |
| 19 | - <block wx:if="{{giftIntegral>0}}"> | ||
| 20 | - <text class="data-v-3a5b7e36">{{giftIntegral+"积分"}}</text> | 75 | + <block wx:if="{{isBuy==0&item.lbType==3}}"> |
| 76 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 21 | </block> | 77 | </block> |
| 22 | - <block wx:if="{{giftType>0}}"> | ||
| 23 | - <text class="data-v-3a5b7e36">{{actTitle}}</text> | 78 | + <block wx:if="{{isBuy==0&item.lbType>3}}"> |
| 79 | + <text class="data-v-3a5b7e36">已自动到账</text> | ||
| 24 | </block> | 80 | </block> |
| 81 | + </view> | ||
| 25 | </view> | 82 | </view> |
| 26 | - <view class="top_foot data-v-3a5b7e36"> | ||
| 27 | - <view class="top_foot_price data-v-3a5b7e36"> | ||
| 28 | - <text class="data-v-3a5b7e36">{{"原价:"+giftPosPrice+"元"}}</text> | ||
| 29 | - </view> | ||
| 30 | - <view class="top_foot_qty data-v-3a5b7e36"> | ||
| 31 | - <text class="data-v-3a5b7e36">{{"已售:"+giftQty+"件"}}</text> | ||
| 32 | - </view> | ||
| 33 | - </view> | 83 | + </view> |
| 84 | + </block> | ||
| 85 | + </view> | ||
| 86 | + <view class="foot_box data-v-3a5b7e36"> | ||
| 87 | + <view class="foot_box_title data-v-3a5b7e36"> | ||
| 88 | + <text class="data-v-3a5b7e36">活动说明</text> | ||
| 34 | </view> | 89 | </view> |
| 35 | - <view class="box_ware data-v-3a5b7e36"> | ||
| 36 | - <view class="box_ware_title data-v-3a5b7e36"> | ||
| 37 | - <text class="data-v-3a5b7e36">礼包内容</text> | ||
| 38 | - </view> | ||
| 39 | - <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
| 40 | - <view class="box_ware_box data-v-3a5b7e36"> | ||
| 41 | - <view class="box_ware_img data-v-3a5b7e36"> | ||
| 42 | - <block wx:if="{{item.lbType==1}}"> | ||
| 43 | - <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 44 | - </block> | ||
| 45 | - <block wx:if="{{item.lbType==2}}"> | ||
| 46 | - <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 47 | - </block> | ||
| 48 | - <block wx:if="{{item.lbType==3}}"> | ||
| 49 | - <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 50 | - </block> | ||
| 51 | - <block wx:if="{{item.lbType==4}}"> | ||
| 52 | - <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 53 | - </block> | ||
| 54 | - <block wx:if="{{item.lbType==5}}"> | ||
| 55 | - <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 56 | - </block> | ||
| 57 | - </view> | ||
| 58 | - <view class="box_ware_item data-v-3a5b7e36"> | ||
| 59 | - <view class="box_ware_item_title data-v-3a5b7e36"> | ||
| 60 | - <text class="data-v-3a5b7e36">{{item.couponName}}</text> | ||
| 61 | - </view> | ||
| 62 | - <view class="box_ware_item_price data-v-3a5b7e36"> | ||
| 63 | - <text class="data-v-3a5b7e36"></text> | ||
| 64 | - </view> | ||
| 65 | - <view class="box_ware_item_qty data-v-3a5b7e36"> | ||
| 66 | - <text class="data-v-3a5b7e36">{{"数量:"+item.num}}</text> | ||
| 67 | - </view> | ||
| 68 | - <view class="box_ware_code data-v-3a5b7e36"> | ||
| 69 | - <block wx:if="{{isBuy==0&item.lbType==1}}"> | ||
| 70 | - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="__e" class="data-v-3a5b7e36"></image> | ||
| 71 | - </block> | ||
| 72 | - <block wx:if="{{isBuy==0&item.lbType==2}}"> | ||
| 73 | - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 74 | - </block> | ||
| 75 | - <block wx:if="{{isBuy==0&item.lbType==3}}"> | ||
| 76 | - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 77 | - </block> | ||
| 78 | - <block wx:if="{{isBuy==0&item.lbType>3}}"> | ||
| 79 | - <text class="data-v-3a5b7e36">已自动到账</text> | ||
| 80 | - </block> | ||
| 81 | - </view> | ||
| 82 | - </view> | ||
| 83 | - </view> | ||
| 84 | - </block> | 90 | + <view class="foot_box_remark data-v-3a5b7e36"> |
| 91 | + <rich-text nodes="{{giftRemark}}"></rich-text> | ||
| 85 | </view> | 92 | </view> |
| 86 | - <view class="foot_box data-v-3a5b7e36"> | ||
| 87 | - <view class="foot_box_title data-v-3a5b7e36"> | ||
| 88 | - <text class="data-v-3a5b7e36">活动说明</text> | 93 | + </view> |
| 94 | + <view class="foot_empty data-v-3a5b7e36"></view> | ||
| 95 | + <block wx:if="{{isBuy==1}}"> | ||
| 96 | + <view class="foot_button data-v-3a5b7e36"> | ||
| 97 | + <block wx:if="{{giftPrice>0&&giftIntegral>0}}"> | ||
| 98 | + <view class="foot_button_left data-v-3a5b7e36"> | ||
| 99 | + <text bindtap="GetBuyPrice" class="data-v-3a5b7e36" data-id="{{lbId}}">立即购买</text> | ||
| 89 | </view> | 100 | </view> |
| 90 | - <view class="foot_box_remark data-v-3a5b7e36"> | ||
| 91 | - <rich-text nodes="{{giftRemark}}"></rich-text> | 101 | + </block> |
| 102 | + <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | ||
| 103 | + <view class="foot_button_right data-v-3a5b7e36"> | ||
| 104 | + <text bindtap="GetBuyIntegral" class="data-v-3a5b7e36" data-id="{{lbId}}">立即兑换</text> | ||
| 92 | </view> | 105 | </view> |
| 93 | - </view> | ||
| 94 | - <view class="foot_empty data-v-3a5b7e36"></view> | ||
| 95 | - <block wx:if="{{isBuy==1}}"> | ||
| 96 | - <view class="foot_button data-v-3a5b7e36"> | ||
| 97 | - <block wx:if="{{giftPrice>0&&giftIntegral>0}}"> | ||
| 98 | - <view class="foot_button_left data-v-3a5b7e36"> | ||
| 99 | - <text bindtap="__e" class="data-v-3a5b7e36">立即购买</text> | ||
| 100 | - </view> | ||
| 101 | - </block> | ||
| 102 | - <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | ||
| 103 | - <view class="foot_button_right data-v-3a5b7e36"> | ||
| 104 | - <text bindtap="__e" class="data-v-3a5b7e36">立即兑换</text> | ||
| 105 | - </view> | ||
| 106 | - </block> | ||
| 107 | - <block wx:if="{{giftPrice>0 && giftIntegral<=0}}"> | ||
| 108 | - <view class="foot_button_buy data-v-3a5b7e36"> | ||
| 109 | - <text bindtap="__e" class="data-v-3a5b7e36">立即购买</text> | ||
| 110 | - </view> | ||
| 111 | - </block> | ||
| 112 | - <block wx:if="{{giftPrice<=0 && giftIntegral>0}}"> | ||
| 113 | - <view class="foot_button_intalge data-v-3a5b7e36"> | ||
| 114 | - <text bindtap="__e" class="data-v-3a5b7e36">立即兑换</text> | ||
| 115 | - </view> | ||
| 116 | - </block> | 106 | + </block> |
| 107 | + <block wx:if="{{giftPrice>0 && giftIntegral<=0}}"> | ||
| 108 | + <view class="foot_button_buy data-v-3a5b7e36"> | ||
| 109 | + <text bindtap="GetBuyPrice" class="data-v-3a5b7e36" data-id="{{lbId}}">立即购买</text> | ||
| 117 | </view> | 110 | </view> |
| 118 | - </block> | ||
| 119 | - <block wx:if="{{isBuy==0}}"> | ||
| 120 | - <view class="foot_button data-v-3a5b7e36"> | ||
| 121 | - <view class="foot_button_buy data-v-3a5b7e36"> | ||
| 122 | - <text bindtap="__e" class="data-v-3a5b7e36">立即使用</text> | ||
| 123 | - </view> | 111 | + </block> |
| 112 | + <block wx:if="{{giftPrice<=0 && giftIntegral>0}}"> | ||
| 113 | + <view class="foot_button_intalge data-v-3a5b7e36"> | ||
| 114 | + <text bindtap="GetBuyIntegral" class="data-v-3a5b7e36" data-id="{{lbId}}">立即兑换</text> | ||
| 124 | </view> | 115 | </view> |
| 125 | - </block> | 116 | + </block> |
| 117 | + </view> | ||
| 118 | + </block> | ||
| 119 | + <block wx:if="{{isBuy==0}}"> | ||
| 120 | + <view class="foot_button data-v-3a5b7e36"> | ||
| 121 | + <view class="foot_button_buy data-v-3a5b7e36"> | ||
| 122 | + <text bindtap="__e" class="data-v-3a5b7e36">立即使用</text> | ||
| 123 | + </view> | ||
| 124 | + </view> | ||
| 125 | + </block> | ||
| 126 | </view> | 126 | </view> |
| 127 | <!-- 引入提示组件 --> | 127 | <!-- 引入提示组件 --> |
| 128 | <warn id="warn"></warn> | 128 | <warn id="warn"></warn> |
pages/giftpack/mygiftpack/mygiftpack.js
| @@ -28,21 +28,25 @@ Page({ | @@ -28,21 +28,25 @@ Page({ | ||
| 28 | var th = this; | 28 | var th = this; |
| 29 | th.setData({ | 29 | th.setData({ |
| 30 | getStorageID: a.stoid, | 30 | getStorageID: a.stoid, |
| 31 | - getUserID: d.user_id | 31 | + getUserID: d.user_id, |
| 32 | + pages: 1, | ||
| 33 | + pageSize: 10, | ||
| 34 | + loadingType: 0 | ||
| 32 | }) | 35 | }) |
| 36 | + th.getList(); | ||
| 33 | }, | 37 | }, |
| 34 | onShow: function() { | 38 | onShow: function() { |
| 35 | // this.pages = 1; | 39 | // this.pages = 1; |
| 36 | // this.pageSize = 10; | 40 | // this.pageSize = 10; |
| 37 | // this.loadingType = 0; | 41 | // this.loadingType = 0; |
| 38 | // this.getList(); | 42 | // this.getList(); |
| 39 | - var th = this; | ||
| 40 | - th.setData({ | ||
| 41 | - pages: 1, | ||
| 42 | - pageSize: 10, | ||
| 43 | - loadingType: 0 | ||
| 44 | - }) | ||
| 45 | - th.getList(); | 43 | + // var th = this; |
| 44 | + // th.setData({ | ||
| 45 | + // pages: 1, | ||
| 46 | + // pageSize: 10, | ||
| 47 | + // loadingType: 0 | ||
| 48 | + // }) | ||
| 49 | + // th.getList(); | ||
| 46 | }, | 50 | }, |
| 47 | // methods: { | 51 | // methods: { |
| 48 | // BuyGift: function BuyGift() { | 52 | // BuyGift: function BuyGift() { |
pages/giftpack/mygiftpack/mygiftpack.wxml
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | </view> | 14 | </view> |
| 15 | <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | 15 | <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
| 16 | <view class="content_box"> | 16 | <view class="content_box"> |
| 17 | - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{item.lbId}}&orderSn={{item.orderSn}}"> | 17 | + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}"> |
| 18 | <view class="content_box_img"> | 18 | <view class="content_box_img"> |
| 19 | <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> | 19 | <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> |
| 20 | <image src="{{iurl+item.lbUrl}}" lazy-load="true"></image> | 20 | <image src="{{iurl+item.lbUrl}}" lazy-load="true"></image> |
| @@ -81,8 +81,8 @@ | @@ -81,8 +81,8 @@ | ||
| 81 | </view> | 81 | </view> |
| 82 | </view> | 82 | </view> |
| 83 | </view> | 83 | </view> |
| 84 | - <view class="content_box_button"> | ||
| 85 | - <button bindtap="__e">立即使用</button> | 84 | + <view class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}"> |
| 85 | + <button>立即使用</button> | ||
| 86 | </view> | 86 | </view> |
| 87 | </view> | 87 | </view> |
| 88 | </block> | 88 | </block> |