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-29 11:20:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
836b309d21e8cc457cbb559b55b38aa22b896d8f
836b309d
1 parent
10a64d2e
fix 二维码状态判断修改
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
src/components/qrCode.vue
src/components/qrCodeSearch.vue
src/components/qrCode.vue
View file @
836b309
<!--
* @Date: 2024-01-16 10:06:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-29 1
0:41:49
* @LastEditTime: 2024-01-29 1
1:18:57
* @FilePath: /xysBooking/src/components/qrCode.vue
* @Description: 预约码卡组件
-->
...
...
@@ -19,7 +19,7 @@
</div>
<div class="center">
<img :src="userList[select_index].qr_code_url ">
<div v-if="useStatus === STATUS_CODE.CANCELED ||
useStatus === STATUS_CODE.USED
" class="qrcode-used">
<div v-if="useStatus === STATUS_CODE.CANCELED ||
STATUS_CODE.USED.includes(useStatus)
" class="qrcode-used">
<p>二维码{{ qr_code_status[useStatus] }}</p>
</div>
</div>
...
...
@@ -137,6 +137,7 @@ const qr_code_status = {
'1': '未激活',
'3': '待使用',
'5': '被取消',
'7': '已使用',
'9': '已使用',
};
...
...
@@ -144,15 +145,15 @@ const STATUS_CODE = {
APPLY: '1',
SUCCESS: '3',
CANCELED: '5',
USED:
'9'
USED:
['7', '9']
};
//
const refreshBtn = async () => {
//
const { code, data } = await qrcodeStatusAPI({ qr_code: userList.value[select_index.value].qr_code });
//
if (code) {
//
useStatus.value = data.status;
//
}
//
}
const refreshBtn = async () => {
const { code, data } = await qrcodeStatusAPI({ qr_code: userList.value[select_index.value].qr_code });
if (code) {
useStatus.value = data.status;
}
}
const formatStatus = (status) => {
switch (status) {
...
...
@@ -243,6 +244,8 @@ const poll = async () => {
const { code, data } = await qrcodeStatusAPI({ qr_code: userList.value[select_index.value].qr_code });
if (code) {
useStatus.value = data.status;
console.warn(STATUS_CODE.USED.includes(useStatus.value));
}
}
};
...
...
src/components/qrCodeSearch.vue
View file @
836b309
<!--
* @Date: 2024-01-16 10:06:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-29 1
0:42:1
1
* @LastEditTime: 2024-01-29 1
1:14:5
1
* @FilePath: /xysBooking/src/components/qrCodeSearch.vue
* @Description: 预约码卡组件
-->
...
...
@@ -16,7 +16,7 @@
</div>
<div class="center">
<img :src="userinfo.qr_code_url ">
<div v-if="useStatus === STATUS_CODE.CANCELED ||
useStatus === STATUS_CODE.USED
" class="qrcode-used">
<div v-if="useStatus === STATUS_CODE.CANCELED ||
STATUS_CODE.USED.includes(useStatus)
" class="qrcode-used">
<p>二维码{{ qr_code_status[useStatus] }}</p>
</div>
</div>
...
...
@@ -98,6 +98,7 @@ const qr_code_status = {
'1': '未激活',
'3': '待使用',
'5': '被取消',
'7': '已使用',
'9': '已使用',
};
...
...
@@ -105,7 +106,7 @@ const STATUS_CODE = {
APPLY: '1',
SUCCESS: '3',
CANCELED: '5',
USED:
'9'
USED:
['7', '9']
};
const formatStatus = (status) => {
...
...
Please
register
or
login
to post a comment