Commit 1bbd4789 authored by gongguan's avatar gongguan

修改了任务配置默认会保留上一次的bug

parent 26b47e3a
......@@ -18,6 +18,17 @@ const THANKS_TYPE = 5
var validator = new schema(descriptor)
const tasks = {
<% for(var i = 0; i < configList.length; ++i) {%>
<%- taskKeys.includes(configList[i].key) && configList[i].key !== 'label' ? `${configList[i].key}:{
value:"",
taskRateType:"",
times:"",
title:"",
link:""
},` : '' %><% } %>
}
Component({
mixins: [ methods ],
data: {
......@@ -27,16 +38,7 @@ Component({
endTime: '',
<% for(var i = 0; i < configList.length; ++i) {%>
<%- !taskKeys.includes(configList[i].key) && configList[i].key !== 'label' ? `${configList[i].key}: ${configList[i].defaultValue || "''"},` : '' %><% } %>
tasks: {
<% for(var i = 0; i < configList.length; ++i) {%>
<%- taskKeys.includes(configList[i].key) && configList[i].key !== 'label' ? `${configList[i].key}:{
value:"",
taskRateType:"",
times:"",
title:"",
link:""
},` : '' %><% } %>
},
tasks: JSON.parse(JSON.stringify(tasks)),
<% for(var i = 0; i < boxDatas.length; ++i) {%>
<%- `${boxkeyDatas[i].name}:{
${boxkeyDatas[i].value}
......@@ -49,6 +51,9 @@ Component({
isPostParams: true
},
didMount() {
this.setData({
tasks: JSON.parse(JSON.stringify(tasks))
})
const { id } = this.$page.$router.params
id && this.getActivityInfo(id)
},
......
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