Commit ae636e8e authored by zhaofei's avatar zhaofei

修改模板

parent 3d92c9eb
...@@ -416,22 +416,21 @@ export default class ActivityConfigService { ...@@ -416,22 +416,21 @@ 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)
const configList = JSON.stringify(<%-configList%>) prizeData = {
// prizeData = { <% for(var i = 0; i < configList.length; ++i) {%>
// <% for(var i = 0; i < configList.length; ++i) {%> <%- configList[i].sort == 'prizePool' && `${configList[i].key}:' prizeList.filter(item=> { return item.prizeDataType == ${configList[i].prizeDataType}})',` %><% } %>
// <%- configList[i].sort == 'prizePool' && `${configList[i].key}:' prizeList.filter(item=> { return item.prizeDataType == ${configList[i].prizeDataType}})',` %><% } %> }
// } <% for(var i = 0; i < configList.length; ++i) {%>
// <% for(var i = 0; i < configList.length; ++i) {%> <% if(configList[i].conditionKeys && configList[i].conditionKeys.length) {%>
// <% if(configList[i].conditionKeys && configList[i].conditionKeys.length) {%> <% for(var j = 0; j < configList[i].conditionKeys.length; ++j) {%>
// <% 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