Skip to content

Commit 887936c

Browse files
committed
2 parents fd907dd + 4a2eddb commit 887936c

File tree

47 files changed

+2530
-290
lines changed

Some content is hidden

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

47 files changed

+2530
-290
lines changed

.env.dev

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
88

99
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
1010
VITE_UPLOAD_TYPE=server
11-
# 上传路径
12-
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
1311

1412
# 接口地址
1513
VITE_API_URL=/admin-api

.env.local

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ VITE_BASE_URL='http://localhost:48080'
88

99
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
1010
VITE_UPLOAD_TYPE=server
11-
# 上传路径
12-
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
1311

1412
# 接口地址
1513
VITE_API_URL=/admin-api

.env.prod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ VITE_BASE_URL='http://localhost:48080'
88

99
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
1010
VITE_UPLOAD_TYPE=server
11-
# 上传路径
12-
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
1311

1412
# 接口地址
1513
VITE_API_URL=/admin-api

.env.stage

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
88

99
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
1010
VITE_UPLOAD_TYPE=server
11-
# 上传路径
12-
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
1311

1412
# 接口地址
1513
VITE_API_URL=/admin-api

.env.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ VITE_BASE_URL='http://localhost:48080'
88

99
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
1010
VITE_UPLOAD_TYPE=server
11-
# 上传路径
12-
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
1311

1412
# 接口地址
1513
VITE_API_URL=/admin-api

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"source.fixAll.stylelint": "explicit"
8888
},
8989
"[vue]": {
90-
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
90+
"editor.defaultFormatter": "esbenp.prettier-vscode"
9191
},
9292
"i18n-ally.localesPaths": ["src/locales"],
9393
"i18n-ally.keystyle": "nested",

src/api/login/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import request from '@/config/axios'
22
import { getRefreshToken } from '@/utils/auth'
3-
import type { UserLoginVO } from './types'
3+
import type { RegisterVO, UserLoginVO } from './types'
44

55
export interface SmsCodeVO {
66
mobile: string
@@ -17,6 +17,11 @@ export const login = (data: UserLoginVO) => {
1717
return request.post({ url: '/system/auth/login', data })
1818
}
1919

20+
// 注册
21+
export const register = (data: RegisterVO) => {
22+
return request.post({ url: '/system/auth/register', data })
23+
}
24+
2025
// 刷新访问令牌
2126
export const refreshToken = () => {
2227
return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })

src/api/login/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ export type UserVO = {
2929
loginIp: string
3030
loginDate: string
3131
}
32+
33+
export type RegisterVO = {
34+
tenantName: string
35+
username: string
36+
password: string
37+
captchaVerification: string
38+
}

src/api/mall/promotion/point/index.ts

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
import request from '@/config/axios'
2+
import { Sku, Spu } from '@/api/mall/product/spu' // 积分商城活动 VO
3+
4+
// 积分商城活动 VO
5+
export interface PointActivityVO {
6+
id: number // 积分商城活动编号
7+
spuId: number // 积分商城活动商品
8+
status: number // 活动状态
9+
stock: number // 积分商城活动库存
10+
totalStock: number // 积分商城活动总库存
11+
remark?: string // 备注
12+
sort: number // 排序
13+
createTime: string // 创建时间
14+
products: PointProductVO[] // 积分商城商品
15+
16+
// ========== 商品字段 ==========
17+
spuName: string // 商品名称
18+
picUrl: string // 商品主图
19+
marketPrice: number // 商品市场价,单位:分
20+
21+
//======================= 显示所需兑换积分最少的 sku 信息 =======================
22+
point: number // 兑换积分
23+
price: number // 兑换金额,单位:分
24+
}
25+
26+
// 秒杀活动所需属性
27+
export interface PointProductVO {
28+
id?: number // 积分商城商品编号
29+
activityId?: number // 积分商城活动 id
30+
spuId?: number // 商品 SPU 编号
31+
skuId: number // 商品 SKU 编号
32+
count: number // 可兑换数量
33+
point: number // 兑换积分
34+
price: number // 兑换金额,单位:分
35+
stock: number // 积分商城商品库存
36+
activityStatus?: number // 积分商城商品状态
37+
}
38+
39+
// 扩展 Sku 配置
40+
export type SkuExtension = Sku & {
41+
productConfig: PointProductVO
42+
}
43+
44+
export interface SpuExtension extends Spu {
45+
skus: SkuExtension[] // 重写类型
46+
}
47+
48+
export interface SpuExtension0 extends Spu {
49+
pointStock: number // 积分商城活动库存
50+
pointTotalStock: number // 积分商城活动总库存
51+
point: number // 兑换积分
52+
pointPrice: number // 兑换金额,单位:分
53+
}
54+
55+
// 积分商城活动 API
56+
export const PointActivityApi = {
57+
// 查询积分商城活动分页
58+
getPointActivityPage: async (params: any) => {
59+
return await request.get({ url: `/promotion/point-activity/page`, params })
60+
},
61+
62+
// 查询积分商城活动详情
63+
getPointActivity: async (id: number) => {
64+
return await request.get({ url: `/promotion/point-activity/get?id=` + id })
65+
},
66+
67+
// 查询积分商城活动列表,基于活动编号数组
68+
getPointActivityListByIds: async (ids: number[]) => {
69+
return request.get({ url: `/promotion/point-activity/list-by-ids?ids=${ids}` })
70+
},
71+
72+
// 新增积分商城活动
73+
createPointActivity: async (data: PointActivityVO) => {
74+
return await request.post({ url: `/promotion/point-activity/create`, data })
75+
},
76+
77+
// 修改积分商城活动
78+
updatePointActivity: async (data: PointActivityVO) => {
79+
return await request.put({ url: `/promotion/point-activity/update`, data })
80+
},
81+
82+
// 删除积分商城活动
83+
deletePointActivity: async (id: number) => {
84+
return await request.delete({ url: `/promotion/point-activity/delete?id=` + id })
85+
},
86+
87+
// 关闭秒杀活动
88+
closePointActivity: async (id: number) => {
89+
return await request.put({ url: '/promotion/point-activity/close?id=' + id })
90+
}
91+
}

src/api/mall/promotion/reward/rewardActivity.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ export const getReward = async (id: number) => {
4747
return await request.get({ url: '/promotion/reward-activity/get?id=' + id })
4848
}
4949

50-
// 删除限时折扣活动
50+
// 删除满减送活动
5151
export const deleteRewardActivity = async (id: number) => {
5252
return await request.delete({ url: '/promotion/reward-activity/delete?id=' + id })
5353
}
54+
55+
// 关闭满减送活动
56+
export const closeRewardActivity = async (id: number) => {
57+
return await request.put({ url: '/promotion/reward-activity/close?id=' + id })
58+
}

0 commit comments

Comments
 (0)