xiaoe_mp_npm 1.0.6 → 1.0.7-alpha2
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/.gitlab-ci.yml +44 -44
- package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.js +160 -160
- package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.js +115 -115
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.js +890 -890
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.json +23 -23
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.wxml +188 -188
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.js +448 -448
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.json +9 -9
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.scss +222 -222
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.wxml +81 -81
- package/miniprogram_dist/ConfirmOrder/components/IntegralSelect/index.scss +90 -90
- package/miniprogram_dist/ConfirmOrder/components/Invoice/index.scss +60 -60
- package/miniprogram_dist/ConfirmOrder/components/LeaveWord/index.scss +39 -39
- package/miniprogram_dist/ConfirmOrder/components/PayBar/index.js +249 -249
- package/miniprogram_dist/ConfirmOrder/components/PayBar/index.scss +61 -61
- package/miniprogram_dist/ConfirmOrder/components/PayDetail/index.scss +40 -40
- package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.js +89 -89
- package/miniprogram_dist/ConfirmOrder/components/PickupSelect/index.wxml +13 -13
- package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.js +99 -99
- package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.json +6 -6
- package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.scss +150 -150
- package/miniprogram_dist/ConfirmOrder/components/SvipSelect/SvipSelect.wxml +39 -39
- package/miniprogram_dist/ConfirmOrder/components/SvipSelect/filter.wxs +6 -6
- package/miniprogram_dist/ConfirmOrder/index.js +110 -110
- package/miniprogram_dist/CopGoodsCard/constans.js +462 -462
- package/miniprogram_dist/CopGoodsCard/index.js +147 -147
- package/miniprogram_dist/CopGoodsCard/index.json +2 -2
- package/miniprogram_dist/CopGoodsCard/index.scss +100 -100
- package/miniprogram_dist/CopGoodsCard/index.wxml +20 -20
- package/miniprogram_dist/CouponList/components/CouponItem/index.css +1715 -1715
- package/miniprogram_dist/CouponList/components/CouponItem/index.js +325 -319
- package/miniprogram_dist/CouponList/components/CouponItem/index.min.css +1 -1
- package/miniprogram_dist/CouponList/components/CouponItem/index.scss +591 -591
- package/miniprogram_dist/CouponList/components/CouponItem/index.wxml +199 -199
- package/miniprogram_dist/CouponList/couponColumn/index.js +176 -176
- package/miniprogram_dist/CouponList/couponColumn/index.scss +117 -117
- package/miniprogram_dist/CouponList/couponColumn/index.wxml +39 -39
- package/miniprogram_dist/CouponReceivePopup/index.js +72 -72
- package/miniprogram_dist/CouponReceivePopup/index.json +5 -5
- package/miniprogram_dist/CouponReceivePopup/index.scss +99 -99
- package/miniprogram_dist/CouponReceivePopup/index.wxml +85 -85
- package/miniprogram_dist/CustomPopup/index.js +82 -82
- package/miniprogram_dist/CustomPopup/index.wxml +25 -25
- package/miniprogram_dist/GoodsItem/index.js +745 -745
- package/miniprogram_dist/GoodsItem/index.scss +524 -524
- package/miniprogram_dist/GoodsItem/index.wxml +173 -173
- package/miniprogram_dist/GoodsItem/index.wxs +18 -18
- package/miniprogram_dist/GoodsRecommend/fun.wxs +37 -37
- package/miniprogram_dist/GoodsRecommend/index.js +91 -91
- package/miniprogram_dist/GoodsRecommend/index.json +3 -3
- package/miniprogram_dist/GoodsRecommend/index.less +129 -129
- package/miniprogram_dist/GoodsRecommend/index.scss +162 -162
- package/miniprogram_dist/GoodsRecommend/index.wxml +47 -47
- package/miniprogram_dist/LiveGoodsList/Header/index.scss +78 -78
- package/miniprogram_dist/LiveGoodsList/index.js +821 -821
- package/miniprogram_dist/LiveGoodsList/index.scss +92 -92
- package/miniprogram_dist/LiveGoodsList/index.wxml +106 -106
- package/miniprogram_dist/PayModule/button/index.scss +44 -44
- package/miniprogram_dist/PayModule/index/index.js +264 -264
- package/miniprogram_dist/Task/TaskBubble/index.js +117 -117
- package/miniprogram_dist/Task/TaskBubble/index.json +3 -3
- package/miniprogram_dist/Task/TaskBubble/index.scss +125 -125
- package/miniprogram_dist/Task/TaskBubble/index.wxml +22 -22
- package/miniprogram_dist/Task/TaskIcon/index.js +29 -29
- package/miniprogram_dist/Task/TaskIcon/index.json +4 -4
- package/miniprogram_dist/Task/TaskIcon/index.scss +70 -70
- package/miniprogram_dist/Task/TaskIcon/index.wxml +5 -5
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +39 -39
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.json +6 -6
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.scss +39 -39
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +19 -19
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +207 -207
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.json +5 -5
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +139 -139
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +43 -43
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +146 -146
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.json +7 -7
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.scss +66 -66
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +39 -39
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +75 -75
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.json +9 -9
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.scss +59 -59
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +42 -42
- package/miniprogram_dist/Task/TaskPopup/index.js +113 -113
- package/miniprogram_dist/Task/TaskPopup/index.json +8 -8
- package/miniprogram_dist/Task/TaskPopup/index.scss +113 -113
- package/miniprogram_dist/Task/TaskPopup/index.wxml +67 -67
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.js +52 -52
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.json +6 -6
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.scss +91 -91
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxml +53 -53
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -48
- package/miniprogram_dist/Task/taskReceivePopup/index.js +30 -30
- package/miniprogram_dist/Task/taskReceivePopup/index.json +11 -11
- package/miniprogram_dist/Task/taskReceivePopup/index.wxml +18 -18
- package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +37 -37
- package/miniprogram_dist/Task/taskReceivePopup/integral/index.json +6 -6
- package/miniprogram_dist/Task/taskReceivePopup/integral/index.scss +60 -60
- package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +17 -17
- package/miniprogram_dist/TeacherGoodsList/index.js +825 -825
- package/miniprogram_dist/TeacherGoodsList/index.json +9 -9
- package/miniprogram_dist/TeacherGoodsList/index.scss +145 -145
- package/miniprogram_dist/TeacherGoodsList/index.wxml +110 -110
- package/miniprogram_dist/common/api/confirmOrder.js +223 -223
- package/miniprogram_dist/common/api/couponlist.js +2 -63
- package/miniprogram_dist/common/api/liveGoodsList.js +89 -89
- package/miniprogram_dist/common/api/sku.js +73 -73
- package/miniprogram_dist/common/utils/index.js +69 -69
- package/miniprogram_dist/coupon/components/CouponItem/index.less +208 -208
- package/miniprogram_dist/coupon/components/CouponItem/index.scss +246 -246
- package/miniprogram_dist/coupon/components/CouponSelect/index.scss +330 -330
- package/miniprogram_dist/coupon/index.js +248 -248
- package/miniprogram_dist/coupon/index.scss +83 -83
- package/package.json +78 -78
- package/src/ConfirmOrder/components/AddressSelect/index.js +160 -160
- package/src/ConfirmOrder/components/ChoosePicker/index.js +115 -115
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +890 -890
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.json +23 -23
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxml +188 -188
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxss +51 -51
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxss +1 -1
- package/src/ConfirmOrder/components/GoodsInfo/index.js +448 -448
- package/src/ConfirmOrder/components/GoodsInfo/index.json +9 -9
- package/src/ConfirmOrder/components/GoodsInfo/index.scss +222 -222
- package/src/ConfirmOrder/components/GoodsInfo/index.wxml +81 -81
- package/src/ConfirmOrder/components/GoodsInfo/index.wxss +673 -673
- package/src/ConfirmOrder/components/IntegralSelect/index.scss +90 -90
- package/src/ConfirmOrder/components/IntegralSelect/index.wxss +218 -218
- package/src/ConfirmOrder/components/Invoice/index.scss +60 -60
- package/src/ConfirmOrder/components/Invoice/index.wxss +93 -93
- package/src/ConfirmOrder/components/LeaveWord/index.scss +39 -39
- package/src/ConfirmOrder/components/LeaveWord/index.wxss +34 -34
- package/src/ConfirmOrder/components/PayBar/index.js +249 -249
- package/src/ConfirmOrder/components/PayBar/index.scss +61 -61
- package/src/ConfirmOrder/components/PayBar/index.wxss +108 -108
- package/src/ConfirmOrder/components/PayDetail/index.scss +40 -40
- package/src/ConfirmOrder/components/PayDetail/index.wxss +50 -50
- package/src/ConfirmOrder/components/PickupSelect/index.js +89 -89
- package/src/ConfirmOrder/components/PickupSelect/index.wxml +13 -13
- package/src/ConfirmOrder/components/SvipSelect/SvipSelect.js +99 -99
- package/src/ConfirmOrder/components/SvipSelect/SvipSelect.json +6 -6
- package/src/ConfirmOrder/components/SvipSelect/SvipSelect.scss +150 -150
- package/src/ConfirmOrder/components/SvipSelect/SvipSelect.wxml +39 -39
- package/src/ConfirmOrder/components/SvipSelect/SvipSelect.wxss +266 -266
- package/src/ConfirmOrder/components/SvipSelect/filter.wxs +6 -6
- package/src/ConfirmOrder/index.js +110 -110
- package/src/CopGoodsCard/constans.js +462 -462
- package/src/CopGoodsCard/index.js +147 -147
- package/src/CopGoodsCard/index.json +2 -2
- package/src/CopGoodsCard/index.scss +100 -100
- package/src/CopGoodsCard/index.wxml +20 -20
- package/src/CopGoodsCard/index.wxss +1 -1
- package/src/CouponList/components/CouponItem/index.css +1715 -1715
- package/src/CouponList/components/CouponItem/index.js +325 -319
- package/src/CouponList/components/CouponItem/index.min.css +1 -1
- package/src/CouponList/components/CouponItem/index.scss +591 -591
- package/src/CouponList/components/CouponItem/index.wxml +199 -199
- package/src/CouponList/components/CouponItem/index.wxss +1715 -1715
- package/src/CouponList/couponColumn/index.js +176 -176
- package/src/CouponList/couponColumn/index.scss +117 -117
- package/src/CouponList/couponColumn/index.wxml +39 -39
- package/src/CouponList/couponColumn/index.wxss +265 -265
- package/src/CouponReceivePopup/index.js +72 -72
- package/src/CouponReceivePopup/index.json +5 -5
- package/src/CouponReceivePopup/index.scss +99 -99
- package/src/CouponReceivePopup/index.wxml +85 -85
- package/src/CouponReceivePopup/index.wxss +1 -1
- package/src/CustomPopup/index.js +82 -82
- package/src/CustomPopup/index.wxml +25 -25
- package/src/GoodsItem/index.js +745 -745
- package/src/GoodsItem/index.scss +524 -524
- package/src/GoodsItem/index.wxml +173 -173
- package/src/GoodsItem/index.wxs +18 -18
- package/src/GoodsItem/index.wxss +1935 -1935
- package/src/GoodsRecommend/fun.wxs +37 -37
- package/src/GoodsRecommend/index.js +91 -91
- package/src/GoodsRecommend/index.json +3 -3
- package/src/GoodsRecommend/index.less +129 -129
- package/src/GoodsRecommend/index.scss +162 -162
- package/src/GoodsRecommend/index.wxml +47 -47
- package/src/GoodsRecommend/index.wxss +537 -537
- package/src/LiveGoodsList/Header/index.scss +78 -78
- package/src/LiveGoodsList/Header/index.wxss +190 -190
- package/src/LiveGoodsList/index.js +821 -821
- package/src/LiveGoodsList/index.scss +92 -92
- package/src/LiveGoodsList/index.wxml +106 -106
- package/src/LiveGoodsList/index.wxss +230 -230
- package/src/PayModule/button/index.scss +44 -44
- package/src/PayModule/button/index.wxss +58 -58
- package/src/PayModule/index/index.js +264 -264
- package/src/Sku/commSelect/index.wxss +54 -54
- package/src/Task/TaskBubble/index.js +117 -117
- package/src/Task/TaskBubble/index.json +3 -3
- package/src/Task/TaskBubble/index.scss +125 -125
- package/src/Task/TaskBubble/index.wxml +22 -22
- package/src/Task/TaskBubble/index.wxss +289 -289
- package/src/Task/TaskIcon/index.js +29 -29
- package/src/Task/TaskIcon/index.json +4 -4
- package/src/Task/TaskIcon/index.scss +70 -70
- package/src/Task/TaskIcon/index.wxml +5 -5
- package/src/Task/TaskIcon/index.wxss +130 -130
- package/src/Task/TaskPopup/component/RewardList/index.js +39 -39
- package/src/Task/TaskPopup/component/RewardList/index.json +6 -6
- package/src/Task/TaskPopup/component/RewardList/index.scss +39 -39
- package/src/Task/TaskPopup/component/RewardList/index.wxml +19 -19
- package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
- package/src/Task/TaskPopup/component/TaskItem/index.js +207 -207
- package/src/Task/TaskPopup/component/TaskItem/index.json +5 -5
- package/src/Task/TaskPopup/component/TaskItem/index.scss +139 -139
- package/src/Task/TaskPopup/component/TaskItem/index.wxml +43 -43
- package/src/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
- package/src/Task/TaskPopup/component/TaskItem/index.wxss +394 -394
- package/src/Task/TaskPopup/component/TaskList/index.js +146 -146
- package/src/Task/TaskPopup/component/TaskList/index.json +7 -7
- package/src/Task/TaskPopup/component/TaskList/index.scss +66 -66
- package/src/Task/TaskPopup/component/TaskList/index.wxml +39 -39
- package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
- package/src/Task/TaskPopup/component/TaskType/index.js +75 -75
- package/src/Task/TaskPopup/component/TaskType/index.json +9 -9
- package/src/Task/TaskPopup/component/TaskType/index.scss +59 -59
- package/src/Task/TaskPopup/component/TaskType/index.wxml +42 -42
- package/src/Task/TaskPopup/component/TaskType/index.wxss +98 -98
- package/src/Task/TaskPopup/index.js +113 -113
- package/src/Task/TaskPopup/index.json +8 -8
- package/src/Task/TaskPopup/index.scss +113 -113
- package/src/Task/TaskPopup/index.wxml +67 -67
- package/src/Task/TaskPopup/index.wxss +306 -306
- package/src/Task/taskReceivePopup/coupon/index.js +52 -52
- package/src/Task/taskReceivePopup/coupon/index.json +6 -6
- package/src/Task/taskReceivePopup/coupon/index.scss +91 -91
- package/src/Task/taskReceivePopup/coupon/index.wxml +53 -53
- package/src/Task/taskReceivePopup/coupon/index.wxs +48 -48
- package/src/Task/taskReceivePopup/coupon/index.wxss +187 -187
- package/src/Task/taskReceivePopup/index.js +30 -30
- package/src/Task/taskReceivePopup/index.json +11 -11
- package/src/Task/taskReceivePopup/index.wxml +18 -18
- package/src/Task/taskReceivePopup/index.wxss +1 -1
- package/src/Task/taskReceivePopup/integral/index.js +37 -37
- package/src/Task/taskReceivePopup/integral/index.json +6 -6
- package/src/Task/taskReceivePopup/integral/index.scss +60 -60
- package/src/Task/taskReceivePopup/integral/index.wxml +17 -17
- package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
- package/src/TeacherGoodsList/index.js +825 -825
- package/src/TeacherGoodsList/index.json +9 -9
- package/src/TeacherGoodsList/index.scss +145 -145
- package/src/TeacherGoodsList/index.wxml +110 -110
- package/src/TeacherGoodsList/index.wxss +196 -196
- package/src/common/api/confirmOrder.js +223 -223
- package/src/common/api/couponlist.js +2 -63
- package/src/common/api/liveGoodsList.js +89 -89
- package/src/common/api/sku.js +73 -73
- package/src/common/utils/index.js +69 -69
- package/src/coupon/components/CouponItem/index.less +208 -208
- package/src/coupon/components/CouponItem/index.scss +246 -246
- package/src/coupon/components/CouponItem/index.wxss +821 -821
- package/src/coupon/components/CouponSelect/index.scss +330 -330
- package/src/coupon/components/CouponSelect/index.wxss +1132 -1132
- package/src/coupon/index.js +248 -248
- package/src/coupon/index.scss +83 -83
- package/src/coupon/index.wxss +216 -216
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
$deviceWidth: 750;
|
|
2
|
-
|
|
3
|
-
@function vmin($rpx) {
|
|
4
|
-
@return #{$rpx * 100 / $deviceWidth}vmin;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@mixin item-box{
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: space-between;
|
|
11
|
-
padding: vmin(32) vmin(24);
|
|
12
|
-
background: #FFFFFF;
|
|
13
|
-
&.line-class{
|
|
14
|
-
position: relative;
|
|
15
|
-
&::after{
|
|
16
|
-
position: absolute;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
content: ' ';
|
|
19
|
-
pointer-events: none;
|
|
20
|
-
right: vmin(32);
|
|
21
|
-
bottom: 0;
|
|
22
|
-
left: vmin(32);
|
|
23
|
-
border-bottom: 1px solid #ebedf0;
|
|
24
|
-
-webkit-transform: scaleY(0.5);
|
|
25
|
-
transform: scaleY(0.5);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
&.bg-change{
|
|
29
|
-
background: linear-gradient(180deg, #FFF3EB 0%, #FFF 100%);
|
|
30
|
-
}
|
|
31
|
-
&.radius{
|
|
32
|
-
border-radius: vmin(16);
|
|
33
|
-
}
|
|
34
|
-
&.mb{
|
|
35
|
-
margin-bottom: vmin(24);
|
|
36
|
-
}
|
|
37
|
-
.left{
|
|
38
|
-
max-width: vmin(485);
|
|
39
|
-
.first{
|
|
40
|
-
line-height: vmin(40);
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
.title{
|
|
44
|
-
font-size: vmin(28);
|
|
45
|
-
font-weight: 500;
|
|
46
|
-
color: #333333;
|
|
47
|
-
word-wrap: break-word;
|
|
48
|
-
word-break: break-all;
|
|
49
|
-
max-width: vmin(290);
|
|
50
|
-
}
|
|
51
|
-
.reward{
|
|
52
|
-
margin-left: vmin(16);
|
|
53
|
-
color: #FF781F;
|
|
54
|
-
font-size: vmin(24);
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
.reward-img{
|
|
58
|
-
width: vmin(24);
|
|
59
|
-
height: vmin(24);
|
|
60
|
-
}
|
|
61
|
-
.reward-text{
|
|
62
|
-
margin-left: vmin(8);
|
|
63
|
-
word-wrap: break-word;
|
|
64
|
-
word-break: break-all;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.time{
|
|
70
|
-
margin-top: vmin(8);
|
|
71
|
-
font-size: vmin(24);
|
|
72
|
-
color: #999999;
|
|
73
|
-
line-height: vmin(32);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.residue-time{
|
|
77
|
-
margin-top: vmin(8);
|
|
78
|
-
font-size: vmin(24);
|
|
79
|
-
color: #FFA114;
|
|
80
|
-
line-height: vmin(32);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.btn{
|
|
85
|
-
// padding: 0.12rem 0.36rem;
|
|
86
|
-
width: vmin(144);
|
|
87
|
-
height: vmin(56);
|
|
88
|
-
background: linear-gradient(270deg, #FF781F 0%, #FB0 100%);
|
|
89
|
-
border-radius: vmin(72);
|
|
90
|
-
color: #FFFFFF;
|
|
91
|
-
font-weight: 500;
|
|
92
|
-
font-size: vmin(24);
|
|
93
|
-
display: flex;
|
|
94
|
-
justify-content: center;
|
|
95
|
-
align-items: center;
|
|
96
|
-
line-height: vmin(32);
|
|
97
|
-
&.reward-btn{
|
|
98
|
-
border: vmin(1) solid #1472FF;
|
|
99
|
-
background: #FFF;
|
|
100
|
-
color: #1472FF;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&.gray-btn{
|
|
104
|
-
background: #F5F5F5;
|
|
105
|
-
color: #B2B2B2;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.item-box {
|
|
112
|
-
@include item-box;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// 竖屏pad
|
|
116
|
-
@media screen and (min-width: 768px) and (orientation: portrait) {
|
|
117
|
-
$deviceWidth: 1536 !global;
|
|
118
|
-
|
|
119
|
-
.item-box {
|
|
120
|
-
@include item-box;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// PC 放大适配
|
|
125
|
-
@media screen and (min-height: 630px) and (orientation: landscape) {
|
|
126
|
-
$deviceWidth: 1260 !global;
|
|
127
|
-
|
|
128
|
-
.item-box {
|
|
129
|
-
@include item-box;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// 横屏pad
|
|
134
|
-
@media screen and (min-height: 768px) and (orientation: landscape) {
|
|
135
|
-
$deviceWidth: 1536 !global;
|
|
136
|
-
|
|
137
|
-
.item-box {
|
|
138
|
-
@include item-box;
|
|
139
|
-
}
|
|
1
|
+
$deviceWidth: 750;
|
|
2
|
+
|
|
3
|
+
@function vmin($rpx) {
|
|
4
|
+
@return #{$rpx * 100 / $deviceWidth}vmin;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin item-box{
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
padding: vmin(32) vmin(24);
|
|
12
|
+
background: #FFFFFF;
|
|
13
|
+
&.line-class{
|
|
14
|
+
position: relative;
|
|
15
|
+
&::after{
|
|
16
|
+
position: absolute;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
content: ' ';
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
right: vmin(32);
|
|
21
|
+
bottom: 0;
|
|
22
|
+
left: vmin(32);
|
|
23
|
+
border-bottom: 1px solid #ebedf0;
|
|
24
|
+
-webkit-transform: scaleY(0.5);
|
|
25
|
+
transform: scaleY(0.5);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
&.bg-change{
|
|
29
|
+
background: linear-gradient(180deg, #FFF3EB 0%, #FFF 100%);
|
|
30
|
+
}
|
|
31
|
+
&.radius{
|
|
32
|
+
border-radius: vmin(16);
|
|
33
|
+
}
|
|
34
|
+
&.mb{
|
|
35
|
+
margin-bottom: vmin(24);
|
|
36
|
+
}
|
|
37
|
+
.left{
|
|
38
|
+
max-width: vmin(485);
|
|
39
|
+
.first{
|
|
40
|
+
line-height: vmin(40);
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
.title{
|
|
44
|
+
font-size: vmin(28);
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
color: #333333;
|
|
47
|
+
word-wrap: break-word;
|
|
48
|
+
word-break: break-all;
|
|
49
|
+
max-width: vmin(290);
|
|
50
|
+
}
|
|
51
|
+
.reward{
|
|
52
|
+
margin-left: vmin(16);
|
|
53
|
+
color: #FF781F;
|
|
54
|
+
font-size: vmin(24);
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
.reward-img{
|
|
58
|
+
width: vmin(24);
|
|
59
|
+
height: vmin(24);
|
|
60
|
+
}
|
|
61
|
+
.reward-text{
|
|
62
|
+
margin-left: vmin(8);
|
|
63
|
+
word-wrap: break-word;
|
|
64
|
+
word-break: break-all;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.time{
|
|
70
|
+
margin-top: vmin(8);
|
|
71
|
+
font-size: vmin(24);
|
|
72
|
+
color: #999999;
|
|
73
|
+
line-height: vmin(32);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.residue-time{
|
|
77
|
+
margin-top: vmin(8);
|
|
78
|
+
font-size: vmin(24);
|
|
79
|
+
color: #FFA114;
|
|
80
|
+
line-height: vmin(32);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.btn{
|
|
85
|
+
// padding: 0.12rem 0.36rem;
|
|
86
|
+
width: vmin(144);
|
|
87
|
+
height: vmin(56);
|
|
88
|
+
background: linear-gradient(270deg, #FF781F 0%, #FB0 100%);
|
|
89
|
+
border-radius: vmin(72);
|
|
90
|
+
color: #FFFFFF;
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
font-size: vmin(24);
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
align-items: center;
|
|
96
|
+
line-height: vmin(32);
|
|
97
|
+
&.reward-btn{
|
|
98
|
+
border: vmin(1) solid #1472FF;
|
|
99
|
+
background: #FFF;
|
|
100
|
+
color: #1472FF;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.gray-btn{
|
|
104
|
+
background: #F5F5F5;
|
|
105
|
+
color: #B2B2B2;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.item-box {
|
|
112
|
+
@include item-box;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 竖屏pad
|
|
116
|
+
@media screen and (min-width: 768px) and (orientation: portrait) {
|
|
117
|
+
$deviceWidth: 1536 !global;
|
|
118
|
+
|
|
119
|
+
.item-box {
|
|
120
|
+
@include item-box;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// PC 放大适配
|
|
125
|
+
@media screen and (min-height: 630px) and (orientation: landscape) {
|
|
126
|
+
$deviceWidth: 1260 !global;
|
|
127
|
+
|
|
128
|
+
.item-box {
|
|
129
|
+
@include item-box;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// 横屏pad
|
|
134
|
+
@media screen and (min-height: 768px) and (orientation: landscape) {
|
|
135
|
+
$deviceWidth: 1536 !global;
|
|
136
|
+
|
|
137
|
+
.item-box {
|
|
138
|
+
@include item-box;
|
|
139
|
+
}
|
|
140
140
|
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<wxs src="./index.wxs" module="filter" />
|
|
2
|
-
|
|
3
|
-
<view
|
|
4
|
-
class="item-box {{lineClass?'line-class':''}} {{listType === 'error' && itemIndex === 0?'bg-change':''}} {{isRadius?'radius':''}} {{isMb?'mb':''}}"
|
|
5
|
-
>
|
|
6
|
-
<!-- 左侧任务详情 -->
|
|
7
|
-
<view class="left">
|
|
8
|
-
<!-- 任务标题 && 奖励 -->
|
|
9
|
-
<view class="first">
|
|
10
|
-
<!-- 标题 -->
|
|
11
|
-
<view class="title" wx:if="{{listType === 'task' || listType === 'error'}}">{{ taskTitle }}</view>
|
|
12
|
-
<view class="title" wx:if="{{listType === 'reward'}}">{{ rewardText }}</view>
|
|
13
|
-
|
|
14
|
-
<!-- 奖励内容 -->
|
|
15
|
-
<view class="reward" wx:if="{{listType === 'task' || listType === 'error'}}">
|
|
16
|
-
<image class="reward-img" src="{{rewardIcon}}" />
|
|
17
|
-
<view class="reward-text">{{ rewardText }}</view>
|
|
18
|
-
</view>
|
|
19
|
-
</view>
|
|
20
|
-
|
|
21
|
-
<!-- 任务时间 -->
|
|
22
|
-
<view
|
|
23
|
-
class="time"
|
|
24
|
-
wx:if="{{listType === 'task' || listType === 'error'}}"
|
|
25
|
-
>任务时间:{{taskItem.show_start_at}} 至 {{taskItem.show_end_at}}</view>
|
|
26
|
-
|
|
27
|
-
<view class="time" wx:if="{{listType === 'reward'}}">获得方式:{{ taskTitle }}</view>
|
|
28
|
-
|
|
29
|
-
<view class="time" wx:if="{{listType === 'reward'}}">获得时间:{{ taskItem.reward_send_at }}</view>
|
|
30
|
-
|
|
31
|
-
<!-- 观看剩余时间 -->
|
|
32
|
-
<view
|
|
33
|
-
class="residue-time"
|
|
34
|
-
wx:if="{{taskItem.task_type === 1 && listType === 'task' && taskItem.join_state === 1 && taskItem.residue_time && taskItem.state !==2}}"
|
|
35
|
-
>{{taskItem.residue_time > 60 ? '再观看 '+ filter.secondsToMinutes(taskItem.residue_time) + '分钟 '+ '获得奖励':'即将获得奖励'}}</view>
|
|
36
|
-
</view>
|
|
37
|
-
|
|
38
|
-
<!-- 右侧按钮 -->
|
|
39
|
-
<view
|
|
40
|
-
class="btn {{listType === 'reward'?'reward-btn':''}} {{listType==='task' && (taskItem.join_state === 2 || taskItem.join_state === 3 || taskItem.join_state === 0 || taskItem.state === 2)?'gray-btn':''}}"
|
|
41
|
-
catch:tap="btnClick"
|
|
42
|
-
>{{btnText}}</view>
|
|
43
|
-
</view>
|
|
1
|
+
<wxs src="./index.wxs" module="filter" />
|
|
2
|
+
|
|
3
|
+
<view
|
|
4
|
+
class="item-box {{lineClass?'line-class':''}} {{listType === 'error' && itemIndex === 0?'bg-change':''}} {{isRadius?'radius':''}} {{isMb?'mb':''}}"
|
|
5
|
+
>
|
|
6
|
+
<!-- 左侧任务详情 -->
|
|
7
|
+
<view class="left">
|
|
8
|
+
<!-- 任务标题 && 奖励 -->
|
|
9
|
+
<view class="first">
|
|
10
|
+
<!-- 标题 -->
|
|
11
|
+
<view class="title" wx:if="{{listType === 'task' || listType === 'error'}}">{{ taskTitle }}</view>
|
|
12
|
+
<view class="title" wx:if="{{listType === 'reward'}}">{{ rewardText }}</view>
|
|
13
|
+
|
|
14
|
+
<!-- 奖励内容 -->
|
|
15
|
+
<view class="reward" wx:if="{{listType === 'task' || listType === 'error'}}">
|
|
16
|
+
<image class="reward-img" src="{{rewardIcon}}" />
|
|
17
|
+
<view class="reward-text">{{ rewardText }}</view>
|
|
18
|
+
</view>
|
|
19
|
+
</view>
|
|
20
|
+
|
|
21
|
+
<!-- 任务时间 -->
|
|
22
|
+
<view
|
|
23
|
+
class="time"
|
|
24
|
+
wx:if="{{listType === 'task' || listType === 'error'}}"
|
|
25
|
+
>任务时间:{{taskItem.show_start_at}} 至 {{taskItem.show_end_at}}</view>
|
|
26
|
+
|
|
27
|
+
<view class="time" wx:if="{{listType === 'reward'}}">获得方式:{{ taskTitle }}</view>
|
|
28
|
+
|
|
29
|
+
<view class="time" wx:if="{{listType === 'reward'}}">获得时间:{{ taskItem.reward_send_at }}</view>
|
|
30
|
+
|
|
31
|
+
<!-- 观看剩余时间 -->
|
|
32
|
+
<view
|
|
33
|
+
class="residue-time"
|
|
34
|
+
wx:if="{{taskItem.task_type === 1 && listType === 'task' && taskItem.join_state === 1 && taskItem.residue_time && taskItem.state !==2}}"
|
|
35
|
+
>{{taskItem.residue_time > 60 ? '再观看 '+ filter.secondsToMinutes(taskItem.residue_time) + '分钟 '+ '获得奖励':'即将获得奖励'}}</view>
|
|
36
|
+
</view>
|
|
37
|
+
|
|
38
|
+
<!-- 右侧按钮 -->
|
|
39
|
+
<view
|
|
40
|
+
class="btn {{listType === 'reward'?'reward-btn':''}} {{listType==='task' && (taskItem.join_state === 2 || taskItem.join_state === 3 || taskItem.join_state === 0 || taskItem.state === 2)?'gray-btn':''}}"
|
|
41
|
+
catch:tap="btnClick"
|
|
42
|
+
>{{btnText}}</view>
|
|
43
|
+
</view>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var secondsToMinutes = function(seconds){
|
|
2
|
-
minutes = Math.floor(seconds / 60);
|
|
3
|
-
return Math.floor(seconds / 60)
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
secondsToMinutes: secondsToMinutes,
|
|
1
|
+
var secondsToMinutes = function(seconds){
|
|
2
|
+
minutes = Math.floor(seconds / 60);
|
|
3
|
+
return Math.floor(seconds / 60)
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
secondsToMinutes: secondsToMinutes,
|
|
8
8
|
}
|
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
const computedBehavior = require('miniprogram-computed').behavior
|
|
2
|
-
Component({
|
|
3
|
-
behaviors: [computedBehavior],
|
|
4
|
-
properties: {
|
|
5
|
-
taskList:{
|
|
6
|
-
type: Array,
|
|
7
|
-
value: ()=>{
|
|
8
|
-
return []
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
errorList:{
|
|
12
|
-
type: Array,
|
|
13
|
-
value: ()=>{
|
|
14
|
-
return []
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
refreshStatus:{
|
|
18
|
-
type:Boolean,
|
|
19
|
-
value: false
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
data: {
|
|
23
|
-
showTaskList: [],
|
|
24
|
-
typeList: [],
|
|
25
|
-
showErrorList: [],
|
|
26
|
-
},
|
|
27
|
-
observers: {
|
|
28
|
-
taskList: function (newVal) {
|
|
29
|
-
let showList = newVal
|
|
30
|
-
if(this.data.showErrorList.length){
|
|
31
|
-
showList = newVal.filter(item1 => !this.data.showErrorList.some(item2 => item2.id === item1.id))
|
|
32
|
-
}
|
|
33
|
-
this.setData({
|
|
34
|
-
showTaskList: showList
|
|
35
|
-
})
|
|
36
|
-
},
|
|
37
|
-
showTaskList: function (newVal) {
|
|
38
|
-
// 先给任务列表排个序,观看直播-评论-分享-点赞
|
|
39
|
-
let typeList = []
|
|
40
|
-
typeList = newVal.reduce((acc,obj)=>{
|
|
41
|
-
let found = acc.find(item => item.task_type === obj.task_type && (item.task_type === 1 || item.task_condition === obj.task_condition))
|
|
42
|
-
|
|
43
|
-
let title;
|
|
44
|
-
let icon;
|
|
45
|
-
|
|
46
|
-
if(obj.task_type === 1){
|
|
47
|
-
title = "观看直播"
|
|
48
|
-
icon = "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lomu3vma0z2d.png"
|
|
49
|
-
}else if(obj.task_type === 2){
|
|
50
|
-
switch(obj.task_condition){
|
|
51
|
-
case "1":
|
|
52
|
-
title = "评论"
|
|
53
|
-
icon = "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lonymngu00pw.png"
|
|
54
|
-
break;
|
|
55
|
-
case "2":
|
|
56
|
-
title = "分享"
|
|
57
|
-
icon = "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lonymnhi03sf.png"
|
|
58
|
-
break;
|
|
59
|
-
case "3":
|
|
60
|
-
title = "点赞"
|
|
61
|
-
icon = "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lonymnhk0dwo.png"
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if(found){
|
|
67
|
-
found.detailList.push(obj);
|
|
68
|
-
}else{
|
|
69
|
-
acc.push({task_type: obj.task_type,task_condition: obj.task_condition, detailList: [obj], title, icon});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return acc;
|
|
73
|
-
},[])
|
|
74
|
-
typeList.sort(this.customSort)
|
|
75
|
-
this.setData({
|
|
76
|
-
typeList
|
|
77
|
-
})
|
|
78
|
-
},
|
|
79
|
-
errorList: function (newVal) {
|
|
80
|
-
let list = [];
|
|
81
|
-
let filteredTaskList = []
|
|
82
|
-
|
|
83
|
-
this.properties.taskList.forEach(item=>{
|
|
84
|
-
if(newVal.includes(item.id)){
|
|
85
|
-
list.push(item)
|
|
86
|
-
}else{
|
|
87
|
-
filteredTaskList.push(item)
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
this.setData({
|
|
92
|
-
showErrorList: list,
|
|
93
|
-
showTaskList: filteredTaskList
|
|
94
|
-
})
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
lifetimes: {
|
|
98
|
-
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
|
|
99
|
-
attached: function () {
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
moved: function () { },
|
|
103
|
-
detached: function () { },
|
|
104
|
-
},
|
|
105
|
-
methods: {
|
|
106
|
-
customSort(a,b){
|
|
107
|
-
const orderMap = {
|
|
108
|
-
1: 0,
|
|
109
|
-
'2-1': 2,
|
|
110
|
-
'2-2': 3,
|
|
111
|
-
'2-3': 4
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
const getTypeOrder = (item) => {
|
|
115
|
-
if (item.task_type === 1) {
|
|
116
|
-
return 1;
|
|
117
|
-
} else if (item.task_type === 2 && item.task_condition) {
|
|
118
|
-
return orderMap[`2-${item.task_condition}`];
|
|
119
|
-
} else {
|
|
120
|
-
return 0;
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
const typeOrderA = getTypeOrder(a);
|
|
125
|
-
const typeOrderB = getTypeOrder(b);
|
|
126
|
-
|
|
127
|
-
return typeOrderA - typeOrderB;
|
|
128
|
-
},
|
|
129
|
-
toReward(){
|
|
130
|
-
this.setData({
|
|
131
|
-
isShowTaskList: false
|
|
132
|
-
})
|
|
133
|
-
},
|
|
134
|
-
toBack(){
|
|
135
|
-
this.setData({
|
|
136
|
-
isShowTaskList: true
|
|
137
|
-
})
|
|
138
|
-
},
|
|
139
|
-
btnClick(e){
|
|
140
|
-
this.triggerEvent("btnClick",e.detail)
|
|
141
|
-
},
|
|
142
|
-
onLoad(){
|
|
143
|
-
this.triggerEvent("onLoad","taskList")
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
})
|
|
1
|
+
const computedBehavior = require('miniprogram-computed').behavior
|
|
2
|
+
Component({
|
|
3
|
+
behaviors: [computedBehavior],
|
|
4
|
+
properties: {
|
|
5
|
+
taskList:{
|
|
6
|
+
type: Array,
|
|
7
|
+
value: ()=>{
|
|
8
|
+
return []
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
errorList:{
|
|
12
|
+
type: Array,
|
|
13
|
+
value: ()=>{
|
|
14
|
+
return []
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
refreshStatus:{
|
|
18
|
+
type:Boolean,
|
|
19
|
+
value: false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
data: {
|
|
23
|
+
showTaskList: [],
|
|
24
|
+
typeList: [],
|
|
25
|
+
showErrorList: [],
|
|
26
|
+
},
|
|
27
|
+
observers: {
|
|
28
|
+
taskList: function (newVal) {
|
|
29
|
+
let showList = newVal
|
|
30
|
+
if(this.data.showErrorList.length){
|
|
31
|
+
showList = newVal.filter(item1 => !this.data.showErrorList.some(item2 => item2.id === item1.id))
|
|
32
|
+
}
|
|
33
|
+
this.setData({
|
|
34
|
+
showTaskList: showList
|
|
35
|
+
})
|
|
36
|
+
},
|
|
37
|
+
showTaskList: function (newVal) {
|
|
38
|
+
// 先给任务列表排个序,观看直播-评论-分享-点赞
|
|
39
|
+
let typeList = []
|
|
40
|
+
typeList = newVal.reduce((acc,obj)=>{
|
|
41
|
+
let found = acc.find(item => item.task_type === obj.task_type && (item.task_type === 1 || item.task_condition === obj.task_condition))
|
|
42
|
+
|
|
43
|
+
let title;
|
|
44
|
+
let icon;
|
|
45
|
+
|
|
46
|
+
if(obj.task_type === 1){
|
|
47
|
+
title = "观看直播"
|
|
48
|
+
icon = "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lomu3vma0z2d.png"
|
|
49
|
+
}else if(obj.task_type === 2){
|
|
50
|
+
switch(obj.task_condition){
|
|
51
|
+
case "1":
|
|
52
|
+
title = "评论"
|
|
53
|
+
icon = "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lonymngu00pw.png"
|
|
54
|
+
break;
|
|
55
|
+
case "2":
|
|
56
|
+
title = "分享"
|
|
57
|
+
icon = "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lonymnhi03sf.png"
|
|
58
|
+
break;
|
|
59
|
+
case "3":
|
|
60
|
+
title = "点赞"
|
|
61
|
+
icon = "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lonymnhk0dwo.png"
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if(found){
|
|
67
|
+
found.detailList.push(obj);
|
|
68
|
+
}else{
|
|
69
|
+
acc.push({task_type: obj.task_type,task_condition: obj.task_condition, detailList: [obj], title, icon});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return acc;
|
|
73
|
+
},[])
|
|
74
|
+
typeList.sort(this.customSort)
|
|
75
|
+
this.setData({
|
|
76
|
+
typeList
|
|
77
|
+
})
|
|
78
|
+
},
|
|
79
|
+
errorList: function (newVal) {
|
|
80
|
+
let list = [];
|
|
81
|
+
let filteredTaskList = []
|
|
82
|
+
|
|
83
|
+
this.properties.taskList.forEach(item=>{
|
|
84
|
+
if(newVal.includes(item.id)){
|
|
85
|
+
list.push(item)
|
|
86
|
+
}else{
|
|
87
|
+
filteredTaskList.push(item)
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
this.setData({
|
|
92
|
+
showErrorList: list,
|
|
93
|
+
showTaskList: filteredTaskList
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
lifetimes: {
|
|
98
|
+
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
|
|
99
|
+
attached: function () {
|
|
100
|
+
|
|
101
|
+
},
|
|
102
|
+
moved: function () { },
|
|
103
|
+
detached: function () { },
|
|
104
|
+
},
|
|
105
|
+
methods: {
|
|
106
|
+
customSort(a,b){
|
|
107
|
+
const orderMap = {
|
|
108
|
+
1: 0,
|
|
109
|
+
'2-1': 2,
|
|
110
|
+
'2-2': 3,
|
|
111
|
+
'2-3': 4
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const getTypeOrder = (item) => {
|
|
115
|
+
if (item.task_type === 1) {
|
|
116
|
+
return 1;
|
|
117
|
+
} else if (item.task_type === 2 && item.task_condition) {
|
|
118
|
+
return orderMap[`2-${item.task_condition}`];
|
|
119
|
+
} else {
|
|
120
|
+
return 0;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const typeOrderA = getTypeOrder(a);
|
|
125
|
+
const typeOrderB = getTypeOrder(b);
|
|
126
|
+
|
|
127
|
+
return typeOrderA - typeOrderB;
|
|
128
|
+
},
|
|
129
|
+
toReward(){
|
|
130
|
+
this.setData({
|
|
131
|
+
isShowTaskList: false
|
|
132
|
+
})
|
|
133
|
+
},
|
|
134
|
+
toBack(){
|
|
135
|
+
this.setData({
|
|
136
|
+
isShowTaskList: true
|
|
137
|
+
})
|
|
138
|
+
},
|
|
139
|
+
btnClick(e){
|
|
140
|
+
this.triggerEvent("btnClick",e.detail)
|
|
141
|
+
},
|
|
142
|
+
onLoad(){
|
|
143
|
+
this.triggerEvent("onLoad","taskList")
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
})
|