import App from './App' import { injectUpSdk } from '@/common/petrolVoucher.js' // xuchao: 云闪付控件 SDK 预热——HBuilderX 构建不吃根 index.html,静态标签无效, // 在 App 挂载前(document-start 最早 JS 点)注入,逼近静态 head 加载时机(石油券支付修复) injectUpSdk() // xuchao: 真机调试开关——URL 带 ?vc=1 时加载 vconsole,可看 console/网络/存储; // 普通用户链接无此参数,零影响 if (typeof window !== 'undefined' && /[?&#]vc=1/.test(window.location.href || '')) { import('vconsole').then(m => { const V = m.default || m.VConsole; if (V) new V() }).catch(() => {}) } // #ifndef VUE3 import Vue from 'vue' import './uni.promisify.adaptor' import uView from './uview-ui' Vue.use(uView) Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ ...App }) import httpInterceptor from '@/common/http.interceptor.js' // 这里需要写在最后,是为了等Vue创建对象完成,引入"app"对象(也即页面的"this"实例) Vue.use(httpInterceptor, app) import httpApi from '@/common/http.api.js'; Vue.use(httpApi, app) app.$mount() // #endif // #ifdef VUE3 import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) return { app } } // #endif