From aaf7631ef3f6bb8e3bd8ebbad4b3bf8371f0f318 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 27 May 2022 15:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0web=E7=AB=AF=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E5=BA=93=E6=A8=A1=E5=9D=97,=E5=B9=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/router/autoRoutes.js | 10 +++- project/oms/apps/AppWebApps/AppWebApps.vue | 66 ++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 project/oms/apps/AppWebApps/AppWebApps.vue diff --git a/examples/router/autoRoutes.js b/examples/router/autoRoutes.js index 21e52671..62d78d0e 100644 --- a/examples/router/autoRoutes.js +++ b/examples/router/autoRoutes.js @@ -2,6 +2,7 @@ import store from "../store"; import {waiting} from "../utils"; import appEntry from "../views/apps/appEntry"; import router from "./router"; +import axios from "./axios"; export default { routes: () => store.state.apps, @@ -29,6 +30,13 @@ export default { //命名规范入口文件必须以App开头 return store.commit("addApp", addApp) } else return 0 - }))).then(() => waiting.close()) + }))).then(() => { + axios.post("/node/wechatapps/addOrUpdate", { + list: this.routes().map(({path: libPath, label, module: {name}, name: id}) => ({ + id, type: 'web', libPath, label, name + })) + }, {baseURL: "/ns"}).catch(() => 0) + waiting.close() + }) } } diff --git a/project/oms/apps/AppWebApps/AppWebApps.vue b/project/oms/apps/AppWebApps/AppWebApps.vue new file mode 100644 index 00000000..21dce3ed --- /dev/null +++ b/project/oms/apps/AppWebApps/AppWebApps.vue @@ -0,0 +1,66 @@ + + + + +