vuex模块化 登录,oauth,agentSign模块
This commit is contained in:
21
src/main.js
21
src/main.js
@@ -34,20 +34,9 @@ const app = new Vue({
|
||||
store,
|
||||
...App
|
||||
});
|
||||
app.$mount();
|
||||
store.dispatch("agentSign").then(config => {
|
||||
const init = (c = 0) => {
|
||||
if (config) {
|
||||
store.commit("getConfig", {...config, latlng: [config.lat, config.lng]})
|
||||
// app.$mount();
|
||||
} else {
|
||||
if (c < 5) {
|
||||
setTimeout(() => {
|
||||
init(++c)
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
}
|
||||
init()
|
||||
})
|
||||
let params = {}
|
||||
if (sessionStorage.getItem("prj")?.indexOf("saas") > -1) {
|
||||
params = {action: "/app/wxcptp/portal/agentSign", corpId: "ww596787bb70f08288"}
|
||||
}
|
||||
store.dispatch("agentSign", params).finally(() => app.$mount())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user