fix(iOS): Move ticket-qr-popup to main package to resolve subpackage evaluate race condition

Root cause: user-order-detail referenced ticket-qr-popup inside vr-ticket-wallet
subpackage. On iOS batchInjectSubPackages, all subpackage JS modules were
evaluated, triggering componentCommon -> common.vue top-level getApp() crash
when globalData hadn't been populated yet. This was an intermittent race
condition (not 100% reproducible).

Fix: Moved ticket-qr-popup from vr-ticket-wallet/components/ to
components/ticket-qr-popup/ (main package). Updated all import paths and
pages.json declarations. Now user-order-detail never triggers subpackage
loading, eliminating the race condition entirely.

Changes:
- NEW: components/ticket-qr-popup/index.vue (copied from subpackage)
- DELETE: pages/plugins/vr-ticket-wallet/components/ticket-qr-popup/
- MODIFY: pages/user-order-detail/user-order-detail.vue (import path)
- MODIFY: pages/plugins/vr-ticket-wallet/ticket-wallet.vue (import path)
- MODIFY: pages.json (usingComponents path)
master
Council 2026-07-01 03:29:13 +08:00
parent 21ba9b7c42
commit e11e2d3a6e
4 changed files with 8 additions and 4 deletions

View File

@ -394,10 +394,14 @@
"enablePullDownRefresh": true,
"navigationBarTitleText": "",
"usingComponents": {
"component-hospital-order-detail": "/pages/plugins/hospital/components/order-detail/order-detail"
"component-hospital-order-detail": "/pages/plugins/hospital/components/order-detail/order-detail",
"ticket-qr-popup": "/components/ticket-qr-popup/index",
"w-qrcode": "/uni_modules/wmf-code/components/w-qrcode/w-qrcode",
"w-barcode": "/uni_modules/wmf-code/components/w-barcode/w-barcode"
},
"componentPlaceholder": {
"component-hospital-order-detail": "view"
"component-hospital-order-detail": "view",
"ticket-qr-popup": "view"
}
}
}

View File

@ -268,7 +268,7 @@
<script>
import uPopup from '@/components/u-popup/u-popup.vue';
import TicketQrPopup from './components/ticket-qr-popup/index.vue';
import TicketQrPopup from '@/components/ticket-qr-popup/index.vue';
import componentCommon from '@/components/common/common';
import componentQuickNav from '@/components/quick-nav/quick-nav';

View File

@ -553,7 +553,7 @@
import componentPayment from '@/components/payment/payment';
import componentHospitalOrderDetail from '@/pages/plugins/hospital/components/order-detail/order-detail';
import uPopup from '@/components/u-popup/u-popup.vue';
import TicketQrPopup from '@/pages/plugins/vr-ticket-wallet/components/ticket-qr-popup/index.vue';
import TicketQrPopup from '@/components/ticket-qr-popup/index.vue';
var common_static_url = app.globalData.get_static_url('common');
export default {
data() {