|
|
|
@ -39,7 +39,7 @@ |
|
|
|
return { |
|
|
|
show: false, |
|
|
|
imgSrc: "", |
|
|
|
merchantNo: "", //商户编号 |
|
|
|
merchantNo: 2, //商户编号 |
|
|
|
isAuthorize: false, |
|
|
|
authorizeSrc : "", |
|
|
|
ImgFix: true, |
|
|
|
@ -66,14 +66,15 @@ |
|
|
|
console.log(name) |
|
|
|
if(!name){ |
|
|
|
this.merchantNo = 2 |
|
|
|
this.defaultCity = '天河区' |
|
|
|
return |
|
|
|
} |
|
|
|
let arr = name.split(',') |
|
|
|
this.addressValue = arr |
|
|
|
let cityNameArr = arr[2].split('&') |
|
|
|
let cityName = cityNameArr[1] |
|
|
|
this.defaultCity = cityName |
|
|
|
this.merchantNo = cityNameArr[2] |
|
|
|
this.defaultCity = cityName || '天河区' |
|
|
|
this.merchantNo = cityNameArr[2] || 2 |
|
|
|
}, |
|
|
|
getPoster (){ |
|
|
|
let merchantNo = this.merchantNo |
|
|
|
@ -193,6 +194,7 @@ |
|
|
|
this.addressValue = name |
|
|
|
/// this.getName() |
|
|
|
}, |
|
|
|
//加载地址 |
|
|
|
getAddress (){ |
|
|
|
homeApi.getAddress().then(res => { |
|
|
|
if ( res.code == 0 ){ |
|
|
|
@ -206,6 +208,7 @@ |
|
|
|
goBack() { |
|
|
|
history.go(-1); |
|
|
|
}, |
|
|
|
//获取连接上的信息 |
|
|
|
getParam(name) { |
|
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); |
|
|
|
var url = window.location.href; |
|
|
|
@ -222,7 +225,7 @@ |
|
|
|
this.sourceType = this.getParam("sourceType") |
|
|
|
|
|
|
|
if ( this.sourceType == 2 ){ //指定优惠券 |
|
|
|
this.defaultCity = '' |
|
|
|
// this.defaultCity = '' |
|
|
|
this.getPoster2() |
|
|
|
} else { //通过商户默认推荐 |
|
|
|
this.getPoster() |
|
|
|
@ -243,6 +246,7 @@ |
|
|
|
var coupon = this.getParam("no") |
|
|
|
var sourceType = this.getParam("sourceType") |
|
|
|
var merchantNo = this.getParam("merchantNo") |
|
|
|
|
|
|
|
if ( sourceType == 2 ){ //指定优惠券 |
|
|
|
this.wxShare({"couponNo":coupon,"source":10,"url":encodeURIComponent(location.href)}) |
|
|
|
} else if( sourceType == 1) { //通过商户默认推荐 |
|
|
|
|