xiaoe_mp_npm 1.0.0-live8 → 1.0.0-live9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +3 -1
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +2 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +8 -2
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +3 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +4 -4
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxss +12 -0
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +0 -1
- package/miniprogram_dist/Task/TaskPopup/index.wxml +1 -1
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -48
- package/package.json +1 -1
- package/src/LiveGoodsList/index.wxss +230 -230
- package/src/Task/TaskBubble/index.wxss +1 -1
- package/src/Task/TaskIcon/index.wxss +1 -1
- package/src/Task/TaskPopup/component/RewardList/index.js +3 -1
- package/src/Task/TaskPopup/component/RewardList/index.wxml +2 -0
- package/src/Task/TaskPopup/component/TaskItem/index.js +8 -2
- package/src/Task/TaskPopup/component/TaskItem/index.scss +3 -0
- package/src/Task/TaskPopup/component/TaskItem/index.wxml +4 -4
- package/src/Task/TaskPopup/component/TaskItem/index.wxss +1 -362
- package/src/Task/TaskPopup/component/TaskList/index.js +0 -1
- package/src/Task/TaskPopup/component/TaskList/index.wxss +98 -98
- package/src/Task/TaskPopup/component/TaskType/index.wxss +98 -98
- package/src/Task/TaskPopup/index.wxml +1 -1
- package/src/Task/TaskPopup/index.wxss +250 -250
- package/src/Task/taskReceivePopup/coupon/index.wxs +48 -48
- package/src/Task/taskReceivePopup/coupon/index.wxss +1 -1
|
@@ -45,6 +45,10 @@ Component({
|
|
|
45
45
|
itemIndex:{
|
|
46
46
|
type: Number,
|
|
47
47
|
value: 0
|
|
48
|
+
},
|
|
49
|
+
isMb:{
|
|
50
|
+
type: Boolean,
|
|
51
|
+
value: false
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
data: {
|
|
@@ -54,7 +58,6 @@ Component({
|
|
|
54
58
|
watch:{
|
|
55
59
|
taskItem:function(newVal){
|
|
56
60
|
const { task_type, task_condition } = newVal
|
|
57
|
-
console.log("taskItem",newVal)
|
|
58
61
|
let taskBelongType;
|
|
59
62
|
// 任务类型归属
|
|
60
63
|
if(task_type === 1){
|
|
@@ -85,7 +88,6 @@ Component({
|
|
|
85
88
|
computed:{
|
|
86
89
|
// 任务标题
|
|
87
90
|
taskTitle(data){
|
|
88
|
-
console.log("taskItem",data.taskBelongType)
|
|
89
91
|
let title = ""
|
|
90
92
|
switch(data.taskBelongType){
|
|
91
93
|
case 1:
|
|
@@ -166,6 +168,10 @@ Component({
|
|
|
166
168
|
// 去转发
|
|
167
169
|
this.triggerEvent("btnClick","toShare")
|
|
168
170
|
return
|
|
171
|
+
}else if(this.data.btnText === "去使用"){
|
|
172
|
+
// 去转发
|
|
173
|
+
this.triggerEvent("btnClick","reward")
|
|
174
|
+
return
|
|
169
175
|
}
|
|
170
176
|
|
|
171
177
|
// 去观看、去点赞 直接关闭弹窗
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<wxs src="./index.wxs" module="filter" />
|
|
2
2
|
|
|
3
3
|
<view
|
|
4
|
-
class="item-box {{lineClass?'line-class':''}} {{listType === 'error' && itemIndex === 0?'bg-change':''}} {{isRadius?'radius':''}}"
|
|
4
|
+
class="item-box {{lineClass?'line-class':''}} {{listType === 'error' && itemIndex === 0?'bg-change':''}} {{isRadius?'radius':''}} {{isMb?'mb':''}}"
|
|
5
5
|
>
|
|
6
6
|
<!-- 左侧任务详情 -->
|
|
7
7
|
<view class="left">
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<view
|
|
23
23
|
class="time"
|
|
24
24
|
wx:if="{{listType === 'task' || listType === 'error'}}"
|
|
25
|
-
>任务时间:{{taskItem.
|
|
25
|
+
>任务时间:{{taskItem.show_start_at}} 至 {{taskItem.show_end_at}}</view>
|
|
26
26
|
|
|
27
27
|
<view class="time" wx:if="{{listType === 'reward'}}">获得方式:{{ taskTitle }}</view>
|
|
28
28
|
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
<!-- 观看剩余时间 -->
|
|
32
32
|
<view
|
|
33
33
|
class="residue-time"
|
|
34
|
-
wx:if="{{taskItem.task_type === 1 && listType === 'task' && taskItem.
|
|
35
|
-
|
|
34
|
+
wx:if="{{taskItem.task_type === 1 && listType === 'task' && taskItem.join_state === 1}}"
|
|
35
|
+
>{{taskItem.residue_time > 60 ? '再观看 '+ filter.secondsToMinutes(taskItem.residue_time) + '分钟 '+ '获得奖励':'即将获得奖励'}}</view>
|
|
36
36
|
</view>
|
|
37
37
|
|
|
38
38
|
<!-- 右侧按钮 -->
|
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
.item-box.radius {
|
|
27
27
|
border-radius: 2.13333vmin;
|
|
28
28
|
}
|
|
29
|
+
.item-box.mb {
|
|
30
|
+
margin-bottom: 3.2vmin;
|
|
31
|
+
}
|
|
29
32
|
.item-box .left {
|
|
30
33
|
max-width: 61.6vmin;
|
|
31
34
|
}
|
|
@@ -116,6 +119,9 @@
|
|
|
116
119
|
.item-box.radius {
|
|
117
120
|
border-radius: 1.04167vmin;
|
|
118
121
|
}
|
|
122
|
+
.item-box.mb {
|
|
123
|
+
margin-bottom: 1.5625vmin;
|
|
124
|
+
}
|
|
119
125
|
.item-box .left {
|
|
120
126
|
max-width: 30.07812vmin;
|
|
121
127
|
}
|
|
@@ -207,6 +213,9 @@
|
|
|
207
213
|
.item-box.radius {
|
|
208
214
|
border-radius: 1.26984vmin;
|
|
209
215
|
}
|
|
216
|
+
.item-box.mb {
|
|
217
|
+
margin-bottom: 1.90476vmin;
|
|
218
|
+
}
|
|
210
219
|
.item-box .left {
|
|
211
220
|
max-width: 36.66667vmin;
|
|
212
221
|
}
|
|
@@ -298,6 +307,9 @@
|
|
|
298
307
|
.item-box.radius {
|
|
299
308
|
border-radius: 1.04167vmin;
|
|
300
309
|
}
|
|
310
|
+
.item-box.mb {
|
|
311
|
+
margin-bottom: 1.5625vmin;
|
|
312
|
+
}
|
|
301
313
|
.item-box .left {
|
|
302
314
|
max-width: 30.07812vmin;
|
|
303
315
|
}
|
|
@@ -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
|
+
}
|