mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-25 07:12:53 +08:00
[NEW] 测试投保支付页面微信分享页面loading
This commit is contained in:
39
src/components/ebiz/LoadingOpcity.vue
Normal file
39
src/components/ebiz/LoadingOpcity.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="loading-container">
|
||||
<van-overlay :show="isLoading" z-index="999">
|
||||
<!-- <div class="flex align-items-c justify-content-c wrapper">
|
||||
<img :src="src" width="80" height="80" />
|
||||
</div> -->
|
||||
<van-loading type="spinner" color="#E9332E" />
|
||||
</van-overlay>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Overlay, Loading } from 'vant'
|
||||
export default {
|
||||
name: 'LoadingOpcity',
|
||||
props: {
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// src: this.$assetsUrl + '/images/loading.gif'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[Overlay.name]: Overlay,
|
||||
[Loading.name]: Loading
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -83,12 +83,15 @@
|
||||
>
|
||||
<van-button type="danger" style="width: 50vw" @click="share" v-no-more-click="1000">分享</van-button>
|
||||
</div>
|
||||
<!-- 分享到微信的页面loading -->
|
||||
<LoadingOpcity :isLoading="isLoading"></LoadingOpcity>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Cell, CellGroup, RadioGroup, Radio, Dialog } from 'vant'
|
||||
import { acceptInsurance } from '@/api/ebiz/sale/sale'
|
||||
import { underWrite, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||
import LoadingOpcity from '@/components/ebiz/LoadingOpcity'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
@@ -162,12 +165,14 @@ export default {
|
||||
PSBC: '7008',
|
||||
CIB: '309'
|
||||
},
|
||||
isWeixin // 是否为微信环境
|
||||
isWeixin, // 是否为微信环境
|
||||
isLoading: false // 分享到微信后的页面loading
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.isWeixin) {
|
||||
this.radio = '3'
|
||||
this.isLoading = true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -247,8 +252,15 @@ export default {
|
||||
|
||||
window.localStorage.setItem('payStatus', res.payStatus)
|
||||
window.localStorage.setItem('payInfo', JSON.stringify(res))
|
||||
if (!this.isWeixin) {
|
||||
this.isLoading = false
|
||||
}
|
||||
} else {
|
||||
that.$toast.clear()
|
||||
if (!this.isWeixin) {
|
||||
that.$toast.clear()
|
||||
} else {
|
||||
this.isLoading = false
|
||||
}
|
||||
that.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
@@ -373,7 +385,8 @@ export default {
|
||||
[CellGroup.name]: CellGroup,
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio,
|
||||
[Dialog.name]: Dialog
|
||||
[Dialog.name]: Dialog,
|
||||
[LoadingOpcity.name]: LoadingOpcity
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
|
||||
Reference in New Issue
Block a user