定制方案全新升级
This commit is contained in:
@@ -6,7 +6,7 @@ module.exports = {
|
|||||||
let {appid, privateKey, projectPath, version, miniapp_appid, id: pid, npmScript} = request.body,
|
let {appid, privateKey, projectPath, version, miniapp_appid, id: pid, npmScript} = request.body,
|
||||||
form = {appid, privateKey, projectPath, version, pid, npmScript}, sql
|
form = {appid, privateKey, projectPath, version, pid, npmScript}, sql
|
||||||
if (form.appid) {//编辑
|
if (form.appid) {//编辑
|
||||||
let arr = Object.keys(form).filter(e => form[e]).map(e => `${e}='${form[e]}'`)
|
let arr = Object.keys(form).filter(e => form[e] != undefined).map(e => `${e}='${form[e]}'`)
|
||||||
sql = `update node_wxmp_config set ${arr.join(",")} where appid='${form.appid}' and pid='${pid}'`
|
sql = `update node_wxmp_config set ${arr.join(",")} where appid='${form.appid}' and pid='${pid}'`
|
||||||
} else {//新增
|
} else {//新增
|
||||||
let cols = [], arr = []
|
let cols = [], arr = []
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ module.exports = {
|
|||||||
db.query(sql).then(() => setTimeout(() => {
|
db.query(sql).then(() => setTimeout(() => {
|
||||||
response.send({code: 0})
|
response.send({code: 0})
|
||||||
}, 2000))
|
}, 2000))
|
||||||
console.log(isDev)
|
|
||||||
const path = info.projectPath || (isDev ? 'E:\\code\\cunwei\\dvcp_v2_wechat' : '/home/deploy/node-service/dvcp_v2_wxmp'),
|
const path = info.projectPath || (isDev ? 'E:\\code\\cunwei\\dvcp_v2_wechat' : '/home/deploy/node-service/dvcp_v2_wxmp'),
|
||||||
dest = (isDev ? `E:\\wxmpZips\\${uid}` : `/home/deploy/wxmpZips/${uid}/`),
|
dest = (isDev ? `E:\\wxmpZips\\${uid}` : `/home/deploy/wxmpZips/${uid}/`),
|
||||||
processEnv = info.npmScript || 'build',
|
processEnv = info.npmScript || 'build',
|
||||||
|
|||||||
Reference in New Issue
Block a user