Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
1fca1bdd
提交
1fca1bdd
authored
10月 25, 2023
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:邀请新好友获取积分
上级
225f1927
全部展开
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
254 行增加
和
37 行删除
+254
-37
.env.production
env/.env.production
+1
-0
activityManage.ts
src/api/interface/activityManage.ts
+58
-1
activityManage.ts
src/api/modules/activityManage.ts
+24
-0
index.tsx
src/components/search-box/index.tsx
+10
-2
index.tsx
...activityManage/activityList/comp/addOrEditModal/index.tsx
+157
-0
index.tsx
src/pages/activityManage/activityList/index.tsx
+0
-0
index.tsx
...ge/activityListOld/components/activityDataModal/index.tsx
+0
-0
index.tsx
...anage/activityListOld/components/addOrEditModal/index.tsx
+0
-0
index.tsx
src/pages/activityManage/activityListOld/index.tsx
+0
-0
index.tsx
src/pages/activityManage/recommendManage/index.tsx
+0
-30
router.tsx
src/router/router.tsx
+4
-4
没有找到文件。
env/.env.production
浏览文件 @
1fca1bdd
#请求接口地址
VITE_REQUEST_BASE_URL='https://www.iuav.shop'
#VITE_REQUEST_BASE_URL='http://120.77.145.47'
#VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='/api'
#旧版接口地址
...
...
src/api/interface/activityManage.ts
浏览文件 @
1fca1bdd
// 活动-裂变优惠券下拉类型
import
{
InterFunction
,
InterItemFunction
}
from
'~/api/interface'
;
import
{
InterFunction
,
InterItemFunction
,
InterListFunction
}
from
'~/api/interface'
;
import
{
SplitCouponItemType
}
from
'~/api/interface/couponManage'
;
// 裂变优惠券-下拉
...
...
@@ -69,3 +69,60 @@ export type SignInListType = InterFunction<
}
>
;
}[]
>
;
// 活动列表
export
type
listActivityPagesType
=
InterListFunction
<
{
activityId
?:
number
;
activityStatus
?:
number
;
activityType
?:
number
;
userAccountId
?:
number
;
},
{
activityName
:
string
;
activityPartDTOS
:
null
;
activityStatus
:
number
;
activityType
:
number
;
createTime
:
string
;
description
:
string
;
endTime
:
string
;
id
:
number
;
requireNum
:
number
;
rewardType
:
number
;
rewardValue
:
number
;
startTime
:
string
;
}
>
;
// 添加活动
export
type
activityInsertType
=
InterFunction
<
{
activityName
:
string
;
activityStatus
:
number
;
activityType
:
number
;
description
:
string
;
endTime
:
string
;
id
?:
number
;
requireNum
:
number
;
rewardType
:
number
;
rewardValue
:
number
;
startTime
:
string
;
},
null
>
;
// 修改活动
export
type
activityUpdateType
=
InterFunction
<
{
activityName
:
string
;
activityStatus
:
number
;
activityType
:
number
;
description
:
string
;
endTime
:
string
;
id
?:
number
;
requireNum
:
number
;
rewardType
:
number
;
rewardValue
:
number
;
startTime
:
string
;
},
null
>
;
// 删除活动
export
type
activityDeleteType
=
InterFunction
<
{
id
:
number
},
null
>
;
src/api/modules/activityManage.ts
浏览文件 @
1fca1bdd
import
{
activeTableItemType
,
activityDataType
,
activityDeleteType
,
activityEditType
,
activityInsertType
,
activityUpdateType
,
addActivityType
,
DataInfoType
,
endActivityType
,
listActivityPagesType
,
SignInListType
,
splitCouponDownType
,
}
from
'../interface/activityManage'
;
...
...
@@ -49,4 +53,24 @@ export class ActivityManageAPI {
};
// 小程序签到列表
static
SignInList
:
SignInListType
=
(
params
)
=>
axios
.
get
(
'/userapp/SignInList'
,
{
params
});
// 活动列表
static
listActivityPages
:
listActivityPagesType
=
(
params
)
=>
{
return
axios
.
post
(
'/userapp/activity/listActivityPages'
,
params
);
};
// 添加活动
static
activityInsert
:
activityInsertType
=
(
params
)
=>
{
return
axios
.
post
(
'/userapp/activity/insert'
,
params
);
};
// 修改活动
static
activityUpdate
:
activityUpdateType
=
(
params
)
=>
{
return
axios
.
post
(
'/userapp/activity/update'
,
params
);
};
// 删除活动
static
activityDelete
:
activityDeleteType
=
(
params
)
=>
{
return
axios
.
get
(
'/userapp/activity/delete'
,
{
params
});
};
}
src/components/search-box/index.tsx
浏览文件 @
1fca1bdd
...
...
@@ -8,7 +8,15 @@ const { RangePicker } = DatePicker;
// 搜索列表的类型
export
interface
searchColumns
{
type
:
'input'
|
'select'
|
'rangePicker'
|
'DatePicker'
|
'Select'
|
'TreeSelect'
|
'Cascader'
;
type
:
|
'input'
|
'select'
|
'rangePicker'
|
'DatePicker'
|
'Select'
|
'TreeSelect'
|
'Cascader'
|
'Input'
;
label
?:
string
;
name
:
string
;
placeholder
:
string
;
...
...
@@ -117,7 +125,7 @@ const Index: React.FC<propsType> = (props) => {
key=
{
item
.
name
}
style=
{
{
marginBottom
:
'10px'
}
}
>
{
item
.
type
===
'input'
?
(
{
item
.
type
===
'input'
||
item
.
type
===
'Input'
?
(
<
Input
placeholder=
{
item
.
placeholder
}
allowClear
...
...
src/pages/activityManage/activityList/comp/addOrEditModal/index.tsx
0 → 100644
浏览文件 @
1fca1bdd
import
React
,
{
FC
,
useEffect
}
from
'react'
;
import
{
DatePicker
,
Form
,
Input
,
InputNumber
,
message
,
Modal
,
ModalProps
,
Radio
,
Select
,
}
from
'antd'
;
import
{
InterListType
}
from
'~/api/interface'
;
import
{
listActivityPagesType
}
from
'~/api/interface/activityManage'
;
import
dayjs
from
'dayjs'
;
import
{
ActivityManageAPI
}
from
'~/api'
;
// 参数
interface
selfProps
{
data
?:
InterListType
<
listActivityPagesType
>
[
0
];
}
const
AddOrEditModal
:
FC
<
ModalProps
&
selfProps
>
=
({
open
,
onCancel
,
title
,
data
})
=>
{
// 表单钩子
const
[
editForm
]
=
Form
.
useForm
();
// 提交数据
const
handleSubmit
=
async
()
=>
{
const
valid
=
await
editForm
.
validateFields
();
if
(
!
valid
)
return
;
const
res
=
await
ActivityManageAPI
[
data
?.
id
?
'activityUpdate'
:
'activityInsert'
]({
...
data
,
...
valid
,
startTime
:
dayjs
(
valid
.
rangeTime
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
),
endTime
:
dayjs
(
valid
.
rangeTime
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
),
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'操作成功'
);
handleCancel
();
}
};
// 关闭弹窗
const
handleCancel
=
()
=>
{
editForm
.
resetFields
();
onCancel
?.({}
as
any
);
};
// 组件挂载
useEffect
(()
=>
{
if
(
data
)
{
editForm
.
setFieldsValue
({
...
data
,
rangeTime
:
[
dayjs
(
data
.
startTime
),
dayjs
(
data
.
endTime
)],
});
}
else
{
editForm
.
resetFields
();
}
console
.
log
(
'组件挂载 --->'
,
data
);
},
[
open
]);
return
(
<
Modal
open=
{
open
}
onCancel=
{
handleCancel
}
title=
{
title
}
onOk=
{
handleSubmit
}
>
<
Form
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
16
}
}
form=
{
editForm
}
>
<
Form
.
Item
label=
'活动名称'
name=
'activityName'
rules=
{
[{
required
:
true
,
message
:
'请输入活动名称'
}]
}
>
<
Input
placeholder=
'请输入连续签到天数'
maxLength=
{
25
}
allowClear
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'活动类型'
name=
'activityType'
rules=
{
[{
required
:
true
,
message
:
'请选择活动类型'
}]
}
>
<
Select
placeholder=
'请选择活动类型'
options=
{
[{
label
:
'新用户邀请'
,
value
:
0
}]
}
allowClear
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'活动状态'
name=
'activityStatus'
rules=
{
[{
required
:
true
,
message
:
'请选择活动状态'
}]
}
initialValue=
{
1
}
>
<
Select
placeholder=
'请选择活动状态'
options=
{
[
{
label
:
'进行中'
,
value
:
1
},
{
label
:
'已结束'
,
value
:
0
},
]
}
allowClear
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'活动说明'
name=
'description'
rules=
{
[{
required
:
true
,
message
:
'请输入活动说明'
}]
}
>
<
Input
.
TextArea
placeholder=
'请输入活动说明'
maxLength=
{
200
}
allowClear
showCount
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'活动时间'
name=
'rangeTime'
rules=
{
[{
required
:
true
,
message
:
'请选择活动时间'
}]
}
>
<
DatePicker
.
RangePicker
placeholder=
{
[
'活动开始时间'
,
'活动结束时间'
]
}
showTime
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'奖励类型'
name=
'rewardType'
rules=
{
[{
required
:
true
,
message
:
'请选择奖励类型'
}]
}
initialValue=
{
0
}
>
<
Radio
.
Group
options=
{
[
{
label
:
'积分'
,
value
:
0
},
{
label
:
'余额'
,
value
:
1
},
{
label
:
'优惠券'
,
value
:
2
,
disabled
:
true
},
]
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'奖励额度'
name=
'rewardValue'
rules=
{
[
{
required
:
true
,
message
:
'请输入奖励额度'
},
{
pattern
:
/^
[
0-9
]
*$/g
,
message
:
'请输入整数'
},
]
}
>
<
InputNumber
min=
{
1
}
max=
{
100000
}
placeholder=
'请输入奖励额度'
style=
{
{
width
:
'200px'
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'人数限制'
name=
'requireNum'
rules=
{
[
{
required
:
true
,
message
:
'请输入人数限制'
},
{
pattern
:
/^
[
0-9
]
*$/g
,
message
:
'请输入整数'
},
]
}
initialValue=
{
0
}
extra=
{
'默认0,为不限制'
}
>
<
InputNumber
min=
{
0
}
max=
{
100000
}
placeholder=
'请输入人数限制'
style=
{
{
width
:
'200px'
}
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
AddOrEditModal
;
src/pages/activityManage/activityList/index.tsx
浏览文件 @
1fca1bdd
差异被折叠。
点击展开。
src/pages/activityManage/activityList/components/activityDataModal/index.tsx
→
src/pages/activityManage/activityList
Old
/components/activityDataModal/index.tsx
浏览文件 @
1fca1bdd
File moved
src/pages/activityManage/activityList/components/addOrEditModal/index.tsx
→
src/pages/activityManage/activityList
Old
/components/addOrEditModal/index.tsx
浏览文件 @
1fca1bdd
File moved
src/pages/activityManage/activityListOld/index.tsx
0 → 100644
浏览文件 @
1fca1bdd
差异被折叠。
点击展开。
src/pages/activityManage/recommendManage/index.tsx
deleted
100644 → 0
浏览文件 @
225f1927
import
React
from
'react'
;
import
{
Form
,
Switch
}
from
'antd'
;
const
RecommendManageView
=
()
=>
{
// 表单钩子
const
[
formRefs
]
=
Form
.
useForm
();
return
(
<>
<
div
className=
'recommend-form'
style=
{
{
width
:
'90%'
}
}
>
<
Form
labelCol=
{
{
span
:
3
}
}
wrapperCol=
{
{
offset
:
1
}
}
form=
{
formRefs
}
initialValues=
{
{
show
:
1
,
activityType
:
1
}
}
>
<
Form
.
Item
label=
'是否启用'
name=
'status'
rules=
{
[{
required
:
true
,
message
:
'请选择是否启用'
}]
}
valuePropName=
'checked'
>
<
Switch
/>
</
Form
.
Item
>
</
Form
>
</
div
>
</>
);
};
export
default
RecommendManageView
;
src/router/router.tsx
浏览文件 @
1fca1bdd
...
...
@@ -173,7 +173,7 @@ import LimitInfo from '~/pages/systemManage/limitManage/limitInfo';
import
CustomListDetail
from
'~/pages/customManage/customList/detail'
;
import
ServiceCategoryDetail
from
'~/pages/categoryManage/serviceCategoryList/detail'
;
import
RewardsManageView
from
'~/pages/activityManage/rewardsManage'
;
import
RecommendManageView
from
'~/pages/activityManage/recommendManage
'
;
import
ActivityListView
from
'~/pages/activityManage/activityList
'
;
const
AddressManageView
=
React
.
lazy
(()
=>
import
(
'~/pages/systemManage/addressManage'
));
// const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表
...
...
@@ -531,12 +531,12 @@ export const routerList: Array<RouteObjectType> = [
},
},
{
path
:
'/activityManage/
recommendManage
'
,
element
:
withLoadingComponent
(<
RecommendManage
View
/>),
path
:
'/activityManage/
activityList
'
,
element
:
withLoadingComponent
(<
ActivityList
View
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
520
,
title
:
'
推荐奖励
'
,
title
:
'
活动管理
'
,
icon
:
<
WechatOutlined
/>,
develop
:
true
,
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论