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