xiaoe_mp_npm 1.0.21 → 1.0.22-store1

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.
Files changed (162) hide show
  1. package/.prettierrc.js +32 -6
  2. package/miniprogram_dist/Task/TaskBubble/index.js +2 -1
  3. package/miniprogram_dist/Task/TaskBubble/index.json +3 -3
  4. package/miniprogram_dist/Task/TaskBubble/index.scss +125 -125
  5. package/miniprogram_dist/Task/TaskBubble/index.wxml +22 -22
  6. package/miniprogram_dist/Task/TaskIcon/index.js +29 -29
  7. package/miniprogram_dist/Task/TaskIcon/index.json +4 -4
  8. package/miniprogram_dist/Task/TaskIcon/index.scss +70 -70
  9. package/miniprogram_dist/Task/TaskIcon/index.wxml +5 -5
  10. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +39 -39
  11. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.json +6 -6
  12. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.scss +39 -39
  13. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +19 -19
  14. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +266 -168
  15. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.json +5 -5
  16. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +26 -0
  17. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +32 -13
  18. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  19. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxss +96 -0
  20. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +8 -0
  21. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.json +7 -7
  22. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.scss +66 -66
  23. package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +1 -0
  24. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +4 -0
  25. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.json +9 -9
  26. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.scss +62 -62
  27. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +1 -0
  28. package/miniprogram_dist/Task/TaskPopup/index.js +76 -70
  29. package/miniprogram_dist/Task/TaskPopup/index.json +2 -2
  30. package/miniprogram_dist/Task/TaskPopup/index.scss +140 -140
  31. package/miniprogram_dist/Task/TaskPopup/index.wxml +1 -0
  32. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.js +132 -0
  33. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.json +6 -0
  34. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.scss +192 -0
  35. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxml +65 -0
  36. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxs +79 -0
  37. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxss +521 -0
  38. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.js +40 -0
  39. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.json +6 -0
  40. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.scss +7 -0
  41. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxml +2 -0
  42. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxss +298 -0
  43. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -0
  44. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -0
  45. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -0
  46. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -0
  47. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -0
  48. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -0
  49. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -0
  50. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -0
  51. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -0
  52. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +316 -0
  53. package/miniprogram_dist/Task/TaskQuizPopup/index.js +225 -0
  54. package/miniprogram_dist/Task/TaskQuizPopup/index.json +8 -0
  55. package/miniprogram_dist/Task/TaskQuizPopup/index.scss +159 -0
  56. package/miniprogram_dist/Task/TaskQuizPopup/index.wxml +97 -0
  57. package/miniprogram_dist/Task/TaskQuizPopup/index.wxss +478 -0
  58. package/miniprogram_dist/Task/taskQuizRemindPopup/index.js +74 -0
  59. package/miniprogram_dist/Task/taskQuizRemindPopup/index.json +6 -0
  60. package/miniprogram_dist/Task/taskQuizRemindPopup/index.scss +108 -0
  61. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxml +27 -0
  62. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxss +286 -0
  63. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.json +6 -6
  64. package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -48
  65. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.js +44 -44
  66. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.json +6 -6
  67. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.scss +106 -106
  68. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
  69. package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
  70. package/miniprogram_dist/Task/taskReceivePopup/index.js +34 -34
  71. package/miniprogram_dist/Task/taskReceivePopup/index.json +13 -13
  72. package/miniprogram_dist/Task/taskReceivePopup/index.wxml +25 -25
  73. package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +61 -61
  74. package/miniprogram_dist/Task/taskReceivePopup/integral/index.json +6 -6
  75. package/miniprogram_dist/Task/taskReceivePopup/integral/index.scss +60 -60
  76. package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +12 -12
  77. package/miniprogram_dist/common/utils/tool.js +54 -48
  78. package/package.json +1 -1
  79. package/src/CustomPopup/index.wxss +22 -22
  80. package/src/Task/TaskBubble/index.js +2 -1
  81. package/src/Task/TaskBubble/index.json +3 -3
  82. package/src/Task/TaskBubble/index.scss +125 -125
  83. package/src/Task/TaskBubble/index.wxml +22 -22
  84. package/src/Task/TaskBubble/index.wxss +289 -289
  85. package/src/Task/TaskIcon/index.js +29 -29
  86. package/src/Task/TaskIcon/index.json +4 -4
  87. package/src/Task/TaskIcon/index.scss +70 -70
  88. package/src/Task/TaskIcon/index.wxml +5 -5
  89. package/src/Task/TaskIcon/index.wxss +130 -130
  90. package/src/Task/TaskPopup/component/RewardList/index.js +39 -39
  91. package/src/Task/TaskPopup/component/RewardList/index.json +6 -6
  92. package/src/Task/TaskPopup/component/RewardList/index.scss +39 -39
  93. package/src/Task/TaskPopup/component/RewardList/index.wxml +19 -19
  94. package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
  95. package/src/Task/TaskPopup/component/TaskItem/index.js +266 -168
  96. package/src/Task/TaskPopup/component/TaskItem/index.json +5 -5
  97. package/src/Task/TaskPopup/component/TaskItem/index.scss +26 -0
  98. package/src/Task/TaskPopup/component/TaskItem/index.wxml +32 -13
  99. package/src/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
  100. package/src/Task/TaskPopup/component/TaskItem/index.wxss +1 -394
  101. package/src/Task/TaskPopup/component/TaskList/index.js +8 -0
  102. package/src/Task/TaskPopup/component/TaskList/index.json +7 -7
  103. package/src/Task/TaskPopup/component/TaskList/index.scss +66 -66
  104. package/src/Task/TaskPopup/component/TaskList/index.wxml +1 -0
  105. package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
  106. package/src/Task/TaskPopup/component/TaskType/index.js +4 -0
  107. package/src/Task/TaskPopup/component/TaskType/index.json +9 -9
  108. package/src/Task/TaskPopup/component/TaskType/index.scss +62 -62
  109. package/src/Task/TaskPopup/component/TaskType/index.wxml +1 -0
  110. package/src/Task/TaskPopup/component/TaskType/index.wxss +110 -110
  111. package/src/Task/TaskPopup/index.js +76 -70
  112. package/src/Task/TaskPopup/index.json +2 -2
  113. package/src/Task/TaskPopup/index.scss +140 -140
  114. package/src/Task/TaskPopup/index.wxml +1 -0
  115. package/src/Task/TaskQuizPopup/components/quizContent/index.js +132 -0
  116. package/src/Task/TaskQuizPopup/components/quizContent/index.json +6 -0
  117. package/src/Task/TaskQuizPopup/components/quizContent/index.scss +192 -0
  118. package/src/Task/TaskQuizPopup/components/quizContent/index.wxml +65 -0
  119. package/src/Task/TaskQuizPopup/components/quizContent/index.wxs +79 -0
  120. package/src/Task/TaskQuizPopup/components/quizContent/index.wxss +1 -0
  121. package/src/Task/TaskQuizPopup/components/quizRichText/index.js +40 -0
  122. package/src/Task/TaskQuizPopup/components/quizRichText/index.json +6 -0
  123. package/src/Task/TaskQuizPopup/components/quizRichText/index.scss +7 -0
  124. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxml +2 -0
  125. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxss +1 -0
  126. package/src/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -0
  127. package/src/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -0
  128. package/src/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -0
  129. package/src/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -0
  130. package/src/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -0
  131. package/src/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -0
  132. package/src/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -0
  133. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -0
  134. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -0
  135. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +283 -0
  136. package/src/Task/TaskQuizPopup/index.js +225 -0
  137. package/src/Task/TaskQuizPopup/index.json +8 -0
  138. package/src/Task/TaskQuizPopup/index.scss +159 -0
  139. package/src/Task/TaskQuizPopup/index.wxml +97 -0
  140. package/src/Task/TaskQuizPopup/index.wxss +1 -0
  141. package/src/Task/taskQuizRemindPopup/index.js +74 -0
  142. package/src/Task/taskQuizRemindPopup/index.json +6 -0
  143. package/src/Task/taskQuizRemindPopup/index.scss +108 -0
  144. package/src/Task/taskQuizRemindPopup/index.wxml +27 -0
  145. package/src/Task/taskQuizRemindPopup/index.wxss +1 -0
  146. package/src/Task/taskReceivePopup/coupon/index.json +6 -6
  147. package/src/Task/taskReceivePopup/coupon/index.wxs +48 -48
  148. package/src/Task/taskReceivePopup/customPrizes/index.js +44 -44
  149. package/src/Task/taskReceivePopup/customPrizes/index.json +6 -6
  150. package/src/Task/taskReceivePopup/customPrizes/index.scss +106 -106
  151. package/src/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
  152. package/src/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
  153. package/src/Task/taskReceivePopup/index.js +34 -34
  154. package/src/Task/taskReceivePopup/index.json +13 -13
  155. package/src/Task/taskReceivePopup/index.wxml +25 -25
  156. package/src/Task/taskReceivePopup/index.wxss +1 -1
  157. package/src/Task/taskReceivePopup/integral/index.js +61 -61
  158. package/src/Task/taskReceivePopup/integral/index.json +6 -6
  159. package/src/Task/taskReceivePopup/integral/index.scss +60 -60
  160. package/src/Task/taskReceivePopup/integral/index.wxml +12 -12
  161. package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
  162. package/src/common/utils/tool.js +54 -48
@@ -1,106 +1,106 @@
1
- @function vmin($rpx) {
2
- @return #{$rpx * 100 / $deviceWidth}vmin;
3
- }
4
-
5
- $deviceWidth: 750;
6
-
7
- @mixin coupon-receive-popup {
8
- .customPrizes-box{
9
- .van-popup--center{
10
- top: 30%;
11
- }
12
- }
13
- .receive-container {
14
- width: vmin(512);
15
- height: vmin(824);
16
- background-size: 100% 100%;
17
- background-image: url('https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltwpaghf05v8.png');
18
- overflow: hidden;
19
- &__content {
20
- display: flex;
21
- flex-direction: column;
22
- margin: vmin(280) vmin(32) 0 vmin(32);
23
- }
24
- &__content-box {
25
- display: flex;
26
- align-items: center;
27
- justify-content: center;
28
- color: #333333;
29
- height: vmin(192);
30
- .proce-img{
31
- width: vmin(144);
32
- height: vmin(144);
33
- }
34
- }
35
- &__content-contact-way{
36
- height: vmin(312);
37
- display: flex;
38
- align-items: center;
39
- justify-content: center;
40
- color: #333333;
41
- flex-direction: column;
42
- .text-title{
43
- font-weight: 500;
44
- font-size: vmin(28);
45
- }
46
- .text-wx{
47
- margin-top: vmin(8);
48
- font-size: vmin(28);
49
- }
50
- .text-qrcode{
51
- margin-top: vmin(8);
52
- display: flex;
53
- flex-direction: column;
54
- align-items: center;
55
- justify-content: center;
56
- .qrcode{
57
- width: vmin(144);
58
- height: vmin(144);
59
- }
60
- .text{
61
- margin-top: vmin(8);
62
- font-size: vmin(24);
63
- color: #666666;
64
- }
65
- }
66
- }
67
- &__close {
68
- display: block;
69
- width: vmin(64);
70
- height: vmin(64);
71
- margin: vmin(32) auto 0;
72
- }
73
- }
74
- &.coupon-receive-popup-full{
75
- .receive-container__close{
76
- position: absolute;
77
- right: 0;
78
- top: vmin(30);
79
- }
80
- .receive-container-wrapper{
81
- transform: scale(0.8);
82
- }
83
- }
84
- }
85
-
86
- .coupon-receive-popup {
87
- @include coupon-receive-popup;
88
- }
89
-
90
- // 竖屏pad
91
- @media screen and (min-width: 768px) and (orientation: portrait) {
92
- $deviceWidth: 1536 !global;
93
-
94
- .coupon-receive-popup {
95
- @include coupon-receive-popup;
96
- }
97
- }
98
-
99
- // 横屏pad
100
- @media screen and (min-height: 768px) and (orientation: landscape) {
101
- $deviceWidth: 1536 !global;
102
-
103
- .coupon-receive-popup {
104
- @include coupon-receive-popup;
105
- }
106
- }
1
+ @function vmin($rpx) {
2
+ @return #{$rpx * 100 / $deviceWidth}vmin;
3
+ }
4
+
5
+ $deviceWidth: 750;
6
+
7
+ @mixin coupon-receive-popup {
8
+ .customPrizes-box{
9
+ .van-popup--center{
10
+ top: 30%;
11
+ }
12
+ }
13
+ .receive-container {
14
+ width: vmin(512);
15
+ height: vmin(824);
16
+ background-size: 100% 100%;
17
+ background-image: url('https://commonresource-1252524126.cdn.xiaoeknow.com/image/ltwpaghf05v8.png');
18
+ overflow: hidden;
19
+ &__content {
20
+ display: flex;
21
+ flex-direction: column;
22
+ margin: vmin(280) vmin(32) 0 vmin(32);
23
+ }
24
+ &__content-box {
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ color: #333333;
29
+ height: vmin(192);
30
+ .proce-img{
31
+ width: vmin(144);
32
+ height: vmin(144);
33
+ }
34
+ }
35
+ &__content-contact-way{
36
+ height: vmin(312);
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ color: #333333;
41
+ flex-direction: column;
42
+ .text-title{
43
+ font-weight: 500;
44
+ font-size: vmin(28);
45
+ }
46
+ .text-wx{
47
+ margin-top: vmin(8);
48
+ font-size: vmin(28);
49
+ }
50
+ .text-qrcode{
51
+ margin-top: vmin(8);
52
+ display: flex;
53
+ flex-direction: column;
54
+ align-items: center;
55
+ justify-content: center;
56
+ .qrcode{
57
+ width: vmin(144);
58
+ height: vmin(144);
59
+ }
60
+ .text{
61
+ margin-top: vmin(8);
62
+ font-size: vmin(24);
63
+ color: #666666;
64
+ }
65
+ }
66
+ }
67
+ &__close {
68
+ display: block;
69
+ width: vmin(64);
70
+ height: vmin(64);
71
+ margin: vmin(32) auto 0;
72
+ }
73
+ }
74
+ &.coupon-receive-popup-full{
75
+ .receive-container__close{
76
+ position: absolute;
77
+ right: 0;
78
+ top: vmin(30);
79
+ }
80
+ .receive-container-wrapper{
81
+ transform: scale(0.8);
82
+ }
83
+ }
84
+ }
85
+
86
+ .coupon-receive-popup {
87
+ @include coupon-receive-popup;
88
+ }
89
+
90
+ // 竖屏pad
91
+ @media screen and (min-width: 768px) and (orientation: portrait) {
92
+ $deviceWidth: 1536 !global;
93
+
94
+ .coupon-receive-popup {
95
+ @include coupon-receive-popup;
96
+ }
97
+ }
98
+
99
+ // 横屏pad
100
+ @media screen and (min-height: 768px) and (orientation: landscape) {
101
+ $deviceWidth: 1536 !global;
102
+
103
+ .coupon-receive-popup {
104
+ @include coupon-receive-popup;
105
+ }
106
+ }
@@ -1,38 +1,38 @@
1
- <wxs src="./index.wxs" module="couponReceivePopup" />
2
- <van-popup
3
- show="{{true}}"
4
- round
5
- class="coupon-receive-popup {{isFullScreen? 'coupon-receive-popup-full' : ''}}"
6
- custom-style="background: unset"
7
- custon-class="customPrizes-box"
8
- bind:close="closePopup"
9
- >
10
- <view class="receive-container-wrapper">
11
- <view class="receive-container">
12
- <view class="receive-container__content">
13
- <view class="receive-container__content-box {{isFullScreen?'full':''}}">
14
- <image
15
- class="proce-img"
16
- wx:if="{{rewardValue.defaultImg}}"
17
- src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lu2gwcle0o2n.png"
18
- />
19
- <image class="proce-img" wx:else src="{{rewardValue.prizeImg}}" />
20
- </view>
21
- <view class="receive-container__content-contact-way {{isFullScreen?'full':''}}">
22
- <view class="text-title">兑奖联系方式</view>
23
- <view class="text-wx" wx:if="{{rewardValue.wechatNum}}">微信:{{rewardValue.wechatNum}}</view>
24
- <view class="text-qrcode" wx:if="{{rewardValue.qrcodeImg}}">
25
- <image class="qrcode" src="{{rewardValue.qrcodeImg}}" />
26
- <view class="text">二维码</view>
27
- </view>
28
- </view>
29
- </view>
30
- </view>
31
- <image
32
- src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lmimm9mb0q88.png"
33
- alt
34
- class="receive-container__close"
35
- catchtap="closePopup"
36
- />
37
- </view>
38
- </van-popup>
1
+ <wxs src="./index.wxs" module="couponReceivePopup" />
2
+ <van-popup
3
+ show="{{true}}"
4
+ round
5
+ class="coupon-receive-popup {{isFullScreen? 'coupon-receive-popup-full' : ''}}"
6
+ custom-style="background: unset"
7
+ custon-class="customPrizes-box"
8
+ bind:close="closePopup"
9
+ >
10
+ <view class="receive-container-wrapper">
11
+ <view class="receive-container">
12
+ <view class="receive-container__content">
13
+ <view class="receive-container__content-box {{isFullScreen?'full':''}}">
14
+ <image
15
+ class="proce-img"
16
+ wx:if="{{rewardValue.defaultImg}}"
17
+ src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lu2gwcle0o2n.png"
18
+ />
19
+ <image class="proce-img" wx:else src="{{rewardValue.prizeImg}}" />
20
+ </view>
21
+ <view class="receive-container__content-contact-way {{isFullScreen?'full':''}}">
22
+ <view class="text-title">兑奖联系方式</view>
23
+ <view class="text-wx" wx:if="{{rewardValue.wechatNum}}">微信:{{rewardValue.wechatNum}}</view>
24
+ <view class="text-qrcode" wx:if="{{rewardValue.qrcodeImg}}">
25
+ <image class="qrcode" src="{{rewardValue.qrcodeImg}}" />
26
+ <view class="text">二维码</view>
27
+ </view>
28
+ </view>
29
+ </view>
30
+ </view>
31
+ <image
32
+ src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lmimm9mb0q88.png"
33
+ alt
34
+ class="receive-container__close"
35
+ catchtap="closePopup"
36
+ />
37
+ </view>
38
+ </van-popup>
@@ -1,48 +1,48 @@
1
- /*
2
- 使用目的:
3
- 这里定义的函数,用在页面中, 类似于 Vue 里的 computed
4
-
5
- 注意点:
6
- 1. wxs中不支持 let , const
7
- 2. 导出的时候,即使 key 和 value 相同, 也不能简写。
8
- */
9
-
10
- // 做数值过滤,value-要处理的数字 ToFix2-默认保留两位,默认转分转元,除以100。其他除以10(如折扣)
11
- var filterPrice = function (value, ToFix2 = true) {
12
- var result = (value / 100).toString();
13
- if (!ToFix2) {
14
- result = (value / 10).toString();
15
- }
16
- if (result.indexOf(".") > 0) {
17
- return result.split(".")[0];
18
- } else {
19
- return result;
20
- }
21
- }
22
-
23
- // 小数点后的样式补充 ToFix2-默认保留2位,其他保留1位
24
- var fixedFont = function (value, ToFix2 = true) {
25
- if (value) {
26
- var result = (value / 100).toString();
27
- if (!ToFix2) {
28
- result = (value / 10).toString();
29
- }
30
- if (result.toString().indexOf(".") > -1) {
31
- return result.split(".")[1];
32
- } else {
33
- return "";
34
- }
35
- }
36
- }
37
-
38
- // 时间精确到分
39
- var formatDateToMinte = function (date) {
40
- var lastIndex = date.lastIndexOf(":");
41
- return date.substring(0, lastIndex).replace(getRegExp('-', 'g'), ".");
42
- }
43
-
44
- module.exports = {
45
- filterPrice: filterPrice,
46
- fixedFont: fixedFont,
47
- formatDateToMinte: formatDateToMinte
48
- }
1
+ /*
2
+ 使用目的:
3
+ 这里定义的函数,用在页面中, 类似于 Vue 里的 computed
4
+
5
+ 注意点:
6
+ 1. wxs中不支持 let , const
7
+ 2. 导出的时候,即使 key 和 value 相同, 也不能简写。
8
+ */
9
+
10
+ // 做数值过滤,value-要处理的数字 ToFix2-默认保留两位,默认转分转元,除以100。其他除以10(如折扣)
11
+ var filterPrice = function (value, ToFix2 = true) {
12
+ var result = (value / 100).toString();
13
+ if (!ToFix2) {
14
+ result = (value / 10).toString();
15
+ }
16
+ if (result.indexOf(".") > 0) {
17
+ return result.split(".")[0];
18
+ } else {
19
+ return result;
20
+ }
21
+ }
22
+
23
+ // 小数点后的样式补充 ToFix2-默认保留2位,其他保留1位
24
+ var fixedFont = function (value, ToFix2 = true) {
25
+ if (value) {
26
+ var result = (value / 100).toString();
27
+ if (!ToFix2) {
28
+ result = (value / 10).toString();
29
+ }
30
+ if (result.toString().indexOf(".") > -1) {
31
+ return result.split(".")[1];
32
+ } else {
33
+ return "";
34
+ }
35
+ }
36
+ }
37
+
38
+ // 时间精确到分
39
+ var formatDateToMinte = function (date) {
40
+ var lastIndex = date.lastIndexOf(":");
41
+ return date.substring(0, lastIndex).replace(getRegExp('-', 'g'), ".");
42
+ }
43
+
44
+ module.exports = {
45
+ filterPrice: filterPrice,
46
+ fixedFont: fixedFont,
47
+ formatDateToMinte: formatDateToMinte
48
+ }
@@ -1,34 +1,34 @@
1
- Component({
2
- /**
3
- * 组件的属性列表
4
- */
5
- properties: {
6
- // 全屏互动
7
- isFullScreen: {
8
- type: Boolean,
9
- value: false,
10
- },
11
- rewardData: {
12
- type: Object,
13
- value: {},
14
- },
15
- isShowSpecialPopup:{
16
- type: Boolean,
17
- value: false,
18
- }
19
- },
20
-
21
- /**
22
- * 组件的初始数据
23
- */
24
- data: {},
25
-
26
- /**
27
- * 组件的方法列表
28
- */
29
- methods: {
30
- handleClose(){
31
- this.triggerEvent('close')
32
- }
33
- },
34
- })
1
+ Component({
2
+ /**
3
+ * 组件的属性列表
4
+ */
5
+ properties: {
6
+ // 全屏互动
7
+ isFullScreen: {
8
+ type: Boolean,
9
+ value: false,
10
+ },
11
+ rewardData: {
12
+ type: Object,
13
+ value: {},
14
+ },
15
+ isShowSpecialPopup:{
16
+ type: Boolean,
17
+ value: false,
18
+ }
19
+ },
20
+
21
+ /**
22
+ * 组件的初始数据
23
+ */
24
+ data: {},
25
+
26
+ /**
27
+ * 组件的方法列表
28
+ */
29
+ methods: {
30
+ handleClose(){
31
+ this.triggerEvent('close')
32
+ }
33
+ },
34
+ })
@@ -1,13 +1,13 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "coupon-popup": "./coupon/index",
5
- "integral-popup": "./integral/index",
6
- "custom-prizes-popup": "./customPrizes/index"
7
- },
8
- "componentPlaceholder": {
9
- "coupon-popup": "view",
10
- "integra-popupl": "view",
11
- "custom-prizes-popup": "view"
12
- }
13
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "coupon-popup": "./coupon/index",
5
+ "integral-popup": "./integral/index",
6
+ "custom-prizes-popup": "./customPrizes/index"
7
+ },
8
+ "componentPlaceholder": {
9
+ "coupon-popup": "view",
10
+ "integra-popupl": "view",
11
+ "custom-prizes-popup": "view"
12
+ }
13
+ }
@@ -1,25 +1,25 @@
1
- <view>
2
- <block wx:if="{{isShowSpecialPopup}}">
3
- <!-- 自定义奖品弹窗 -->
4
- <custom-prizes-popup rewardData="{{rewardData}}" isFullScreen="{{isFullScreen}}" bind:close="handleClose"></custom-prizes-popup>
5
- </block>
6
- <block wx:else>
7
- <!-- 优惠券奖励弹窗 -->
8
- <coupon-popup
9
- rewardData="{{rewardData}}"
10
- showCouponReceivePopup="{{rewardData.live_task.reward_type === 2}}"
11
- isFullScreen="{{isFullScreen}}"
12
- bind:close="handleClose"
13
- wx:if="{{rewardData.live_task.reward_type === 2}}"
14
- ></coupon-popup>
15
-
16
- <!-- 其他奖励弹窗 积分、红包、奖品、课程 -->
17
- <integral-popup
18
- rewardData="{{rewardData}}"
19
- showIntegralReceivePopup="{{rewardData.live_task.reward_type !== 2}}"
20
- isFullScreen="{{isFullScreen}}"
21
- bind:close="handleClose"
22
- wx:else
23
- ></integral-popup>
24
- </block>
25
- </view>
1
+ <view>
2
+ <block wx:if="{{isShowSpecialPopup}}">
3
+ <!-- 自定义奖品弹窗 -->
4
+ <custom-prizes-popup rewardData="{{rewardData}}" isFullScreen="{{isFullScreen}}" bind:close="handleClose"></custom-prizes-popup>
5
+ </block>
6
+ <block wx:else>
7
+ <!-- 优惠券奖励弹窗 -->
8
+ <coupon-popup
9
+ rewardData="{{rewardData}}"
10
+ showCouponReceivePopup="{{rewardData.live_task.reward_type === 2}}"
11
+ isFullScreen="{{isFullScreen}}"
12
+ bind:close="handleClose"
13
+ wx:if="{{rewardData.live_task.reward_type === 2}}"
14
+ ></coupon-popup>
15
+
16
+ <!-- 其他奖励弹窗 积分、红包、奖品、课程 -->
17
+ <integral-popup
18
+ rewardData="{{rewardData}}"
19
+ showIntegralReceivePopup="{{rewardData.live_task.reward_type !== 2}}"
20
+ isFullScreen="{{isFullScreen}}"
21
+ bind:close="handleClose"
22
+ wx:else
23
+ ></integral-popup>
24
+ </block>
25
+ </view>
@@ -1 +1 @@
1
- /* subpkg/components/sideBarWidgets/task/taskReceivePopup/index.wxss */
1
+ /* subpkg/components/sideBarWidgets/task/taskReceivePopup/index.wxss */
@@ -1,61 +1,61 @@
1
- const computedBehavior = require('miniprogram-computed').behavior
2
- const awardImgList = {
3
- 1: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lujibydk0lc8.png",
4
- 3: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lujibydw0tfz.png",
5
- 4: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lujibydv0kfq.png"
6
- }
7
- Component({
8
- behaviors: [computedBehavior],
9
- /**
10
- * 组件的属性列表
11
- */
12
- properties: {
13
- // 全屏互动
14
- isFullScreen: {
15
- type: Boolean,
16
- value: false,
17
- },
18
- showIntegralReceivePopup: {
19
- type: Boolean,
20
- value: false,
21
- },
22
- rewardData: {
23
- type: Object,
24
- value: {},
25
- }
26
- },
27
-
28
- /**
29
- * 组件的初始数据
30
- */
31
- data: {},
32
- computed:{
33
- awardImg(data){
34
- let { reward_type } = data.rewardData.live_task
35
- return awardImgList[reward_type]
36
- },
37
- rewardValue(data){
38
- let { reward_type, reward_value } = data.rewardData.live_task
39
- if(reward_type === 3){
40
- // 红包
41
- return (reward_value.money/100).toFixed(2)
42
- }else if(reward_type === 1){
43
- return reward_value
44
- }else{
45
- return 1
46
- }
47
- }
48
- },
49
-
50
- /**
51
- * 组件的方法列表
52
- */
53
- methods: {
54
- closePopup() {
55
- this.setData({
56
- showIntegralReceivePopup: false
57
- })
58
- this.triggerEvent('close')
59
- },
60
- },
61
- })
1
+ const computedBehavior = require('miniprogram-computed').behavior
2
+ const awardImgList = {
3
+ 1: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lujibydk0lc8.png",
4
+ 3: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lujibydw0tfz.png",
5
+ 4: "https://commonresource-1252524126.cdn.xiaoeknow.com/image/lujibydv0kfq.png"
6
+ }
7
+ Component({
8
+ behaviors: [computedBehavior],
9
+ /**
10
+ * 组件的属性列表
11
+ */
12
+ properties: {
13
+ // 全屏互动
14
+ isFullScreen: {
15
+ type: Boolean,
16
+ value: false,
17
+ },
18
+ showIntegralReceivePopup: {
19
+ type: Boolean,
20
+ value: false,
21
+ },
22
+ rewardData: {
23
+ type: Object,
24
+ value: {},
25
+ }
26
+ },
27
+
28
+ /**
29
+ * 组件的初始数据
30
+ */
31
+ data: {},
32
+ computed:{
33
+ awardImg(data){
34
+ let { reward_type } = data.rewardData.live_task
35
+ return awardImgList[reward_type]
36
+ },
37
+ rewardValue(data){
38
+ let { reward_type, reward_value } = data.rewardData.live_task
39
+ if(reward_type === 3){
40
+ // 红包
41
+ return (reward_value.money/100).toFixed(2)
42
+ }else if(reward_type === 1){
43
+ return reward_value
44
+ }else{
45
+ return 1
46
+ }
47
+ }
48
+ },
49
+
50
+ /**
51
+ * 组件的方法列表
52
+ */
53
+ methods: {
54
+ closePopup() {
55
+ this.setData({
56
+ showIntegralReceivePopup: false
57
+ })
58
+ this.triggerEvent('close')
59
+ },
60
+ },
61
+ })
@@ -1,6 +1,6 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "van-popup": "@vant/weapp/popup/index"
5
- }
6
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "van-popup": "@vant/weapp/popup/index"
5
+ }
6
+ }