...
|
...
|
@@ -3,7 +3,12 @@ |
|
|
:title="$route.params.owner === 'sell' ? '我的出售' : '我的购买订单'"
|
|
|
class="list-page"
|
|
|
>
|
|
|
<status-nav class="order-status-nav" :status="status" :owner="owner" @select="onStatusChange"/>
|
|
|
<status-nav
|
|
|
class="order-status-nav"
|
|
|
:status="status"
|
|
|
:owner="owner"
|
|
|
@select="onStatusChange"
|
|
|
/>
|
|
|
<div class="content-wrapper">
|
|
|
<LayoutScroll
|
|
|
@scroll="scrollHandler"
|
...
|
...
|
@@ -15,11 +20,11 @@ |
|
|
>
|
|
|
<ul class="list-wrapper">
|
|
|
<li v-for="order in viewOrderList" :key="order.orderCode">
|
|
|
<order-item-header :order="order"/>
|
|
|
<order-item :order="order"/>
|
|
|
<order-item-header :order="order" />
|
|
|
<order-item :order="order" />
|
|
|
<!-- 订单操作 -->
|
|
|
<div class="footer-wrapper">
|
|
|
<count-down :leftTime="order.leftTime"/>
|
|
|
<count-down :leftTime="order.leftTime" />
|
|
|
<order-actions
|
|
|
class="actions"
|
|
|
pageName="list"
|
...
|
...
|
@@ -54,23 +59,23 @@ |
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { createNamespacedHelpers } from 'vuex';
|
|
|
import { createNamespacedHelpers } from "vuex";
|
|
|
|
|
|
import OrderItem from './components/order-item';
|
|
|
import StatusNav from './components/status-nav';
|
|
|
import OrderItemHeader from './components/order-item-header';
|
|
|
import VideoPlayer from './components/video-player';
|
|
|
import OrderItem from "./components/order-item";
|
|
|
import StatusNav from "./components/status-nav";
|
|
|
import OrderItemHeader from "./components/order-item-header";
|
|
|
import VideoPlayer from "./components/video-player";
|
|
|
|
|
|
import EmptyList from 'components//ufo-no-item';
|
|
|
import EmptyList from "components//ufo-no-item";
|
|
|
|
|
|
import OrderActions from '../components/order-actions';
|
|
|
import CountDown from '../components/count-down';
|
|
|
import OrderActions from "../components/order-actions";
|
|
|
import CountDown from "../components/count-down";
|
|
|
|
|
|
import orderActionMixin from '../mixin/order-action';
|
|
|
import orderInSaleActionMixin from '../mixin/order-in-sale-action';
|
|
|
import { orderStatusKey, getOrderStatus } from 'constants/order-constants';
|
|
|
import orderActionMixin from "../mixin/order-action";
|
|
|
import orderInSaleActionMixin from "../mixin/order-in-sale-action";
|
|
|
import { orderStatusKey, getOrderStatus } from "constants/order-constants";
|
|
|
|
|
|
const STORE_PATH = 'order/orderList';
|
|
|
const STORE_PATH = "order/orderList";
|
|
|
|
|
|
const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
|
|
|
STORE_PATH
|
...
|
...
|
@@ -91,14 +96,14 @@ export default { |
|
|
data() {
|
|
|
return {
|
|
|
scrollY: 0
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
|
owner: String,
|
|
|
status: Number
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['orderListByType']),
|
|
|
...mapState(["orderListByType"]),
|
|
|
orderStatus() {
|
|
|
return this.orderListByType[orderStatusKey(this.owner, this.status)];
|
|
|
},
|
...
|
...
|
@@ -113,7 +118,7 @@ export default { |
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
|
if (this.yoho.direction === 'back') {
|
|
|
if (this.$yoho.direction === "back") {
|
|
|
this.scrollY && this.$refs.scroll.scrollTo(this.scrollY);
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -128,9 +133,9 @@ export default { |
|
|
return store.dispatch(`${STORE_PATH}/fetchOrderList`, { owner, status });
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchOrderList', 'confirmReceipt']),
|
|
|
...mapMutations(['resetData']),
|
|
|
scrollHandler({y}) {
|
|
|
...mapActions(["fetchOrderList", "confirmReceipt"]),
|
|
|
...mapMutations(["resetData"]),
|
|
|
scrollHandler({ y }) {
|
|
|
this.scrollY = -y;
|
|
|
},
|
|
|
fetchData() {
|
...
|
...
|
|