保存商户信息

This commit is contained in:
duan 2024-10-21 17:17:39 +08:00
parent f442efd357
commit 998874db87
2 changed files with 17 additions and 1 deletions

View File

@ -115,6 +115,14 @@ export default {
// this.getCookie()
// // token
// 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: {
getCode() {
@ -170,6 +178,14 @@ export default {
user.password = encrypt(user.password)
this.$store.dispatch('Login', user).then(() => {
this.loading = false
//
localStorage.setItem('MerchantId', JSON.stringify({
merchantName: this.loginForm.merchantName,
username: this.loginForm.username,
}))
// this.$router.push({ path: this.redirect || '/' })
window.location.href = './'
}).catch(() => {