Browse Source

Merge branch 'feature/3.1.0-小区合伙人' into release/3.1.0-小区合伙人

release/3.1.0-小区合伙人
nesxy 6 years ago
parent
commit
edb3e583d8
4 changed files with 51 additions and 67 deletions
  1. 1
      src/models/wxLocation.js
  2. 2
      src/models/wxShare.js
  3. 32
      src/view/home.vue
  4. 83
      src/view/month-card.vue

1
src/models/wxLocation.js

@ -64,7 +64,6 @@ Vue.prototype.wxLocation = function () {
}
// alert("lat:" + localStorage.getItem("latitude") + ";lng:" + localStorage.getItem("longitude"));
wx.error(function (res) {
alert("wx-js初始化: " + res);
resolve("定位失败")
});
});

2
src/models/wxShare.js

@ -121,7 +121,7 @@ wxShareModel.getWXCheck().then(response =>{
// alert("lat:" + localStorage.getItem("latitude") + ";lng:" + localStorage.getItem("longitude"));
wx.error(function (res) {
console.log("--------wx")
alert("wx-js初始化: " + res);
// alert("wx-js初始化: " + res);
});
});
});

32
src/view/home.vue

@ -402,8 +402,8 @@ export default {
let districtArr = arr[2].split("&");
this.districtId = districtArr[0];
this.defaultDistrict = districtArr[1];
// this.merchantNo = cityNameArr[2];
this.merchantNo = 2;
this.merchantNo = arr[2].split("&")[2];
// this.merchantNo = 2;
}
if (!estateStr) {
} else {
@ -475,20 +475,20 @@ export default {
localStorage.setItem("longitude", location.creditLongitude);
_this.lat = location.creditLatitude;
_this.lng = location.creditLongitude;
alert(
"省-" +
location.creditProvince +
";市-" +
location.creditCity +
";区-" +
location.creditArea +
";街道-" +
location.creditStreet +
";lat-" +
location.creditLatitude +
";lng-" +
location.creditLongitude
);
// alert(
// "-" +
// location.creditProvince +
// ";-" +
// location.creditCity +
// ";-" +
// location.creditArea +
// ";-" +
// location.creditStreet +
// ";lat-" +
// location.creditLatitude +
// ";lng-" +
// location.creditLongitude
// );
_this.getId();
_this.getAddressInfo();
}

83
src/view/month-card.vue

@ -198,42 +198,10 @@ export default {
if (sourceUserId) {
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: {
numFilter(value) {
@ -255,24 +223,41 @@ export default {
this.uniqueId = "";
}
let eId = this.$route.query.estateId;
var that = this;
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();
// console.log('uniqueId:'+this.uniqueId)
return new Promise((resolve, reject) => {
var params = {
salesmanUniqueIdentity: this.uniqueId
@ -292,7 +277,7 @@ export default {
couponNo: this.batchNo,
source: 20,
url: encodeURIComponent(url),
shareUrl: encodeURIComponent("http://" + location.host + "/v2/home")
shareUrl: encodeURIComponent(url)
});
} else {
this.$vux.toast.text(res.msg, "middle");

Loading…
Cancel
Save