Commit 372a0105 authored by zhaofei's avatar zhaofei

修改模板

parent 64c620fb
...@@ -416,21 +416,22 @@ export default class ActivityConfigService { ...@@ -416,21 +416,22 @@ export default class ActivityConfigService {
formatPrizeConfig(prizeConfig: Array<IActivityPrize>) { formatPrizeConfig(prizeConfig: Array<IActivityPrize>) {
// level 根据level排序 // level 根据level排序
let prizeList = prizeConfig.sort((a,b) => a.level - b.level) let prizeList = prizeConfig.sort((a,b) => a.level - b.level)
prizeData = { const configList = <%-configList%>
<% for(var i = 0; i < configList.length; ++i) {%> // prizeData = {
<%- configList[i].sort == 'prizePool' && `${configList[i].key}:' prizeList.filter(item=> { return item.prizeDataType == ${configList[i].prizeDataType}})',` %><% } %> // <% for(var i = 0; i < configList.length; ++i) {%>
} // <%- configList[i].sort == 'prizePool' && `${configList[i].key}:' prizeList.filter(item=> { return item.prizeDataType == ${configList[i].prizeDataType}})',` %><% } %>
<% for(var i = 0; i < configList.length; ++i) {%> // }
<% if(configList[i].conditionKeys && configList[i].conditionKeys.length) {%> // <% for(var i = 0; i < configList.length; ++i) {%>
<% for(var j = 0; j < configList[i].conditionKeys.length; ++j) {%> // <% if(configList[i].conditionKeys && configList[i].conditionKeys.length) {%>
<%-` // <% for(var j = 0; j < configList[i].conditionKeys.length; ++j) {%>
prizeData['${configList[i].key}'].filter(item=> return item['${ configList[i].conditionKeys[j].key}' == ${configList[i].conditionKeys[j].value}]) // <%-`
`%> // prizeData['${configList[i].key}'].filter(item=> return item['${ configList[i].conditionKeys[j].key}' == ${configList[i].conditionKeys[j].value}])
<% } %> // `%>
<% } %> // <% } %>
<% } %> // <% } %>
// <% } %>
return prizeData // return prizeData
} }
// 概率奖品配置 properiodfrom properiodto // 概率奖品配置 properiodfrom properiodto
setPrizeProbalityRange(prizes: IActivityPrize[]) { setPrizeProbalityRange(prizes: IActivityPrize[]) {
......
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