Commit e97c5787 authored by 杨梦雅's avatar 杨梦雅

config

parent 080e4ac8
<view class="items-config"> <view class="items-config">
<text style="font-size: 12px">{{itemIds ? `已选择${(itemIds + '').split(',').length}个商品` : ''}} </text> <text a:if="{{itemIds}}" style="font-size: 12px; margin-right: 10px">{{`已选择${(itemIds + '').split(',').length}个商品`}} </text>
<button type="primary" text size="small" onTap="onOpenDialog">{{itemIds ? '更换商品' : '选择商品'}}</button> <button type="primary" style="height:auto;" text size="small" onTap="onOpenDialog">{{itemIds ? '更换商品' : '选择商品'}}</button>
<items-dialog <items-dialog
onUpdateBabyChoose="onUpdateBabyChoose" onUpdateBabyChoose="onUpdateBabyChoose"
browseItemIds="{{itemIds + ''}}" browseItemIds="{{itemIds + ''}}"
......
...@@ -24,7 +24,7 @@ const tasks = { ...@@ -24,7 +24,7 @@ const tasks = {
value:${configList[i].value || '""'}, value:${configList[i].value || '""'},
taskRateType: ${configList[i].taskRateType ? `TASK_RATE_TYPE["${configList[i].taskRateType}"]`: '""'}, taskRateType: ${configList[i].taskRateType ? `TASK_RATE_TYPE["${configList[i].taskRateType}"]`: '""'},
times:${configList[i].times || '""'}, times:${configList[i].times || '""'},
title:${configList[i].title || '""'}, title:${configList[i].name || '""'},
link:"", link:"",
itemIds:"" itemIds:""
},` : '' %><% } %> },` : '' %><% } %>
...@@ -221,6 +221,18 @@ Component({ ...@@ -221,6 +221,18 @@ Component({
} }
return prizeInfoListCopy return prizeInfoListCopy
}, },
// 任务配置选择商品回调
onItemIdsChange(ids, dataName) {
this.setData({
tasks: {
...this.data.tasks,
[dataName]: {
...this.data.tasks[dataName],
itemIds: ids
}
},
});
},
backList() { backList() {
this.$page.$router.go(-1) this.$page.$router.go(-1)
} }
......
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