保存商户信息
This commit is contained in:
@@ -115,6 +115,14 @@ export default {
|
|||||||
// this.getCookie()
|
// this.getCookie()
|
||||||
// // token 过期提示
|
// // token 过期提示
|
||||||
// this.point()
|
// this.point()
|
||||||
|
|
||||||
|
let getinfo = localStorage.getItem('MerchantId')
|
||||||
|
let info = JSON.parse(getinfo)
|
||||||
|
if (info.merchantName) {
|
||||||
|
this.loginForm.merchantName = info.merchantName
|
||||||
|
this.loginForm.username = info.username
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
getCode() {
|
||||||
@@ -170,6 +178,14 @@ export default {
|
|||||||
user.password = encrypt(user.password)
|
user.password = encrypt(user.password)
|
||||||
this.$store.dispatch('Login', user).then(() => {
|
this.$store.dispatch('Login', user).then(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
// 保存商户号
|
||||||
|
|
||||||
|
localStorage.setItem('MerchantId', JSON.stringify({
|
||||||
|
merchantName: this.loginForm.merchantName,
|
||||||
|
username: this.loginForm.username,
|
||||||
|
}))
|
||||||
|
|
||||||
|
|
||||||
// this.$router.push({ path: this.redirect || '/' })
|
// this.$router.push({ path: this.redirect || '/' })
|
||||||
window.location.href = './'
|
window.location.href = './'
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user