Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
web
Commits
3c1ffc99
提交
3c1ffc99
authored
6月 16, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:商城,作业服务,飞手培训,产品商城海报更换
上级
73e8a574
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
107 行增加
和
87 行删除
+107
-87
index.tsx
api/index.tsx
+55
-40
next.config.js
next.config.js
+2
-2
index.tsx
pages/equipmentLeasing/api/index.tsx
+0
-9
index.page.tsx
pages/equipmentLeasing/index.page.tsx
+12
-8
styled.tsx
pages/equipmentLeasing/styled.tsx
+1
-1
index.page.tsx
pages/flyingHandService/index.page.tsx
+11
-5
styled.tsx
pages/flyingHandService/styled.tsx
+1
-1
index.tsx
...home/waterfallFlowBody/components/rotationChart/index.tsx
+12
-9
index.page.tsx
pages/jobServices/index.page.tsx
+12
-11
index.page.tsx
pages/mall/index.page.tsx
+1
-1
没有找到文件。
api/index.tsx
浏览文件 @
3c1ffc99
import
request
,
{
Response
}
from
'~/api/request'
import
request
,
{
Response
}
from
'~/api/request'
;
import
config
from
'./config'
import
config
from
'./config'
;
export
interface
RegionResp
{
export
interface
RegionResp
{
childInfo
?:
RegionResp
[]
|
null
childInfo
?:
RegionResp
[]
|
null
;
id
:
number
id
:
number
;
level
:
number
level
:
number
;
name
:
string
name
:
string
;
pid
:
number
pid
:
number
;
}
}
export
interface
UserInfoResp
{
export
interface
UserInfoResp
{
id
:
number
id
:
number
;
accountType
:
number
accountType
:
number
;
uid
:
string
uid
:
string
;
phoneNum
:
string
phoneNum
:
string
;
userName
:
string
userName
:
string
;
nickName
:
string
nickName
:
string
;
userImg
:
string
userImg
:
string
;
userSex
:
number
userSex
:
number
;
email
:
string
email
:
string
;
source
:
number
source
:
number
;
accountStatus
:
number
accountStatus
:
number
;
remark
:
string
remark
:
string
;
portType
:
number
portType
:
number
;
createTime
:
string
createTime
:
string
;
companyAuthStatus
:
number
companyAuthStatus
:
number
;
token
:
string
token
:
string
;
cooperationTagId
:
number
|
null
cooperationTagId
:
number
|
null
;
}
}
export
interface
TestAppletLoginResp
{
export
interface
TestAppletLoginResp
{
userAccountId
:
number
userAccountId
:
number
;
token
:
string
token
:
string
;
uid
:
string
uid
:
string
;
phoneNum
?:
string
phoneNum
?:
string
;
nickName
:
string
nickName
:
string
;
sessionKey
?:
any
sessionKey
?:
any
;
}
}
export
default
{
export
default
{
//获取区域数据
//获取区域数据
region
:
():
Promise
<
Response
<
Array
<
RegionResp
>>>
=>
{
region
:
():
Promise
<
Response
<
Array
<
RegionResp
>>>
=>
{
return
request
(
'/pms/webDevice/getSecondDistrictInfo'
)
return
request
(
'/pms/webDevice/getSecondDistrictInfo'
)
;
},
},
//测试-小程序unionId登录-注册
//测试-小程序unionId登录-注册
testAppletLogin
:
():
Promise
<
Response
<
TestAppletLoginResp
>>
=>
{
testAppletLogin
:
():
Promise
<
Response
<
TestAppletLoginResp
>>
=>
{
let
params
=
new
URLSearchParams
()
let
params
=
new
URLSearchParams
()
;
params
.
append
(
'unionId'
,
'oQZEd5hy0Qrwaj10BGtP8xq8vH--s88888'
)
params
.
append
(
'unionId'
,
'oQZEd5hy0Qrwaj10BGtP8xq8vH--s88888'
)
;
return
request
(
return
request
(
'/userapp/auth/testAppletLogin'
,
'/userapp/auth/testAppletLogin'
,
'post'
,
'post'
,
...
@@ -55,28 +55,43 @@ export default {
...
@@ -55,28 +55,43 @@ export default {
'Content-Type'
:
'application/x-www-form-urlencoded'
,
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
},
body
:
params
,
body
:
params
,
}
}
,
)
)
;
},
},
//生成小程序码
//生成小程序码
getAppletQRCode
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
getAppletQRCode
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
return
request
(
'/userapp/wx/getAppletQRCode'
,
'get'
,
{
return
request
(
'/userapp/wx/getAppletQRCode'
,
'get'
,
{
page
:
'page-identity/identity-empower/index'
,
page
:
'page-identity/identity-empower/index'
,
scene
:
'randomLoginCode='
+
params
.
randomLoginCode
,
scene
:
'randomLoginCode='
+
params
.
randomLoginCode
,
})
})
;
},
},
//查询登录信息
//查询登录信息
getLoginInfo
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
getLoginInfo
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
return
request
(
'/userapp/temp-auth/getLoginInfo'
,
'get'
,
params
,
{
return
request
(
'/userapp/temp-auth/getLoginInfo'
,
'get'
,
params
,
{
hideError
:
true
,
//隐藏错误提示
hideError
:
true
,
//隐藏错误提示
})
})
;
},
},
//获取用户基本信息
//获取用户基本信息
userInfo
:
():
Promise
<
Response
<
UserInfoResp
>>
=>
{
userInfo
:
():
Promise
<
Response
<
UserInfoResp
>>
=>
{
return
request
(
'/userapp/user-account/info'
,
'get'
)
return
request
(
'/userapp/user-account/info'
,
'get'
)
;
},
},
//图片上传地址
//图片上传地址
imgOss
:
()
=>
{
imgOss
:
()
=>
{
return
config
.
baseUrl
+
'/pms/upload/imgOss'
return
config
.
baseUrl
+
'/pms/upload/imgOss'
;
},
},
}
//宣传中心
listBannerImg
:
(
moduleCode
:
string
,
):
Promise
<
Response
<
{
id
:
number
;
bannerImg
:
string
;
}[]
>
>
=>
{
return
request
(
'/release/module/listBannerImg'
,
'get'
,
{
moduleCode
,
});
},
};
next.config.js
浏览文件 @
3c1ffc99
...
@@ -27,8 +27,8 @@ const nextConfig = {
...
@@ -27,8 +27,8 @@ const nextConfig = {
return
[
return
[
{
{
source
:
'/local/:path*'
,
source
:
'/local/:path*'
,
//
destination: 'https://www.iuav.shop/:path*',
destination
:
'https://www.iuav.shop/:path*'
,
destination
:
'https://test.iuav.shop/:path*'
,
//
destination: 'https://test.iuav.shop/:path*',
},
},
];
];
},
},
...
...
pages/equipmentLeasing/api/index.tsx
浏览文件 @
3c1ffc99
...
@@ -18,11 +18,6 @@ export interface Device {
...
@@ -18,11 +18,6 @@ export interface Device {
price
:
number
|
null
;
price
:
number
|
null
;
}
}
export
interface
Advertisement
{
id
:
number
;
imageUrl
:
string
;
}
export
interface
ListPageDeviceInfoResp
{
export
interface
ListPageDeviceInfoResp
{
pageNo
:
1
;
pageNo
:
1
;
pageSize
:
10
;
pageSize
:
10
;
...
@@ -39,8 +34,4 @@ export default {
...
@@ -39,8 +34,4 @@ export default {
):
Promise
<
Response
<
ListPageDeviceInfoResp
>>
=>
{
):
Promise
<
Response
<
ListPageDeviceInfoResp
>>
=>
{
return
request
(
'/pms/product/mall/deviceList'
,
'post'
,
params
,
options
);
return
request
(
'/pms/product/mall/deviceList'
,
'post'
,
params
,
options
);
},
},
//web-设备租赁-广告
listAdvertisementInfo
:
():
Promise
<
Response
<
Array
<
Advertisement
>>>
=>
{
return
request
(
'/pms/webDevice/ad'
,
'get'
);
},
};
};
pages/equipmentLeasing/index.page.tsx
浏览文件 @
3c1ffc99
...
@@ -5,9 +5,10 @@ import { useContext, useEffect, useRef, useState } from 'react';
...
@@ -5,9 +5,10 @@ import { useContext, useEffect, useRef, useState } from 'react';
import
ContentBox
from
'~/components/contentBox'
;
import
ContentBox
from
'~/components/contentBox'
;
import
Filter
,
{
AdapterResult
,
FilterResult
}
from
'~/components/filter'
;
import
Filter
,
{
AdapterResult
,
FilterResult
}
from
'~/components/filter'
;
import
Layout
from
'~/components/layout'
;
import
Layout
from
'~/components/layout'
;
import
api
,
{
Advertisement
,
Device
}
from
'./api'
;
import
api
,
{
Device
}
from
'./api'
;
import
{
Box
}
from
'./styled'
;
import
{
Box
}
from
'./styled'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
import
commonApi
from
'~/api'
;
// 此函数在构建时被调用
// 此函数在构建时被调用
export
async
function
getStaticProps
()
{
export
async
function
getStaticProps
()
{
//获取筛选数据,进行静态渲染
//获取筛选数据,进行静态渲染
...
@@ -53,10 +54,10 @@ export default function EquipmentLeasing(props: Props) {
...
@@ -53,10 +54,10 @@ export default function EquipmentLeasing(props: Props) {
);
);
};
};
const
rightDom
=
(
item
:
Advertisement
)
=>
{
const
rightDom
=
(
item
:
{
id
:
number
;
bannerImg
:
string
}
)
=>
{
return
(
return
(
<
div
key=
{
item
.
id
}
className=
'right-box-item right-item'
>
<
div
key=
{
item
.
id
}
className=
'right-box-item right-item'
>
<
Image
src=
{
item
.
imageUrl
}
alt=
'error'
fill
/>
<
Image
src=
{
item
.
bannerImg
}
alt=
'error'
fill
/>
</
div
>
</
div
>
);
);
};
};
...
@@ -119,15 +120,18 @@ export default function EquipmentLeasing(props: Props) {
...
@@ -119,15 +120,18 @@ export default function EquipmentLeasing(props: Props) {
adapterFilterResult
.
categoryId
=
adapterFilterResult
.
categoryId
?.
map
((
item
)
=>
item
.
id
);
adapterFilterResult
.
categoryId
=
adapterFilterResult
.
categoryId
?.
map
((
item
)
=>
item
.
id
);
setFilterResult
(
adapterFilterResult
);
setFilterResult
(
adapterFilterResult
);
};
};
const
getPropagandaCenter
=
()
=>
{
useEffect
(()
=>
{
commonApi
.
listBannerImg
(
'DEVICE_RENT'
).
then
((
res
)
=>
{
api
.
listAdvertisementInfo
().
then
((
res
)
=>
{
setRightProductList
(
setRightProductList
(
res
.
result
?
.
map
((
item
)
=>
{
(
res
.
result
||
[])
.
map
((
item
)
=>
{
return
{
element
:
rightDom
(
item
)
};
return
{
element
:
rightDom
(
item
)
};
})
||
[]
,
}),
);
);
});
});
};
useEffect
(()
=>
{
getPropagandaCenter
();
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
pages/equipmentLeasing/styled.tsx
浏览文件 @
3c1ffc99
...
@@ -67,7 +67,7 @@ export const Box = styled.div`
...
@@ -67,7 +67,7 @@ export const Box = styled.div`
}
}
.right-item {
.right-item {
width: 180px;
width: 180px;
height:
295
px;
height:
347
px;
background: #d8d8d8;
background: #d8d8d8;
border-radius: 6px;
border-radius: 6px;
overflow: hidden;
overflow: hidden;
...
...
pages/flyingHandService/index.page.tsx
浏览文件 @
3c1ffc99
...
@@ -21,6 +21,7 @@ import { phoneNumber } from '~/lib/validateUtils';
...
@@ -21,6 +21,7 @@ import { phoneNumber } from '~/lib/validateUtils';
import
api
,
{
Flying
,
RegionResp
,
SkillsType
}
from
'./api'
;
import
api
,
{
Flying
,
RegionResp
,
SkillsType
}
from
'./api'
;
import
{
Box
}
from
'./styled'
;
import
{
Box
}
from
'./styled'
;
import
{
TypesResp
}
from
'~/components/filter/api'
;
import
{
TypesResp
}
from
'~/components/filter/api'
;
import
commonApi
from
'~/api'
;
interface
FilterInfoParams
{
interface
FilterInfoParams
{
provinceId
?:
number
;
provinceId
?:
number
;
categoryId
?:
any
[];
categoryId
?:
any
[];
...
@@ -221,13 +222,18 @@ export default function FlyingHandService() {
...
@@ -221,13 +222,18 @@ export default function FlyingHandService() {
};
};
});
});
};
};
const
getPropagandaCenter
=
()
=>
{
commonApi
.
listBannerImg
(
'FLYER_TRAIN'
).
then
((
res
)
=>
{
setRightDomList
(
(
res
.
result
||
[]).
map
((
item
)
=>
{
return
{
element
:
rightDom
(
item
.
bannerImg
)
};
}),
);
});
};
useEffect
(()
=>
{
useEffect
(()
=>
{
setRightDomList
(
getPropagandaCenter
();
list
.
map
((
item
:
string
)
=>
{
return
{
element
:
rightDom
(
item
)
};
}),
);
api
.
region
().
then
((
res
)
=>
{
api
.
region
().
then
((
res
)
=>
{
setSecondDistrictInfo
(
res
.
result
||
[]);
setSecondDistrictInfo
(
res
.
result
||
[]);
});
});
...
...
pages/flyingHandService/styled.tsx
浏览文件 @
3c1ffc99
...
@@ -128,7 +128,7 @@ export const Box = styled.div`
...
@@ -128,7 +128,7 @@ export const Box = styled.div`
}
}
.right-item {
.right-item {
width: 260px;
width: 260px;
height:
42
0px;
height:
50
0px;
background: #ffffff;
background: #ffffff;
border-radius: 6px;
border-radius: 6px;
overflow: hidden;
overflow: hidden;
...
...
pages/home/waterfallFlowBody/components/rotationChart/index.tsx
浏览文件 @
3c1ffc99
import
React
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Carousel
}
from
'antd'
;
import
{
Carousel
}
from
'antd'
;
import
{
Box
}
from
'./styled'
;
import
{
Box
}
from
'./styled'
;
import
Image
from
'next/image'
;
import
Image
from
'next/image'
;
import
commonApi
from
'~/api'
;
export
default
function
RotationChart
()
{
export
default
function
RotationChart
()
{
const
list
=
[
const
[
bannerList
,
setBannerList
]
=
useState
<
string
[]
>
([]);
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/da9ebaef-8dfb-4daf-930a-155f21c7351b.jpg'
,
const
getPropagandaCenter
=
()
=>
{
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/150654a8-64bc-4888-a8b9-b35d812f60c2.jpg'
,
commonApi
.
listBannerImg
(
'OFFICIAL_BANNER'
).
then
((
res
)
=>
{
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/a93492b7-7b60-43c0-ad51-86262b87b4de.jpg'
,
setBannerList
((
res
.
result
||
[]).
map
((
item
)
=>
item
.
bannerImg
));
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/a0dc9062-cef8-44ce-bbba-ee82a0d5fe80.jpg'
,
});
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/95843a99-e8bf-4156-b47a-cf3720f4a885.jpg'
,
};
];
useEffect
(()
=>
{
getPropagandaCenter
();
},
[]);
return
(
return
(
<
Box
>
<
Box
>
<
Carousel
className=
'rotationChart'
autoplay
dots=
{
{
className
:
'botsBotton'
}
}
>
<
Carousel
className=
'rotationChart'
autoplay
dots=
{
{
className
:
'botsBotton'
}
}
>
{
l
ist
.
map
((
item
)
=>
(
{
bannerL
ist
.
map
((
item
)
=>
(
<
div
key=
{
item
}
>
<
div
key=
{
item
}
>
<
h3
className=
'contentStyle'
>
<
h3
className=
'contentStyle'
>
<
Image
src=
{
item
}
alt=
'error'
fill
/>
<
Image
src=
{
item
}
alt=
'error'
fill
/>
...
...
pages/jobServices/index.page.tsx
浏览文件 @
3c1ffc99
...
@@ -6,6 +6,7 @@ import ContentBox from '~/components/contentBox';
...
@@ -6,6 +6,7 @@ import ContentBox from '~/components/contentBox';
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
import
Filter
,
{
FilterResult
,
AdapterResult
}
from
'~/components/filter'
;
import
Filter
,
{
FilterResult
,
AdapterResult
}
from
'~/components/filter'
;
import
api
,
{
Job
}
from
'./api'
;
import
api
,
{
Job
}
from
'./api'
;
import
commonApi
from
'~/api'
;
import
Image
from
'next/image'
;
import
Image
from
'next/image'
;
// 此函数在构建时被调用
// 此函数在构建时被调用
export
async
function
getServerSideProps
()
{
export
async
function
getServerSideProps
()
{
...
@@ -18,10 +19,6 @@ interface ImageListType {}
...
@@ -18,10 +19,6 @@ interface ImageListType {}
export
default
function
JobServices
()
{
export
default
function
JobServices
()
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
[
list
,
setList
]
=
useState
([
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/540X844-2(1).jpg'
,
// "https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/665512fd-12e6-49a9-93c1-f9dcd0e82083.jpg",
]);
const
[
productList
,
setProductList
]
=
useState
(
Array
<
{
element
:
JSX
.
Element
}
>
);
const
[
productList
,
setProductList
]
=
useState
(
Array
<
{
element
:
JSX
.
Element
}
>
);
const
[
rightDomList
,
setRightDomList
]
=
useState
(
Array
<
{
element
:
JSX
.
Element
}
>
);
const
[
rightDomList
,
setRightDomList
]
=
useState
(
Array
<
{
element
:
JSX
.
Element
}
>
);
const
leftDom
=
(
item
:
Job
)
=>
{
const
leftDom
=
(
item
:
Job
)
=>
{
...
@@ -56,7 +53,7 @@ export default function JobServices() {
...
@@ -56,7 +53,7 @@ export default function JobServices() {
const
rightDom
=
(
item
:
string
)
=>
{
const
rightDom
=
(
item
:
string
)
=>
{
return
(
return
(
<
div
className=
'right-box-item advertisement'
key=
{
item
}
>
<
div
className=
'right-box-item advertisement'
key=
{
item
}
>
<
Image
src=
{
item
}
alt=
'error'
width=
{
260
}
height=
{
42
0
}
/>
<
Image
src=
{
item
}
alt=
'error'
width=
{
260
}
height=
{
50
0
}
/>
</
div
>
</
div
>
);
);
};
};
...
@@ -77,7 +74,15 @@ export default function JobServices() {
...
@@ -77,7 +74,15 @@ export default function JobServices() {
pageNo
:
page
,
pageNo
:
page
,
});
});
};
};
const
getPropagandaCenter
=
()
=>
{
commonApi
.
listBannerImg
(
'JOB_SERVICE'
).
then
((
res
)
=>
{
setRightDomList
(
(
res
.
result
||
[]).
map
((
item
)
=>
{
return
{
element
:
rightDom
(
item
.
bannerImg
)
};
}),
);
});
};
useEffect
(()
=>
{
useEffect
(()
=>
{
//中断前一次列表请求
//中断前一次列表请求
abort
?.
abort
();
abort
?.
abort
();
...
@@ -122,11 +127,7 @@ export default function JobServices() {
...
@@ -122,11 +127,7 @@ export default function JobServices() {
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
setRightDomList
(
getPropagandaCenter
();
list
.
map
((
item
)
=>
{
return
{
element
:
rightDom
(
item
)
};
}),
);
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
pages/mall/index.page.tsx
浏览文件 @
3c1ffc99
...
@@ -151,7 +151,7 @@ export default function Mall(props: Props) {
...
@@ -151,7 +151,7 @@ export default function Mall(props: Props) {
className=
{
styles
.
ad
}
className=
{
styles
.
ad
}
src=
{
item
.
bannerImg
}
src=
{
item
.
bannerImg
}
width=
{
189
}
width=
{
189
}
height=
{
295
}
height=
{
364
}
preview=
{
false
}
preview=
{
false
}
fallback=
{
errImg
}
fallback=
{
errImg
}
></
Image
>
></
Image
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论