From d78e9e26e35216f9d3b9843686b85f0e5e71ab50 Mon Sep 17 00:00:00 2001 From: fengchengzhi Date: Fri, 14 Sep 2018 22:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=B7=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/poster.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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");