Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
lea guo
5 years ago
Commit
22416243cbd182c84431099e8daa554f1e7c1732
1 parent
27ea6e6b
订单列表
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
27 deletions
apps/pages/order/components/count-down.vue
apps/pages/order/components/order-actions.vue
apps/pages/order/order-detail/buyer-order-detail.vue
apps/pages/order/order-list/components/order-footer.vue
apps/pages/order/order-list/in-sell-order-list.vue
apps/pages/order/order-list/order-list.vue
apps/store/order/in-sale-order-list.js
apps/pages/order/components/count-down.vue
View file @
2241624
<template>
<div class="count-down-wrapper">
<span></span>
<div class="count-down-wrapper" v-if="countDown !== ''">
<i class="time-icon"></i>
<span>{{ countDown }}</span>
</div>
</template>
...
...
@@ -14,29 +15,33 @@ export default {
},
data() {
return {
remainTime: this.props.leftTime,
remainTime: this.
$
props.leftTime,
countDown: "",
timeoutId: null
};
},
mounted() {
this.countDown = this.formatTime();
this.countDown = this.formatTime()
.join(":")
;
this.timeoutId = setInterval(() => {
this.remainTime--;
this.countDown = this.formatTime();
this.countDown = this.formatTime()
.join(":")
;
}, 1000);
},
destroyed() {
clearInterval(this.timeoutId);
},
computed: {
timeList: function() {}
watch: {
countDown(val) {
if (val === "") {
clearInterval(this.timeoutId);
}
}
},
methods: {
formatTime() {
if (this.remainTime < 0) {
return ["00", "00", "00"];
if (this.remainTime <= 0) {
return [];
}
let remainTime = this.remainTime;
...
...
@@ -49,7 +54,7 @@ export default {
const numberOfSeconds = remainTime - numberOfMinutes * 60;
return [numberOfHour
, numberOfMinute
, numberOfSeconds].map(time => {
return [numberOfHour
s, numberOfMinutes
, numberOfSeconds].map(time => {
return time < 10 ? `0${time}` : `${time}`;
});
}
...
...
@@ -60,5 +65,21 @@ export default {
<style lang="scss" scoped>
.count-down-wrapper {
display: flex;
font-size: 32px;
font-weight: bold;
align-items: center;
& > i {
width: 30px;
height: 30px;
display: block;
background: url("~statics/image/order/time-icon@3x.png");
background-size: contain;
background-position: center;
}
& > span {
padding: 0 9px;
}
}
</style>
\ No newline at end of file
...
...
apps/pages/order/components/order-actions.vue
View file @
2241624
...
...
@@ -161,7 +161,6 @@ export default {
.actions-wrapper {
display: flex;
justify-content: flex-end;
margin-top: 40px;
button {
font-size: 24px;
...
...
apps/pages/order/order-detail/buyer-order-detail.vue
View file @
2241624
...
...
@@ -59,7 +59,7 @@
</div>
<!-- 操作 -->
<div v-if="actionList.length" class="actions">
<order-actions
class="detail-actions"
:order="orderDetail" />
<order-actions :order="orderDetail" />
</div>
</div>
</template>
...
...
@@ -215,10 +215,6 @@ export default {
box-shadow: inset 0 1px 0 0 #eee;
padding: 20px;
z-index: 10;
.detail-actions {
margin-top: 0;
}
}
}
</style>
\ No newline at end of file
...
...
apps/pages/order/order-list/components/order-footer.vue
0 → 100644
View file @
2241624
<template>
<div class="footer-wrapper">
<count-down :leftTime="order.leftTime" />
<order-actions class="actions" :order="order" />
</div>
</template>
<script>
import OrderActions from "../../components/order-actions";
import CountDown from "../../components/count-down";
export default {
props: {
order: {
type: Object,
default: {}
}
},
components: {
OrderActions,
CountDown
}
};
</script>
<style lang="scss" scoped>
.footer-wrapper {
display: flex;
margin-top: 40px;
.actions {
flex: 1;
}
}
</style>
\ No newline at end of file
...
...
apps/pages/order/order-list/in-sell-order-list.vue
View file @
2241624
...
...
@@ -12,7 +12,7 @@
<order-info :order="order" />
<order-list-item :order="order" />
<!-- 订单操作 -->
<order-
actions
:order="order" />
<order-
item-footer
:order="order" />
</li>
</ul>
</scroll>
...
...
@@ -27,8 +27,7 @@ import { createNamespacedHelpers } from "vuex";
import OrderListItem from "./components/order-item";
import OrderInfo from "./components/order-info.vue";
import EmptyList from "./components/empty";
import OrderActions from "../components/order-actions";
import OrderItemFooter from "./components/order-footer";
const { mapActions, mapState, mapGetters } = createNamespacedHelpers(
"order/inSaleOrderList"
...
...
@@ -38,9 +37,9 @@ export default {
components: {
Scroll,
OrderListItem,
OrderActions,
OrderInfo,
EmptyList
EmptyList,
OrderItemFooter
},
computed: {
...mapState(["entryOrder", "notEntryOrder", "isShowEmpty"]),
...
...
apps/pages/order/order-list/order-list.vue
View file @
2241624
...
...
@@ -14,7 +14,7 @@
<order-info :order="order" />
<order-list-item :order="order" />
<!-- 订单操作 -->
<order-
actions
:order="order" />
<order-
item-footer
:order="order" />
</li>
</ul>
</scroll>
...
...
@@ -31,8 +31,7 @@ import OrderListItem from "./components/order-item";
import StatusNav from "./components/status-nav";
import OrderInfo from "./components/order-info.vue";
import EmptyList from "./components/empty";
import OrderActions from "../components/order-actions";
import OrderItemFooter from "./components/order-footer";
const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
"order/orderList"
...
...
@@ -43,9 +42,9 @@ export default {
Scroll,
OrderListItem,
StatusNav,
OrderActions,
OrderInfo,
EmptyList
EmptyList,
OrderItemFooter
},
computed: {
...mapState(["orderList", "pullUpLoad", "isShowEmpty"]),
...
...
apps/store/order/in-sale-order-list.js
View file @
2241624
...
...
@@ -82,7 +82,7 @@ export default function() {
});
if
(
res
.
code
===
200
)
{
commit
(
'setEntryOrder'
,
res
.
data
);
commit
(
'set
Not
EntryOrder'
,
res
.
data
);
}
},
},
...
...
Please
register
or
login
to post a comment