2020-06-09 17:33:12 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="order">
|
2020-06-10 16:06:01 +08:00
|
|
|
|
<view class="info-address" @click="changeAddress">
|
2020-06-09 17:33:12 +08:00
|
|
|
|
<image src="../static/image/2.png" class="address-icon"></image>
|
|
|
|
|
<view class="address">
|
|
|
|
|
<view class="user-info">
|
|
|
|
|
<view>胖胖</view>
|
|
|
|
|
<view>18220171014</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="address-text u-line-2">山东省泰安市泰山区东岳大街与克山路交汇口银山店四楼橙天影视南邻山东省泰安市泰山区东岳大街与克山路交汇口银山店四楼橙天影视南邻</view>
|
|
|
|
|
</view>
|
|
|
|
|
<image src="../static/image/1.png" class="right"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="main">
|
2020-06-30 18:06:50 +08:00
|
|
|
|
<view v-for="(item, index) in orderInfo.store_cart_list" :key="index">
|
|
|
|
|
<view class="goods-info">
|
|
|
|
|
<view class="store">
|
|
|
|
|
<image class="avatar" :src="item[0].store_avatar"></image>
|
|
|
|
|
<view>{{ item[0].store_name }}</view>
|
|
|
|
|
<image src="../static/image/1.png" class="right"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="goods">
|
|
|
|
|
<view v-for="(goods, g_index) in item" :key="g_index" class="goods-item">
|
|
|
|
|
<image :src="goods.goods_image_url"></image>
|
|
|
|
|
<view class="info">
|
|
|
|
|
<view class="name u-line-2">{{ goods.goods_name }}</view>
|
|
|
|
|
<view class="cart-info">
|
|
|
|
|
<view class="price">¥{{ goods.goods_price }}</view>
|
|
|
|
|
<u-number-box :input-width="38" :input-height="39" :size="22" bg-color="#FFFFFF" color="#FF780F" :index="g_index" v-model="goods.goods_num"></u-number-box>
|
|
|
|
|
</view>
|
2020-06-09 17:33:12 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2020-06-30 18:06:50 +08:00
|
|
|
|
<view class="order-info">
|
|
|
|
|
<view>
|
|
|
|
|
<view class="title">优惠券折扣</view>
|
|
|
|
|
<view class="value">
|
|
|
|
|
<view>-¥10.00</view>
|
|
|
|
|
<image src="../static/image/1.png"></image>
|
|
|
|
|
</view>
|
2020-06-09 17:33:12 +08:00
|
|
|
|
</view>
|
2020-06-30 18:06:50 +08:00
|
|
|
|
<view>
|
|
|
|
|
<view class="title">配送方式</view>
|
|
|
|
|
<view class="value">
|
|
|
|
|
<view>快递</view>
|
|
|
|
|
<image src="../static/image/1.png"></image>
|
|
|
|
|
</view>
|
2020-06-09 17:33:12 +08:00
|
|
|
|
</view>
|
2020-06-30 18:06:50 +08:00
|
|
|
|
<view>
|
|
|
|
|
<view class="title">支付方式</view>
|
|
|
|
|
<view class="value">
|
|
|
|
|
<view>微信</view>
|
|
|
|
|
<image src="../static/image/1.png"></image>
|
|
|
|
|
</view>
|
2020-06-09 17:33:12 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2020-06-10 16:06:01 +08:00
|
|
|
|
<view class="bottom">
|
|
|
|
|
<view class="left">
|
|
|
|
|
<view class="title">合计:</view>
|
2020-06-30 18:06:50 +08:00
|
|
|
|
<view class="price">¥{{ orderInfo.store_goods_total | showTotalPrice }}</view>
|
2020-06-10 16:06:01 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="right">
|
|
|
|
|
<view class="num">共1件商品</view>
|
|
|
|
|
<view class="btn" @click="settlement">结算</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2020-06-09 17:33:12 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
2020-06-30 18:06:50 +08:00
|
|
|
|
return {
|
|
|
|
|
orderInfo: {},
|
|
|
|
|
totalPrice: '0.00',
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
|
|
|
|
showTotalPrice(object) {
|
|
|
|
|
let price = 0;
|
|
|
|
|
for (const key in object) {
|
|
|
|
|
if (object.hasOwnProperty(key)) {
|
|
|
|
|
const element = object[key];
|
|
|
|
|
price += Number(element);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return price.toFixed(2);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(option) {
|
|
|
|
|
console.log(JSON.parse(option.info));
|
|
|
|
|
this.orderInfo = JSON.parse(option.info);
|
|
|
|
|
// this.orderListInit();
|
|
|
|
|
this.showTotalPrice();
|
2020-06-10 16:06:01 +08:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2020-06-30 18:06:50 +08:00
|
|
|
|
// orderListInit() {
|
|
|
|
|
// this.orderList = this.orderInfo.store_list;
|
|
|
|
|
// for (const key in this.orderList) {
|
|
|
|
|
// if (this.orderList.hasOwnProperty(key)) {
|
|
|
|
|
// const element = this.orderList[key];
|
|
|
|
|
// let tempArray = Object.entries(this.orderInfo.store_cart_list);
|
|
|
|
|
// tempArray.forEach(item => {
|
|
|
|
|
// if (item[0])
|
|
|
|
|
// })
|
|
|
|
|
// let temp = this.orderInfo.store_cart_list.filters(store => {
|
|
|
|
|
// return store.store_id == item.store_id
|
|
|
|
|
// })
|
|
|
|
|
// element
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// this.orderList.forEach(item => {
|
|
|
|
|
// let temp = this.orderInfo.store_cart_list.filters(store => {
|
|
|
|
|
// return store.store_id == item.store_id
|
|
|
|
|
// })
|
|
|
|
|
// Object.assign(item, { goods_list: temp });
|
|
|
|
|
// })
|
|
|
|
|
// console.log(this.orderList);
|
|
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
showTotalPrice() {
|
|
|
|
|
|
|
|
|
|
},
|
2020-06-10 16:06:01 +08:00
|
|
|
|
settlement() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pageE/order/Details'
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changeAddress() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pageE/more/Address'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-06-09 17:33:12 +08:00
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.order {
|
2020-06-10 16:06:01 +08:00
|
|
|
|
min-height: calc(100vh - var(--window-top));
|
|
|
|
|
background-color: #ECECEC;
|
|
|
|
|
padding-top: 1rpx;
|
2020-06-09 17:33:12 +08:00
|
|
|
|
.info-address {
|
2020-06-10 16:06:01 +08:00
|
|
|
|
padding: 30rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
background:rgba(255,255,255,1);
|
|
|
|
|
.address-icon {
|
|
|
|
|
width: 28rpx;
|
|
|
|
|
height: 34rpx;
|
|
|
|
|
margin-right: 31rpx;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
.address {
|
|
|
|
|
width: 570rpx;
|
|
|
|
|
.user-info {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: rgba(51,51,51,1);
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
margin-right: 13rpx;
|
|
|
|
|
}
|
|
|
|
|
.address-text {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: rgba(102,102,102,1);
|
|
|
|
|
line-height: 42rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.right {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
width: 12rpx;
|
|
|
|
|
height: 22rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.main {
|
2020-06-30 18:06:50 +08:00
|
|
|
|
> view {
|
|
|
|
|
.goods-info {
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
padding: 30rpx;
|
|
|
|
|
margin-bottom: 2rpx;
|
|
|
|
|
.store {
|
2020-06-09 17:33:12 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2020-06-30 18:06:50 +08:00
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
.avatar {
|
|
|
|
|
width: 60rpx;
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
border: 1rpx solid #000;
|
|
|
|
|
margin-right: 15rpx;
|
|
|
|
|
}
|
|
|
|
|
> view {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: rgba(51,51,51,1);
|
|
|
|
|
margin-right: 15rpx;
|
2020-06-10 16:06:01 +08:00
|
|
|
|
}
|
2020-06-30 18:06:50 +08:00
|
|
|
|
.right {
|
2020-06-10 16:06:01 +08:00
|
|
|
|
flex-shrink: 0;
|
2020-06-30 18:06:50 +08:00
|
|
|
|
width: 11rpx;
|
|
|
|
|
height: 22rpx;
|
2020-06-10 16:06:01 +08:00
|
|
|
|
}
|
2020-06-30 18:06:50 +08:00
|
|
|
|
}
|
|
|
|
|
.goods {
|
|
|
|
|
.goods-item {
|
2020-06-10 16:06:01 +08:00
|
|
|
|
display: flex;
|
2020-06-30 18:06:50 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
> image {
|
|
|
|
|
margin-right: 30rpx;
|
|
|
|
|
width: 180rpx;
|
|
|
|
|
height: 160rpx;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
background-color: aqua;
|
|
|
|
|
flex-shrink: 0;
|
2020-06-10 16:06:01 +08:00
|
|
|
|
}
|
2020-06-30 18:06:50 +08:00
|
|
|
|
.info {
|
|
|
|
|
// width: 418rpx;
|
|
|
|
|
height: 160rpx;
|
2020-06-10 16:06:01 +08:00
|
|
|
|
display: flex;
|
2020-06-30 18:06:50 +08:00
|
|
|
|
flex-direction: column;
|
2020-06-10 16:06:01 +08:00
|
|
|
|
justify-content: space-between;
|
2020-06-30 18:06:50 +08:00
|
|
|
|
.name {
|
2020-06-10 16:06:01 +08:00
|
|
|
|
font-size: 30rpx;
|
2020-06-30 18:06:50 +08:00
|
|
|
|
color: rgba(51,51,51,1);
|
2020-06-10 16:06:01 +08:00
|
|
|
|
}
|
2020-06-30 18:06:50 +08:00
|
|
|
|
.cart-info {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
.price {
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: rgba(255,49,49,1);
|
|
|
|
|
}
|
|
|
|
|
.u-numberbox {
|
|
|
|
|
border: 1rpx solid rgba(217,215,215,1);
|
|
|
|
|
border-radius:4px;
|
|
|
|
|
/deep/ .u-number-input {
|
|
|
|
|
margin: 0;
|
|
|
|
|
color: #333 !important;
|
|
|
|
|
border: 1rpx #D9D7D7 solid {
|
|
|
|
|
top: 0px;
|
|
|
|
|
bottom: 0px;
|
|
|
|
|
}
|
2020-06-10 16:06:01 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-09 17:33:12 +08:00
|
|
|
|
}
|
2020-06-10 16:06:01 +08:00
|
|
|
|
}
|
2020-06-30 18:06:50 +08:00
|
|
|
|
.order-info {
|
|
|
|
|
> view {
|
|
|
|
|
height: 98rpx;
|
|
|
|
|
background: rgba(255,255,255,1);
|
|
|
|
|
padding: 35rpx 30rpx;
|
2020-06-10 16:06:01 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2020-06-30 18:06:50 +08:00
|
|
|
|
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;
|
|
|
|
|
}
|
2020-06-10 16:06:01 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.bottom {
|
|
|
|
|
padding: 35rpx 30rpx;
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 98rpx;
|
|
|
|
|
background-color: rgba(255,255,255,1);
|
|
|
|
|
box-shadow: 0rpx 10rpx 14rpx 2rpx rgba(0, 0, 0, 0.34);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
.left {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
.title {
|
|
|
|
|
color:rgba(153,153,153,1);
|
|
|
|
|
margin-right: 10rpx;
|
2020-06-09 17:33:12 +08:00
|
|
|
|
}
|
2020-06-10 16:06:01 +08:00
|
|
|
|
.price {
|
|
|
|
|
color: #F40E0E;
|
2020-06-09 17:33:12 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-10 16:06:01 +08:00
|
|
|
|
.right {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.num {
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
color: rgba(153,153,153,1);
|
|
|
|
|
margin-right: 50rpx;
|
|
|
|
|
}
|
|
|
|
|
.btn {
|
|
|
|
|
width: 160rpx;
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
background: rgba(255,120,15,1);
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
color: rgba(255,255,255,1);
|
|
|
|
|
line-height: 60rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-09 17:33:12 +08:00
|
|
|
|
}
|
|
|
|
|
</style>
|