Browse Source

分享

feature/feature-compatible
fengchengzhi 7 years ago
parent
commit
71003e6d2a
1 changed files with 16 additions and 13 deletions
  1. 29
      src/view/poster.vue

29
src/view/poster.vue

@ -85,7 +85,6 @@
}
if ( res.data.imageUrl ){
this.imgSrc = ''
this.imgSrc = res.data.imageUrl + "?" + Date.now();
} else {
if ( res.data.hasOAuth == 0 ){
@ -161,10 +160,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 => {
@ -222,13 +221,13 @@
this.no = this.getParam("no")
this.sourceType = this.getParam("sourceType")
if ( this.sourceType == 2 ){
if ( this.sourceType == 2 ){ //
this.defaultCity = ''
this.getPoster2()
} else {
} else { //
this.getPoster()
}
this.shareWenXin()
},
//
createImg (){
@ -241,18 +240,22 @@
},
//
shareWenXin (){
var merchantNo = this.getParam("merchantNo")
if ( merchantNo ){
var coupon = this.getParam("no")
var sourceType = this.getParam("sourceType")
var merchantNo = this.getParam("merchantNo")
if ( sourceType == 2 ){ //
this.wxShare({"couponNo":coupon,"source":1,"url":encodeURIComponent(location.href)})
} else if( sourceType == 1) { //
this.wxShare({"merchantNo":merchantNo,"source":1,"url":encodeURIComponent(location.href)})
} else {
var coupon = this.getParam("no")
this.wxShare({"coupon":coupon,"source":1,"url":encodeURIComponent(location.href)})
this.wxShare({"merchantNo":this.merchantNo,"source":1,"url":encodeURIComponent(location.href)})
}
}
},
mounted() {
this.getNo()
this.shareWenXin()
}
};
</script>

Loading…
Cancel
Save