验证码路径调整

This commit is contained in:
gooking 2018-05-17 08:23:30 +08:00
parent 1b442d7e8a
commit b2cec26840
4 changed files with 6 additions and 6 deletions

View File

@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
BASE_API: '"http://127.0.0.1:8082"', BASE_API: '"http://user.api.it120.cc"',
}) })

View File

@ -80,7 +80,8 @@ export default {
} }
}, },
mounted() { mounted() {
this.changeRandom(); this.changeRandom()
console.log('1233', process.env.BASE_API)
}, },
methods: { methods: {
showPwd() { showPwd() {
@ -162,8 +163,7 @@ export default {
}, },
changeRandom() { changeRandom() {
this.loginForm.picKey = Math.random(); this.loginForm.picKey = Math.random();
// (document.getElementsByClassName('random'))[0].setAttribute('src', 'http://127.0.0.1:8082/code?k=' + this.loginForm.picKey) (document.getElementsByClassName('random'))[0].setAttribute('src', process.env.BASE_API + '/code?k=' + this.loginForm.picKey)
(document.getElementsByClassName('random'))[0].setAttribute('src', 'http://user.api.it120.cc/code?k=' + this.loginForm.picKey)
} }
} }
} }

View File

@ -197,7 +197,7 @@ export default {
}, },
changeRandom() { changeRandom() {
this.loginForm.picKey = Math.random(); this.loginForm.picKey = Math.random();
(document.getElementsByClassName('random'))[0].setAttribute('src', 'http://user.api.it120.cc/code?k=' + this.loginForm.picKey) (document.getElementsByClassName('random'))[0].setAttribute('src', process.env.BASE_API + '/code?k=' + this.loginForm.picKey)
} }
} }
} }

View File

@ -184,7 +184,7 @@ export default {
}, },
changeRandom() { changeRandom() {
this.loginForm.picKey = Math.random(); this.loginForm.picKey = Math.random();
(document.getElementsByClassName('random'))[0].setAttribute('src', 'http://user.api.it120.cc/code?k=' + this.loginForm.picKey) (document.getElementsByClassName('random'))[0].setAttribute('src', process.env.BASE_API + '/code?k=' + this.loginForm.picKey)
} }
} }
} }