xiaoe_mp_npm 0.5.26-alpha1 → 0.5.26-alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/miniprogram_dist/CouponList/components/CouponItem/index.js +10 -0
- package/miniprogram_dist/CouponList/components/CouponItem/index.scss +0 -7
- package/miniprogram_dist/CouponList/components/CouponItem/index.wxml +8 -2
- package/miniprogram_dist/CouponList/components/CouponItem/index.wxss +0 -6
- package/package.json +1 -1
- package/src/CouponList/components/CouponItem/index.js +10 -0
- package/src/CouponList/components/CouponItem/index.scss +0 -7
- package/src/CouponList/components/CouponItem/index.wxml +8 -2
- package/src/CouponList/components/CouponItem/index.wxss +0 -7
|
@@ -96,6 +96,16 @@ Component({
|
|
|
96
96
|
return "7.47vmin";
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
+
// 判断金额长度,不同金额区间端显示不同样式(竖屏互动页优惠券样式)
|
|
100
|
+
isVerLongNumStyle1(data) {
|
|
101
|
+
if (data.item && data.item.price) {
|
|
102
|
+
let tempPrice = data.item.price / 100;
|
|
103
|
+
if (tempPrice.toString().length >=6 ) {
|
|
104
|
+
return true
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return false
|
|
108
|
+
},
|
|
99
109
|
// 格式化使用说明
|
|
100
110
|
getDesInfo (data) {
|
|
101
111
|
if (!data.item.instructions) {
|
|
@@ -423,16 +423,9 @@ $deviceWidth: 750;
|
|
|
423
423
|
.coupon-price {
|
|
424
424
|
display: flex;
|
|
425
425
|
font-weight: 500;
|
|
426
|
-
line-height: vmin(64);
|
|
427
426
|
font-size: vmin(64);
|
|
428
427
|
}
|
|
429
428
|
|
|
430
|
-
.coupon-price view {
|
|
431
|
-
width: 40px;
|
|
432
|
-
height: 40px;
|
|
433
|
-
background: red;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
429
|
.coupon-price-long {
|
|
437
430
|
font-size: vmin(48);
|
|
438
431
|
}
|
|
@@ -7,8 +7,14 @@
|
|
|
7
7
|
<!-- discount_way优惠方式 1-满减券 2-折扣券 -->
|
|
8
8
|
<block wx:if="{{item.discount_way == 1}}">
|
|
9
9
|
<view class="coupon-symbol">¥</view>
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
<!-- 竖屏卡片 -->
|
|
11
|
+
<view wx:if="{{aliveMode}}" class="coupon-price {{isVerLongNumStyle1?'coupon-price-ver':''}}" >
|
|
12
|
+
{{price.ToFilter(item.price)}}
|
|
13
|
+
<view wx:if="{{item.price % 100 != 0}}">.{{ price.fixedFont(item.price) }}</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- 横屏卡片 -->
|
|
16
|
+
<view wx:if="{{!aliveMode}}" style="font-size: {{isLongNumStyle1}}" class="coupon-price" >
|
|
17
|
+
{{price.ToFilter(item.price)}}
|
|
12
18
|
<view wx:if="{{item.price % 100 != 0}}">.{{ price.fixedFont(item.price) }}</view>
|
|
13
19
|
</view>
|
|
14
20
|
</block>
|
|
@@ -345,14 +345,8 @@
|
|
|
345
345
|
.styleType1_wrapper-v .coupon_style1 .couponValue .couponPriceWrap .coupon-price {
|
|
346
346
|
display: flex;
|
|
347
347
|
font-weight: 500;
|
|
348
|
-
line-height: 8.53333vmin;
|
|
349
348
|
font-size: 8.53333vmin;
|
|
350
349
|
}
|
|
351
|
-
.styleType1_wrapper-v .coupon_style1 .couponValue .couponPriceWrap .coupon-price view {
|
|
352
|
-
width: 40px;
|
|
353
|
-
height: 40px;
|
|
354
|
-
background: red;
|
|
355
|
-
}
|
|
356
350
|
.styleType1_wrapper-v .coupon_style1 .couponValue .couponPriceWrap .coupon-price-long {
|
|
357
351
|
font-size: 6.4vmin;
|
|
358
352
|
}
|
package/package.json
CHANGED
|
@@ -96,6 +96,16 @@ Component({
|
|
|
96
96
|
return "7.47vmin";
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
+
// 判断金额长度,不同金额区间端显示不同样式(竖屏互动页优惠券样式)
|
|
100
|
+
isVerLongNumStyle1(data) {
|
|
101
|
+
if (data.item && data.item.price) {
|
|
102
|
+
let tempPrice = data.item.price / 100;
|
|
103
|
+
if (tempPrice.toString().length >=6 ) {
|
|
104
|
+
return true
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return false
|
|
108
|
+
},
|
|
99
109
|
// 格式化使用说明
|
|
100
110
|
getDesInfo (data) {
|
|
101
111
|
if (!data.item.instructions) {
|
|
@@ -423,16 +423,9 @@ $deviceWidth: 750;
|
|
|
423
423
|
.coupon-price {
|
|
424
424
|
display: flex;
|
|
425
425
|
font-weight: 500;
|
|
426
|
-
line-height: vmin(64);
|
|
427
426
|
font-size: vmin(64);
|
|
428
427
|
}
|
|
429
428
|
|
|
430
|
-
.coupon-price view {
|
|
431
|
-
width: 40px;
|
|
432
|
-
height: 40px;
|
|
433
|
-
background: red;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
429
|
.coupon-price-long {
|
|
437
430
|
font-size: vmin(48);
|
|
438
431
|
}
|
|
@@ -7,8 +7,14 @@
|
|
|
7
7
|
<!-- discount_way优惠方式 1-满减券 2-折扣券 -->
|
|
8
8
|
<block wx:if="{{item.discount_way == 1}}">
|
|
9
9
|
<view class="coupon-symbol">¥</view>
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
<!-- 竖屏卡片 -->
|
|
11
|
+
<view wx:if="{{aliveMode}}" class="coupon-price {{isVerLongNumStyle1?'coupon-price-ver':''}}" >
|
|
12
|
+
{{price.ToFilter(item.price)}}
|
|
13
|
+
<view wx:if="{{item.price % 100 != 0}}">.{{ price.fixedFont(item.price) }}</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- 横屏卡片 -->
|
|
16
|
+
<view wx:if="{{!aliveMode}}" style="font-size: {{isLongNumStyle1}}" class="coupon-price" >
|
|
17
|
+
{{price.ToFilter(item.price)}}
|
|
12
18
|
<view wx:if="{{item.price % 100 != 0}}">.{{ price.fixedFont(item.price) }}</view>
|
|
13
19
|
</view>
|
|
14
20
|
</block>
|
|
@@ -404,16 +404,9 @@
|
|
|
404
404
|
.styleType1_wrapper-v .coupon_style1 .couponValue .couponPriceWrap .coupon-price {
|
|
405
405
|
display: flex;
|
|
406
406
|
font-weight: 500;
|
|
407
|
-
line-height: 8.53333vmin;
|
|
408
407
|
font-size: 8.53333vmin;
|
|
409
408
|
}
|
|
410
409
|
|
|
411
|
-
.styleType1_wrapper-v .coupon_style1 .couponValue .couponPriceWrap .coupon-price view {
|
|
412
|
-
width: 40px;
|
|
413
|
-
height: 40px;
|
|
414
|
-
background: red;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
410
|
.styleType1_wrapper-v .coupon_style1 .couponValue .couponPriceWrap .coupon-price-long {
|
|
418
411
|
font-size: 6.4vmin;
|
|
419
412
|
}
|