diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue index 37397d6..b8685e9 100644 --- a/pages/goods/detail.vue +++ b/pages/goods/detail.vue @@ -101,7 +101,8 @@ - {{addressInfo.region?addressInfo.region.city:addressResult.city}}:{{stockValue}} + {{addressInfo.region?addressInfo.region.city:addressResult.city}}:{{stockValue}} @@ -572,9 +573,12 @@ goods_id: this.goodsId, num: this.selectNum }], - province: this.addressInfo.region?this.addressInfo.region.province:(this.addressResult ? this.addressResult.province : '江苏省'), - city: this.addressInfo.region?this.addressInfo.region.city:(this.addressResult ? this.addressResult.city : '南京市'), - district: this.addressInfo.region?this.addressInfo.region.region:(this.addressResult ? this.addressResult.district : '玄武区') + province: this.addressInfo.region ? this.addressInfo.region.province : (this.addressResult ? + this.addressResult.province : '江苏省'), + city: this.addressInfo.region ? this.addressInfo.region.city : (this.addressResult ? this + .addressResult.city : '南京市'), + district: this.addressInfo.region ? this.addressInfo.region.region : (this.addressResult ? this + .addressResult.district : '玄武区') } let { status, @@ -822,11 +826,19 @@ for (var i = 0; i < that.addressList.length; i++) { if (res.data.defaultId == that.addressList[i].address_id) { that.addressInfo = that.addressList[i]; - console.log('kkkkkkkkk') } } - if(that.addressInfo){ - that.getGoodsStockInfor() + if (that.addressInfo) { + this.addressResult.province = this.addressInfo.region ? this.addressInfo + .region.province : (this.addressResult ? this.addressResult.province : + '江苏省'); + this.addressResult.city = this.addressInfo.region ? this.addressInfo.region + .city : (this.addressResult ? this.addressResult.city : '南京市'); + this.addressResult.district = this.addressInfo.region ? this.addressInfo + .region.region : (this.addressResult ? this.addressResult.district : + '江苏省'); + + that.getGoodsStockInfor(); } } }) @@ -1004,7 +1016,7 @@ return; } uni.navigateTo({ - url: '/pages/member/index?type='+(this.userInfo.user_type != 30?'hy':'fx') + url: '/pages/member/index?type=' + (this.userInfo.user_type != 30 ? 'hy' : 'fx') }) }, toFuwu() { @@ -1376,7 +1388,7 @@ height: 82rpx; display: flex; align-items: center; - margin: 20rpx 28rpx 0 28rpx; + margin: 20rpx 28rpx 0 28rpx; .proMem { width: 142rpx; @@ -1414,6 +1426,7 @@ .goodsDetail { margin: 0 26rpx; + .goodsContent { justify-content: space-between; display: flex; @@ -1491,7 +1504,7 @@ .operaImg { display: flex; align-items: center; - + image { width: 49rpx; height: 49rpx;