liudan 5 months ago
parent 0552961917
commit f9bfda54f1
  1. 14
      components/productWindow/index.vue
  2. 15
      pages/goods_details/index.vue
  3. 20
      pages/users/order_confirm/index.vue

@ -28,6 +28,7 @@
</view>
<view v-else>
<text></text><text class="num">{{ attr.productSelect.price }}</text>
<text class='num' v-if="point!=0">+积分{{point}}</text>
</view>
<view v-if="svipPrice" class="acea-row row-middle">
<text class='vip-money'>{{attr.productSelect.svip_price}}</text>
@ -59,7 +60,7 @@
<view v-if="type !='points'" class="cart acea-row">
<view class="title">数量</view>
<view class="carnum acea-row row-left">
<view class="buy_limit" v-if="minCount>0 || maxCount>0">
<view class="buy_limit" v-if="(minCount>0 || maxCount>0)&&productType!=1">
(<text v-if="minCount>0">{{minCount}}件起购<text v-if="minCount>0 && maxCount>0">,</text></text><text v-if="maxCount>0">最多{{maxCount}}</text>)
</view>
<view class="item reduce" :class="(attr.productSelect.cart_num <= 1 || (minCount>0 && attr.productSelect.cart_num<=minCount)) ? 'on' : ''" @click="CartNumDes">
@ -161,6 +162,15 @@
domain: {
type: String,
value: ''
},
productType:{
type:null,
value:null
},
point:{
type:Number||String,
value:0
}
},
computed: mapGetters(['viewColor']),
@ -169,7 +179,7 @@
};
},
mounted(){
console.log(this.maxCount)
console.log(this.maxCount,this.attr,"=-")
},
methods: {
//

@ -356,7 +356,7 @@
:showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
</block>
<!-- 组件 -->
<productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum"
<productWindow :attr="attr" :point="point" :productType="productType" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum"
@attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window' :payLimit="pay_limit" :maxCount="max_count" :minCount="min_count" :svipPrice="svipPrice" :image="storeInfo.image"></productWindow>
<block v-if="coupon.coupon">
<couponListWindow :coupon='coupon' @ChangCouponsClose="ChangCouponsClose" @ChangCoupons="ChangCoupons"
@ -625,7 +625,8 @@
url: '/pages/user/index'
},
],
point:0
point:0,
productType:null,
};
},
computed:{
@ -1104,7 +1105,15 @@
// that.$set(that, 'is_burst', res.data.is_burst);
that.$set(that, 'min_count', res.data.once_min_count);
that.$set(that, 'svipData', res.data.show_svip_info || null);
that.$set(that, 'svipPrice', res.data.show_svip_info && res.data.show_svip_info.show_svip_price || false);
that.$set(that, 'svipPrice', res.data.show_svip_info && res.data.show_svip_info.show_svip_price || false);
if(res.data.is_wholesale==1){
//
that.productType = 1
}
if(res.data.is_retail==1){
//
that.productType = 2
}
uni.setNavigationBarTitle({
title: storeInfo.store_name.substring(0, 7) + "..."
})

@ -1,7 +1,7 @@
<template>
<view :style="viewColor">
<view class='order-submission'>
<view v-if="allow_address && order_model == 0" class="allAddress" @click="onAddress">
<view v-if="allow_address && order_model == 0&&productType!=1" class="allAddress" @click="onAddress">
<view class='address acea-row row-between-wrapper' v-if='shippingType == 0 '>
<view class='addressCon' v-if="addressInfo.real_name">
<view class='name'>
@ -94,7 +94,7 @@
{{goods.activeSku.active_price}}
</block>
<block v-else>
{{goods.productAttr.price}}
{{goods.productAttr.price}}<text style="color:var(--view-priceColor);margin-left:0rpx" v-if="goods.productAttr.point>0">+积分{{goods.productAttr.point}}</text>
</block>
<text>X{{goods.cart_num}}</text>
<view v-if="goods.productAttr.show_svip_price" class="vipImg">
@ -147,7 +147,8 @@
v-if="order_type != 3 && order_type != 4 && item.order.enabledCoupon">
<view>店铺优惠券</view>
<block v-if="item.coupon.length>0">
<view class='discount' @tap='couponTap(item,index)'>
<!-- @tap='couponTap(item,index)' -->
<view class='discount' >
<text v-if="item.order.coupon_price>0">优惠{{item.order.coupon_price}}</text>
<text v-else>暂未选择优惠券</text>
@ -425,7 +426,8 @@
v-if="order_type != 3 && order_type != 4 && enabledPlatformCoupon">
<view>平台优惠券<text @tap="showCoupon" class="iconfont icon-wenhao1"></text></view>
<block v-if="platformCoupon.length > 0">
<view class='discount money' @tap='couponTap2(platformCoupon,0)'>
<!-- @tap='couponTap2(platformCoupon,0)' -->
<view class='discount money'>
<text v-if="total_platform_coupon_price>0">优惠{{total_platform_coupon_price}}</text>
<text v-else>暂未选择优惠券</text>
<text class='iconfont icon-jiantou'></text>
@ -446,6 +448,7 @@
<view>
合计:
<text class='pColor'>{{totalPrice || 0}}</text>
<text class='pColor' v-if="totalPoint>0">+积分{{totalPoint}}</text>
</view>
<view class="coupon_price" v-if="couponData.total_coupon > 0">
优惠:¥ {{couponData.total_coupon}}
@ -699,6 +702,7 @@
orderType:null,
// is_burst:null,
productType:null,
totalPoint:0,
};
},
computed: {
@ -1179,7 +1183,13 @@
formData.sort(sortNumber);
that.$set(that, 'order_form', (that.order_form && that.order_form.length>0) ? that.order_form : formData);
}
that.totalPrice = res.data.order_price
that.totalPrice = res.data.order_price;
that.totalPoint = 0
res.data.order.forEach(item => {
item.list.forEach(i=>{
that.totalPoint+=i.productAttr.point
})
})
that.orderStatus = res.data.status
that.proPrice = res.data.total_price
that.order_type = res.data.order_type

Loading…
Cancel
Save