hookehuyr

优化未预约的显示情况

<!--
* @Date: 2024-01-16 10:06:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-22 12:23:30
* @LastEditTime: 2024-01-22 14:17:28
* @FilePath: /xysBooking/src/components/qrCode.vue
* @Description: 文件描述
-->
......@@ -198,7 +198,7 @@ onMounted(async () => {
// 定义轮询函数
const poll = async () => {
// 二维码未使用不停轮询接口
if (useStatus.value !== '7') {
if (userList.value.length && useStatus.value !== '7') {
const { code, data } = await qrcodeStatusAPI({ qr_code: userList.value[select_index.value].qr_code });
if (code) {
useStatus.value = data.status;
......@@ -332,6 +332,7 @@ onUnmounted(() => {
justify-content: center;
align-items: center;
flex-direction: column;
margin-bottom: 1rem;
img {
margin-top: 1rem;
margin-bottom: 1rem;
......
<!--
* @Date: 2022-08-29 13:55:31
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-20 09:33:07
* @LastEditTime: 2024-01-22 14:12:09
* @FilePath: /xysBooking/src/views/auth.vue
* @Description: 授权模块
-->
......@@ -25,7 +25,10 @@ onMounted(() => {
let raw_url = encodeURIComponent(location.origin + location.pathname + $route.query.href); // 未授权的地址
// 当用户完成授权后,使用 pushState() 方法将授权页面从浏览器历史记录中移除
window.history.pushState(null, '', '/'); // 将授权页面替换为根路径或其他合适的路径
let reload_url = import.meta.env.DEV
? '/'
: location.origin + location.pathname;
window.history.pushState(null, '', reload_url); // 将授权页面替换为根路径或其他合适的路径
// 在返回按钮被点击时,检测历史记录的变化并进行处理
// window.addEventListener('popstate', function(event) {
......
......@@ -21,6 +21,10 @@
<div class="booking-time">下单时间:<span>{{ item.order_time }}</span></div>
</div>
</div>
<div v-if="!bookingList.length" class="no-qrcode">
<img src="https://cdn.ipadbiz.cn/xys/booking/%E6%9A%82%E6%97%A0@2x.png" style="width: 10rem;">
<div class="no-qrcode-title">您还没有预约过参观</div>
</div>
</div>
</template>
......@@ -165,5 +169,21 @@ onMounted(async () => {
}
}
}
.no-qrcode {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
img {
margin-top: 1rem;
margin-bottom: 1rem;
width: 10rem;
}
.no-qrcode-title {
color: #A67939;
font-size: 1.05rem;
}
}
}
</style>
......