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

Loading…
Cancel
Save