Sfoglia il codice sorgente

qr-code info 接口返回修改

wuyi 1 mese fa
parent
commit
7047306072
1 ha cambiato i file con 1 aggiunte e 4 eliminazioni
  1. 1 4
      src/services/qr-code.service.ts

+ 1 - 4
src/services/qr-code.service.ts

@@ -144,7 +144,6 @@ export class QrCodeService {
       throw new Error('二维码不存在')
     }
 
-    let scanCount = entity.scanCount
     let info = null
     let isVisible = true
 
@@ -160,7 +159,6 @@ export class QrCodeService {
     }
 
     if (!isAdmin && info && info.isVisible === false) {
-      scanCount = 0
       info = null
       isVisible = false
     } else if (info) {
@@ -187,9 +185,8 @@ export class QrCodeService {
       id: entity.id,
       qrCode: entity.qrCode,
       qrType: entity.qrType,
-      ...(isAdmin && { createdAt: entity.createdAt, updatedAt: entity.updatedAt }),
+      ...(isAdmin && { scanCount: entity.scanCount, createdAt: entity.createdAt, updatedAt: entity.updatedAt }),
       isActivated: entity.isActivated,
-      scanCount,
       isVisible,
       info
     }