longz
2026-07-13 5882ba8863d77fdcc168b176c3ffb30e8a20556a
yuyueMiniProgram/src/pages/index/index.vue
@@ -14,6 +14,10 @@
  qrCodes: VisitorCodeDisplayTicket[]
}
function wait(ms: number) {
  return new Promise(resolve => setTimeout(resolve, ms))
}
const systemInfo = uni.getSystemInfoSync()
const { safeAreaInsets } = systemInfo
const parkFlowBottomPx = Math.max(24, Math.round(systemInfo.windowHeight / 8))
@@ -72,9 +76,9 @@
)
const visitorCodeCardMinHeightClass = computed(() => {
  if (hasLongAccessAreaText.value) {
    return currentOrderHasMultipleTickets.value ? 'min-h-[900rpx]' : 'min-h-[860rpx]'
    return currentOrderHasMultipleTickets.value ? 'min-h-[940rpx]' : 'min-h-[900rpx]'
  }
  return currentOrderHasMultipleTickets.value ? 'min-h-[804rpx]' : 'min-h-[760rpx]'
  return currentOrderHasMultipleTickets.value ? 'min-h-[844rpx]' : 'min-h-[800rpx]'
})
const currentTicket = computed(() => {
  if (!currentOrder.value) {
@@ -259,7 +263,7 @@
    errorCorrectionLevel: 'M',
    margin: 1,
  })
  const size = 300
  const size = 400
  const moduleCount = qr.modules.size
  const tileSize = size / moduleCount
  const canvasId = 'visitorQrCanvas'
@@ -285,14 +289,16 @@
    }
    context.draw(false, () => {
      uni.canvasToTempFilePath({
        canvasId,
        width: size,
        height: size,
        destWidth: size * 2,
        destHeight: size * 2,
        success: res => resolve(res.tempFilePath),
        fail: reject,
      void wait(500).then(() => {
        uni.canvasToTempFilePath({
          canvasId,
          width: size,
          height: size,
          destWidth: size * 2,
          destHeight: size * 2,
          success: res => resolve(res.tempFilePath),
          fail: reject,
        })
      })
    })
  })
@@ -671,7 +677,7 @@
                />
                <image
                  :src="currentOrder?.orderId === order.orderId ? currentTicket?.qrCode : order.qrCodes[0]?.qrCode"
                  class="h-[360rpx] w-[360rpx]"
                  class="h-[400rpx] w-[400rpx]"
                  mode="aspectFit"
                />
                <image
@@ -795,8 +801,8 @@
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 300px;
  height: 300px;
  width: 400px;
  height: 400px;
  pointer-events: none;
}
</style>