优化打包服务

This commit is contained in:
aixianling
2022-05-27 18:10:45 +08:00
parent 785157a65a
commit dd329d6e60

View File

@@ -19,8 +19,8 @@ module.exports = {
}, 2000))
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'))
.then(() => fse.copy(`${info.projectPath || '/root/node-service/dvcp_v2_wechat'}/dist/build/mp-weixin/`, `../wxmpZips/${id}/`))
.then(() => fse.emptyDir(`${info.projectPath || '/root/node-service/dvcp_v2_wechat'}/dist/build`))
.then(() => {
db.query(`update node_wxmp_config set error='打包时间:${dayjs().format("YYYY-MM-DD HH:mm:ss")}' where appid='${info.appid}'`)
}).catch(err => {