2024-05-30 17:02:05 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<!-- A11Y:注意设置页面的 lang 属性 -->
|
|
|
|
|
<html lang="zh">
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<!-- A11Y:打开页面时,屏幕阅读器会首先阅读 title 的内容,确保 title 准确描述页面 -->
|
|
|
|
|
<title>兑换详情</title>
|
|
|
|
|
<meta name="description" content="" />
|
|
|
|
|
<meta name="keywords" content="" />
|
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
|
|
|
|
<meta name="format-detection" content="telephone=no, email=no" />
|
|
|
|
|
<meta name="viewport"
|
|
|
|
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" />
|
|
|
|
|
<!-- A11Y:如果有无障碍方面的需求,建议使用下面的 viewport 设置,不要禁止页面缩放 -->
|
|
|
|
|
<!--<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />-->
|
|
|
|
|
<script>
|
|
|
|
|
var docEl = document.documentElement;
|
|
|
|
|
docEl.style.fontSize = 100 / 375 * docEl.clientWidth + 'px';
|
|
|
|
|
window.addEventListener('resize', function () {
|
|
|
|
|
docEl.style.fontSize = 100 / 375 * docEl.clientWidth + 'px';
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/common/axios.js?v=1367936144999"></script>
|
|
|
|
|
<script src="./dof-api.js"></script>
|
|
|
|
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/libs/vue.global.js"></script>
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<link rel="stylesheet" href="https://gw.alipayobjects.com/as/g/antui/antui/10.1.10/rem/widget/toast.css">
|
2024-05-30 17:02:05 +08:00
|
|
|
|
<link rel="stylesheet" href="./detail-style.css">
|
2024-05-30 18:19:07 +08:00
|
|
|
|
<link rel="stylesheet" href="./style.css">
|
2024-05-30 17:02:05 +08:00
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
<div id="app">
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<div class="header" v-if="state.showPage">
|
2024-05-30 17:38:23 +08:00
|
|
|
|
<img src="https://lsxd-customcard-h5.oss-cn-hangzhou.aliyuncs.com/department-of-finance/img/detail-bg.png"
|
|
|
|
|
alt="">
|
|
|
|
|
|
|
|
|
|
<div class="detail-box">
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<p class="order-status">{{ orderState(state.order.state) }}</p>
|
2024-05-30 17:38:23 +08:00
|
|
|
|
<div class="goods-info">
|
|
|
|
|
<p class="goods-title">商品信息</p>
|
|
|
|
|
|
|
|
|
|
<div class="goods-info-box">
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<img :src="state.product.icon" alt="">
|
2024-05-30 17:38:23 +08:00
|
|
|
|
<div style="padding-left: 0.09rem;">
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<p class="name">{{ sliceStr(state.order.prize_name)[0] }}</p>
|
|
|
|
|
<p class="type">{{ sliceStr(state.order.prize_name)[1] }}</p>
|
2024-05-30 17:38:23 +08:00
|
|
|
|
</div>
|
|
|
|
|
<p class="num">x1</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="order-info">
|
|
|
|
|
<p class="order-title">订单信息</p>
|
|
|
|
|
|
|
|
|
|
<div class="order-list">
|
|
|
|
|
<span>订单编号</span>
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<span>{{ state.order.order_no }}</span>
|
2024-05-30 17:38:23 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="order-list">
|
|
|
|
|
<span>充值账号</span>
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<span>{{ state.order.mobile }}</span>
|
2024-05-30 17:38:23 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="order-list">
|
|
|
|
|
<span>充值时间</span>
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<span>{{ state.order.create_time }}</span>
|
2024-05-30 17:38:23 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="order-list">
|
|
|
|
|
<span>充值状态</span>
|
2024-05-31 13:48:10 +08:00
|
|
|
|
<span>{{ orderState(state.order.state) }}</span>
|
2024-05-30 17:38:23 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
2024-05-31 13:48:10 +08:00
|
|
|
|
|
|
|
|
|
<div class="am-toast text" v-show="state.showToast">
|
|
|
|
|
<div class="am-toast-text">
|
|
|
|
|
{{ state.toastText }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-05-30 17:02:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
<script>
|
2024-05-31 13:48:10 +08:00
|
|
|
|
const { createApp, reactive, onMounted } = Vue
|
2024-05-30 17:02:05 +08:00
|
|
|
|
createApp({
|
2024-05-31 13:48:10 +08:00
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
|
|
const state = reactive({
|
|
|
|
|
showToast: false,
|
|
|
|
|
toastText: "",
|
|
|
|
|
product: {},
|
|
|
|
|
order: {},
|
|
|
|
|
showPage: false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 状态
|
|
|
|
|
const orderState = (status) => {
|
|
|
|
|
switch (status) {
|
|
|
|
|
case 1:
|
2024-05-31 17:14:43 +08:00
|
|
|
|
return "充值中";
|
2024-05-31 13:48:10 +08:00
|
|
|
|
case 2:
|
2024-05-31 17:14:43 +08:00
|
|
|
|
return "充值成功"
|
2024-05-31 13:48:10 +08:00
|
|
|
|
case 3:
|
2024-05-31 17:14:43 +08:00
|
|
|
|
return "充值失败"
|
2024-05-31 13:48:10 +08:00
|
|
|
|
case 4:
|
2024-05-31 17:21:15 +08:00
|
|
|
|
return "充值失败"
|
2024-05-31 13:48:10 +08:00
|
|
|
|
default:
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const sliceStr = (str) => {
|
|
|
|
|
if (str) {
|
|
|
|
|
return str.split("|")
|
|
|
|
|
}
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// toast
|
|
|
|
|
const openToast = (msg) => {
|
|
|
|
|
if (state.showToast) return;
|
|
|
|
|
state.toastText = msg;
|
|
|
|
|
state.showToast = true;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
state.showToast = false;
|
|
|
|
|
}, 1500);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 获取订单详情
|
|
|
|
|
const getOrderDetail = () => {
|
|
|
|
|
try {
|
|
|
|
|
req.axiosGet("/front/order/list").then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
state.product = res.data.data[0].product;
|
|
|
|
|
state.order = res.data.data[0];
|
|
|
|
|
state.showPage = true;
|
|
|
|
|
} else {
|
|
|
|
|
openToast(res.message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
|
|
getOrderDetail();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
orderState,
|
|
|
|
|
state,
|
|
|
|
|
sliceStr
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-30 17:02:05 +08:00
|
|
|
|
}).mount('#app')
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</html>
|