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