Authored by lea guo

订单回寄地址

<template>
<layout-app class="address-wrapper" title="商品回寄地址">
<SellOrderAddress :isOnlyShowBack="true" />
</layout-app>
</template>
<script>
import SellOrderAddress from "./order-detail/components/sell-order-address-info";
import { createNamespacedHelpers } from "vuex";
const { mapActions } = createNamespacedHelpers("order/orderDetail");
export default {
components: {
SellOrderAddress
},
activated() {
const { code } = this.$route.params;
this.fetchOrderDetail({ code, owner: "sell" });
},
methods: {
...mapActions(["fetchOrderDetail"])
}
};
</script>
<style lang="scss" scoped>
.address-wrapper {
padding: 40px;
}
</style>
\ No newline at end of file
... ...
... ... @@ -9,8 +9,8 @@ export default [
component: () => import(/* webpackChunkName: "order" */ './seller-confirm'),
props: route => ({
productId: route.query.productId,
storageId: route.query.storageId
})
storageId: route.query.storageId,
}),
},
{
name: 'OrderPay',
... ... @@ -19,7 +19,7 @@ export default [
props: route => ({
orderCode: route.query.orderCode,
payParams: route.query.payParams,
extra: route.query.extra
extra: route.query.extra,
}),
},
{
... ... @@ -28,8 +28,8 @@ export default [
component: () => import(/* webpackChunkName: "order" */ './buyer-confirm'),
props: route => ({
productId: route.query.productId,
storageId: route.query.storageId
})
storageId: route.query.storageId,
}),
},
{
name: 'SellPayOk',
... ... @@ -37,7 +37,7 @@ export default [
component: () => import(/* webpackChunkName: "order" */ './sell-pay-ok'),
props: route => ({
orderCode: route.query.orderCode,
})
}),
},
{
name: 'BuyPayOk',
... ... @@ -45,16 +45,16 @@ export default [
component: () => import(/* webpackChunkName: "order" */ './buy-pay-ok'),
props: route => ({
orderCode: route.query.orderCode,
productId: route.query.productId
})
productId: route.query.productId,
}),
},
{
name: 'buyerAskOrder', // 买家求购确认
path: '/xianyu/order/buyeraskorder.html',
component: () => import('./buyer-ask-order'),
props: route => ({
storageId: route.query.storageId
})
storageId: route.query.storageId,
}),
},
{
... ... @@ -64,7 +64,7 @@ export default [
props: route => ({
skup: route.query.skup,
price: route.query.price,
})
}),
},
// 物流信息
... ... @@ -80,6 +80,14 @@ export default [
component: () =>
import(/* webpackChunkName: "order.deliver" */ './deliver'),
},
{
name: 'deliverBackAddress',
path: '/xianyu/detail/deliver/back/address/:code',
component: () =>
import(
/* webpackChunkName: "deliverBackAddress" */ './delivery-back-address.vue'
),
},
...PriceChange,
...OrderList,
...OrderDetail,
... ...
... ... @@ -229,6 +229,7 @@ export default {
width: 48px;
height: 48px;
display: block;
background-repeat: no-repeat;
background-size: contain;
}
... ...
<template>
<div class="address-wrapper">
<i
v-if="$route.params.owner === 'sell'"
class="address-icon back-address-icon"
></i>
<i v-else class="address-icon"></i>
<i class="address-icon"></i>
<div>
<p class="consignee">
{{
isSell ? `回寄地址: ${userAddress.consignee}` : userAddress.consignee
}}
</p>
<p class="consignee">{{ userAddress.consignee }}</p>
<p class="area">{{ userAddress.area }}</p>
<p class="mobile">{{ userAddress.mobile }}</p>
</div>
... ... @@ -23,11 +15,7 @@ const { mapGetters } = createNamespacedHelpers("order/orderDetail");
export default {
computed: {
...mapGetters(["userAddress"]),
isSell() {
const { owner } = this.$route.params;
return owner === "sell";
}
...mapGetters(["userAddress"])
}
};
</script>
... ... @@ -57,6 +45,7 @@ export default {
height: 48px;
display: block;
background-size: contain;
background-repeat: no-repeat;
margin-right: 40px;
background-image: url("~statics/image/order/addr-icon@3x.png");
}
... ...
<template>
<div class="sell-order-address-wrapper">
<!-- 鉴定平台地址 -->
<div v-if="appraiseAddress && !isOnlyShowBack">
<div class="address-wrapper">
<i class="address-icon"></i>
<div>
<p class="consignee">{{ appraiseAddress.addressName }}</p>
<p class="area">{{ appraiseAddress.address }}</p>
<p class="mobile">{{ appraiseAddress.mobile }}</p>
</div>
</div>
<router-link
:to="{ name: 'deliverBackAddress', params: $route.params }"
class="to-back-address"
>
<div class="back-address">
<span>商品回寄地址</span>
<i class="right-icon"></i>
</div>
</router-link>
</div>
<div class="address-wrapper" v-else>
<i class="address-icon back-address-icon"></i>
<div>
<p class="consignee">
{{ `回寄地址: ${userAddress.consignee || ""}` }}
</p>
<p class="area">{{ userAddress.area }}</p>
<p class="mobile">{{ userAddress.mobile }}</p>
</div>
</div>
</div>
</template>
<script>
import { createNamespacedHelpers } from "vuex";
const { mapGetters } = createNamespacedHelpers("order/orderDetail");
export default {
props: {
isOnlyShowBack: {
type: Boolean,
default: false
}
},
computed: {
...mapGetters(["userAddress", "appraiseAddress"])
}
};
</script>
<style lang="scss" scoped>
.sell-order-address-wrapper {
.to-back-address {
display: block;
}
.back-address {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28px;
padding-top: 40px;
border-top: 1px solid #eee;
margin-top: 40px;
.right-icon {
width: 48px;
height: 48px;
display: block;
background-size: contain;
background-repeat: no-repeat;
background-image: url("~statics/image/order/right-arrow-icon@3x.png");
}
}
.address-wrapper {
display: flex;
align-items: center;
.consignee {
font-size: 32px;
font-weight: bold;
}
.area {
color: #999;
margin: 12px 0;
}
.mobile {
font-size: 28px;
font-weight: bold;
}
.address-icon {
width: 48px;
height: 48px;
display: block;
background-repeat: no-repeat;
background-size: contain;
margin-right: 40px;
background-image: url("~statics/image/order/addr-icon@3x.png");
}
.back-address-icon {
background-image: url("~statics/image/order/blackAddress@3x.png");
}
}
}
</style>
\ No newline at end of file
... ...
... ... @@ -101,7 +101,7 @@ import { createNamespacedHelpers } from "vuex";
import { Button } from "cube-ui";
import Clipboard from "clipboard";
import AddressInfo from "./components/address-info";
import AddressInfo from "./components/sell-order-address-info";
import OrderItemInfo from "./components/order-detail-item";
import DetailHeader from "./components/header";
import DetailFooter from "./components//detail-footer";
... ... @@ -247,6 +247,7 @@ export default {
width: 48px;
height: 48px;
display: block;
background-repeat: no-repeat;
background-size: contain;
}
... ...
... ... @@ -18,6 +18,9 @@ export default function() {
actionList: state => state.orderDetail.buttons || {}, // 允许操作
// 卖家订单价格字段
platformFee: state => state.orderDetail.platformFee || {},
// 鉴定平台地址
appraiseAddress: state => state.orderDetail.appraiseAddress || null,
},
actions: {
/**
... ...