Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
xysBooking
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-01-22 14:19:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
aedf3b2c1d4e36f802c6fae01514f61c76f8b780
aedf3b2c
1 parent
ae58caf1
优化未预约的显示情况
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
src/components/qrCode.vue
src/views/auth.vue
src/views/bookingList.vue
src/components/qrCode.vue
View file @
aedf3b2
<!--
* @Date: 2024-01-16 10:06:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-22 1
2:23:30
* @LastEditTime: 2024-01-22 1
4:17:28
* @FilePath: /xysBooking/src/components/qrCode.vue
* @Description: 文件描述
-->
...
...
@@ -198,7 +198,7 @@ onMounted(async () => {
// 定义轮询函数
const poll = async () => {
// 二维码未使用不停轮询接口
if (useStatus.value !== '7') {
if (use
rList.value.length && use
Status.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;
...
...
src/views/auth.vue
View file @
aedf3b2
<!--
* @Date: 2022-08-29 13:55:31
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-2
0 09:33:07
* @LastEditTime: 2024-01-2
2 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) {
...
...
src/views/bookingList.vue
View file @
aedf3b2
...
...
@@ -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>
...
...
Please
register
or
login
to post a comment