diff --git a/src/views/ebiz/product-store/StoreDetail.vue b/src/views/ebiz/product-store/StoreDetail.vue
index 190fb0fe6..5dad26111 100644
--- a/src/views/ebiz/product-store/StoreDetail.vue
+++ b/src/views/ebiz/product-store/StoreDetail.vue
@@ -48,7 +48,7 @@
-
+
@@ -123,7 +123,8 @@ export default {
loaded: false,
detailImg: '',
bottomBtnShow: false,
- redirectUrl: ''
+ redirectUrl: '',
+ thirdUrlReady: false
}
},
created() {
@@ -165,38 +166,48 @@ export default {
const res = await getShopList(data)
if (!res) return
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: `即将为您跳转至${thirdName}`
+ message: `3s后将为您跳转至${thirdName}`
})
- setTimeout(() => {
- // 手动清除 Toast
- toast.clear()
- if (res.content.redirect) {
- this.redirectUrl = res.content.linkUrl
+ 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
+ } 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
+ clearInterval(timer)
+ // 手动清除 Toast
+ toast.clear()
}
- }, 3000)
+ }, 1000)
this.loaded = true
} else {
this.$toast(res.resultMessage)