wangfukang 2 days ago
parent
commit
3754cc2f7d
  1. 1
      package1/address/addressList.vue
  2. 3
      package1/buyFood/buyFood.vue
  3. 4
      package1/group/groupBuySingle.vue
  4. 14
      package1/order/orderDetail.vue
  5. 10
      package1/runErrand/runErrand.vue

1
package1/address/addressList.vue

@ -144,6 +144,7 @@
let that = this; let that = this;
that.tui.request("/app/shopArea/getByParentId/"+JSON.parse(uni.getStorageSync('area')).id, "GET", {}, false, true).then((res) => { that.tui.request("/app/shopArea/getByParentId/"+JSON.parse(uni.getStorageSync('area')).id, "GET", {}, false, true).then((res) => {
if (res.code == 200 && res.result) { if (res.code == 200 && res.result) {
that.$emit('shopAreaList',res.result)
that.areaList = res.result; that.areaList = res.result;
that.areaTitleList = res.result.map(item => item.title); that.areaTitleList = res.result.map(item => item.title);
} }

3
package1/buyFood/buyFood.vue

@ -565,7 +565,7 @@
if (this.selectedCoupon) { if (this.selectedCoupon) {
total -= parseFloat(this.selectedCoupon.discountAmount); total -= parseFloat(this.selectedCoupon.discountAmount);
} }
return total > 0 ? total : 0; return total > 0 ? total : 0.01;
}, },
preDiscountTotal() { preDiscountTotal() {
if(this.isPaotui==true){ if(this.isPaotui==true){
@ -585,6 +585,7 @@
onShow() { onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.initAddress() this.initAddress()
//this.fetchCoupons();
const now = new Date(); const now = new Date();
const startTime = new Date(now); const startTime = new Date(now);
const endTime = new Date(now); const endTime = new Date(now);

4
package1/group/groupBuySingle.vue

@ -114,7 +114,7 @@
</view> </view>
<view class="goods-content-center"> <view class="goods-content-center">
<view class="goods-deal1"> <view class="goods-deal1">
月售 <text> 100+</text> 销量 <text> {{item.tailWarn}}</text>
</view> </view>
</view> </view>
<view class="shop-tag1"> <view class="shop-tag1">
@ -688,7 +688,7 @@
}, },
onShow() { onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect(); this.menuButtonInfo = uni.getMenuButtonBoundingClientRect();
//this.fetchCoupons(); this.fetchCoupons();
// sticky offsetstatusBarHeight + 40px // sticky offsetstatusBarHeight + 40px
const info = uni.getSystemInfoSync(); const info = uni.getSystemInfoSync();
this.navBarHeight = info.statusBarHeight + 40; this.navBarHeight = info.statusBarHeight + 40;

14
package1/order/orderDetail.vue

@ -312,12 +312,12 @@
{{orderDetail.deliveryFee}} {{orderDetail.deliveryFee}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"> <view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.userCouponNum > 0">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
优惠券 优惠券
</view> </view>
<view style="color: #000;font-weight:700;"> <view style="color: #000;font-weight:700;">
-1 <uni-icons type="right" size="12"></uni-icons> -{{orderDetail.userCouponNum}}
</view> </view>
</view> </view>
</view> </view>
@ -560,7 +560,9 @@
peisongTime:'', peisongTime:'',
orderId:'', orderId:'',
payData:{}, payData:{},
orderDetail:{}, orderDetail:{
userCouponNum:0
},
codeImg:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg', codeImg:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg',
additionalFee: '', additionalFee: '',
addFeeTradeNo: '' addFeeTradeNo: ''
@ -855,6 +857,12 @@
that.pintuan = true; that.pintuan = true;
} }
} }
that.orderDetail.userCouponNum = 0
if(that.orderDetail.userCoupon.length > 0){
for(let i = 0;i<that.orderDetail.userCoupon.length;i++){
that.orderDetail.userCouponNum += Number(that.orderDetail.userCoupon[i].discountAmount)
}
}
that.$forceUpdate(); that.$forceUpdate();
} else { } else {
that.tui.toast(res.message) that.tui.toast(res.message)

10
package1/runErrand/runErrand.vue

@ -249,7 +249,7 @@
<!-- 收货/取货地址簿弹出层 --> <!-- 收货/取货地址簿弹出层 -->
<uni-popup ref="bookPopup" background-color="#fff"> <uni-popup ref="bookPopup" background-color="#fff">
<view class="book-popup-content"> <view class="book-popup-content">
<address-list @selectAddress="handleSelectAddress" @syncAddress="handleSyncAddress" @close="$refs.bookPopup.close()"></address-list> <address-list @selectAddress="handleSelectAddress" @syncAddress="handleSyncAddress" @shopAreaList="updateArea" @close="$refs.bookPopup.close()"></address-list>
</view> </view>
</uni-popup> </uni-popup>
@ -423,7 +423,7 @@
if (this.selectedCoupon) { if (this.selectedCoupon) {
total = total - parseFloat(this.selectedCoupon.discountAmount); total = total - parseFloat(this.selectedCoupon.discountAmount);
} }
return total > 0 ? total : 0; return total > 0 ? total : 0.01;
} }
}, },
watch: { watch: {
@ -439,7 +439,7 @@
onShow() { onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.initAddress() this.initAddress()
this.fetchCoupons()
const now = new Date(); const now = new Date();
const startTime = new Date(now); const startTime = new Date(now);
const endTime = new Date(now); const endTime = new Date(now);
@ -536,6 +536,10 @@
} }
this.$refs.bookPopup.close(); this.$refs.bookPopup.close();
}, },
updateArea(v){
this.shopArea = v
this.kuaidiAreaList = v.filter(item => item.isCanteen === 2);
},
handleSyncAddress(address) { handleSyncAddress(address) {
if (this.addressSelectMode === 'put') { if (this.addressSelectMode === 'put') {
this.formData.address = address; this.formData.address = address;

Loading…
Cancel
Save