Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ab64a1d1
authored
Jan 07, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📖
MALL:code review 满减送活动
parent
1e68cd53
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
24 deletions
+20
-24
.env.dev
+3
-3
src/api/mall/promotion/reward/rewardActivity.ts
+16
-12
src/views/mall/promotion/rewardActivity/RewardForm.vue
+0
-0
src/views/mall/promotion/rewardActivity/index.vue
+1
-9
No files found.
.env.dev
View file @
ab64a1d1
...
...
@@ -4,8 +4,8 @@ NODE_ENV=development
VITE_DEV=true
# 请求路径
#
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
VITE_BASE_URL='http://dofast.demo.huizhizao.vip:20001'
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
#
VITE_BASE_URL='http://dofast.demo.huizhizao.vip:20001'
# 上传路径
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
...
...
@@ -35,4 +35,4 @@ VITE_OUT_DIR=dist
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=
tru
e
VITE_APP_CAPTCHA_ENABLE=
fals
e
src/api/mall/promotion/reward/rewardActivity.ts
View file @
ab64a1d1
import
request
from
'@/config/axios'
export
interface
DiscountActivityVO
{
id
?:
number
,
id
?:
number
name
?:
string
startTime
?:
Date
endTime
?:
Date
remark
?:
string
conditionType
?:
number
productScope
?:
number
productSpuIds
?:
number
[]
rules
?:
DiscountProductVO
[]
startTime
?:
Date
endTime
?:
Date
remark
?:
string
conditionType
?:
number
productScope
?:
number
productSpuIds
?:
number
[]
rules
?:
DiscountProductVO
[]
}
//优惠规则
// 优惠规则
export
interface
DiscountProductVO
{
limit
:
number
discountPrice
:
number
...
...
@@ -21,23 +22,26 @@ export interface DiscountProductVO {
couponCounts
:
number
[]
}
// 新增满减送活动
export
const
createRewardActivity
=
async
(
data
:
DiscountActivityVO
)
=>
{
return
await
request
.
post
({
url
:
'/promotion/reward-activity/create'
,
data
})
}
// 更新满减送活动
export
const
updateRewardActivity
=
async
(
data
:
DiscountActivityVO
)
=>
{
return
await
request
.
put
({
url
:
'/promotion/reward-activity/update'
,
data
})
}
// 查询满减送活动列表
export
const
getRewardActivityPage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
'/promotion/reward-activity/page'
,
params
})
}
// 查询满减送活动详情
export
const
getReward
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
'/promotion/reward-activity/get?id='
+
id
,
})
export
const
getReward
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
'/promotion/reward-activity/get?id='
+
id
})
}
// 删除限时折扣活动
export
const
deleteRewardActivity
=
async
(
id
:
number
)
=>
{
return
await
request
.
delete
({
url
:
'/promotion/reward-activity/delete?id='
+
id
})
...
...
src/views/mall/promotion/rewardActivity/RewardForm.vue
View file @
ab64a1d1
This diff is collapsed.
Click to expand it.
src/views/mall/promotion/rewardActivity/index.vue
View file @
ab64a1d1
...
...
@@ -122,8 +122,7 @@
<
script
lang=
"ts"
setup
>
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
ProductBrandApi
from
'@/api/mall/product/brand'
import
*
as
RewardActivityApi
from
'@/api/mall/promotion/reward/rewardActivity'
import
*
as
RewardActivityApi
from
'@/api/mall/promotion/reward/rewardActivity'
import
RewardForm
from
'./RewardForm.vue'
defineOptions
({
name
:
'PromotionRewardActivity'
})
...
...
@@ -157,16 +156,11 @@ const getList = async () => {
/** 搜索按钮操作 */
const
handleQuery
=
()
=>
{
// console.log(queryParams)
// message.success('已打印搜索参数')
// return
getList
()
}
/** 重置按钮操作 */
const
resetQuery
=
()
=>
{
// message.success('重置查询表单获取数据')
// return
queryFormRef
.
value
.
resetFields
()
handleQuery
()
}
...
...
@@ -182,8 +176,6 @@ const handleDelete = async (id: number) => {
try
{
// 删除的二次确认
await
message
.
delConfirm
()
// message.success('您以确认删除')
// return
// 发起删除
await
RewardActivityApi
.
deleteRewardActivity
(
id
)
message
.
success
(
t
(
'common.delSuccess'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment