增加同一个小程序不同项目的兼容
This commit is contained in:
@@ -3,11 +3,11 @@ module.exports = {
|
||||
action: "/node/wxmp/addOrUpdate",
|
||||
method: "post",
|
||||
execute: (request, response) => {
|
||||
let {appid, privateKey, projectPath, version, miniapp_appid} = request.body,
|
||||
form = {appid, privateKey, projectPath, version}, sql
|
||||
let {appid, privateKey, projectPath, version, miniapp_appid, id: pid} = request.body,
|
||||
form = {appid, privateKey, projectPath, version, pid}, sql
|
||||
if (form.appid) {//编辑
|
||||
let arr = Object.keys(form).filter(e => form[e]).map(e => `${e}='${form[e]}'`)
|
||||
sql = `update node_wxmp_config set ${arr.join(",")} where appid='${form.appid}'`
|
||||
sql = `update node_wxmp_config set ${arr.join(",")} where appid='${form.appid}' and pid='${pid}'`
|
||||
} else {//新增
|
||||
let cols = [], arr = []
|
||||
form.appid = miniapp_appid
|
||||
|
||||
Reference in New Issue
Block a user