mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-22 03:36:44 +08:00
增加loading
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { NoticeBar, Field, Radio, Popup, RadioGroup } from 'vant'
|
||||
import { NoticeBar, Field, Radio, Popup, RadioGroup, Toast } from 'vant'
|
||||
import icon from '@/assets/images/jilu@3x.png'
|
||||
import { getShopList, saveShareTrack } from '@/api/ebiz/product-store/product-store'
|
||||
|
||||
@@ -130,7 +130,11 @@ export default {
|
||||
if (this.$route.query.sectionName) {
|
||||
this.sectionName = this.$route.query.sectionName
|
||||
}
|
||||
document.title = `${this.sectionName}简介`
|
||||
if (this.sectionName !== '一站购齐') {
|
||||
document.title = `${this.sectionName}简介`
|
||||
} else {
|
||||
document.title = this.sectionName
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
if (this.isWeixin) {
|
||||
@@ -162,7 +166,25 @@ export default {
|
||||
if (!res) return
|
||||
if (res.result == '0') {
|
||||
if (res.content.redirect) {
|
||||
this.redirectUrl = res.content.linkUrl
|
||||
const toast = Toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true,
|
||||
icon: 'info-o',
|
||||
message: '3秒后将跳转第三方平台'
|
||||
})
|
||||
|
||||
let second = 3
|
||||
const timer = setInterval(() => {
|
||||
second--
|
||||
if (second) {
|
||||
toast.message = `${second}秒后将跳转第三方平台`
|
||||
} else {
|
||||
clearInterval(timer)
|
||||
// 手动清除 Toast
|
||||
Toast.clear()
|
||||
this.redirectUrl = res.content.linkUrl
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
if (res.content.rightBtnShow && !this.isWeixin) {
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
Reference in New Issue
Block a user