修复路径问题

master
wayn 3 years ago
parent a8063c858a
commit 479fcb7263

@ -3,7 +3,7 @@ ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_PATH = '/mall'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().

@ -2,4 +2,5 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = '/mobile-api'
VUE_APP_BASE_API = '/mobile-api'
VUE_APP_BASE_PATH = '/mall'

@ -74,7 +74,7 @@ export default {
watch: {
$route: {
handler(route) {
this.redirect = (route.query && route.query.redirect) || '/'
this.redirect = (route.query && route.query.redirect) || process.env.VUE_APP_BASE_PATH
},
immediate: true
}
@ -92,6 +92,7 @@ export default {
//
onSubmit() {
this.loading = true
console.log(process.env.VUE_APP_BASE_PATH)
this.$store
.dispatch('user/login', this.form)
.then(() => {

Loading…
Cancel
Save