|
|
@ -198,42 +198,10 @@ export default { |
|
|
if (sourceUserId) { |
|
|
if (sourceUserId) { |
|
|
couponModel.sourceUser(sourceUserId).then(res => {}); |
|
|
couponModel.sourceUser(sourceUserId).then(res => {}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
|
|
|
defaultLocalEstate(estateRes) { |
|
|
|
|
|
this.provinceId = estateRes.provinceId |
|
|
|
|
|
? estateRes.provinceId |
|
|
|
|
|
: this.provinceId; |
|
|
|
|
|
this.cityId = estateRes.cityId ? estateRes.cityId : this.cityId; |
|
|
|
|
|
this.districtId = estateRes.districtId |
|
|
|
|
|
? estateRes.districtId |
|
|
|
|
|
: this.districtId; |
|
|
|
|
|
this.defaultCity = estateRes.districtName |
|
|
|
|
|
? estateRes.districtName |
|
|
|
|
|
: this.defaultCity; |
|
|
|
|
|
this.merchantNo = estateRes.merchantNo; |
|
|
|
|
|
this.addressValue = [ |
|
|
|
|
|
this.provinceId + "&" + estateRes.provinceName, |
|
|
|
|
|
this.cityId + "&" + estateRes.cityName, |
|
|
|
|
|
this.districtId + |
|
|
|
|
|
"&" + |
|
|
|
|
|
estateRes.districtName + |
|
|
|
|
|
"&" + |
|
|
|
|
|
estateRes.merchantNo |
|
|
|
|
|
]; |
|
|
|
|
|
localStorage.setItem("cityName", this.addressValue.slice()); |
|
|
|
|
|
this.estateId = estateRes.housingEstateId |
|
|
|
|
|
? estateRes.housingEstateId |
|
|
|
|
|
: this.estateId; |
|
|
|
|
|
this.defaultCommunity = estateRes.housingEstateName |
|
|
|
|
|
? estateRes.housingEstateName |
|
|
|
|
|
: this.defaultCommunity; |
|
|
|
|
|
if (!isEmpty(this.estateId)) { |
|
|
|
|
|
localStorage.setItem( |
|
|
|
|
|
"estate", |
|
|
|
|
|
this.estateId + "&" + this.defaultCommunity |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
// defaultLocalEstate(estateRes) { |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
}, |
|
|
}, |
|
|
filters: { |
|
|
filters: { |
|
|
numFilter(value) { |
|
|
numFilter(value) { |
|
|
@ -255,24 +223,41 @@ export default { |
|
|
this.uniqueId = ""; |
|
|
this.uniqueId = ""; |
|
|
} |
|
|
} |
|
|
let eId = this.$route.query.estateId; |
|
|
let eId = this.$route.query.estateId; |
|
|
|
|
|
var that = this; |
|
|
if (!isEmpty(eId)) { |
|
|
if (!isEmpty(eId)) { |
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
chooseCommunityApi |
|
|
|
|
|
.getEstateInfo({ |
|
|
|
|
|
estateId: eId |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
if (isEmpty(res.response)) { |
|
|
|
|
|
this.defaultLocalEstate(res.response); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(error => {}); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
chooseCommunityApi |
|
|
|
|
|
.getEstateInfo({ |
|
|
|
|
|
estateId: eId |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
if (!isEmpty(res.response)) { |
|
|
|
|
|
var addressValue = |
|
|
|
|
|
estateRes.provinceId + |
|
|
|
|
|
"&" + |
|
|
|
|
|
estateRes.provinceName + |
|
|
|
|
|
"," + |
|
|
|
|
|
estateRes.cityId + |
|
|
|
|
|
"&" + |
|
|
|
|
|
estateRes.cityName + |
|
|
|
|
|
"," + |
|
|
|
|
|
estateRes.districtId + |
|
|
|
|
|
"&" + |
|
|
|
|
|
estateRes.districtName + |
|
|
|
|
|
"&" + |
|
|
|
|
|
estateRes.merchantNo; |
|
|
|
|
|
localStorage.setItem("cityName", addressValue); |
|
|
|
|
|
localStorage.setItem( |
|
|
|
|
|
"estate", |
|
|
|
|
|
estateRes.housingEstateId + "&" + estateRes.housingEstateName |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(error => {}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 初始化 |
|
|
// 初始化 |
|
|
|
|
|
// console.log('batchNo:'+this.batchNo) |
|
|
this.handleInit(); |
|
|
this.handleInit(); |
|
|
// console.log('uniqueId:'+this.uniqueId) |
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
var params = { |
|
|
var params = { |
|
|
salesmanUniqueIdentity: this.uniqueId |
|
|
salesmanUniqueIdentity: this.uniqueId |
|
|
@ -292,7 +277,7 @@ export default { |
|
|
couponNo: this.batchNo, |
|
|
couponNo: this.batchNo, |
|
|
source: 20, |
|
|
source: 20, |
|
|
url: encodeURIComponent(url), |
|
|
url: encodeURIComponent(url), |
|
|
shareUrl: encodeURIComponent("http://" + location.host + "/v2/home") |
|
|
|
|
|
|
|
|
shareUrl: encodeURIComponent(url) |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
this.$vux.toast.text(res.msg, "middle"); |
|
|
this.$vux.toast.text(res.msg, "middle"); |
|
|
|