From 5e16f0ca9f6695ae242da18c3efe8531344f625c Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 30 Jun 2022 15:53:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8C=87=E5=AE=9Anpm?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rest/wechat/getZip.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rest/wechat/getZip.js b/src/rest/wechat/getZip.js index 7c866d0..9c49dbc 100644 --- a/src/rest/wechat/getZip.js +++ b/src/rest/wechat/getZip.js @@ -18,10 +18,10 @@ module.exports = { response.send({code: 0}) }, 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} ${id}&&npm run ${info.npmScript || 'build'}`) + dest = `/home/deploy/wxmpZips/${uid}/`, processEnv = info.npmScript || 'build' + execute(`cd ${path}&&npm run apps&&node bin/pages.js ${appid} ${id}&&npm run ${processEnv}`) .then(() => fse.emptyDir(dest)) - .then(() => fse.copy(`${path}/dist/build/mp-weixin/`, dest)) + .then(() => fse.copy(`${path}/dist/${processEnv}/mp-weixin/`, dest)) .then(() => fse.emptyDir(`${path}/dist/build`)) .then(() => { db.query(`update node_wxmp_config set error='ζ‰“εŒ…ζ—Άι—΄:${dayjs().format("YYYY-MM-DD HH:mm:ss")}' where ${uniCon}`)