地区组件改造完成

This commit is contained in:
aixianling
2021-12-29 11:50:04 +08:00
parent 55781c471a
commit 0a06a076d6
3 changed files with 157 additions and 59 deletions

View File

@@ -33,7 +33,18 @@ const app = new Vue({
...App
});
store.dispatch("agentSign").then(config => {
store.commit("getConfig", {...config, latlng: [config.lat, config.lng]})
app.$mount();
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()
})