Browse Source

优惠券

feature/feature-compatible
fengchengzhi 7 years ago
parent
commit
d27af342aa
1 changed files with 7 additions and 5 deletions
  1. 12
      src/view/home.vue

12
src/view/home.vue

@ -20,7 +20,7 @@
</swiper> </swiper>
</div> </div>
<div class="coupon" v-if="promotionImgList == {}">
<div class="coupon" v-if="promotionImgList.imgUrl">
<a :href="promotionImgList.linkUrl || ''"><img :src="promotionImgList.imgUrl"/></a> <a :href="promotionImgList.linkUrl || ''"><img :src="promotionImgList.imgUrl"/></a>
</div> </div>
<div class="new-card" v-for="item in goodsList"> <div class="new-card" v-for="item in goodsList">
@ -168,14 +168,15 @@
// //
getdefaultAddress (){ getdefaultAddress (){
homeApi.getdefaultAddress().then(res => { homeApi.getdefaultAddress().then(res => {
// console.log('',res)
console.log('默认地址信息',res)
if ( res.code == 0 ){ if ( res.code == 0 ){
if ( !res.data ){ if ( !res.data ){
this.show = true this.show = true
this.merchantNo = 2
} else { } else {
this.defaultCity = res.data.districtName || '' this.defaultCity = res.data.districtName || ''
this.districtId = res.data.districtId || '' this.districtId = res.data.districtId || ''
this.merchantNo = res.data.merchantNo || ''
this.merchantNo = res.data.merchantNo || 2
this.addressValue = [] this.addressValue = []
this.addressValue.push(res.data.provinceId) this.addressValue.push(res.data.provinceId)
this.addressValue.push(res.data.cityId) this.addressValue.push(res.data.cityId)
@ -184,14 +185,15 @@
} else { } else {
this.$vux.toast.text(res.msg,"middle"); this.$vux.toast.text(res.msg,"middle");
} }
console.log(this.merchantNo)
this.getGoodsList()
}); });
}, },
}, },
mounted() { mounted() {
// //
this.getdefaultAddress() this.getdefaultAddress()
this.getGoodsList()
this.getAddress() this.getAddress()
} }
}; };

Loading…
Cancel
Save