hookehuyr

fix

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 14:17:28 4 + * @LastEditTime: 2024-01-24 17:44:15
5 * @FilePath: /xysBooking/src/components/qrCode.vue 5 * @FilePath: /xysBooking/src/components/qrCode.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -173,7 +173,7 @@ onMounted(async () => { ...@@ -173,7 +173,7 @@ onMounted(async () => {
173 if (code) { 173 if (code) {
174 data.forEach(item => { 174 data.forEach(item => {
175 // 生成二维码地址 175 // 生成二维码地址
176 - item.qr_code_url = 'http://oa.onwall.cn/admin?m=srv&a=get_qrcode&key=' + item.qr_code 176 + item.qr_code_url = 'http://oa.onwall.cn/admin?m=srv&a=get_qrcode&key=' + item.qr_code;
177 // 二维码使用时间 177 // 二维码使用时间
178 let begin_time = item.begin_time.slice(0, -3); 178 let begin_time = item.begin_time.slice(0, -3);
179 let end_time = item.end_time.slice(0, -3); 179 let end_time = item.end_time.slice(0, -3);
...@@ -181,16 +181,18 @@ onMounted(async () => { ...@@ -181,16 +181,18 @@ onMounted(async () => {
181 // 181 //
182 item.datetime = `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}` 182 item.datetime = `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`
183 }); 183 });
184 - userList.value = data; 184 + // 剔除qr_code为空的二维码
185 + userList.value = data.filter(item => item.qr_code !== '');
185 } 186 }
186 } else { 187 } else {
187 const { code, data } = await billPersonAPI({ pay_id }); 188 const { code, data } = await billPersonAPI({ pay_id });
188 if (code) { 189 if (code) {
189 data.forEach(item => { 190 data.forEach(item => {
190 // 生成二维码地址 191 // 生成二维码地址
191 - item.qr_code_url = 'http://oa.onwall.cn/admin?m=srv&a=get_qrcode&key=' + item.qr_code 192 + item.qr_code_url = 'http://oa.onwall.cn/admin?m=srv&a=get_qrcode&key=' + item.qr_code;
192 }); 193 });
193 - userList.value = data; 194 + // 剔除qr_code为空的二维码
195 + userList.value = data.filter(item => item.qr_code !== '');
194 } 196 }
195 } 197 }
196 }); 198 });
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
37 <script setup> 37 <script setup>
38 import { ref } from 'vue' 38 import { ref } from 'vue'
39 import { useRoute, useRouter } from 'vue-router' 39 import { useRoute, useRouter } from 'vue-router'
40 - 40 +import { useGo } from '@/hooks/useGo'
41 import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js' 41 import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js'
42 //import { } from '@/utils/generateModules.js' 42 //import { } from '@/utils/generateModules.js'
43 //import { } from '@/utils/generateIcons.js' 43 //import { } from '@/utils/generateIcons.js'
...@@ -45,6 +45,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@ ...@@ -45,6 +45,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
45 const $route = useRoute(); 45 const $route = useRoute();
46 const $router = useRouter(); 46 const $router = useRouter();
47 useTitle($route.meta.title); 47 useTitle($route.meta.title);
48 +const go = useGo();
48 49
49 const props = defineProps({ 50 const props = defineProps({
50 data: { 51 data: {
......