追加全局方法跳转使其能在同一页面跳转不受影响

This commit is contained in:
aixianling
2021-11-17 18:01:56 +08:00
parent 455ae34b2a
commit 264cd70161

View File

@@ -8,7 +8,6 @@ export default {
}
},
onLaunch: function () {
this.initConfig()
},
onShow: function () {
this.initWaterMarker()
@@ -21,17 +20,10 @@ export default {
},
methods: {
...mapMutations(['initWaterMarker', 'logout', 'getConfig']),
initDev() {
let baseURL = 'http://192.168.1.87:9000'
this.getConfig({baseURL})
},
initConfig() {
if (process.env.NODE_ENV == 'development') this.initDev()
else {
let baseURL = location.origin
this.getConfig({baseURL})
}
},
goto(params) {
let {path} = this.$route
this.$router.push({path, ...params})
}
},
}
</script>