Skip to content

Commit 6917c5a

Browse files
committed
Chore: Chore Update
2 parents c5f2ed5 + 9863d33 commit 6917c5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1078
-987
lines changed

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"uni-helper.uni-ui-snippets-vscode",
1313
"uni-helper.uni-app-snippets-vscode",
1414
"streetsidesoftware.code-spell-checker",
15-
"foxundermoon.shell-format",
1615
"christian-kohler.path-intellisense"
1716
]
1817
}

env/.env

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ VITE_APP_PROXY_ENABLE = false
2121
VITE_APP_PROXY_PREFIX = '/fg-api'
2222

2323
# 第二个请求地址 (目前alova中可以使用)
24-
VITE_API_SECONDARY_URL = 'https://ukw0y1.laf.run'
24+
VITE_SERVER_BASEURL_SECONDARY = 'https://ukw0y1.laf.run'
2525

2626
# 认证模式,'single' | 'double' ==> 单token | 双token
27-
VITE_AUTH_MODE = 'single'
27+
VITE_AUTH_MODE = 'single'
28+
29+
# 原生插件资源复制开关,控制是否启用 copy-native-resources 插件
30+
VITE_COPY_NATIVE_RES_ENABLE = false

eslint.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ export default uniHelper({
55
vue: true,
66
markdown: false,
77
ignores: [
8-
'src/uni_modules/',
8+
// 忽略uni_modules目录
9+
'**/uni_modules/',
10+
// 忽略原生插件目录
11+
'**/nativeplugins/',
912
'dist',
1013
// unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用
1114
'auto-import.d.ts',

manifest.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ export default defineManifestConfig({
128128
optimization: {
129129
subPackages: true,
130130
},
131+
// 是否合并组件虚拟节点外层属性,uni-app 3.5.1+ 开始支持。目前仅支持 style、class 属性。
132+
// 默认不开启(undefined),这里设置为开启。
133+
mergeVirtualHostAttributes: true,
131134
// styleIsolation: 'shared',
132135
usingComponents: true,
133136
// __usePrivacyCheck__: true,

openapi-ts-request.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { GenerateServiceProps } from 'openapi-ts-request'
22

33
export default [
44
{
5-
schemaPath: 'http://petstore.swagger.io/v2/swagger.json',
5+
schemaPath: 'https://ukw0y1.laf.run/unibest-opapi-test.json',
66
serversPath: './src/service',
77
requestLibPath: `import request from '@/http/vue-query';\n import { CustomRequestOptions } from '@/http/types';`,
88
requestOptionsType: 'CustomRequestOptions',

package.json

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "unibest",
33
"type": "module",
4-
"version": "3.16.3",
5-
"unibest-version": "3.16.3",
6-
"update-time": "2025-09-16",
4+
"version": "3.18.5",
5+
"unibest-version": "3.18.5",
6+
"update-time": "2025-10-03",
77
"packageManager": "pnpm@10.10.0",
88
"description": "unibest - 最好的 uniapp 开发模板",
99
"generate-time": "用户创建项目时生成",
@@ -36,7 +36,7 @@
3636
"dev:app-android": "uni -p app-android",
3737
"dev:app-ios": "uni -p app-ios",
3838
"dev:custom": "uni -p",
39-
"dev": "node --experimental-loader ./scripts/window-path-loader.js node_modules/@dcloudio/vite-plugin-uni/bin/uni.js",
39+
"dev": "uni",
4040
"dev:test": "uni --mode test",
4141
"dev:prod": "uni --mode production",
4242
"dev:h5": "uni",
@@ -87,7 +87,7 @@
8787
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
8888
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
8989
"type-check": "vue-tsc --noEmit",
90-
"openapi-ts-request": "openapi-ts",
90+
"openapi": "openapi-ts",
9191
"prepare": "git init && husky && node ./scripts/create-base-files.js",
9292
"docker:prepare": "node ./scripts/create-base-files.js",
9393
"lint": "eslint",
@@ -135,18 +135,18 @@
135135
"@iconify-json/carbon": "^1.2.4",
136136
"@rollup/rollup-darwin-x64": "^4.28.0",
137137
"@types/node": "^20.17.9",
138-
"@uni-helper/eslint-config": "^0.5.0",
138+
"@uni-helper/eslint-config": "0.5.0",
139139
"@uni-helper/plugin-uni": "0.1.0",
140-
"@uni-helper/uni-env": "^0.1.8",
141-
"@uni-helper/uni-types": "^1.0.0-alpha.6",
142-
"@uni-helper/unocss-preset-uni": "^0.2.11",
143-
"@uni-helper/vite-plugin-uni-components": "0.2.0",
140+
"@uni-helper/uni-env": "0.1.8",
141+
"@uni-helper/uni-types": "1.0.0-alpha.6",
142+
"@uni-helper/unocss-preset-uni": "0.2.11",
143+
"@uni-helper/vite-plugin-uni-components": "0.2.3",
144144
"@uni-helper/vite-plugin-uni-layouts": "0.1.11",
145-
"@uni-helper/vite-plugin-uni-manifest": "^0.2.8",
146-
"@uni-helper/vite-plugin-uni-pages": "^0.3.8",
147-
"@uni-helper/vite-plugin-uni-platform": "^0.0.5",
148-
"@uni-ku/bundle-optimizer": "^1.3.3",
149-
"@uni-ku/root": "^1.3.4",
145+
"@uni-helper/vite-plugin-uni-manifest": "0.2.8",
146+
"@uni-helper/vite-plugin-uni-pages": "0.3.13",
147+
"@uni-helper/vite-plugin-uni-platform": "0.0.5",
148+
"@uni-ku/bundle-optimizer": "v1.3.15-beta.2",
149+
"@uni-ku/root": "1.4.1",
150150
"@unocss/eslint-plugin": "^66.2.3",
151151
"@unocss/preset-legacy-compat": "66.0.0",
152152
"@vue/runtime-core": "^3.4.21",
@@ -172,8 +172,17 @@
172172
"vite-plugin-restart": "^1.0.0",
173173
"vue-tsc": "^3.0.6"
174174
},
175+
"pnpm": {
176+
"overrides": {
177+
"unconfig": "7.3.2"
178+
}
179+
},
180+
"overrides": {
181+
"unconfig": "7.3.2"
182+
},
175183
"resolutions": {
176-
"bin-wrapper": "npm:bin-wrapper-china"
184+
"bin-wrapper": "npm:bin-wrapper-china",
185+
"unconfig": "7.3.2"
177186
},
178187
"lint-staged": {
179188
"*": "eslint --fix"

scripts/create-base-files.js

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// 生成 src/manifest.json 和 src/pages.json
1+
// 基础配置文件生成脚本
2+
// 此脚本用于生成 src/manifest.json 和 src/pages.json 基础文件
3+
// 由于这两个配置文件会被添加到 .gitignore 中,因此需要通过此脚本确保项目能正常运行
24
import fs from 'node:fs'
35
import path from 'node:path'
46
import { fileURLToPath } from 'node:url'
@@ -157,10 +159,6 @@ const pages = {
157159
text: '首页',
158160
pagePath: 'pages/index/index',
159161
},
160-
{
161-
text: '关于',
162-
pagePath: 'pages/about/about',
163-
},
164162
{
165163
text: '我的',
166164
pagePath: 'pages/me/me',
@@ -176,35 +174,6 @@ const pages = {
176174
navigationBarTitleText: '首页',
177175
},
178176
},
179-
{
180-
path: 'pages/about/about',
181-
type: 'page',
182-
style: {
183-
navigationBarTitleText: '关于',
184-
},
185-
excludeLoginPath: false,
186-
},
187-
{
188-
path: 'pages/about/alova',
189-
type: 'page',
190-
style: {
191-
navigationBarTitleText: 'Alova 演示',
192-
},
193-
},
194-
{
195-
path: 'pages/login/login',
196-
type: 'page',
197-
style: {
198-
navigationBarTitleText: '登录',
199-
},
200-
},
201-
{
202-
path: 'pages/login/register',
203-
type: 'page',
204-
style: {
205-
navigationBarTitleText: '注册',
206-
},
207-
},
208177
{
209178
path: 'pages/me/me',
210179
type: 'page',
@@ -239,6 +208,12 @@ if (!fs.existsSync(srcDir)) {
239208
fs.mkdirSync(srcDir, { recursive: true })
240209
}
241210

242-
// 写入文件
243-
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2))
244-
fs.writeFileSync(pagesPath, JSON.stringify(pages, null, 2))
211+
// 如果 src/manifest.json 不存在,就创建它;存在就不处理,以免覆盖
212+
if (!fs.existsSync(manifestPath)) {
213+
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2))
214+
}
215+
216+
// 如果 src/pages.json 不存在,就创建它;存在就不处理,以免覆盖
217+
if (!fs.existsSync(pagesPath)) {
218+
fs.writeFileSync(pagesPath, JSON.stringify(pages, null, 2))
219+
}

scripts/open-dev-tools.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import process from 'node:process'
88
*/
99
function _openDevTools() {
1010
const platform = process.platform // darwin, win32, linux
11-
const { UNI_PLATFORM } = process.env // mp, mp-weixin, mp-alipay
11+
const { UNI_PLATFORM } = process.env // mp-weixin, mp-alipay
1212

13-
const uniPlatformText = UNI_PLATFORM === 'mp' || UNI_PLATFORM === 'mp-weixin' ? '微信小程序' : UNI_PLATFORM === 'mp-alipay' ? '支付宝小程序' : '小程序'
13+
const uniPlatformText = UNI_PLATFORM === 'mp-weixin' ? '微信小程序' : UNI_PLATFORM === 'mp-alipay' ? '支付宝小程序' : '小程序'
1414

1515
// 项目路径(构建输出目录)
1616
const projectPath = path.resolve(process.cwd(), `dist/dev/${UNI_PLATFORM}`)

scripts/window-path-loader.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/api/foo.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export interface IFooItem {
2121
}
2222

2323
/** GET 请求 */
24-
export function getFooAPI(name: string) {
25-
return http.get<IFooItem>('/foo', { name })
24+
export async function getFooAPI(name: string) {
25+
return await http.get<IFooItem>('/foo', { name })
2626
}
2727
/** GET 请求;支持 传递 header 的范例 */
2828
export function getFooAPI2(name: string) {
@@ -35,9 +35,9 @@ export function postFooAPI(name: string) {
3535
}
3636
/** POST 请求;需要传递 query 参数的范例;微信小程序经常有同时需要query参数和body参数的场景 */
3737
export function postFooAPI2(name: string) {
38-
return http.post<IFooItem>('/foo', { name })
38+
return http.post<IFooItem>('/foo', { name }, { a: 1, b: 2 })
3939
}
4040
/** POST 请求;支持 传递 header 的范例 */
4141
export function postFooAPI3(name: string) {
42-
return http.post<IFooItem>('/foo', { name }, { name }, { 'Content-Type-100': '100' })
42+
return http.post<IFooItem>('/foo', { name }, { a: 1, b: 2 }, { 'Content-Type-100': '100' })
4343
}

0 commit comments

Comments
 (0)