Browse Source

海报

feature/feature-compatible
fengchengzhi 7 years ago
parent
commit
351b4b9dc5
1 changed files with 10 additions and 14 deletions
  1. 24
      src/view/poster.vue

24
src/view/poster.vue

@ -9,7 +9,7 @@
<i class="text" @click="show = true" v-if=" defaultCity != '' ">{{defaultCity}}</i>
</div>
<div class="page-content">
<img class="poster-img" v-if="imgSrc != ''" :src="imgSrc + '?' + now">
<img class="poster-img" v-if="imgSrc != ''" :src="imgSrc">
<!--<img src="" v-if="imgSrc != ''" :src="imgSrc">
<img src="../assets/images/hill.png">-->
<button class="create-poster" @click="createImg()">重新生成海报</button>
@ -86,7 +86,7 @@
if ( res.data.imageUrl ){
this.imgSrc = ''
this.imgSrc = res.data.imageUrl
this.imgSrc = res.response + "?" + Date.now();
} else {
if ( res.data.hasOAuth == 0 ){
location.href = res.data.oauthUrl
@ -119,7 +119,7 @@
},500)
if ( res.code == 0 ){
this.imgSrc = ''
this.imgSrc = res.response
this.imgSrc = res.response + "?" + Date.now();
} else {
this.$vux.toast.text(res.msg,"middle");
if ( res.code == 666 ){
@ -140,7 +140,7 @@
if ( res.data.imageUrl ){
this.imgSrc = ''
this.imgSrc = res.data.imageUrl
this.imgSrc = res.data.imageUrl + "?" + Date.now();
} else {
if ( res.data.hasOAuth == 0 ){
location.href = res.data.oauthUrl
@ -161,10 +161,10 @@
})
},
createPoster2 (){
if ( !this.isAuthorize ){
location.href = this.authorizeSrc
return;
}
// if ( !this.isAuthorize ){
// location.href = this.authorizeSrc
// return;
// }
var no = this.no
this.showLoading = true
posterApi.createPoster2({"couponNo":no}).then(res => {
@ -173,7 +173,7 @@
},500)
if ( res.code == 0 ){
this.imgSrc = ''
this.imgSrc = res.response
this.imgSrc = res.response + "?" + Date.now();
} else {
this.$vux.toast.text(res.msg,"middle");
if ( res.code == 666 ){
@ -248,11 +248,7 @@
var coupon = this.getParam("no")
this.wxShare({"coupon":coupon,"source":1,"url":encodeURIComponent(location.href)})
}
},
//
now(){
return Date.now();
}
}
},
mounted() {
this.getNo()

Loading…
Cancel
Save