[NEW] 将vantLoading组件改为自定义gif动图

This commit is contained in:
wangmingzhe
2020-04-26 11:35:19 +08:00
parent 3ff77f1942
commit cf80215549
2 changed files with 13 additions and 13 deletions

View File

@@ -2,14 +2,14 @@
<div class="loading-container">
<van-overlay :show="isLoading" z-index="999">
<div class="flex align-items-c justify-content-c wrapper">
<van-loading type="spinner" color="#E9332E" />
<img :src="src" width="80" height="80" />
</div>
</van-overlay>
</div>
</template>
<script>
import { Overlay, Loading } from 'vant'
import { Overlay } from 'vant'
export default {
name: 'Loading',
props: {
@@ -20,12 +20,11 @@ export default {
},
data() {
return {
// src: this.$assetsUrl + '/images/loading.gif'
src: this.$assetsUrl + 'images/loading.gif'
}
},
components: {
[Overlay.name]: Overlay,
[Loading.name]: Loading
[Overlay.name]: Overlay
}
}
</script>

View File

@@ -205,12 +205,14 @@ export default {
methods: {
// 点击支付
payMent() {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
if (!this.isWeixin) {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
}
let that = this
let data = {
orderNo: window.localStorage.getItem('orderNo'),
@@ -252,9 +254,8 @@ export default {
window.localStorage.setItem('payStatus', res.payStatus)
window.localStorage.setItem('payInfo', JSON.stringify(res))
if (!this.isWeixin) {
if (this.isWeixin) {
this.isLoading = false
console.log('隐藏')
}
} else {
if (!this.isWeixin) {