乡村相册 考勤配置
This commit is contained in:
@@ -5,7 +5,7 @@ const getFileInfo = (app, file) => {
|
||||
let vue = fs.readFileSync(file).toString()
|
||||
if (/appName/.test(vue)) {
|
||||
let appName = vue.replace(/[\s\S]*(appName:.+),[\s\S]*/gm, '$1')
|
||||
app.label = appName.replace(/(appName:|["'])/g, '')?.trim()
|
||||
app.label = appName.replace(/(appName:|["'])/g, '').trim()
|
||||
if (/customNavigation/.test(vue)) {
|
||||
app.style = {navigationStyle: "custom"}
|
||||
} else
|
||||
@@ -14,13 +14,13 @@ const getFileInfo = (app, file) => {
|
||||
if (/^App/.test(app.name)) {
|
||||
let {name, label} = app,
|
||||
path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/apps/$1/$2`)
|
||||
apps.list.push({id: name, name, label, path, libPath: file?.replace(/\\/g, '/')?.replace(/^src(\/.+)\.vue/, '$1'), type: 'wxwork'})
|
||||
apps.list.push({id: name, name, label, path, libPath: file.replace(/\\/g, '/').replace(/^src(\/.+)\.vue/, '$1'), type: 'wxwork'})
|
||||
}
|
||||
}
|
||||
const saveApps = app => {
|
||||
if (app.list.length > 0) {
|
||||
axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app).then(res => {
|
||||
if (res?.code == 0) chalkTag.done("产品库目录已同步至后台数据库...")
|
||||
if (res.code == 0) chalkTag.done("产品库目录已同步至后台数据库...")
|
||||
}).catch(() => 0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user