Skip to content

Commit c19007d

Browse files
committed
chore: bump update
2 parents 1b07252 + 730d127 commit c19007d

15 files changed

Lines changed: 262 additions & 23 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dist
2727
docs/.vitepress/dist
2828
docs/.vitepress/cache
2929

30-
types
30+
src/types
3131

3232
# lock 文件还是不要了,我主要的版本写死就好了
3333
# pnpm-lock.yaml

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
"explorer.fileNesting.patterns": {
5656
"README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md",
5757
"pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts",
58-
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
59-
"eslint.config.mjs": "tsconfig.json,.commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"
58+
"package.json": "tsconfig.json,pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
59+
"eslint.config.mjs": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"
6060
},
6161

6262
// // 保存的时候自动格式化

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "unibest",
33
"type": "commonjs",
4-
"version": "3.0.0",
4+
"version": "3.2.0",
55
"description": "unibest - 最好的 uniapp 开发模板",
66
"update-time": "2025-06-21",
77
"author": {
@@ -79,6 +79,8 @@
7979
"lint:fix": "eslint --fix"
8080
},
8181
"dependencies": {
82+
"@alova/adapter-uniapp": "^2.0.14",
83+
"@alova/shared": "^1.3.1",
8284
"@dcloudio/uni-app": "3.0.0-4060620250520001",
8385
"@dcloudio/uni-app-harmony": "3.0.0-4060620250520001",
8486
"@dcloudio/uni-app-plus": "3.0.0-4060620250520001",
@@ -97,11 +99,11 @@
9799
"@dcloudio/uni-quickapp-webview": "3.0.0-4060620250520001",
98100
"@tanstack/vue-query": "^5.62.16",
99101
"abortcontroller-polyfill": "^1.7.8",
102+
"alova": "^3.3.3",
100103
"dayjs": "1.11.10",
101104
"element-plus": "^2.10.2",
102105
"pinia": "2.0.36",
103106
"pinia-plugin-persistedstate": "3.2.1",
104-
"qs": "6.5.3",
105107
"vue": "^3.4.21",
106108
"vue-i18n": "9.1.9",
107109
"wot-design-uni": "^1.9.1",

pnpm-lock.yaml

Lines changed: 38 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/alova-foo.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { http } from '@/utils/request/alova'
2+
3+
export interface IFooItem {
4+
id: string
5+
name: string
6+
}
7+
8+
export function foo() {
9+
return http.Get<IFooItem>('/foo', {
10+
params: {
11+
name: '菲鸽',
12+
page: 1,
13+
pageSize: 10,
14+
},
15+
})
16+
}

src/api/types/login.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* 用户信息
3+
*/
4+
export interface IUserInfoVo {
5+
id: number
6+
username: string
7+
avatar: string
8+
token: string
9+
}
10+
11+
/**
12+
* 登录返回的信息
13+
*/
14+
export interface IUserLogin {
15+
id: string
16+
username: string
17+
token: string
18+
}
19+
20+
/**
21+
* 获取验证码
22+
*/
23+
export interface ICaptcha {
24+
captchaEnabled: boolean
25+
uuid: string
26+
image: string
27+
}
28+
/**
29+
* 上传成功的信息
30+
*/
31+
export interface IUploadSuccessInfo {
32+
fileId: number
33+
originalName: string
34+
fileName: string
35+
storagePath: string
36+
fileHash: string
37+
fileType: string
38+
fileBusinessType: string
39+
fileSize: number
40+
}
41+
/**
42+
* 更新用户信息
43+
*/
44+
export interface IUpdateInfo {
45+
id: number
46+
name: string
47+
sex: string
48+
}
49+
/**
50+
* 更新用户信息
51+
*/
52+
export interface IUpdatePassword {
53+
id: number
54+
oldPassword: string
55+
newPassword: string
56+
confirmPassword: string
57+
}

src/env.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ interface ImportMetaEnv {
2929
interface ImportMeta {
3030
readonly env: ImportMetaEnv
3131
}
32+
33+
declare const __VITE_APP_PROXY__: 'true' | 'false'
34+
declare const __UNI_PLATFORM__: 'app' | 'h5' | 'mp-alipay' | 'mp-baidu' | 'mp-kuaishou' | 'mp-lark' | 'mp-qq' | 'mp-tiktok' | 'mp-weixin' | 'mp-xiaochengxu'

src/interceptors/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import qs from 'qs'
21
import { useUserStore } from '@/store'
32
import { getEnvBaseUrl } from '@/utils'
43
import { platform } from '@/utils/platform'
4+
import { stringifyQuery } from '@/utils/queryString'
55

66
export type CustomRequestOptions = UniApp.RequestOptions & {
77
query?: Record<string, any>
@@ -18,7 +18,7 @@ const httpInterceptor = {
1818
invoke(options: CustomRequestOptions) {
1919
// 接口请求支持通过 query 参数配置 queryString
2020
if (options.query) {
21-
const queryStr = qs.stringify(options.query)
21+
const queryStr = stringifyQuery(options.query)
2222
if (options.url.includes('?')) {
2323
options.url += `&${queryStr}`
2424
}

src/layouts/fg-tabbar/tabbar.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
`tabbar` 分为 `4 种` 情况:
44

5-
- `完全原生 tabbar`,使用 `switchTab` 切换 tabbar,`tabbar` 页面有缓存。
5+
- 0 `完全原生 tabbar`,使用 `switchTab` 切换 tabbar,`tabbar` 页面有缓存。
66
- 优势:原生自带的 tabbar,最先渲染,有缓存。
77
- 劣势:只能使用 2 组图片来切换选中和非选中状态,修改颜色只能重新换图片(或者用 iconfont)。
8-
- `半自定义 tabbar`,使用 `switchTab` 切换 tabbar,`tabbar` 页面有缓存。使用了第三方 UI 库的 `tabbar` 组件,并隐藏了原生 `tabbar` 的显示。
8+
- 1 `半自定义 tabbar`,使用 `switchTab` 切换 tabbar,`tabbar` 页面有缓存。使用了第三方 UI 库的 `tabbar` 组件,并隐藏了原生 `tabbar` 的显示。
99
- 优势:可以随意配置自己想要的 `svg icon`,切换字体颜色方便。有缓存。可以实现各种花里胡哨的动效等。
1010
- 劣势:首次点击 tababr 会闪烁。
11-
- `全自定义 tabbar`,使用 `navigateTo` 切换 `tabbar``tabbar` 页面无缓存。使用了第三方 UI 库的 `tabbar` 组件。
11+
- 2 `全自定义 tabbar`,使用 `navigateTo` 切换 `tabbar``tabbar` 页面无缓存。使用了第三方 UI 库的 `tabbar` 组件。
1212
- 优势:可以随意配置自己想要的 svg icon,切换字体颜色方便。可以实现各种花里胡哨的动效等。
1313
- 劣势:首次点击 `tababr` 会闪烁,无缓存。
14-
- `无 tabbar`,只有一个页面入口,底部无 `tabbar` 显示;常用语临时活动页。
14+
- 3 `无 tabbar`,只有一个页面入口,底部无 `tabbar` 显示;常用语临时活动页。
1515

1616
> 注意:花里胡哨的效果需要自己实现,本模版不提供。

src/layouts/fg-tabbar/tabbarList.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
// TODO:通过这里切换使用tabbar的策略
1212
export const selectedTabbarStrategy = 0
1313

14-
// 0 和 1 时,需要tabbar缓存
15-
export const cacheTabbarEnable = selectedTabbarStrategy < 2
16-
1714
// selectedTabbarStrategy==0 时,需要填 iconPath 和 selectedIconPath
1815
// selectedTabbarStrategy==1 or 2 时,需要填 icon 和 iconType
1916
// selectedTabbarStrategy==3 时,tabbarList 不生效
@@ -49,6 +46,9 @@ export const tabbarList = [
4946
// },
5047
]
5148

49+
// 0 和 1 时,需要tabbar缓存
50+
export const cacheTabbarEnable = selectedTabbarStrategy < 2
51+
5252
const _tabbar = {
5353
color: '#999999',
5454
selectedColor: '#018d71',

0 commit comments

Comments
 (0)