增加web端产品库模块,并增加埋点

This commit is contained in:
aixianling
2022-05-27 15:13:14 +08:00
parent a134902bd6
commit aaf7631ef3
2 changed files with 75 additions and 1 deletions

View File

@@ -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()
})
}
}