diff --git a/src/rest/wechat/getZip.js b/src/rest/wechat/getZip.js index 3135eb9..8e04a5c 100644 --- a/src/rest/wechat/getZip.js +++ b/src/rest/wechat/getZip.js @@ -17,7 +17,7 @@ module.exports = { db.query(sql).then(() => setTimeout(() => { response.send({code: 0}) }, 2000)) - execute(`cd /root/node-service/dvcp_v2_wechat&&npm run apps&&node bin/pages.js ${id}&&npm run build`) + execute(`cd ${info.projectPath || '/root/node-service/dvcp_v2_wechat'}&&npm run apps&&node bin/pages.js ${id}&&npm run build`) .then(() => fse.emptyDir(`../wxmpZips/${id}/`)) .then(() => fse.copy('../dvcp_v2_wechat/dist/build/mp-weixin/', `../wxmpZips/${id}/`)) .then(() => fse.emptyDir('../dvcp_v2_wechat/dist/build'))