|
|
@ -85,7 +85,6 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ( res.data.imageUrl ){ |
|
|
if ( res.data.imageUrl ){ |
|
|
this.imgSrc = '' |
|
|
|
|
|
this.imgSrc = res.data.imageUrl + "?" + Date.now(); |
|
|
this.imgSrc = res.data.imageUrl + "?" + Date.now(); |
|
|
} else { |
|
|
} else { |
|
|
if ( res.data.hasOAuth == 0 ){ |
|
|
if ( res.data.hasOAuth == 0 ){ |
|
|
@ -161,10 +160,10 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
createPoster2 (){ |
|
|
createPoster2 (){ |
|
|
// if ( !this.isAuthorize ){ |
|
|
|
|
|
// location.href = this.authorizeSrc |
|
|
|
|
|
// return; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
if ( !this.isAuthorize ){ |
|
|
|
|
|
location.href = this.authorizeSrc |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
var no = this.no |
|
|
var no = this.no |
|
|
this.showLoading = true |
|
|
this.showLoading = true |
|
|
posterApi.createPoster2({"couponNo":no}).then(res => { |
|
|
posterApi.createPoster2({"couponNo":no}).then(res => { |
|
|
@ -222,13 +221,13 @@ |
|
|
this.no = this.getParam("no") |
|
|
this.no = this.getParam("no") |
|
|
this.sourceType = this.getParam("sourceType") |
|
|
this.sourceType = this.getParam("sourceType") |
|
|
|
|
|
|
|
|
if ( this.sourceType == 2 ){ |
|
|
|
|
|
|
|
|
if ( this.sourceType == 2 ){ //指定优惠券 |
|
|
this.defaultCity = '' |
|
|
this.defaultCity = '' |
|
|
this.getPoster2() |
|
|
this.getPoster2() |
|
|
} else { |
|
|
|
|
|
|
|
|
} else { //通过商户默认推荐 |
|
|
this.getPoster() |
|
|
this.getPoster() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.shareWenXin() |
|
|
}, |
|
|
}, |
|
|
//点击生成海报按钮 |
|
|
//点击生成海报按钮 |
|
|
createImg (){ |
|
|
createImg (){ |
|
|
@ -241,18 +240,22 @@ |
|
|
}, |
|
|
}, |
|
|
//分享微信 |
|
|
//分享微信 |
|
|
shareWenXin (){ |
|
|
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)}) |
|
|
this.wxShare({"merchantNo":merchantNo,"source":1,"url":encodeURIComponent(location.href)}) |
|
|
} else { |
|
|
} 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() { |
|
|
mounted() { |
|
|
this.getNo() |
|
|
this.getNo() |
|
|
this.shareWenXin() |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|