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}`)