From 5f976b01395ee3b1595ebec5cfe2cb687d8412d9 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Fri, 10 Oct 2025 14:50:45 +0800 Subject: [PATCH 01/77] =?UTF-8?q?refactor(scripts):=20=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E4=B8=BA=E6=9C=80=E5=B0=8F?= =?UTF-8?q?=E5=8F=AF=E8=BF=90=E8=A1=8C=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/create-base-files.js | 171 +---------------------------------- 1 file changed, 2 insertions(+), 169 deletions(-) diff --git a/scripts/create-base-files.js b/scripts/create-base-files.js index 0cf31cc..6734968 100644 --- a/scripts/create-base-files.js +++ b/scripts/create-base-files.js @@ -9,162 +9,9 @@ import { fileURLToPath } from 'node:url' const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) -const manifest = { - 'name': 'unibest', - 'appid': '__UNI__D1E5001', - 'description': '', - 'versionName': '1.0.0', - 'versionCode': '100', - 'transformPx': false, - 'app-plus': { - usingComponents: true, - nvueStyleCompiler: 'uni-app', - compilerVersion: 3, - splashscreen: { - alwaysShowBeforeRender: true, - waiting: true, - autoclose: true, - delay: 0, - }, - modules: {}, - distribute: { - android: { - permissions: [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - ], - minSdkVersion: 21, - targetSdkVersion: 30, - abiFilters: [ - 'armeabi-v7a', - 'arm64-v8a', - ], - }, - ios: {}, - sdkConfigs: {}, - icons: { - android: { - hdpi: 'static/app/icons/72x72.png', - xhdpi: 'static/app/icons/96x96.png', - xxhdpi: 'static/app/icons/144x144.png', - xxxhdpi: 'static/app/icons/192x192.png', - }, - ios: { - appstore: 'static/app/icons/1024x1024.png', - ipad: { - 'app': 'static/app/icons/76x76.png', - 'app@2x': 'static/app/icons/152x152.png', - 'notification': 'static/app/icons/20x20.png', - 'notification@2x': 'static/app/icons/40x40.png', - 'proapp@2x': 'static/app/icons/167x167.png', - 'settings': 'static/app/icons/29x29.png', - 'settings@2x': 'static/app/icons/58x58.png', - 'spotlight': 'static/app/icons/40x40.png', - 'spotlight@2x': 'static/app/icons/80x80.png', - }, - iphone: { - 'app@2x': 'static/app/icons/120x120.png', - 'app@3x': 'static/app/icons/180x180.png', - 'notification@2x': 'static/app/icons/40x40.png', - 'notification@3x': 'static/app/icons/60x60.png', - 'settings@2x': 'static/app/icons/58x58.png', - 'settings@3x': 'static/app/icons/87x87.png', - 'spotlight@2x': 'static/app/icons/80x80.png', - 'spotlight@3x': 'static/app/icons/120x120.png', - }, - }, - }, - }, - compatible: { - ignoreVersion: true, - }, - }, - 'quickapp': {}, - 'mp-weixin': { - appid: 'wxa2abb91f64032a2b', - setting: { - urlCheck: false, - es6: true, - minified: true, - }, - usingComponents: true, - optimization: { - subPackages: true, - }, - }, - 'mp-alipay': { - usingComponents: true, - styleIsolation: 'shared', - optimization: { - subPackages: true, - }, - }, - 'mp-baidu': { - usingComponents: true, - }, - 'mp-toutiao': { - usingComponents: true, - }, - 'uniStatistics': { - enable: false, - }, - 'vueVersion': '3', - 'h5': { - router: { - base: '/', - }, - }, -} - +// 最简可运行配置 +const manifest = { } const pages = { - globalStyle: { - navigationStyle: 'default', - navigationBarTitleText: 'unibest', - navigationBarBackgroundColor: '#f8f8f8', - navigationBarTextStyle: 'black', - backgroundColor: '#FFFFFF', - }, - easycom: { - autoscan: true, - custom: { - '^fg-(.*)': '@/components/fg-$1/fg-$1.vue', - '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)': 'z-paging/components/z-paging$1/z-paging$1.vue', - }, - }, - tabBar: { - custom: true, - color: '#999999', - selectedColor: '#018d71', - backgroundColor: '#F8F8F8', - borderStyle: 'black', - height: '50px', - fontSize: '10px', - iconWidth: '24px', - spacing: '3px', - list: [ - { - text: '首页', - pagePath: 'pages/index/index', - }, - { - text: '我的', - pagePath: 'pages/me/me', - }, - ], - }, pages: [ { path: 'pages/index/index', @@ -182,20 +29,6 @@ const pages = { }, }, ], - subPackages: [ - { - root: 'pages-sub', - pages: [ - { - path: 'demo/index', - type: 'page', - style: { - navigationBarTitleText: '分包页面', - }, - }, - ], - }, - ], } // 使用修复后的 __dirname 来解析文件路径 From aa980ecfc22c8f6a057c4134da28b2ff44e5ca13 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Fri, 10 Oct 2025 17:33:30 +0800 Subject: [PATCH 02/77] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7=20uni-pages,?= =?UTF-8?q?=20=E5=8E=BB=E6=8E=89=20h5=20=E7=9A=84=20hack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- pages.config.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 21edf61..823d7b0 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "@uni-helper/vite-plugin-uni-components": "0.2.3", "@uni-helper/vite-plugin-uni-layouts": "0.1.11", "@uni-helper/vite-plugin-uni-manifest": "0.2.8", - "@uni-helper/vite-plugin-uni-pages": "0.3.13", + "@uni-helper/vite-plugin-uni-pages": "0.3.19", "@uni-helper/vite-plugin-uni-platform": "0.0.5", "@uni-ku/bundle-optimizer": "v1.3.15-beta.2", "@uni-ku/root": "1.4.1", diff --git a/pages.config.ts b/pages.config.ts index 3e70458..1aa275e 100644 --- a/pages.config.ts +++ b/pages.config.ts @@ -1,4 +1,3 @@ -import { isH5 } from '@uni-helper/uni-env' import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages' import { tabBar } from './src/tabbar/config' @@ -20,6 +19,5 @@ export default defineUniPages({ }, }, // tabbar 的配置统一在 “./src/tabbar/config.ts” 文件中 - // 无tabbar模式下,h5 设置为 {} 为了防止浏览器报错导致白屏 - tabBar: tabBar || (isH5 ? {} : undefined) as any, + tabBar: tabBar as any, }) From 3fddf6f46a38d224bbfe097e45ea0c1d4f4f9f04 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Fri, 10 Oct 2025 17:34:00 +0800 Subject: [PATCH 03/77] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E8=87=B33.18.6=E5=B9=B6=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 823d7b0..a46820f 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "unibest", "type": "module", - "version": "3.18.5", - "unibest-version": "3.18.5", - "update-time": "2025-10-03", + "version": "3.18.6", + "unibest-version": "3.18.6", + "update-time": "2025-10-10", "packageManager": "pnpm@10.10.0", "description": "unibest - 最好的 uniapp 开发模板", "generate-time": "用户创建项目时生成", From b112c97f7a5ce600b960429da2f4a61c697b72d0 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Sat, 11 Oct 2025 10:05:37 +0800 Subject: [PATCH 04/77] =?UTF-8?q?refactor(store):=20=E6=B7=BB=E5=8A=A0=20s?= =?UTF-8?q?etActivePinia=20=E4=BB=A5=E6=BF=80=E6=B4=BB=20store=20=E5=AE=9E?= =?UTF-8?q?=E4=BE=8B,=20=E8=A7=A3=E5=86=B3APP=E7=99=BD=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/index.ts b/src/store/index.ts index d5e3770..d09a35c 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,4 +1,4 @@ -import { createPinia } from 'pinia' +import { createPinia, setActivePinia } from 'pinia' import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化 const store = createPinia() @@ -10,6 +10,7 @@ store.use( }, }), ) +setActivePinia(store) export default store From 810fe4339ef35b5a2dc90044dadd3d59d3238608 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Sat, 11 Oct 2025 10:10:29 +0800 Subject: [PATCH 05/77] =?UTF-8?q?fix(store):=20=E7=AB=8B=E5=8D=B3=E6=BF=80?= =?UTF-8?q?=E6=B4=BBPinia=E5=AE=9E=E4=BE=8B=E4=BB=A5=E8=A7=A3=E5=86=B3APP?= =?UTF-8?q?=E7=AB=AF=E7=99=BD=E5=B1=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在app.use(store)之前调用store时确保Pinia实例已激活,避免白屏问题 --- src/store/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/store/index.ts b/src/store/index.ts index d09a35c..2f5a7c3 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -10,6 +10,7 @@ store.use( }, }), ) +// 立即激活 Pinia 实例, 这样即使在 app.use(store)之前调用 store 也能正常工作 (解决APP端白屏问题) setActivePinia(store) export default store From 1dccf1ef5f5c9833b56cb3e8e7053b259a77b9ec Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 16:26:52 +0800 Subject: [PATCH 06/77] =?UTF-8?q?fix(=E5=B0=8F=E7=A8=8B=E5=BA=8F):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=94=AF=E4=BB=98=E5=AE=9D=E5=92=8C=E4=B8=81?= =?UTF-8?q?=E4=B8=81=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9A=84globalObjectMode?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决支付宝小程序和丁丁小程序开发工具报错【globalThis is not defined】的问题 --- manifest.config.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/manifest.config.ts b/manifest.config.ts index 7702df5..d9a8a38 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -141,6 +141,13 @@ export default defineManifestConfig({ optimization: { subPackages: true, }, + componentOptions: { + // 解决支付宝小程序和丁丁小程序开发工具报错 【globalThis is not defined】 + globalObjectMode: 'enable', + transpile: { + ignore: ['node_modules/**'], + }, + }, }, 'mp-baidu': { usingComponents: true, From 49d166a3911d48b75462cefc813b1db808fad2a9 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 16:30:55 +0800 Subject: [PATCH 07/77] =?UTF-8?q?fix(=E5=B0=8F=E7=A8=8B=E5=BA=8F):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=AF=E4=BB=98=E5=AE=9D=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=BC=80=E5=8F=91=E5=B7=A5=E5=85=B7=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整编译配置,解决支付宝小程序开发工具中 globalThis 未定义的报错问题,并优化忽略 node_modules 的配置 --- manifest.config.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manifest.config.ts b/manifest.config.ts index d9a8a38..b420eb2 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -141,11 +141,13 @@ export default defineManifestConfig({ optimization: { subPackages: true, }, - componentOptions: { - // 解决支付宝小程序和丁丁小程序开发工具报错 【globalThis is not defined】 + // 解决支付宝小程序开发工具报错 【globalThis is not defined】 + compileOptions: { globalObjectMode: 'enable', transpile: { - ignore: ['node_modules/**'], + script: { + ignore: ['node_modules/**'], + }, }, }, }, From 4c5ed50fb65fefcfcc493fded22dd14d23c657cb Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 17:04:51 +0800 Subject: [PATCH 08/77] =?UTF-8?q?refactor(scripts):=20=E6=8B=86=E5=88=86?= =?UTF-8?q?=20prepare=20=E8=84=9A=E6=9C=AC=E4=B8=BA=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 prepare 和 docker:prepare 脚本拆分为独立的 init-husky 和 init-baseFile 命令 --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a46820f..66007f1 100644 --- a/package.json +++ b/package.json @@ -88,8 +88,10 @@ "build:quickapp-webview-union": "uni build -p quickapp-webview-union", "type-check": "vue-tsc --noEmit", "openapi": "openapi-ts", - "prepare": "git init && husky && node ./scripts/create-base-files.js", - "docker:prepare": "node ./scripts/create-base-files.js", + "init-husky": "git init && husky", + "init-baseFile": "node ./scripts/create-base-files.js", + "prepare": "pnpm init-husky & pnpm init-baseFile", + "docker:prepare": "pnpm init-baseFile", "lint": "eslint", "lint:fix": "eslint --fix" }, From dac85b44fdd7395e56fd2f00572808669fea1fb5 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 17:05:55 +0800 Subject: [PATCH 09/77] =?UTF-8?q?refactor(docker):=20=E9=87=8D=E6=9E=84doc?= =?UTF-8?q?ker=E7=9B=B8=E5=85=B3=E6=96=87=E4=BB=B6=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E5=B9=B6=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将docker相关文件(.dockerignore, Dockerfile, nginx.conf, docker.md)移动到codes/docker目录下 移除package.json中冗余的docker:prepare脚本 --- .dockerignore => codes/docker/.dockerignore | 0 Dockerfile => codes/docker/Dockerfile | 0 docker.md => codes/docker/docker.md | 0 nginx.conf => codes/docker/nginx.conf | 0 package.json | 1 - 5 files changed, 1 deletion(-) rename .dockerignore => codes/docker/.dockerignore (100%) rename Dockerfile => codes/docker/Dockerfile (100%) rename docker.md => codes/docker/docker.md (100%) rename nginx.conf => codes/docker/nginx.conf (100%) diff --git a/.dockerignore b/codes/docker/.dockerignore similarity index 100% rename from .dockerignore rename to codes/docker/.dockerignore diff --git a/Dockerfile b/codes/docker/Dockerfile similarity index 100% rename from Dockerfile rename to codes/docker/Dockerfile diff --git a/docker.md b/codes/docker/docker.md similarity index 100% rename from docker.md rename to codes/docker/docker.md diff --git a/nginx.conf b/codes/docker/nginx.conf similarity index 100% rename from nginx.conf rename to codes/docker/nginx.conf diff --git a/package.json b/package.json index 66007f1..420feb2 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,6 @@ "init-husky": "git init && husky", "init-baseFile": "node ./scripts/create-base-files.js", "prepare": "pnpm init-husky & pnpm init-baseFile", - "docker:prepare": "pnpm init-baseFile", "lint": "eslint", "lint:fix": "eslint --fix" }, From 121be5fd6cf4d91d131ba41e388d4c8392e9df0c Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 17:06:32 +0800 Subject: [PATCH 10/77] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20package.jso?= =?UTF-8?q?n=20=E7=89=88=E6=9C=AC=E5=8F=B7=E8=87=B3=203.18.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 420feb2..7495234 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "unibest", "type": "module", - "version": "3.18.6", - "unibest-version": "3.18.6", - "update-time": "2025-10-10", + "version": "3.18.7", + "unibest-version": "3.18.7", + "update-time": "2025-10-13", "packageManager": "pnpm@10.10.0", "description": "unibest - 最好的 uniapp 开发模板", "generate-time": "用户创建项目时生成", From 14594dadc6ba15bcd5a6cb6601f3537e6d178559 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 20:44:25 +0800 Subject: [PATCH 11/77] =?UTF-8?q?fix(tabbar):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AE=9D=E5=B9=B3=E5=8F=B0=E5=8E=9F=E7=94=9F?= =?UTF-8?q?tabbar=E9=9A=90=E8=97=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在支付宝平台添加onMounted钩子处理原生tabbar隐藏,与微信平台逻辑保持一致 --- src/tabbar/index.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/tabbar/index.vue b/src/tabbar/index.vue index c600530..9bd3c6d 100644 --- a/src/tabbar/index.vue +++ b/src/tabbar/index.vue @@ -39,7 +39,7 @@ function handleClick(index: number) { uni.navigateTo({ url }) } } -// #ifndef MP-WEIXIN +// #ifndef MP-WEIXIN || MP-ALIPAY // 因为有了 custom:true, 微信里面不需要多余的hide操作 onLoad(() => { // 解决原生 tabBar 未隐藏导致有2个 tabBar 的问题 @@ -54,6 +54,21 @@ onLoad(() => { }) }) // #endif + +// #ifdef MP-ALIPAY +onMounted(() => { + // 解决支付宝自定义tabbar 未隐藏导致有2个 tabBar 的问题; 注意支付宝很特别,需要在 onMounted 钩子调用 + needHideNativeTabbar + && uni.hideTabBar({ + fail(err) { + console.log('hideTabBar fail: ', err) + }, + success(res) { + // console.log('hideTabBar success: ', res) + }, + }) +}) +// #endif const activeColor = 'var(--wot-color-theme, #1890ff)' const inactiveColor = '#666' function getColorByIndex(index: number) { From 51414d90c9ef85170bdf02cacfb92fb3e00d7f5d Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 20:46:31 +0800 Subject: [PATCH 12/77] =?UTF-8?q?fix(tabbar):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AE=9D=E8=87=AA=E5=AE=9A=E4=B9=89tabbar?= =?UTF-8?q?=E6=9C=AA=E9=9A=90=E8=97=8F=E5=AF=BC=E8=87=B4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=A4=E4=B8=AAtabbar=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 支付宝环境下需要在onMounted钩子中调用hideTabBar来隐藏原生tabbar --- src/tabbar/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tabbar/index.vue b/src/tabbar/index.vue index 9bd3c6d..6e1f982 100644 --- a/src/tabbar/index.vue +++ b/src/tabbar/index.vue @@ -58,7 +58,7 @@ onLoad(() => { // #ifdef MP-ALIPAY onMounted(() => { // 解决支付宝自定义tabbar 未隐藏导致有2个 tabBar 的问题; 注意支付宝很特别,需要在 onMounted 钩子调用 - needHideNativeTabbar + customTabbarEnable // 另外,支付宝里面,只要是 customTabbar 都需要隐藏 && uni.hideTabBar({ fail(err) { console.log('hideTabBar fail: ', err) From e18f437e468f1805aee84cabf6867c2060e3316f Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 13 Oct 2025 20:48:24 +0800 Subject: [PATCH 13/77] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E8=87=B33.18.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7495234..99b40dc 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "unibest", "type": "module", - "version": "3.18.7", - "unibest-version": "3.18.7", + "version": "3.18.8", + "unibest-version": "3.18.8", "update-time": "2025-10-13", "packageManager": "pnpm@10.10.0", "description": "unibest - 最好的 uniapp 开发模板", From d53bf38274886617e2f406a41830526719d91a91 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Tue, 14 Oct 2025 11:06:52 +0800 Subject: [PATCH 14/77] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=96=87=E6=A1=A3=E8=A7=84=E8=8C=83=E5=8F=8A=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加支付宝小程序开发命令和构建配置 - 明确全局组件和局部组件的存放位置 - 更新第三方组件库支持列表 - 补充项目功能说明和核心文件描述 - 修正页面配置宏定义说明 --- .cursor/rules/development-workflow.mdc | 4 +++- .cursor/rules/project-overview.mdc | 4 +++- .cursor/rules/uni-app-patterns.mdc | 6 +++--- .cursor/rules/vue-typescript-patterns.mdc | 5 +++-- .trae/rules/project_rules.md | 18 +++++++++++------- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.cursor/rules/development-workflow.mdc b/.cursor/rules/development-workflow.mdc index 7a8c901..4da3f43 100644 --- a/.cursor/rules/development-workflow.mdc +++ b/.cursor/rules/development-workflow.mdc @@ -5,6 +5,7 @@ 2. 开发环境: - H5: `pnpm dev` 或 `pnpm dev:h5` - 微信小程序: `pnpm dev:mp` + - 支付宝小程序: `pnpm dev:mp-alipay` - APP: `pnpm dev:app` ## 代码规范 @@ -15,7 +16,8 @@ ## 构建和部署 - H5 构建:`pnpm build:h5` -- 小程序构建:`pnpm build:mp` +- 微信小程序构建:`pnpm build:mp` +- 支付宝小程序构建:`pnpm build:mp-alipay` - APP 构建:`pnpm build:app` - 类型检查:`pnpm type-check` diff --git a/.cursor/rules/project-overview.mdc b/.cursor/rules/project-overview.mdc index 335b480..f0d613e 100644 --- a/.cursor/rules/project-overview.mdc +++ b/.cursor/rules/project-overview.mdc @@ -8,7 +8,7 @@ alwaysApply: true ## 项目特点 - 支持 H5、小程序、APP 多平台开发 - 使用最新的前端技术栈 -- 内置约定式路由、layout布局、请求封装等功能 +- 内置约定式路由、layout布局、请求封装、登录拦截、自定义tabbar等功能 - 无需依赖 HBuilderX,支持命令行开发 ## 核心配置文件 @@ -26,9 +26,11 @@ alwaysApply: true - `src/http/` - HTTP 请求封装 - `src/store/` - 状态管理 - `src/tabbar/` - 底部导航栏 +- `src/App.ku.vue` - 全局根组件(类似 App.vue 里面的 template作用) ## 开发命令 - `pnpm dev` - 开发 H5 版本 - `pnpm dev:mp` - 开发微信小程序 +- `pnpm dev:mp-alipay` - 开发支付宝小程序(含钉钉) - `pnpm dev:app` - 开发 APP 版本 - `pnpm build` - 构建生产版本 diff --git a/.cursor/rules/uni-app-patterns.mdc b/.cursor/rules/uni-app-patterns.mdc index 956566d..143b0b6 100644 --- a/.cursor/rules/uni-app-patterns.mdc +++ b/.cursor/rules/uni-app-patterns.mdc @@ -3,12 +3,12 @@ ## 页面开发 - 页面文件放在 [src/pages/](mdc:src/pages/) 目录下 - 使用约定式路由,文件名即路由路径 -- 页面配置在仅需要在 `route-block` 中配置标题等内容即可,会自动生成到 `pages.json` 中 +- 页面配置在仅需要在 宏`definePage` 中配置标题等内容即可,会自动生成到 `pages.json` 中 ## 组件开发 -- 组件文件放在 [src/components/](mdc:src/components/) 目录下 +- 组件文件放在 [src/components/](mdc:src/components/) 或者 [src/pages/xx/components/](mdc:src/pages/xx/components/) 目录下 - 使用 uni-app 内置组件和第三方组件库 -- 支持 wot-design-uni\uv-ui\uview-plus 等多种第三方组件库 和 z-paging 组件 +- 支持 wot-ui\uview-pro\uv-ui\sard-ui\uview-plus 等多种第三方组件库 和 z-paging 组件 - 自定义组件遵循 uni-app 组件规范 ## 平台适配 diff --git a/.cursor/rules/vue-typescript-patterns.mdc b/.cursor/rules/vue-typescript-patterns.mdc index f726299..d81cc8f 100644 --- a/.cursor/rules/vue-typescript-patterns.mdc +++ b/.cursor/rules/vue-typescript-patterns.mdc @@ -4,10 +4,11 @@ - 使用 Composition API 和 ` + + +``` + +## 实现步骤总结 + +1. **创建API**: 确保你有一个返回分页数据的API请求函数(例如 `getList`),它应该接受页码和页面大小作为参数。 +2. **调用 `useScroll`**: 在你的页面脚本中,导入并调用 `useScroll` Hook,将你的API函数作为参数传入。 +3. **模板绑定**: + - 使用 `scroll-view` 组件作为滚动容器。 + - 将其 `refresher-triggered` 属性绑定到 `useScroll` 返回的 `loading` 状态。 + - 将其 `@scrolltolower` 事件绑定到 `onScrollToLower` 方法。 + - 将其 `@refresherrefresh` 事件绑定到 `onRefresherRefresh` 方法。 +4. **渲染列表**: 使用 `v-for` 指令渲染 `useScroll` 返回的 `list` 数组。 +5. **添加加载提示**: 根据 `loading`, `finished`, `error` 状态,在列表底部显示不同的提示信息,提升用户体验。 + +通过以上步骤,你就可以在项目中快速集成一个功能完善、体验良好的上拉刷新和下拉加载列表。 \ No newline at end of file diff --git a/src/pages-sub/about/about.vue b/src/pages-sub/about/about.vue index 005200d..b4bf1e6 100644 --- a/src/pages-sub/about/about.vue +++ b/src/pages-sub/about/about.vue @@ -109,11 +109,10 @@ onShow(() => { - + - 简单hooks(非z-paging组件)