Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
90792e5a
提交
90792e5a
authored
10月 27, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/develop' into develop
上级
dcaaa61f
22769b65
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
260 行增加
和
6 行删除
+260
-6
.env.production
env/.env.production
+1
-0
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
activityManage.ts
src/api/interface/activityManage.ts
+75
-0
activityManage.ts
src/api/modules/activityManage.ts
+6
-0
index.tsx
...activityManage/activityList/comp/addOrEditModal/index.tsx
+2
-2
index.tsx
src/pages/activityManage/activityList/detail/index.tsx
+139
-0
index.tsx
src/pages/activityManage/activityList/index.tsx
+22
-3
router.tsx
src/router/router.tsx
+14
-0
没有找到文件。
env/.env.production
浏览文件 @
90792e5a
#请求接口地址
VITE_REQUEST_BASE_URL='https://www.iuav.shop'
#VITE_REQUEST_BASE_URL='http://119.23.248.181'
#VITE_REQUEST_BASE_URL='http://120.77.145.47'
#VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='/api'
...
...
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
90792e5a
...
...
@@ -14,4 +14,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
6a85a7fa07fcbc6507de09152937ed5f27bf494c
newTag
:
73fe5eb8d83e5b85040be66663070575ca1db890
src/api/interface/activityManage.ts
浏览文件 @
90792e5a
...
...
@@ -126,3 +126,78 @@ export type activityUpdateType = InterFunction<
>
;
// 删除活动
export
type
activityDeleteType
=
InterFunction
<
{
id
:
number
},
null
>
;
// 活动详情
export
type
activityInviteDetailType
=
InterListFunction
<
{
activityId
:
number
;
activityStatus
?:
number
;
activityType
?:
number
;
userAccountId
?:
number
;
},
{
id
:
number
;
activityId
:
number
;
userAccountId
:
number
;
createTime
:
null
;
accountSimpleDTO
:
{
id
:
number
;
uid
:
string
;
phoneNum
:
string
;
userName
:
string
;
nickName
:
string
;
userImg
:
string
;
openid
:
string
;
userSex
:
number
;
email
:
null
;
source
:
null
;
accountStatus
:
number
;
portType
:
number
;
companyAuthStatus
:
number
;
cooperationTagId
:
null
;
companyName
:
string
;
tagName
:
null
;
cooperationTagVOS
:
Array
<
{
id
:
number
;
tagName
:
string
;
tagImg
:
null
;
tagDescription
:
null
;
tagRequire
:
null
;
createTime
:
null
;
}
>
;
briefIntroduction
:
null
;
coverPicture
:
null
;
region
:
null
;
};
rewardValue
:
null
;
puserAccountId
:
number
;
paccountSimpleDTO
:
{
id
:
number
;
uid
:
string
;
phoneNum
:
string
;
userName
:
null
;
nickName
:
string
;
userImg
:
string
;
openid
:
string
;
userSex
:
number
;
email
:
null
;
source
:
null
;
accountStatus
:
number
;
portType
:
number
;
companyAuthStatus
:
number
;
cooperationTagId
:
null
;
companyName
:
null
;
tagName
:
null
;
cooperationTagVOS
:
Array
<
{
id
:
number
;
tagName
:
string
;
tagImg
:
null
;
tagDescription
:
null
;
tagRequire
:
null
;
createTime
:
null
;
}
>
;
briefIntroduction
:
null
;
coverPicture
:
null
;
region
:
null
;
};
}
>
;
src/api/modules/activityManage.ts
浏览文件 @
90792e5a
...
...
@@ -4,6 +4,7 @@ import {
activityDeleteType
,
activityEditType
,
activityInsertType
,
activityInviteDetailType
,
activityUpdateType
,
addActivityType
,
DataInfoType
,
...
...
@@ -73,4 +74,9 @@ export class ActivityManageAPI {
static
activityDelete
:
activityDeleteType
=
(
params
)
=>
{
return
axios
.
get
(
'/userapp/activity/delete'
,
{
params
});
};
// 活动详情
static
activityInviteDetail
:
activityInviteDetailType
=
(
params
)
=>
{
return
axios
.
post
(
'/userapp/activity/inviteDetail'
,
params
);
};
}
src/pages/activityManage/activityList/comp/addOrEditModal/index.tsx
浏览文件 @
90792e5a
...
...
@@ -52,7 +52,7 @@ const AddOrEditModal: FC<ModalProps & selfProps> = ({ open, onCancel, title, dat
}
else
{
editForm
.
resetFields
();
}
console
.
log
(
'组件挂载 --->'
,
data
);
//
console.log('组件挂载 --->', data);
},
[
open
]);
return
(
<
Modal
open=
{
open
}
onCancel=
{
handleCancel
}
title=
{
title
}
onOk=
{
handleSubmit
}
>
...
...
@@ -113,7 +113,7 @@ const AddOrEditModal: FC<ModalProps & selfProps> = ({ open, onCancel, title, dat
<
Radio
.
Group
options=
{
[
{
label
:
'积分'
,
value
:
0
},
{
label
:
'余额'
,
value
:
1
},
{
label
:
'余额'
,
value
:
1
,
disabled
:
true
},
{
label
:
'优惠券'
,
value
:
2
,
disabled
:
true
},
]
}
/>
...
...
src/pages/activityManage/activityList/detail/index.tsx
0 → 100644
浏览文件 @
90792e5a
import
{
useEffect
,
useState
}
from
'react'
;
import
SearchBox
from
'~/components/search-box'
;
import
{
Button
,
message
,
Table
}
from
'antd'
;
import
{
ArrowLeftOutlined
}
from
'@ant-design/icons'
;
import
{
activityInviteDetailType
}
from
'~/api/interface/activityManage'
;
import
{
InterListType
}
from
'~/api/interface'
;
import
{
ActivityManageAPI
}
from
'~/api'
;
import
{
useLocation
,
useNavigate
}
from
'react-router-dom'
;
import
qs
from
'query-string'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
// 列表的类型
type
TableType
=
InterListType
<
activityInviteDetailType
>
;
const
ActivityListDetailView
=
()
=>
{
// 路由钩子
const
location
=
useLocation
();
const
navigate
=
useNavigate
();
// 表格数据
const
[
tableData
,
setTableData
]
=
useState
<
TableType
>
([]);
// 表格分页配置
const
[
pagination
,
setPagination
]
=
useState
({
total
:
0
,
pageSize
:
10
,
current
:
1
,
totalPage
:
0
,
});
// 活动id
const
activityId
=
Number
(
qs
.
parse
(
location
.
search
).
id
);
// 加载列表
const
getTableList
=
async
(
value
=
{})
=>
{
// 只需要修改这个地方的接口即可
const
res
=
await
ActivityManageAPI
.
activityInviteDetail
({
pageNo
:
pagination
.
current
,
pageSize
:
pagination
.
pageSize
,
activityId
,
...
value
,
});
if
(
res
&&
res
.
code
===
'200'
)
{
const
{
list
,
pageNo
,
totalCount
,
pageSize
,
totalPage
}
=
res
.
result
;
// 解构
setPagination
({
total
:
totalCount
,
current
:
pageNo
,
pageSize
,
totalPage
,
});
setTableData
(
list
||
[]);
// console.log('加载列表 --->', list);
}
else
{
message
.
warning
(
res
.
message
);
}
};
// 翻页
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
getTableList
({
pageNo
,
pageSize
}).
then
();
};
// 页面挂载
useEffect
(()
=>
{
getTableList
().
then
();
},
[]);
// 表格结构
const
columns
:
ColumnsType
<
TableType
[
0
]
>
=
[
{
title
:
'邀请人'
,
dataIndex
:
'userAccountId'
,
align
:
'center'
,
render
:
(
_text
,
record
)
=>
record
?.
accountSimpleDTO
?.
userName
||
record
?.
accountSimpleDTO
?.
nickName
,
},
{
title
:
'邀请人手机号'
,
dataIndex
:
'userAccountId'
,
align
:
'center'
,
render
:
(
_text
,
record
)
=>
record
?.
accountSimpleDTO
?.
phoneNum
,
},
{
title
:
'被邀请人'
,
dataIndex
:
'userAccountId'
,
align
:
'center'
,
render
:
(
_text
,
record
)
=>
record
?.
paccountSimpleDTO
?.
userName
||
record
?.
paccountSimpleDTO
?.
nickName
,
},
{
title
:
'被邀请人手机号'
,
dataIndex
:
'userAccountId'
,
align
:
'center'
,
render
:
(
_text
,
record
)
=>
record
?.
paccountSimpleDTO
?.
phoneNum
,
},
{
title
:
'奖励积分'
,
dataIndex
:
'rewardValue'
,
align
:
'center'
,
render
:
(
text
)
=>
`
${
text
}
分`
,
},
{
title
:
'注册时间'
,
dataIndex
:
'createTime'
,
align
:
'center'
,
},
];
return
(
<>
<
SearchBox
child=
{
<>
<
Button
type=
{
'primary'
}
icon=
{
<
ArrowLeftOutlined
/>
}
onClick=
{
()
=>
{
navigate
(
-
1
);
}
}
>
返回
</
Button
>
</>
}
/>
<
Table
// size='small'
dataSource=
{
tableData
}
columns=
{
columns
}
rowKey=
'id'
// scroll={{ x: 1000 }}
bordered
pagination=
{
{
total
:
pagination
.
total
,
pageSize
:
pagination
.
pageSize
,
current
:
pagination
.
current
,
showSizeChanger
:
true
,
showQuickJumper
:
true
,
onChange
:
(
page
:
number
,
pageSize
:
number
)
=>
paginationChange
(
page
,
pageSize
),
showTotal
:
(
total
,
range
)
=>
`当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`
,
}
}
/>
</>
);
};
export
default
ActivityListDetailView
;
src/pages/activityManage/activityList/index.tsx
浏览文件 @
90792e5a
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
SearchView
from
'~/components/search-box'
;
import
{
ActivityManageAPI
}
from
'~/api'
;
import
{
InterListType
,
InterReqListType
}
from
'~/api/interface'
;
...
...
@@ -7,6 +7,8 @@ import { Button, message, Modal, Table } from 'antd';
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
AddOrEditModal
from
'~/pages/activityManage/activityList/comp/addOrEditModal'
;
import
{
useNavigate
}
from
'react-router-dom'
;
import
qs
from
'query-string'
;
// 列表的类型
type
TableType
=
InterListType
<
listActivityPagesType
>
;
...
...
@@ -29,6 +31,8 @@ const rewardTypeList = [
];
const
ActivityListView
=
()
=>
{
// 路由钩子
const
navigate
=
useNavigate
();
// 表格数据
const
[
tableData
,
setTableData
]
=
useState
<
TableType
>
([]);
// 表格分页配置
...
...
@@ -62,7 +66,7 @@ const ActivityListView = () => {
totalPage
,
});
setTableData
(
list
||
[]);
console
.
log
(
'加载列表 --->'
,
list
);
//
console.log('加载列表 --->', list);
}
else
{
message
.
warning
(
res
.
message
);
}
...
...
@@ -87,7 +91,9 @@ const ActivityListView = () => {
const
res
=
await
ActivityManageAPI
.
activityDelete
({
id
:
record
?.
id
});
if
(
res
&&
res
.
code
===
'200'
)
{
paginationChange
(
tableData
.
length
===
1
?
pagination
.
current
-
1
:
pagination
.
current
,
tableData
.
length
===
1
&&
pagination
.
current
!==
1
?
pagination
.
current
-
1
:
pagination
.
current
,
pagination
.
pageSize
,
);
message
.
success
(
'删除成功'
);
...
...
@@ -160,6 +166,7 @@ const ActivityListView = () => {
dataIndex
:
'action'
,
align
:
'center'
,
fixed
:
'right'
,
width
:
'180px'
,
render
:
(
_text
,
record
)
=>
(
<>
<
Button
...
...
@@ -171,6 +178,18 @@ const ActivityListView = () => {
>
编辑
</
Button
>
<
Button
type=
{
'link'
}
onClick=
{
()
=>
{
navigate
(
`/activityManage/activityList/detail?${qs.stringify({
id: record?.id,
})}`
,
);
}
}
>
领取记录
</
Button
>
<
Button
type=
{
'link'
}
danger
onClick=
{
()
=>
handleDelete
(
record
)
}
>
删除
</
Button
>
...
...
src/router/router.tsx
浏览文件 @
90792e5a
...
...
@@ -174,6 +174,7 @@ import CustomListDetail from '~/pages/customManage/customList/detail';
import
ServiceCategoryDetail
from
'~/pages/categoryManage/serviceCategoryList/detail'
;
import
RewardsManageView
from
'~/pages/activityManage/rewardsManage'
;
import
ActivityListView
from
'~/pages/activityManage/activityList'
;
import
ActivityListDetailView
from
'~/pages/activityManage/activityList/detail'
;
const
AddressManageView
=
React
.
lazy
(()
=>
import
(
'~/pages/systemManage/addressManage'
));
// const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表
...
...
@@ -529,6 +530,19 @@ export const routerList: Array<RouteObjectType> = [
develop
:
true
,
},
},
{
path
:
'/activityManage/activityList/detail'
,
element
:
withLoadingComponent
(<
ActivityListDetailView
/>),
errorElement
:
<
ErrorPage
/>,
meta
:
{
id
:
520
,
title
:
'领取记录'
,
icon
:
<
WechatOutlined
/>,
hidden
:
true
,
pid
:
520
,
develop
:
true
,
},
},
],
},
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论