diff --git a/src/view/poster.vue b/src/view/poster.vue index 3368539..993c750 100644 --- a/src/view/poster.vue +++ b/src/view/poster.vue @@ -29,7 +29,7 @@ import homeApi from "../models/home-model.js"; import posterApi from "../models/poster-model.js"; // import Swiper from 'swiper'; - import { Alert, Toast,Popup,Picker } from "vux"; + import { Alert, Toast,Popup,Picker,Loading } from "vux"; export default { data() { return { @@ -49,7 +49,8 @@ components: { Toast, Popup, - Picker + Picker, + Loading }, watch: { @@ -105,9 +106,15 @@ location.href = this.authorizeSrc return; } + this.$vux.loading.show({ + text: 'Loading' + }) var merchantNo = this.merchantNo posterApi.createPoster(merchantNo).then(res => { if ( res.code == 0 ){ + setTimeout(()=>{ + this.$vux.loading.hide() + },500) this.imgSrc = res.response } else { this.$vux.toast.text(res.msg,"middle"); @@ -155,8 +162,14 @@ return; } var no = this.no + this.$vux.loading.show({ + text: 'Loading' + }) posterApi.createPoster2({"couponNo":no}).then(res => { if ( res.code == 0 ){ + setTimeout(()=>{ + this.$vux.loading.hide() + },500) this.imgSrc = res.response } else { this.$vux.toast.text(res.msg,"middle");