mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-06 03:57:50 +08:00
二维码
This commit is contained in:
parent
026e1a0767
commit
1b8ac74fe5
@ -113,15 +113,21 @@ export default {
|
||||
},
|
||||
|
||||
// 获取门禁二维码值
|
||||
async doorAccessKey () {
|
||||
doorAccessKey () {
|
||||
this.qrTitle = '小蚁货仓入场券'
|
||||
this.qrTips = '<p>凭入场券二维码入场</p>'
|
||||
// 如果不存在入场券
|
||||
if (!this.accesskey) {
|
||||
const { data } = await getDoorKey()
|
||||
this.accesskey = data.doorKey
|
||||
// 请求入场券
|
||||
getDoorKey().then(res => {
|
||||
this.accesskey = res.data.doorKey
|
||||
this.qrSrc = this.accesskey
|
||||
this.qrcodeVisible = true
|
||||
}).catch(() => { })
|
||||
} else {
|
||||
this.qrSrc = this.accesskey
|
||||
this.qrcodeVisible = true
|
||||
}
|
||||
this.qrSrc = this.accesskey
|
||||
this.qrcodeVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user