This commit is contained in:
2020-07-14 09:15:51 +08:00
parent 58b02c7432
commit 700ae94f79
3 changed files with 84 additions and 17 deletions

View File

@@ -40,20 +40,29 @@
<image src="../static/image/1.png"></image>
</view>
</view>
<view>
<view class="title">配送方式</view>
<view class="value">
<view>快递</view>
<image src="../static/image/1.png"></image>
</view>
</view>
<view>
<!-- <view>
<view class="title">支付方式</view>
<view class="value">
<view>微信</view>
<image src="../static/image/1.png"></image>
</view>
</view>
</view> -->
</view>
</view>
</view>
<view class="common-active">
<view>
<view class="title">平台优惠券</view>
<view class="value">
<view>-0.00</view>
<image src="../static/image/1.png"></image>
</view>
</view>
<view>
<view class="title">配送方式</view>
<view class="value">
<view>快递</view>
<image src="../static/image/1.png"></image>
</view>
</view>
</view>
@@ -63,7 +72,7 @@
<view class="price">{{ orderInfo.store_goods_total | showTotalPrice }}</view>
</view>
<view class="right">
<view class="num">1件商品</view>
<view class="num">共件{{ orderInfo.store_cart_list | setTotalNumber }}商品</view>
<view class="btn" @click="settlement">结算</view>
</view>
</view>
@@ -89,7 +98,18 @@ export default {
}
}
return price.toFixed(2);
}
},
setTotalNumber(data) {
let num = 0;
for (const key in data) {
if (data.hasOwnProperty(key)) {
const element = data[key][0];
console.log(element);
num += element.goods_num;
}
}
return num;
},
},
onLoad(option) {
console.log(JSON.parse(option.info));
@@ -151,7 +171,9 @@ export default {
font-size: 28rpx;
color: rgba(51,51,51,1);
margin-bottom: 20rpx;
margin-right: 13rpx;
> view:first-child {
margin-right: 13rpx;
}
}
.address-text {
font-size: 24rpx;
@@ -167,7 +189,7 @@ export default {
}
}
.main {
margin-bottom: 100rpx;
margin-bottom: 50rpx;
> view {
.goods-info {
background-color: #ffffff;
@@ -276,6 +298,34 @@ export default {
}
}
}
.common-active {
padding-bottom: 200rpx;
> view {
height: 98rpx;
background: rgba(255,255,255,1);
padding: 35rpx 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 2rpx;
.title {
font-size: 28rpx;
color: rgba(102,102,102,1);
}
.value {
display: flex;
align-items: center;
font-size: 30rpx;
color:rgba(51,51,51,1);
> image {
width: 12rpx;
height: 22rpx;
flex-shrink: 0;
margin-left: 20rpx;
}
}
}
}
.bottom {
padding: 35rpx 30rpx;
position: fixed;

View File

@@ -93,8 +93,8 @@ export default {
temp = '';
})
// console.log(id);
this.$u.api.settlementOrder({ cart_id: id }).then(res => {
// ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
this.$u.api.settlementOrder({ ifcart: 1, cart_id: id }).then(res => {
if(res.errCode == 0) {
this.$u.route({
url: '/pageC/cart/ConfirmOrder',