feat(DefaultSharePage): loading add mask
This commit is contained in:
parent
661665f2a4
commit
c030eded16
|
@ -100,15 +100,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async sharePage() {
|
async sharePage() {
|
||||||
if (!this.qrCodeImage) {
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
uni.showToast({
|
|
||||||
title: '二维码尚未生成',
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
uni.showLoading({ title: '加载中...' })
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.shareButtonShow = false
|
this.shareButtonShow = false
|
||||||
|
@ -116,8 +108,6 @@ export default {
|
||||||
|
|
||||||
await this.capturePageWithHtml2Canvas()
|
await this.capturePageWithHtml2Canvas()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.hideLoading()
|
|
||||||
uni.showToast({ title: '图片生成失败,请稍后重试', icon: 'none' })
|
|
||||||
console.error('sharePage error:', error)
|
console.error('sharePage error:', error)
|
||||||
} finally {
|
} finally {
|
||||||
// 恢复按钮显示
|
// 恢复按钮显示
|
||||||
|
|
Loading…
Reference in New Issue