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

config

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