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