xiaoe_mp_npm 1.0.21 → 1.0.22-store2

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 (165) hide show
  1. package/.prettierrc.js +32 -6
  2. package/miniprogram_dist/GoodsItem/index.json +6 -6
  3. package/miniprogram_dist/GoodsItem/index.wxs +18 -18
  4. package/miniprogram_dist/LiveGoodsList/Header/index.js +54 -54
  5. package/miniprogram_dist/LiveGoodsList/Header/index.json +6 -6
  6. package/miniprogram_dist/LiveGoodsList/Header/index.less +45 -45
  7. package/miniprogram_dist/LiveGoodsList/Header/index.scss +105 -105
  8. package/miniprogram_dist/LiveGoodsList/Header/index.wxml +32 -32
  9. package/miniprogram_dist/LiveGoodsList/README.md +9 -9
  10. package/miniprogram_dist/LiveGoodsList/index.json +8 -8
  11. package/miniprogram_dist/LiveGoodsList/index.less +53 -53
  12. package/miniprogram_dist/LiveGoodsList/index.scss +92 -92
  13. package/miniprogram_dist/Task/TaskBubble/index.js +2 -1
  14. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +23 -21
  15. package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +1 -0
  16. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +264 -169
  17. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +26 -0
  18. package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +32 -13
  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.wxml +1 -0
  22. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +4 -0
  23. package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +1 -0
  24. package/miniprogram_dist/Task/TaskPopup/index.js +76 -70
  25. package/miniprogram_dist/Task/TaskPopup/index.json +2 -2
  26. package/miniprogram_dist/Task/TaskPopup/index.wxml +2 -0
  27. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.js +132 -0
  28. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.json +6 -0
  29. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.scss +192 -0
  30. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxml +65 -0
  31. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxs +79 -0
  32. package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxss +521 -0
  33. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.js +40 -0
  34. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.json +6 -0
  35. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.scss +7 -0
  36. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxml +2 -0
  37. package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxss +298 -0
  38. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -0
  39. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -0
  40. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -0
  41. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -0
  42. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -0
  43. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -0
  44. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -0
  45. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -0
  46. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -0
  47. package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +316 -0
  48. package/miniprogram_dist/Task/TaskQuizPopup/index.js +225 -0
  49. package/miniprogram_dist/Task/TaskQuizPopup/index.json +8 -0
  50. package/miniprogram_dist/Task/TaskQuizPopup/index.scss +159 -0
  51. package/miniprogram_dist/Task/TaskQuizPopup/index.wxml +97 -0
  52. package/miniprogram_dist/Task/TaskQuizPopup/index.wxss +478 -0
  53. package/miniprogram_dist/Task/taskQuizRemindPopup/index.js +74 -0
  54. package/miniprogram_dist/Task/taskQuizRemindPopup/index.json +6 -0
  55. package/miniprogram_dist/Task/taskQuizRemindPopup/index.scss +108 -0
  56. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxml +27 -0
  57. package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxss +286 -0
  58. package/miniprogram_dist/common/utils/tool.js +54 -48
  59. package/package.json +1 -1
  60. package/src/AliveInvite/LiveRoomVertical/index.wxss +252 -252
  61. package/src/CollectionAddress/index.wxss +5 -5
  62. package/src/ConfirmOrder/components/AddressEdit/index.wxss +120 -120
  63. package/src/ConfirmOrder/components/AddressManage/index.wxss +98 -98
  64. package/src/ConfirmOrder/components/AddressSelect/index.wxss +67 -67
  65. package/src/ConfirmOrder/components/ChoosePicker/index.wxss +18 -18
  66. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.wxss +45 -45
  67. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.wxss +100 -100
  68. package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.wxss +55 -55
  69. package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.wxss +13 -13
  70. package/src/ConfirmOrder/components/Header/index.wxss +26 -26
  71. package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.wxss +85 -85
  72. package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.wxss +155 -155
  73. package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.wxss +51 -51
  74. package/src/ConfirmOrder/components/ModeSelect/index.wxss +44 -44
  75. package/src/ConfirmOrder/components/PickupSelect/index.wxss +22 -22
  76. package/src/ConfirmOrder/components/SelectSite/index.wxss +82 -82
  77. package/src/ConfirmOrder/components/Shipper/index.wxss +76 -76
  78. package/src/ConfirmOrder/components/ShipperEdit/index.wxss +78 -78
  79. package/src/ConfirmOrder/components/WechatAddress/index.wxss +22 -22
  80. package/src/ConfirmOrder/index.wxss +5 -5
  81. package/src/CouponList/couponMsg/index.wxss +3 -3
  82. package/src/CustomPopup/index.wxss +22 -22
  83. package/src/GoodsItem/index.json +6 -6
  84. package/src/GoodsItem/index.wxs +18 -18
  85. package/src/LiveGoodsList/Header/index.js +54 -54
  86. package/src/LiveGoodsList/Header/index.json +6 -6
  87. package/src/LiveGoodsList/Header/index.less +45 -45
  88. package/src/LiveGoodsList/Header/index.scss +105 -105
  89. package/src/LiveGoodsList/Header/index.wxml +32 -32
  90. package/src/LiveGoodsList/README.md +9 -9
  91. package/src/LiveGoodsList/index.json +8 -8
  92. package/src/LiveGoodsList/index.less +53 -53
  93. package/src/LiveGoodsList/index.scss +92 -92
  94. package/src/LiveGoodsList/index.wxss +218 -218
  95. package/src/PayComplete/Components/CouponItem/index.wxss +122 -122
  96. package/src/PayComplete/Components/Header/index.wxss +27 -27
  97. package/src/PayComplete/Components/LeadGroup/index.wxss +33 -33
  98. package/src/PayComplete/Components/PayGifts/index.wxss +157 -157
  99. package/src/PayComplete/Components/PayState/earnIntegral/index.wxss +23 -23
  100. package/src/PayComplete/Components/PayState/index.wxss +20 -20
  101. package/src/PayComplete/index.wxss +27 -27
  102. package/src/PayModule/wechatLoading/index.wxss +57 -57
  103. package/src/Recommend/index.wxss +110 -110
  104. package/src/Sku/Header/index.wxss +27 -27
  105. package/src/Sku/goods-info/index.wxss +52 -52
  106. package/src/Sku/index/index.wxss +52 -52
  107. package/src/Sku/row-item/index.wxss +50 -50
  108. package/src/Sku/step/index.wxss +11 -11
  109. package/src/Task/TaskBubble/index.js +2 -1
  110. package/src/Task/TaskBubble/index.wxss +289 -289
  111. package/src/Task/TaskIcon/index.wxss +130 -130
  112. package/src/Task/TaskPopup/component/RewardList/index.js +23 -21
  113. package/src/Task/TaskPopup/component/RewardList/index.wxml +1 -0
  114. package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
  115. package/src/Task/TaskPopup/component/TaskItem/index.js +264 -169
  116. package/src/Task/TaskPopup/component/TaskItem/index.scss +26 -0
  117. package/src/Task/TaskPopup/component/TaskItem/index.wxml +32 -13
  118. package/src/Task/TaskPopup/component/TaskItem/index.wxss +1 -394
  119. package/src/Task/TaskPopup/component/TaskList/index.js +8 -0
  120. package/src/Task/TaskPopup/component/TaskList/index.wxml +1 -0
  121. package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
  122. package/src/Task/TaskPopup/component/TaskType/index.js +4 -0
  123. package/src/Task/TaskPopup/component/TaskType/index.wxml +1 -0
  124. package/src/Task/TaskPopup/component/TaskType/index.wxss +110 -110
  125. package/src/Task/TaskPopup/index.js +76 -70
  126. package/src/Task/TaskPopup/index.json +2 -2
  127. package/src/Task/TaskPopup/index.wxml +2 -0
  128. package/src/Task/TaskPopup/index.wxss +406 -406
  129. package/src/Task/TaskQuizPopup/components/quizContent/index.js +132 -0
  130. package/src/Task/TaskQuizPopup/components/quizContent/index.json +6 -0
  131. package/src/Task/TaskQuizPopup/components/quizContent/index.scss +192 -0
  132. package/src/Task/TaskQuizPopup/components/quizContent/index.wxml +65 -0
  133. package/src/Task/TaskQuizPopup/components/quizContent/index.wxs +79 -0
  134. package/src/Task/TaskQuizPopup/components/quizContent/index.wxss +1 -0
  135. package/src/Task/TaskQuizPopup/components/quizRichText/index.js +40 -0
  136. package/src/Task/TaskQuizPopup/components/quizRichText/index.json +6 -0
  137. package/src/Task/TaskQuizPopup/components/quizRichText/index.scss +7 -0
  138. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxml +2 -0
  139. package/src/Task/TaskQuizPopup/components/quizRichText/index.wxss +1 -0
  140. package/src/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -0
  141. package/src/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -0
  142. package/src/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -0
  143. package/src/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -0
  144. package/src/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -0
  145. package/src/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -0
  146. package/src/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -0
  147. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -0
  148. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -0
  149. package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +283 -0
  150. package/src/Task/TaskQuizPopup/index.js +225 -0
  151. package/src/Task/TaskQuizPopup/index.json +8 -0
  152. package/src/Task/TaskQuizPopup/index.scss +159 -0
  153. package/src/Task/TaskQuizPopup/index.wxml +97 -0
  154. package/src/Task/TaskQuizPopup/index.wxss +1 -0
  155. package/src/Task/taskQuizRemindPopup/index.js +74 -0
  156. package/src/Task/taskQuizRemindPopup/index.json +6 -0
  157. package/src/Task/taskQuizRemindPopup/index.scss +108 -0
  158. package/src/Task/taskQuizRemindPopup/index.wxml +27 -0
  159. package/src/Task/taskQuizRemindPopup/index.wxss +1 -0
  160. package/src/Task/taskReceivePopup/customPrizes/index.wxss +220 -220
  161. package/src/Task/taskReceivePopup/index.wxss +1 -1
  162. package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
  163. package/src/common/css/theme.wxss +16 -16
  164. package/src/common/utils/tool.js +54 -48
  165. package/src/miniprogram_npm/miniprogram-computed/index.js +1 -0
@@ -0,0 +1,108 @@
1
+ $deviceWidth: 750;
2
+
3
+ @function vmin($rpx) {
4
+ @return #{$rpx * 100 / $deviceWidth}vmin;
5
+ }
6
+
7
+ @mixin remind-popup {
8
+ border-radius: vmin(16);
9
+ overflow: hidden;
10
+ .popup-quiz-box {
11
+ box-sizing: border-box;
12
+ width: vmin(576);
13
+ padding: vmin(48);
14
+ display: flex;
15
+ flex-direction: column;
16
+ justify-content: center;
17
+ align-items: center;
18
+ background: linear-gradient(180deg, rgba(20, 114, 255, 0.12) 0%, rgba(20, 114, 255, 0) 100%), #fff;
19
+
20
+ font-size: vmin(28);
21
+ font-style: normal;
22
+ font-weight: 400;
23
+ line-height: normal;
24
+ font-family: "PingFang SC";
25
+ position: relative;
26
+ .time-icon {
27
+ width: vmin(172);
28
+ height: vmin(172);
29
+ position: absolute;
30
+ right: 0;
31
+ top: -#{vmin(10)};
32
+ }
33
+ .header-title {
34
+ color: #333333;
35
+ text-align: center;
36
+ font-size: vmin(32);
37
+ font-style: normal;
38
+ font-weight: 500;
39
+ margin-bottom: vmin(16);
40
+ line-height: vmin(48);
41
+ }
42
+ .content-body {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ color: #666666;
47
+ text-align: center;
48
+ align-self: stretch;
49
+ line-height: vmin(40);
50
+ margin-bottom: vmin(48);
51
+ }
52
+ .quiz-remind-btn {
53
+ width: 100%;
54
+ display: flex;
55
+ align-items: center;
56
+ justify-content: space-between;
57
+ font-weight: 500;
58
+ view {
59
+ display: flex;
60
+ width: vmin(224);
61
+ height: vmin(80);
62
+ justify-content: center;
63
+ align-items: center;
64
+ border-radius: vmin(40);
65
+ }
66
+ .close-btn {
67
+ box-sizing: border-box;
68
+ border: vmin(1) solid #cccccc;
69
+ color: #333333;
70
+ }
71
+ .to-quiz-btn {
72
+ background: #1472ff;
73
+ color: #ffffff;
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ .remind-popup {
80
+ @include remind-popup;
81
+ }
82
+
83
+ // 竖屏pad
84
+ @media screen and (min-width: 768px) and (orientation: portrait) {
85
+ $deviceWidth: 1536 !global;
86
+
87
+ .remind-popup {
88
+ @include remind-popup;
89
+ }
90
+ }
91
+
92
+ // PC 放大适配
93
+ @media screen and (min-height: 630px) and (orientation: landscape) {
94
+ $deviceWidth: 1260 !global;
95
+
96
+ .remind-popup {
97
+ @include remind-popup;
98
+ }
99
+ }
100
+
101
+ // 横屏pad
102
+ @media screen and (min-height: 768px) and (orientation: landscape) {
103
+ $deviceWidth: 1536 !global;
104
+
105
+ .remind-popup {
106
+ @include remind-popup;
107
+ }
108
+ }
@@ -0,0 +1,27 @@
1
+ <view catchtap>
2
+ <van-popup
3
+ show="{{showPopup}}"
4
+ zIndex="{{500}}"
5
+ custom-class="remind-popup"
6
+ bind:close="closePop"
7
+ bind:click-overlay="closePop"
8
+ overlay-style="{{ 'background-color: rgba(0, 0, 0, 0.8)' }}"
9
+ >
10
+ <!-- 内容 -->
11
+ <view class="popup-quiz-box">
12
+ <image
13
+ class="time-icon"
14
+ src="https://commonresource-1252524126.cdn.xiaoeknow.com/image/lz6lllsd09kp.svg"
15
+ />
16
+ <!-- 标题 -->
17
+ <view class="header-title">答题开始了</view>
18
+ <!-- 内容 -->
19
+ <view class="content-body">完成答题任务将会获得奖励</view>
20
+ <!-- 按钮 -->
21
+ <view class="quiz-remind-btn">
22
+ <view class="close-btn" catchtap="closePop">取消</view>
23
+ <view class="to-quiz-btn" catchtap="quizHandle">去答题</view>
24
+ </view>
25
+ </view>
26
+ </van-popup>
27
+ </view>
@@ -0,0 +1,286 @@
1
+ .remind-popup {
2
+ border-radius: 2.13333vmin;
3
+ overflow: hidden;
4
+ }
5
+ .remind-popup .popup-quiz-box {
6
+ box-sizing: border-box;
7
+ width: 76.8vmin;
8
+ padding: 6.4vmin;
9
+ display: flex;
10
+ flex-direction: column;
11
+ justify-content: center;
12
+ align-items: center;
13
+ background: linear-gradient(180deg, rgba(20, 114, 255, 0.12) 0%, rgba(20, 114, 255, 0) 100%), #fff;
14
+ font-size: 3.73333vmin;
15
+ font-style: normal;
16
+ font-weight: 400;
17
+ line-height: normal;
18
+ font-family: "PingFang SC";
19
+ position: relative;
20
+ }
21
+ .remind-popup .popup-quiz-box .time-icon {
22
+ width: 22.93333vmin;
23
+ height: 22.93333vmin;
24
+ position: absolute;
25
+ right: 0;
26
+ top: -1.33333vmin;
27
+ }
28
+ .remind-popup .popup-quiz-box .header-title {
29
+ color: #333333;
30
+ text-align: center;
31
+ font-size: 4.26667vmin;
32
+ font-style: normal;
33
+ font-weight: 500;
34
+ margin-bottom: 2.13333vmin;
35
+ line-height: 6.4vmin;
36
+ }
37
+ .remind-popup .popup-quiz-box .content-body {
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ color: #666666;
42
+ text-align: center;
43
+ align-self: stretch;
44
+ line-height: 5.33333vmin;
45
+ margin-bottom: 6.4vmin;
46
+ }
47
+ .remind-popup .popup-quiz-box .quiz-remind-btn {
48
+ width: 100%;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: space-between;
52
+ font-weight: 500;
53
+ }
54
+ .remind-popup .popup-quiz-box .quiz-remind-btn view {
55
+ display: flex;
56
+ width: 29.86667vmin;
57
+ height: 10.66667vmin;
58
+ justify-content: center;
59
+ align-items: center;
60
+ border-radius: 5.33333vmin;
61
+ }
62
+ .remind-popup .popup-quiz-box .quiz-remind-btn .close-btn {
63
+ box-sizing: border-box;
64
+ border: 0.13333vmin solid #ccc;
65
+ color: #333333;
66
+ }
67
+ .remind-popup .popup-quiz-box .quiz-remind-btn .to-quiz-btn {
68
+ background: #1472ff;
69
+ color: #ffffff;
70
+ }
71
+ @media screen and (min-width: 768px) and (orientation: portrait) {
72
+ .remind-popup {
73
+ border-radius: 1.04167vmin;
74
+ overflow: hidden;
75
+ }
76
+ .remind-popup .popup-quiz-box {
77
+ box-sizing: border-box;
78
+ width: 37.5vmin;
79
+ padding: 3.125vmin;
80
+ display: flex;
81
+ flex-direction: column;
82
+ justify-content: center;
83
+ align-items: center;
84
+ background: linear-gradient(180deg, rgba(20, 114, 255, 0.12) 0%, rgba(20, 114, 255, 0) 100%), #fff;
85
+ font-size: 1.82292vmin;
86
+ font-style: normal;
87
+ font-weight: 400;
88
+ line-height: normal;
89
+ font-family: "PingFang SC";
90
+ position: relative;
91
+ }
92
+ .remind-popup .popup-quiz-box .time-icon {
93
+ width: 11.19792vmin;
94
+ height: 11.19792vmin;
95
+ position: absolute;
96
+ right: 0;
97
+ top: -0.65104vmin;
98
+ }
99
+ .remind-popup .popup-quiz-box .header-title {
100
+ color: #333333;
101
+ text-align: center;
102
+ font-size: 2.08333vmin;
103
+ font-style: normal;
104
+ font-weight: 500;
105
+ margin-bottom: 1.04167vmin;
106
+ line-height: 3.125vmin;
107
+ }
108
+ .remind-popup .popup-quiz-box .content-body {
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ color: #666666;
113
+ text-align: center;
114
+ align-self: stretch;
115
+ line-height: 2.60417vmin;
116
+ margin-bottom: 3.125vmin;
117
+ }
118
+ .remind-popup .popup-quiz-box .quiz-remind-btn {
119
+ width: 100%;
120
+ display: flex;
121
+ align-items: center;
122
+ justify-content: space-between;
123
+ font-weight: 500;
124
+ }
125
+ .remind-popup .popup-quiz-box .quiz-remind-btn view {
126
+ display: flex;
127
+ width: 14.58333vmin;
128
+ height: 5.20833vmin;
129
+ justify-content: center;
130
+ align-items: center;
131
+ border-radius: 2.60417vmin;
132
+ }
133
+ .remind-popup .popup-quiz-box .quiz-remind-btn .close-btn {
134
+ box-sizing: border-box;
135
+ border: 0.0651vmin solid #ccc;
136
+ color: #333333;
137
+ }
138
+ .remind-popup .popup-quiz-box .quiz-remind-btn .to-quiz-btn {
139
+ background: #1472ff;
140
+ color: #ffffff;
141
+ }
142
+ }
143
+ @media screen and (min-height: 630px) and (orientation: landscape) {
144
+ .remind-popup {
145
+ border-radius: 1.26984vmin;
146
+ overflow: hidden;
147
+ }
148
+ .remind-popup .popup-quiz-box {
149
+ box-sizing: border-box;
150
+ width: 45.71429vmin;
151
+ padding: 3.80952vmin;
152
+ display: flex;
153
+ flex-direction: column;
154
+ justify-content: center;
155
+ align-items: center;
156
+ background: linear-gradient(180deg, rgba(20, 114, 255, 0.12) 0%, rgba(20, 114, 255, 0) 100%), #fff;
157
+ font-size: 2.22222vmin;
158
+ font-style: normal;
159
+ font-weight: 400;
160
+ line-height: normal;
161
+ font-family: "PingFang SC";
162
+ position: relative;
163
+ }
164
+ .remind-popup .popup-quiz-box .time-icon {
165
+ width: 13.65079vmin;
166
+ height: 13.65079vmin;
167
+ position: absolute;
168
+ right: 0;
169
+ top: -0.79365vmin;
170
+ }
171
+ .remind-popup .popup-quiz-box .header-title {
172
+ color: #333333;
173
+ text-align: center;
174
+ font-size: 2.53968vmin;
175
+ font-style: normal;
176
+ font-weight: 500;
177
+ margin-bottom: 1.26984vmin;
178
+ line-height: 3.80952vmin;
179
+ }
180
+ .remind-popup .popup-quiz-box .content-body {
181
+ display: flex;
182
+ align-items: center;
183
+ justify-content: center;
184
+ color: #666666;
185
+ text-align: center;
186
+ align-self: stretch;
187
+ line-height: 3.1746vmin;
188
+ margin-bottom: 3.80952vmin;
189
+ }
190
+ .remind-popup .popup-quiz-box .quiz-remind-btn {
191
+ width: 100%;
192
+ display: flex;
193
+ align-items: center;
194
+ justify-content: space-between;
195
+ font-weight: 500;
196
+ }
197
+ .remind-popup .popup-quiz-box .quiz-remind-btn view {
198
+ display: flex;
199
+ width: 17.77778vmin;
200
+ height: 6.34921vmin;
201
+ justify-content: center;
202
+ align-items: center;
203
+ border-radius: 3.1746vmin;
204
+ }
205
+ .remind-popup .popup-quiz-box .quiz-remind-btn .close-btn {
206
+ box-sizing: border-box;
207
+ border: 0.07937vmin solid #ccc;
208
+ color: #333333;
209
+ }
210
+ .remind-popup .popup-quiz-box .quiz-remind-btn .to-quiz-btn {
211
+ background: #1472ff;
212
+ color: #ffffff;
213
+ }
214
+ }
215
+ @media screen and (min-height: 768px) and (orientation: landscape) {
216
+ .remind-popup {
217
+ border-radius: 1.04167vmin;
218
+ overflow: hidden;
219
+ }
220
+ .remind-popup .popup-quiz-box {
221
+ box-sizing: border-box;
222
+ width: 37.5vmin;
223
+ padding: 3.125vmin;
224
+ display: flex;
225
+ flex-direction: column;
226
+ justify-content: center;
227
+ align-items: center;
228
+ background: linear-gradient(180deg, rgba(20, 114, 255, 0.12) 0%, rgba(20, 114, 255, 0) 100%), #fff;
229
+ font-size: 1.82292vmin;
230
+ font-style: normal;
231
+ font-weight: 400;
232
+ line-height: normal;
233
+ font-family: "PingFang SC";
234
+ position: relative;
235
+ }
236
+ .remind-popup .popup-quiz-box .time-icon {
237
+ width: 11.19792vmin;
238
+ height: 11.19792vmin;
239
+ position: absolute;
240
+ right: 0;
241
+ top: -0.65104vmin;
242
+ }
243
+ .remind-popup .popup-quiz-box .header-title {
244
+ color: #333333;
245
+ text-align: center;
246
+ font-size: 2.08333vmin;
247
+ font-style: normal;
248
+ font-weight: 500;
249
+ margin-bottom: 1.04167vmin;
250
+ line-height: 3.125vmin;
251
+ }
252
+ .remind-popup .popup-quiz-box .content-body {
253
+ display: flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ color: #666666;
257
+ text-align: center;
258
+ align-self: stretch;
259
+ line-height: 2.60417vmin;
260
+ margin-bottom: 3.125vmin;
261
+ }
262
+ .remind-popup .popup-quiz-box .quiz-remind-btn {
263
+ width: 100%;
264
+ display: flex;
265
+ align-items: center;
266
+ justify-content: space-between;
267
+ font-weight: 500;
268
+ }
269
+ .remind-popup .popup-quiz-box .quiz-remind-btn view {
270
+ display: flex;
271
+ width: 14.58333vmin;
272
+ height: 5.20833vmin;
273
+ justify-content: center;
274
+ align-items: center;
275
+ border-radius: 2.60417vmin;
276
+ }
277
+ .remind-popup .popup-quiz-box .quiz-remind-btn .close-btn {
278
+ box-sizing: border-box;
279
+ border: 0.0651vmin solid #ccc;
280
+ color: #333333;
281
+ }
282
+ .remind-popup .popup-quiz-box .quiz-remind-btn .to-quiz-btn {
283
+ background: #1472ff;
284
+ color: #ffffff;
285
+ }
286
+ }
@@ -1,66 +1,72 @@
1
1
  /*函数节流*/
2
2
  function throttle(fn, interval) {
3
- var enterTime = 0; //触发的时间
4
- var gapTime = interval || 300; //间隔时间,如果interval不传,则默认300ms
3
+ var enterTime = 0 //触发的时间
4
+ var gapTime = interval || 300 //间隔时间,如果interval不传,则默认300ms
5
5
  return function () {
6
- var context = this;
7
- var backTime = new Date(); //第一次函数return即触发的时间
6
+ var context = this
7
+ var backTime = new Date() //第一次函数return即触发的时间
8
8
  if (backTime - enterTime > gapTime) {
9
- fn.call(context, arguments);
10
- enterTime = backTime; //赋值给第一次触发的时间,这样就保存了第二次触发的时间
9
+ fn.call(context, arguments)
10
+ enterTime = backTime //赋值给第一次触发的时间,这样就保存了第二次触发的时间
11
11
  }
12
- };
12
+ }
13
13
  }
14
14
 
15
15
  /*函数防抖*/
16
16
  function debounce(func, wait, immediate) {
17
- let timer;
17
+ let timer
18
18
 
19
19
  return function () {
20
- //this指向debounce
21
- let context = this;
22
- //即参数,func,wait
23
- let args = arguments;
20
+ //this指向debounce
21
+ let context = this
22
+ //即参数,func,wait
23
+ let args = arguments
24
24
 
25
- //如果timer不为null, 清除定时器
26
- if (timer) clearTimeout(timer);
25
+ //如果timer不为null, 清除定时器
26
+ if (timer) clearTimeout(timer)
27
27
 
28
- //如果是立即执行
29
- if (immediate) {
30
- //定义callNow = !timer
31
- var callNow = !timer;
32
- //定义wait时间后把timer变为null
33
- //即在wait时间之后事件才会有效
34
- timer = setTimeout(() => {
35
- timer = null;
36
- }, wait)
37
- //如果callNow为true,即原本timer为null
38
- //那么执行func函数
39
- if (callNow) func.apply(context, args)
40
- } else {
41
- //如果是不立即执行
42
- //那就是每次重新定时
43
- timer = setTimeout(function () {
44
- func.apply(context, args)
45
- }, wait);
46
- }
28
+ //如果是立即执行
29
+ if (immediate) {
30
+ //定义callNow = !timer
31
+ var callNow = !timer
32
+ //定义wait时间后把timer变为null
33
+ //即在wait时间之后事件才会有效
34
+ timer = setTimeout(() => {
35
+ timer = null
36
+ }, wait)
37
+ //如果callNow为true,即原本timer为null
38
+ //那么执行func函数
39
+ if (callNow) func.apply(context, args)
40
+ } else {
41
+ //如果是不立即执行
42
+ //那就是每次重新定时
43
+ timer = setTimeout(function () {
44
+ func.apply(context, args)
45
+ }, wait)
46
+ }
47
47
  }
48
48
  }
49
- // }
50
- // function debounce(fn, interval) {
51
- // var timer;
52
- // var gapTime = interval || 1000; //间隔时间,如果interval不传,则默认1000ms
53
- // return function () {
54
- // clearTimeout(timer);
55
- // var context = this;
56
- // var args = arguments; //保存此处的arguments,因为setTimeout是全局的,arguments不是防抖函数需要的。
57
- // timer = setTimeout(function () {
58
- // fn.call(context, args);
59
- // }, gapTime);
60
- // };
61
- // }
49
+
50
+ /**
51
+ * 高并发请求打散
52
+ * @param delayHandler 目标并发量获取器
53
+ * @param options 配置项 { defaultDelay: 1000, useScatter: false }
54
+ * @param cb 回调函数
55
+ * @returns {number} 定时器
56
+ */
57
+ function scatterRequest(delayHandler, options, cb) {
58
+ let timer
59
+ const { defaultDelay = 1000, useScatter = false } = options
60
+ let delay = useScatter ? delayHandler() : defaultDelay // 默认并发量为1000
61
+ console.log(useScatter ? `[scatterRequest] High concurrency delay request: ${delay}` : '[scatterRequest] Disabled')
62
+ timer = setTimeout(() => {
63
+ cb()
64
+ }, delay)
65
+ return timer
66
+ }
62
67
 
63
68
  module.exports = {
64
69
  throttle,
65
- debounce
66
- };
70
+ debounce,
71
+ scatterRequest,
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaoe_mp_npm",
3
- "version": "1.0.21",
3
+ "version": "1.0.22-store2",
4
4
  "description": "",
5
5
  "main": "miniprogram_dist/index.js",
6
6
  "scripts": {