Commit 3a2fbdb8 authored by 罗超's avatar 罗超

2

parent bf61121c
...@@ -75,9 +75,9 @@ ...@@ -75,9 +75,9 @@
</view> </view>
<u-popup v-model="isShowQrcode" mode="center" @close="closeQrcode"> <u-popup v-model="isShowQrcode" mode="center" @close="closeQrcode">
<view style="margin: 60rpx;" class="qrcodeBox"> <view class="qrcodeBox">
<Qrcode ref="qrcode" :modal="modal_qr" :url="qrData" @hideQrcode="hideQrcode" :width="300" :height="300" <Qrcode ref="qrcode" :modal="modal_qr" :url="qrData" @hideQrcode="hideQrcode"
themeColor="#000000" is_themeImg :h_w_img="80" :themeImg="headImg" /> themeColor="#000000" is_themeImg :themeImg="headImg" />
</view> </view>
</u-popup> </u-popup>
<u-popup v-model="isShowSuccess" :maskCloseAble="false" mode="center" @close="closePopup"> <u-popup v-model="isShowSuccess" :maskCloseAble="false" mode="center" @close="closePopup">
...@@ -147,13 +147,13 @@ ...@@ -147,13 +147,13 @@
} }
return res return res
}, },
async showPopup() { showPopup() {
this.timestamp = new Date().getTime() this.timestamp = new Date().getTime()
this.qrData = encodeURIComponent(JSON.stringify({ this.qrData = encodeURIComponent(JSON.stringify({
UserId: this.UserId, UserId: this.UserId,
timestamp: this.timestamp timestamp: this.timestamp
})) }))
await this.showQrcode() //生成二维码 this.showQrcode() //生成二维码
this.isShowQrcode = true this.isShowQrcode = true
setTimeout(() => { setTimeout(() => {
this.flag=true this.flag=true
...@@ -166,12 +166,11 @@ ...@@ -166,12 +166,11 @@
// 展示二维码 // 展示二维码
showQrcode() { showQrcode() {
let _this = this; let _this = this;
setTimeout(async ()=> {
this.modal_qr = true; this.modal_qr = true;
setTimeout(function() { await _this.$refs.qrcode.crtQrCode()
_this.$refs.qrcode.crtQrCode()
}, 50) }, 50)
}, },
//传入组件的方法 //传入组件的方法
hideQrcode() { hideQrcode() {
this.modal_qr = false; this.modal_qr = false;
...@@ -216,6 +215,7 @@ ...@@ -216,6 +215,7 @@
this.isShowSuccess = false this.isShowSuccess = false
}, },
closeQrcode(){ closeQrcode(){
this.modal_qr=false
this.flag=false this.flag=false
clearTimeout(this.timer) clearTimeout(this.timer)
} }
...@@ -454,10 +454,16 @@ ...@@ -454,10 +454,16 @@
justify-content: center; justify-content: center;
} }
.qrcodeBox{ .qrcodeBox{
height: 320px; width: 220px;
height: 220px;
border:1px solid #000000; border:1px solid #000000;
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
background-color: #fff; background-color: #fff;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
z-index: 5;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment