1457e7cf by yyx

1

1 parent bb980684
......@@ -23,7 +23,7 @@ const startCheckSuccessListener = (orderSn, actId) => {
// 支付成功
payment.showCodeDialog = false;
ElMessage({ type: "success", message: "支付成功" });
router.push({
router.replace({
path: "/seat/order",
});
} else {
......
<script setup>
import { setToken, getToken } from "./utils/local-store.js";
import { getOrderList, immediatePay, cancelPay } from "./api/index.js";
import qrCodeDialog from "./components/qrCodeDialog.vue";
import { ElMessageBox, ElMessage } from "element-plus";
......@@ -55,7 +56,6 @@ const order = reactive({
fetchData() {
getOrderList({ pageNo: order.pageNo, pageSize: order.pageSize }).then(
(res) => {
// TODO: 后期优化
order.noPay = res.data.lists.find((it) => it.state == 0);
order.data = res.data.lists;
order.total = res.data.count;
......@@ -129,7 +129,7 @@ const order = reactive({
totalTime -= 1000;
// console.log(totalTime)
} else {
clearInterval(timer); // 停止调用函数
clearInterval(order.timer); // 停止调用函数
}
}, 1000);
}
......@@ -145,6 +145,10 @@ watch(
}
);
onUnmounted(() => {
clearInterval(order.timer);
});
order.fetchData();
</script>
......
......@@ -227,23 +227,13 @@ watch(
<div class="time">
时间:{{
detail.data?.startTime
? dayjs(detail.data?.startTime).format("YYYY.MM.DD")
: ""
}}
{{
detail.data?.startTime
? dayjs(detail.data?.startTime).format("ddd")
? dayjs(detail.data?.startTime).format("YYYY.MM.DD ddd")
: ""
}}
{{
detail.data?.endTime
? dayjs(detail.data?.endTime).format("YYYY.MM.DD")
: ""
}}
{{
detail.data?.endTime
? dayjs(detail.data?.endTime).format("ddd")
? dayjs(detail.data?.endTime).format("YYYY.MM.DD ddd")
: ""
}}
</div>
......@@ -480,6 +470,7 @@ watch(
.bottom {
padding: 50px;
margin-top: 30px;
margin-bottom: 30px;
.title {
padding: 20px 30px;
background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!