支持离线模式
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,3 +24,4 @@ yarn-error.log*
|
||||
/package-lock.json
|
||||
/.hbuilderx/launch.json
|
||||
/src/pages.json
|
||||
/src/config.json
|
||||
|
||||
@@ -28,7 +28,7 @@ const saveApps = app => {
|
||||
if (app.list.length > 0) {
|
||||
axios.post("http://dvcp.sinoecare.net/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => {
|
||||
if (res.data.code == 0) chalkTag.done("产品库目录已同步至后台数据库...")
|
||||
}).catch(err => 0)
|
||||
}).catch(err => 0).finally(() => fsExtra.outputJson('src/config.json', {apps: app.list}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script>
|
||||
import {mapMutations, mapState} from 'vuex'
|
||||
import config from "./config.json";
|
||||
|
||||
export default {
|
||||
provide() {
|
||||
@@ -53,7 +54,7 @@ export default {
|
||||
document.body.appendChild(btn)
|
||||
},
|
||||
getApps() {
|
||||
this.setApps([])
|
||||
this.setApps(config.apps)
|
||||
this.$http.post("/node/wechatapps/list", null, {
|
||||
withoutToken: true,
|
||||
params: {size: 999, type: 'wxwork'}
|
||||
|
||||
Reference in New Issue
Block a user