From 00cc2d9e4f09941f474e8ff465d2903dcd828ed0 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 30 Jun 2022 14:08:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B8=E5=90=8Cappid?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E7=89=88=E6=9C=AC=E6=95=B0=E6=8D=AE=E6=B7=B7?= =?UTF-8?q?=E6=B7=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rest/wechat/detail.js | 4 ++-- src/rest/wechat/getZip.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rest/wechat/detail.js b/src/rest/wechat/detail.js index 0feacf0..e04803b 100644 --- a/src/rest/wechat/detail.js +++ b/src/rest/wechat/detail.js @@ -3,8 +3,8 @@ module.exports = { action: "/node/wxmp/detail", method: "post", execute: (request, response) => { - let {appid} = request.query - dbUtils.query(`select * from node_dvcp_config where appid='${appid}' limit 0,1`).then(res => { + let {appid, pid} = request.query + dbUtils.query(`select * from node_dvcp_config where appid='${appid}' and pid='${pid}' limit 0,1`).then(res => { response.send({ code: 0, data: res?.[0] diff --git a/src/rest/wechat/getZip.js b/src/rest/wechat/getZip.js index ac95168..8ac67a6 100644 --- a/src/rest/wechat/getZip.js +++ b/src/rest/wechat/getZip.js @@ -6,7 +6,7 @@ module.exports = { action: "/node/wxmp/getZip", method: "post", execute: (request, response) => { - let {appid, id} = request.query, uniCon = `appid='${appid}' and pid='${id}'`,uid= [appid, id].join("_") + let {appid, id} = request.query, uniCon = `appid='${appid}' and pid='${id}'`, uid = [appid, id].join("_") db.query(`select * from node_dvcp_config where id='${id}'`).then(res => { let info = res?.[0], sql if (info?.appid && info?.pid) { @@ -19,7 +19,7 @@ module.exports = { }, 2000)) const path = info.projectPath || '/home/deploy/node-service/dvcp_v2_wechat', dest = `/home/deploy/wxmpZips/${uid}/` - execute(`cd ${path}&&npm run apps&&node bin/pages.js ${appid}&&npm run build`) + execute(`cd ${path}&&npm run apps&&node bin/pages.js ${appid} ${id}&&npm run build`) .then(() => fse.emptyDir(dest)) .then(() => fse.copy(`${path}/dist/build/mp-weixin/`, dest)) .then(() => fse.emptyDir(`${path}/dist/build`))