保存商户信息
This commit is contained in:
parent
f442efd357
commit
998874db87
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue