保存商户信息

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

@ -36,7 +36,7 @@
<div style="margin-left: 80px;color: #FF4D4F;">* 可在打印机设备底部查看打印机编号和秘钥(key)</div>
</el-form-item>
</template> -->
<el-form-item label="小票尺寸">
<el-radio-group v-model="forms.receiptSize">
<el-radio label="58mm"></el-radio>

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(() => {