From 364b2b32f2d0d2e4c69409ada24daa5cbd2c487b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=A6=E6=98=9F=E6=98=9F?= <605893810@qq.com>
Date: Mon, 31 Aug 2026 15:06:55 +0800
Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=B0=8F=E7=A8=8B=E5=BA=8F?=
=?UTF-8?q?=E5=8E=8B=E4=BD=8F=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
main.js | 106 +++++++------------
manifest.json | 5 +-
pages.json | 8 +-
pages/mine_package/mine_purse/mine_purse.vue | 50 ++++++---
vite.config.js | 1 +
5 files changed, 86 insertions(+), 84 deletions(-)
diff --git a/main.js b/main.js
index c1b351a..6e7bd6d 100644
--- a/main.js
+++ b/main.js
@@ -1,70 +1,46 @@
import App from './App'
import messages from './locale/index'
import uviewPlus from '@/uni_modules/uview-plus'
-import QiaobaoAssistant from '@/components/qiaobao-assistant/qiaobao-assistant.vue'
-// #ifndef MP-WEIXIN
-import VueClipboard from 'vue-clipboard2'
-// #endif
-
-let i18nConfig = {
- locale: uni.getLocale(),
- messages
-}
-
-// #ifndef VUE3
-import Vue from 'vue'
-import VueI18n from 'vue-i18n'
-
-import '@/uni_modules/uview-plus/theme.scss' // 引入uView的样式
-
-// #ifndef MP-WEIXIN
-Vue.use(VueClipboard);
-// #endif
-
-Vue.use(uviewPlus)
-Vue.use(VueI18n)
-Vue.component('qiaobao-assistant', QiaobaoAssistant)
-const i18n = new VueI18n(i18nConfig)
-Vue.config.productionTip = false
-App.mpType = 'app'
-const app = new Vue({
- i18n,
- ...App
-})
-app.$mount()
-// #endif
-
-// #ifdef VUE3
-import { createSSRApp } from 'vue'
-import { createI18n } from 'vue-i18n'
-const i18n = createI18n(i18nConfig)
+import { createSSRApp, h } from 'vue'
+import { createI18n } from 'vue-i18n'
+
+// #ifdef H5
+import VueClipboard from 'vue-clipboard2'
+// #endif
+
+const i18nConfig = {
+ locale: uni.getLocale(),
+ messages
+}
+
+const i18n = createI18n(i18nConfig)
+
export function createApp() {
const app = createSSRApp(App)
- app.component('qiaobao-assistant', QiaobaoAssistant)
- // #ifdef H5
- app.component('AsyncError', {
- props: ['error'],
- mounted() {
- console.error('[AsyncPageError]', this.error)
- },
- render() {
- const detail = import.meta.env.DEV && this.error
- ? `:${this.error.message || String(this.error)}`
- : ''
- return h('div', {
- class: 'uni-async-error',
- onClick: () => window.location.reload()
- }, `页面加载失败${detail},点击屏幕重试`)
- }
- })
- // #endif
- // #ifndef MP-WEIXIN
- app.use(VueClipboard);
- // #endif
- app.use(i18n)
- app.use(uviewPlus)
- return {
- app
- }
-}
-// #endif
+
+ // #ifdef H5
+ app.component('AsyncError', {
+ props: ['error'],
+ mounted() {
+ console.error('[AsyncPageError]', this.error)
+ },
+ render() {
+ const detail = import.meta.env.DEV && this.error
+ ? `:${this.error.message || String(this.error)}`
+ : ''
+ return h('div', {
+ class: 'uni-async-error',
+ onClick: () => window.location.reload()
+ }, `页面加载失败${detail},点击屏幕重试`)
+ }
+ })
+ app.use(VueClipboard);
+ // #endif
+
+ app.use(i18n)
+ app.use(uviewPlus)
+
+ return {
+ app
+ }
+}
diff --git a/manifest.json b/manifest.json
index c66dacc..635f130 100644
--- a/manifest.json
+++ b/manifest.json
@@ -182,7 +182,10 @@
}
},
"mp-alipay" : {
- "usingComponents" : true
+ "usingComponents" : true,
+ "optimization" : {
+ "subPackages" : true
+ }
},
"mp-baidu" : {
"usingComponents" : true
diff --git a/pages.json b/pages.json
index 06ef73f..6a2eabe 100644
--- a/pages.json
+++ b/pages.json
@@ -5,7 +5,9 @@
"custom": {
"^u--(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
- "^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue"
+ "^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
+ "^qiaobao-assistant": "@/components/qiaobao-assistant/qiaobao-assistant.vue",
+ "^TopSafe": "@/components/common/top-safe.nvue"
}
},
"pages": [
@@ -748,7 +750,7 @@
"preloadRule": {
"pages/home/home": {
"network": "all",
- "packages": ["pages/other_package"]
+ "packages": ["pages/other_package", "pages/login_package"]
},
"pages/sort/sort": {
"network": "all",
@@ -760,7 +762,7 @@
},
"pages/mine/mine": {
"network": "all",
- "packages": ["pages/mine_package"]
+ "packages": ["pages/mine_package", "pages/login_package"]
}
},
"condition": {
diff --git a/pages/mine_package/mine_purse/mine_purse.vue b/pages/mine_package/mine_purse/mine_purse.vue
index d539a06..e1538bc 100644
--- a/pages/mine_package/mine_purse/mine_purse.vue
+++ b/pages/mine_package/mine_purse/mine_purse.vue
@@ -37,9 +37,11 @@
{{ item.lockAmount || 0 }}
- {{ item.categoty === "raffle" ? "不可用次数" : "不可用余额" }}
-
+
+ {{ item.categoty === "raffle" ? "不可用次数" : "不可用余额" }}
+
+
+
@@ -53,20 +55,20 @@
-
-
+
+