From e218ae19d35c17c7ae6580cae76abb71f5b8ffb5 Mon Sep 17 00:00:00 2001 From: mengxiaolong Date: Fri, 25 Sep 2020 11:31:09 +0800 Subject: [PATCH] =?UTF-8?q?vip=E4=B8=93=E5=8C=BA=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/product-store/StoreDetail.vue | 68 +++++++++----------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/src/views/ebiz/product-store/StoreDetail.vue b/src/views/ebiz/product-store/StoreDetail.vue index eaada9c02..190fb0fe6 100644 --- a/src/views/ebiz/product-store/StoreDetail.vue +++ b/src/views/ebiz/product-store/StoreDetail.vue @@ -165,46 +165,38 @@ export default { const res = await getShopList(data) if (!res) return if (res.result == '0') { - let thirdName = res.content.name - if (res.content.redirect) { - const toast = Toast.loading({ - duration: 0, // 持续展示 toast - forbidClick: true, - icon: 'info-o', - message: `3秒后将跳转至${thirdName}` - }) - - let second = 3 - const timer = setInterval(() => { - second-- - if (second) { - toast.message = `${second}秒后将跳转至${thirdName}` - } else { - clearInterval(timer) - // 手动清除 Toast - Toast.clear() - this.redirectUrl = res.content.linkUrl + let thirdName = res.content.tip + const toast = Toast.loading({ + duration: 0, // 持续展示 toast + forbidClick: true, + icon: 'info-o', + message: `即将为您跳转至${thirdName}` + }) + setTimeout(() => { + // 手动清除 Toast + toast.clear() + if (res.content.redirect) { + this.redirectUrl = res.content.linkUrl + } 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) - } 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 + 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.detailImg = res.content.detailImgUrl - this.bottomBtnShow = res.content.bottomBtnShow - this.detail = res.content - this.pdfUrl = this.$assetsUrl + res.content.pdfUrl - this.isCanCheck2 = true - } + }, 3000) this.loaded = true } else { this.$toast(res.resultMessage)