mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-05-04 17:16:46 +08:00
二维码
This commit is contained in:
parent
026e1a0767
commit
1b8ac74fe5
@ -113,15 +113,21 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 获取门禁二维码值
|
// 获取门禁二维码值
|
||||||
async doorAccessKey () {
|
doorAccessKey () {
|
||||||
this.qrTitle = '小蚁货仓入场券'
|
this.qrTitle = '小蚁货仓入场券'
|
||||||
this.qrTips = '<p>凭入场券二维码入场</p>'
|
this.qrTips = '<p>凭入场券二维码入场</p>'
|
||||||
|
// 如果不存在入场券
|
||||||
if (!this.accesskey) {
|
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