触发点改为提交之后
This commit is contained in:
@@ -2,7 +2,6 @@ import store from "../store";
|
|||||||
import {waiting} from "../utils";
|
import {waiting} from "../utils";
|
||||||
import appEntry from "../views/appEntry";
|
import appEntry from "../views/appEntry";
|
||||||
import router from "./router";
|
import router from "./router";
|
||||||
import axios from "./axios";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
routes: () => store.state.apps,
|
routes: () => store.state.apps,
|
||||||
@@ -36,14 +35,6 @@ export default {
|
|||||||
Promise.all([
|
Promise.all([
|
||||||
promise(apps, "packages"),
|
promise(apps, "packages"),
|
||||||
promise(projects, "project")
|
promise(projects, "project")
|
||||||
]).then(() => {
|
]).finally(() => waiting.close())
|
||||||
axios.post("/node/wechatapps/addOrUpdate", {
|
|
||||||
type: "web",
|
|
||||||
list: this.routes().map(({path: libPath, label, module: {name}, name: id}) => ({
|
|
||||||
id, type: 'web', libPath, label, name
|
|
||||||
}))
|
|
||||||
}, {baseURL: "/ns"}).catch(() => 0)
|
|
||||||
waiting.close()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user