Browse Source

海报

feature/feature-compatible
fengchengzhi 7 years ago
parent
commit
d78e9e26e3
1 changed files with 15 additions and 2 deletions
  1. 17
      src/view/poster.vue

17
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");

Loading…
Cancel
Save