|
|
@ -65,9 +65,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
<ul class="card-list"> |
|
|
<ul class="card-list"> |
|
|
<li v-for="item1 in item.goodsList"> |
|
|
<li v-for="item1 in item.goodsList"> |
|
|
<a :href="'/mall/web/vgoods/detail/' + item1.goodsNo"> |
|
|
|
|
|
|
|
|
<a :href="'/mall/web/vgoods/detail/' + item1.goodsNo + '?uniqueId='+ uniqueId"> |
|
|
<div class="left"> |
|
|
<div class="left"> |
|
|
<a :href="'/mall/web/vgoods/detail/' + item1.goodsNo"> |
|
|
|
|
|
|
|
|
<a :href="'/mall/web/vgoods/detail/' + item1.goodsNo + '?uniqueId='+ uniqueId"> |
|
|
<img v-if="item1.goodsTitleImg!=''" :src=" imghost + item1.goodsTitleImg" /> |
|
|
<img v-if="item1.goodsTitleImg!=''" :src=" imghost + item1.goodsTitleImg" /> |
|
|
<img v-else-if="item1.showImg!=''" :src=" imghost + item1.showImg" /> |
|
|
<img v-else-if="item1.showImg!=''" :src=" imghost + item1.showImg" /> |
|
|
<img v-else :src=" imghost + item1.bannerImgs" /> |
|
|
<img v-else :src=" imghost + item1.bannerImgs" /> |
|
|
@ -86,7 +86,7 @@ |
|
|
<span class="price">¥ <em>{{item1.price ? item1.price/100:item1.originalPrice/100}}</em></span> |
|
|
<span class="price">¥ <em>{{item1.price ? item1.price/100:item1.originalPrice/100}}</em></span> |
|
|
<span class="original-price" v-if="item1.price&&item1.price!=item1.originalPrice"><em>¥{{ item1.originalPrice/100}}</em></span> |
|
|
<span class="original-price" v-if="item1.price&&item1.price!=item1.originalPrice"><em>¥{{ item1.originalPrice/100}}</em></span> |
|
|
</div> |
|
|
</div> |
|
|
<a :href="'/mall/web/vgoods/detail/' + item1.goodsNo">立即购买</a> |
|
|
|
|
|
|
|
|
<a :href="'/mall/web/vgoods/detail/' + item1.goodsNo + '?uniqueId='+ uniqueId">立即购买</a> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</a> |
|
|
</a> |
|
|
@ -118,6 +118,8 @@ import configs from "../configs"; |
|
|
import { Alert, Toast, Loading } from "vux"; |
|
|
import { Alert, Toast, Loading } from "vux"; |
|
|
import routerFooter from "../components/nav-bottom"; |
|
|
import routerFooter from "../components/nav-bottom"; |
|
|
import popupPicker from "../components/popup-picker.vue"; |
|
|
import popupPicker from "../components/popup-picker.vue"; |
|
|
|
|
|
import Qs from 'qs'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var locationUrl = configs.locationUrl; |
|
|
var locationUrl = configs.locationUrl; |
|
|
export default { |
|
|
export default { |
|
|
@ -131,6 +133,7 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
show: false, |
|
|
show: false, |
|
|
|
|
|
uniqueId:Qs.parse(location.search.substring(1)).uniqueId, |
|
|
defaultCity: "天河区", //区名 默认值 不需要去掉 |
|
|
defaultCity: "天河区", //区名 默认值 不需要去掉 |
|
|
merchantNo: 2, //商户编号 默认值 不需要去掉 |
|
|
merchantNo: 2, //商户编号 默认值 不需要去掉 |
|
|
districtId: "440106000", //区id 默认值 不需要去掉 |
|
|
districtId: "440106000", //区id 默认值 不需要去掉 |
|
|
@ -245,10 +248,39 @@ export default { |
|
|
var merchantNo = this.merchantNo; |
|
|
var merchantNo = this.merchantNo; |
|
|
this.wxShare({ |
|
|
this.wxShare({ |
|
|
merchantNo: merchantNo, |
|
|
merchantNo: merchantNo, |
|
|
|
|
|
uniqueId:this.uniqueId, |
|
|
source: 0, |
|
|
source: 0, |
|
|
url: encodeURIComponent(location.href) |
|
|
url: encodeURIComponent(location.href) |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
countExtend() { |
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
var params = { |
|
|
|
|
|
buryingPointType: 0, |
|
|
|
|
|
salesmanUniqueIdentity: this.uniqueId, |
|
|
|
|
|
timeStr: this.getTime(Date.now()) |
|
|
|
|
|
}; |
|
|
|
|
|
homeApi.countExtend(params).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
resolve(); |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
getTime(time) { |
|
|
|
|
|
let date = new Date(time); |
|
|
|
|
|
let year = date.getFullYear(); |
|
|
|
|
|
let month = this.checkTime(date.getMonth() + 1); |
|
|
|
|
|
let day = this.checkTime(date.getDate()); |
|
|
|
|
|
let str = |
|
|
|
|
|
year + "-" + month + "-" + day; |
|
|
|
|
|
return str; |
|
|
|
|
|
}, |
|
|
|
|
|
checkTime(i) { |
|
|
|
|
|
if (i < 10) { |
|
|
|
|
|
i = "0" + i; |
|
|
|
|
|
} |
|
|
|
|
|
return i; |
|
|
|
|
|
}, |
|
|
// 商品分类 |
|
|
// 商品分类 |
|
|
goods(c_no) { |
|
|
goods(c_no) { |
|
|
this.$router.push({ |
|
|
this.$router.push({ |
|
|
@ -269,10 +301,10 @@ export default { |
|
|
cityId: this.cityId ? this.cityId : "" |
|
|
cityId: this.cityId ? this.cityId : "" |
|
|
}) |
|
|
}) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
if (res.data.allAddress && res.data.userAddress) { |
|
|
|
|
|
this.addressData = res.data.allAddress; |
|
|
|
|
|
|
|
|
if (res.response.allAddress && res.response.userAddress) { |
|
|
|
|
|
this.addressData = res.response.allAddress; |
|
|
this.flag = true; |
|
|
this.flag = true; |
|
|
let data = res.data; |
|
|
|
|
|
|
|
|
let data = res.response; |
|
|
if (data.userAddress.type == 1) { |
|
|
if (data.userAddress.type == 1) { |
|
|
this.address = |
|
|
this.address = |
|
|
data.userAddress.cityName + |
|
|
data.userAddress.cityName + |
|
|
@ -380,7 +412,28 @@ export default { |
|
|
// this.getAddress(); |
|
|
// this.getAddress(); |
|
|
// this.getLocation(); |
|
|
// this.getLocation(); |
|
|
this.getData(); |
|
|
this.getData(); |
|
|
this.ShareWenXin(); |
|
|
|
|
|
|
|
|
let uuniqueId = Qs.parse(location.search.substring(1)).uniqueId |
|
|
|
|
|
|
|
|
|
|
|
if(uuniqueId !== undefined && uuniqueId !== null && uuniqueId !== ""){ |
|
|
|
|
|
this.countExtend(); |
|
|
|
|
|
uuniqueId = ''; |
|
|
|
|
|
} |
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
var params = { |
|
|
|
|
|
salesmanUniqueIdentity: uuniqueId, |
|
|
|
|
|
}; |
|
|
|
|
|
homeApi.updateUniqueId(params).then(res => { |
|
|
|
|
|
this.showLoading = false; |
|
|
|
|
|
if (res.code == 0) { |
|
|
|
|
|
this.uniqueId=this.$cookies.get('1hjz_mall_unique_id') |
|
|
|
|
|
this.ShareWenXin(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$vux.toast.text(res.msg, "middle"); |
|
|
|
|
|
} |
|
|
|
|
|
resolve(); |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|