Commit cd38e06b authored by 王波's avatar 王波

编辑模板

parent 97b155f9
......@@ -11,7 +11,7 @@
"dayjs": "^1.8.28",
"node-xlsx": "^0.15.0",
"source-map-support": "^0.5.19",
"taobao-mini-sdk": "0.2.4"
"taobao-mini-sdk": "0.2.5"
},
"scripts": {
"start": "tsc",
......
......@@ -2,7 +2,7 @@
import { CODE_TYPES, _48_HOURS } from './../constants'
import { services, paramsCheck, paramsValidate } from '../decorator'
import { resultsModel } from '../sdk'
import { resultsModel, TBAPIS } from '../sdk'
import { ActivityconfigService } from '../service'
import { saveParams } from '../utils/saveValidate'
......@@ -92,11 +92,20 @@ export default class ActivitSaveController {
}
if (result || result === 0) {
<%if (miniConfig.needMiniapp && miniConfig.MiniappIdList.length > 0) {%>
try {
<% for (var i = 0; i < miniConfig.MiniappIdList.length; ++i) { %>
<%- `await TBAPIS.configMiniApp(context, {appId: ${+miniConfig.MiniappIdList[i]},version:'0.0.1'})` %>
<% } %>
} catch (error) {
console.log(error)
}
<%}%>
return resultsModel.success(true)
} else {
console.log(result, '保存活动失败')
return resultsModel.error(CODE_TYPES.SYSTEM_ERROR, '保存活动失败')
}
} else {
console.log(result, '保存活动失败')
return resultsModel.error(CODE_TYPES.SYSTEM_ERROR, '保存活动失败')
}
}
}
}
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