Skip to content

Commit 5e70577

Browse files
YunaiVgitee-org
authored andcommitted
!111 【众测版】合并最新的 Vue3 重构
Merge pull request !111 from 芋道源码/dev
2 parents 808d38f + 47b5ce2 commit 5e70577

File tree

121 files changed

+5047
-1015
lines changed

Some content is hidden

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

121 files changed

+5047
-1015
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ VITE_APP_CAPTCHA_ENABLE=true
1515

1616
# 验证码的开关
1717
VITE_APP_CAPTCHA_ENABLE=true
18+
19+
# 百度统计
20+
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc

.env.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ VITE_API_BASEPATH=/dev-api
1616
VITE_API_URL=/admin-api
1717

1818
# 打包路径
19-
VITE_BASE_PATH=/dist-dev/
19+
VITE_BASE_PATH=/
2020

2121
# 是否删除debugger
2222
VITE_DROP_DEBUGGER=false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"private": false,
77
"scripts": {
88
"i": "pnpm install",
9-
"dev": "pnpm vite",
9+
"dev": "vite --mode base",
1010
"front": "vite --mode front",
1111
"ts:check": "vue-tsc --noEmit",
1212
"build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro",

src/api/bpm/leave/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ export const getLeave = async (id: number) => {
2222
}
2323

2424
// 获得请假申请分页
25-
export const getLeavePage = async (params) => {
25+
export const getLeavePage = async (params: PageParam) => {
2626
return await request.get({ url: '/bpm/oa/leave/page', params })
2727
}

src/api/infra/redis/index.ts

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,3 @@ import request from '@/config/axios'
66
export const getCache = () => {
77
return request.get({ url: '/infra/redis/get-monitor-info' })
88
}
9-
10-
// 获取模块
11-
export const getKeyDefineList = () => {
12-
return request.get({ url: '/infra/redis/get-key-define-list' })
13-
}
14-
15-
/**
16-
* 获取redis key列表
17-
*/
18-
export const getKeyList = (keyTemplate: string) => {
19-
return request.get({
20-
url: '/infra/redis/get-key-list',
21-
params: {
22-
keyTemplate
23-
}
24-
})
25-
}
26-
27-
// 获取缓存内容
28-
export const getKeyValue = (key: string) => {
29-
return request.get({ url: '/infra/redis/get-key-value?key=' + key })
30-
}
31-
32-
// 根据键名删除缓存
33-
export const deleteKey = (key: string) => {
34-
return request.delete({ url: '/infra/redis/delete-key?key=' + key })
35-
}
36-
37-
export const deleteKeys = (keyTemplate: string) => {
38-
return request.delete({
39-
url: '/infra/redis/delete-keys?',
40-
params: {
41-
keyTemplate
42-
}
43-
})
44-
}

src/api/infra/redis/types.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,3 @@ export interface RedisCommandStatsVO {
174174
calls: number
175175
usec: number
176176
}
177-
178-
export interface RedisKeyInfo {
179-
keyTemplate: string
180-
keyType: string
181-
valueType: string
182-
timeoutType: number
183-
timeout: number
184-
memo: string
185-
}

src/api/login/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ import request from '@/config/axios'
22
import { getRefreshToken } from '@/utils/auth'
33
import type { UserLoginVO } from './types'
44

5-
export interface CodeImgResult {
6-
captchaOnOff: boolean
7-
img: string
8-
uuid: string
9-
}
105
export interface SmsCodeVO {
116
mobile: string
127
scene: number
138
}
9+
1410
export interface SmsLoginVO {
1511
mobile: string
1612
code: string

src/api/login/oauth2/index.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import request from '@/config/axios'
2+
3+
// 获得授权信息
4+
export const getAuthorize = (clientId: string) => {
5+
return request.get({ url: '/system/oauth2/authorize?clientId=' + clientId })
6+
}
7+
8+
// 发起授权
9+
export const authorize = (
10+
responseType: string,
11+
clientId: string,
12+
redirectUri: string,
13+
state: string,
14+
autoApprove: boolean,
15+
checkedScopes: string[],
16+
uncheckedScopes: string[]
17+
) => {
18+
// 构建 scopes
19+
const scopes = {}
20+
for (const scope of checkedScopes) {
21+
scopes[scope] = true
22+
}
23+
for (const scope of uncheckedScopes) {
24+
scopes[scope] = false
25+
}
26+
// 发起请求
27+
return request.post({
28+
url: '/system/oauth2/authorize',
29+
headers: {
30+
'Content-type': 'application/x-www-form-urlencoded'
31+
},
32+
params: {
33+
response_type: responseType,
34+
client_id: clientId,
35+
redirect_uri: redirectUri,
36+
state: state,
37+
auto_approve: autoApprove,
38+
scope: JSON.stringify(scopes)
39+
}
40+
})
41+
}

src/api/login/types.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,3 @@ export type UserVO = {
2626
loginIp: string
2727
loginDate: string
2828
}
29-
30-
export type UserInfoVO = {
31-
permissions: []
32-
roles: []
33-
user: {
34-
avatar: string
35-
id: number
36-
nickname: string
37-
}
38-
}
39-
40-
export type TentantNameVO = {
41-
name: string
42-
}

src/api/mall/product/brand.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import request from '@/config/axios'
2+
3+
/**
4+
* 商品品牌
5+
*/
6+
export interface BrandVO {
7+
/**
8+
* 品牌编号
9+
*/
10+
id?: number
11+
/**
12+
* 品牌名称
13+
*/
14+
name: string
15+
/**
16+
* 品牌图片
17+
*/
18+
picUrl: string
19+
/**
20+
* 品牌排序
21+
*/
22+
sort?: number
23+
/**
24+
* 品牌描述
25+
*/
26+
description?: string
27+
/**
28+
* 开启状态
29+
*/
30+
status: number
31+
}
32+
33+
// 创建商品品牌
34+
export const createBrand = (data: BrandVO) => {
35+
return request.post({ url: '/product/brand/create', data })
36+
}
37+
38+
// 更新商品品牌
39+
export const updateBrand = (data: BrandVO) => {
40+
return request.put({ url: '/product/brand/update', data })
41+
}
42+
43+
// 删除商品品牌
44+
export const deleteBrand = (id: number) => {
45+
return request.delete({ url: `/product/brand/delete?id=${id}` })
46+
}
47+
48+
// 获得商品品牌
49+
export const getBrand = (id: number) => {
50+
return request.get({ url: `/product/brand/get?id=${id}` })
51+
}
52+
53+
// 获得商品品牌列表
54+
export const getBrandParam = (params: PageParam) => {
55+
return request.get({ url: '/product/brand/page', params })
56+
}

0 commit comments

Comments
 (0)