From 1bcd971658b9a797901afcfd40299e1567f4aa5a Mon Sep 17 00:00:00 2001 From: mengxiaolong Date: Fri, 25 Sep 2020 13:31:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/product-store/StoreDetail.vue | 73 ++++++++++---------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/src/views/ebiz/product-store/StoreDetail.vue b/src/views/ebiz/product-store/StoreDetail.vue index 5dad26111..2417f9914 100644 --- a/src/views/ebiz/product-store/StoreDetail.vue +++ b/src/views/ebiz/product-store/StoreDetail.vue @@ -168,46 +168,47 @@ export default { if (res.result == '0') { if (res.content.redirect) { this.redirectUrl = res.content.linkUrl - } - let thirdName = res.content.tip - const toast = Toast.loading({ - duration: 0, // 持续展示 toast - forbidClick: true, - icon: 'info-o', - message: `3s后将为您跳转至${thirdName}` - }) - let second = 3 - let timer = setInterval(() => { - second-- - if (second) { - toast.message = `${second}s后将为您跳转至${thirdName}` - } else { - if (res.content.redirect) { - this.thirdUrlReady = true + let thirdName = res.content.tip + const toast = Toast.loading({ + duration: 0, // 持续展示 toast + forbidClick: true, + icon: 'info-o', + message: `3s后将为您跳转至${thirdName}` + }) + + let second = 3 + let timer = setInterval(() => { + second-- + if (second) { + toast.message = `${second}s后将为您跳转至${thirdName}` } else { - if (res.content.rightBtnShow && !this.isWeixin) { - // eslint-disable-next-line no-undef - window.EWebBridge.webCallAppInJs('webview_right_button', { - btns: [ - { - img: icon, - route: { flag: '', extra: {} } - } - ] - }) - window['appCallBack'] = this.appCallBack + if (res.content.redirect) { + this.thirdUrlReady = true } - this.detailImg = res.content.detailImgUrl - this.bottomBtnShow = res.content.bottomBtnShow - this.detail = res.content - this.pdfUrl = this.$assetsUrl + res.content.pdfUrl - this.isCanCheck2 = true + clearInterval(timer) + // 手动清除 Toast + toast.clear() } - clearInterval(timer) - // 手动清除 Toast - toast.clear() + }, 1000) + } else { + if (res.content.rightBtnShow && !this.isWeixin) { + // eslint-disable-next-line no-undef + window.EWebBridge.webCallAppInJs('webview_right_button', { + btns: [ + { + img: icon, + route: { flag: '', extra: {} } + } + ] + }) + window['appCallBack'] = this.appCallBack } - }, 1000) + this.detailImg = res.content.detailImgUrl + this.bottomBtnShow = res.content.bottomBtnShow + this.detail = res.content + this.pdfUrl = this.$assetsUrl + res.content.pdfUrl + this.isCanCheck2 = true + } this.loaded = true } else { this.$toast(res.resultMessage)