Commit e581abda authored by 秦海涛's avatar 秦海涛

update

parent f26cce70
...@@ -17,62 +17,6 @@ const THANKS_TYPE = 5 ...@@ -17,62 +17,6 @@ const THANKS_TYPE = 5
var validator = new schema(descriptor) var validator = new schema(descriptor)
// {
// type: "beMembership",//会员
// value: 20,//完成任务获得值
// },
// {
// type: "attentionStore",
// value: 20,
// },
// {
// type: "sign",
// value: 20,
// },
// {
// type: "exchangeCredits",
// value: 20,
// times: 1,
// },
// {
// type: "inviteFriends",
// title: "标题",//任务标题
// taskRateType: 1,//任务频率类型
// times: 3,//任务为每日限次次数值
// value: 30,
// },
// {
// type: "orderGoods",
// title: "标题",
// taskRateType: 2,
// times: 3,
// value: 90,
// itemIds: "111,222,333",//商品类型任务商品id
// },
// {
// type: "browseGoods",
// title: "标题",
// taskRateType: 3,
// times: 3,
// value: 90,
// itemIds: "111,222,333",
// },
// {
// type: "jumpLink",
// title: "标题",
// taskRateType: 3,
// link: "http://www.taobao.com",//跳转链接
// times: 3,
// value: 90,
// },
// {
// type: "collectGoods",
// title: "标题",
// taskRateType: 1,
// times: 3,
// value: 90,
// itemIds: "111,222,333",
// }
Component({ Component({
mixins: [ methods ], mixins: [ methods ],
data: { data: {
...@@ -83,25 +27,31 @@ Component({ ...@@ -83,25 +27,31 @@ Component({
<% for(var i = 0; i < configList.length; ++i) {%> <% for(var i = 0; i < configList.length; ++i) {%>
<%- !taskKeys.includes(configList[i].key) && configList[i].key !== 'label' ? `${configList[i].key}: ${configList[i].defaultValue || "''"},` : '' %><% } %> <%- !taskKeys.includes(configList[i].key) && configList[i].key !== 'label' ? `${configList[i].key}: ${configList[i].defaultValue || "''"},` : '' %><% } %>
tasks: { tasks: {
// 关注店铺
attentionStore: { attentionStore: {
value: '', value: '',
}, },
// 成为会员
beMembership: { beMembership: {
value: '', value: '',
}, },
// 签到
sign: { sign: {
value: '' value: ''
}, },
// 兑换积分
exchangeCredits: { exchangeCredits: {
value: '', value: '',
times: '', times: '',
}, },
// 邀请好友
inviteFriends: { inviteFriends: {
title: '', // 任务标题 title: '', // 任务标题
taskRateType: 1, // 任务频率类型 taskRateType: 1, // 任务频率类型
times: 3, // 任务为每日限次次数值 times: 3, // 任务为每日限次次数值
value: '', // 任务奖励 value: '', // 任务奖励
}, },
// 浏览商品
browseGoods: { browseGoods: {
title: '', title: '',
taskRateType: 1, taskRateType: 1,
...@@ -110,6 +60,7 @@ Component({ ...@@ -110,6 +60,7 @@ Component({
link: '', link: '',
itemIds: '', itemIds: '',
}, },
// 下单商品
orderGoods: { orderGoods: {
title: '', title: '',
taskRateType: 1, taskRateType: 1,
...@@ -118,6 +69,7 @@ Component({ ...@@ -118,6 +69,7 @@ Component({
link: '', link: '',
itemIds: '', itemIds: '',
}, },
// 收藏商品
collectGoods: { collectGoods: {
title: '', title: '',
taskRateType: 1, taskRateType: 1,
...@@ -125,6 +77,7 @@ Component({ ...@@ -125,6 +77,7 @@ Component({
value: '', value: '',
itemIds: "", itemIds: "",
}, },
// 跳转链接
jumpLink: { jumpLink: {
title: '', title: '',
taskRateType: 1, taskRateType: 1,
...@@ -158,7 +111,7 @@ Component({ ...@@ -158,7 +111,7 @@ Component({
originalStartTime: +data.startTime, originalStartTime: +data.startTime,
isStart: +data.startTime < Date.now(), isStart: +data.startTime < Date.now(),
isEnd: +data.endTime < Date.now(), isEnd: +data.endTime < Date.now(),
tasks tasks: data.tasks
}) })
} catch (error) { } catch (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment