埋点调整
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| const {chalkTag, findPages, fs, fsExtra} = require("./tools"); | ||||
| const axios = require("axios"); | ||||
| let apps = {list: [], desc: "用于产品库主页面获取应用使用"} | ||||
| let apps = {list: [], desc: "用于产品库主页面获取应用使用", type: 'wxwork'} | ||||
| const getFileInfo = (app, file) => { | ||||
|   let vue = fs.readFileSync(file).toString() | ||||
|   if (/appName/.test(vue)) { | ||||
| @@ -11,7 +11,7 @@ const getFileInfo = (app, file) => { | ||||
|     } else | ||||
|       app.style = {navigationBarTitleText: app.label} | ||||
|   } | ||||
|   if (/^App/.test(app.name)) { | ||||
|   if (/^App/.test(app.name) && app.label) { | ||||
|     let {name, label} = app, | ||||
|         path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/apps/$1/$2`) | ||||
|     apps.list.push({ | ||||
| @@ -27,7 +27,7 @@ const getFileInfo = (app, file) => { | ||||
| const saveApps = app => { | ||||
|   if (app.list.length > 0) { | ||||
|     axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => { | ||||
|       if (res.code == 0) chalkTag.done("产品库目录已同步至后台数据库...") | ||||
|       if (res.data.code == 0) chalkTag.done("产品库目录已同步至后台数据库...") | ||||
|     }).catch(err => { | ||||
|       console.log(err) | ||||
|     }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user