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 个修改的文件
包含
106 行增加
和
86 行删除
+106
-86
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
+10
-4
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
config
from
'./config'
import
request
,
{
Response
}
from
'~/api/request'
;
import
config
from
'./config'
;
export
interface
RegionResp
{
childInfo
?:
RegionResp
[]
|
null
id
:
number
level
:
number
name
:
string
pid
:
number
childInfo
?:
RegionResp
[]
|
null
;
id
:
number
;
level
:
number
;
name
:
string
;
pid
:
number
;
}
export
interface
UserInfoResp
{
id
:
number
accountType
:
number
uid
:
string
phoneNum
:
string
userName
:
string
nickName
:
string
userImg
:
string
userSex
:
number
email
:
string
source
:
number
accountStatus
:
number
remark
:
string
portType
:
number
createTime
:
string
companyAuthStatus
:
number
token
:
string
cooperationTagId
:
number
|
null
id
:
number
;
accountType
:
number
;
uid
:
string
;
phoneNum
:
string
;
userName
:
string
;
nickName
:
string
;
userImg
:
string
;
userSex
:
number
;
email
:
string
;
source
:
number
;
accountStatus
:
number
;
remark
:
string
;
portType
:
number
;
createTime
:
string
;
companyAuthStatus
:
number
;
token
:
string
;
cooperationTagId
:
number
|
null
;
}
export
interface
TestAppletLoginResp
{
userAccountId
:
number
token
:
string
uid
:
string
phoneNum
?:
string
nickName
:
string
sessionKey
?:
any
userAccountId
:
number
;
token
:
string
;
uid
:
string
;
phoneNum
?:
string
;
nickName
:
string
;
sessionKey
?:
any
;
}
export
default
{
//获取区域数据
region
:
():
Promise
<
Response
<
Array
<
RegionResp
>>>
=>
{
return
request
(
'/pms/webDevice/getSecondDistrictInfo'
)
return
request
(
'/pms/webDevice/getSecondDistrictInfo'
)
;
},
//测试-小程序unionId登录-注册
testAppletLogin
:
():
Promise
<
Response
<
TestAppletLoginResp
>>
=>
{
let
params
=
new
URLSearchParams
()
params
.
append
(
'unionId'
,
'oQZEd5hy0Qrwaj10BGtP8xq8vH--s88888'
)
let
params
=
new
URLSearchParams
()
;
params
.
append
(
'unionId'
,
'oQZEd5hy0Qrwaj10BGtP8xq8vH--s88888'
)
;
return
request
(
'/userapp/auth/testAppletLogin'
,
'post'
,
...
...
@@ -55,28 +55,43 @@ export default {
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
body
:
params
,
}
)
}
,
)
;
},
//生成小程序码
getAppletQRCode
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
return
request
(
'/userapp/wx/getAppletQRCode'
,
'get'
,
{
page
:
'page-identity/identity-empower/index'
,
scene
:
'randomLoginCode='
+
params
.
randomLoginCode
,
})
})
;
},
//查询登录信息
getLoginInfo
:
(
params
:
{
randomLoginCode
:
string
})
=>
{
return
request
(
'/userapp/temp-auth/getLoginInfo'
,
'get'
,
params
,
{
hideError
:
true
,
//隐藏错误提示
})
})
;
},
//获取用户基本信息
userInfo
:
():
Promise
<
Response
<
UserInfoResp
>>
=>
{
return
request
(
'/userapp/user-account/info'
,
'get'
)
return
request
(
'/userapp/user-account/info'
,
'get'
)
;
},
//图片上传地址
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 = {
return
[
{
source
:
'/local/:path*'
,
//
destination: 'https://www.iuav.shop/:path*',
destination
:
'https://test.iuav.shop/:path*'
,
destination
:
'https://www.iuav.shop/:path*'
,
//
destination: 'https://test.iuav.shop/:path*',
},
];
},
...
...
pages/equipmentLeasing/api/index.tsx
浏览文件 @
3c1ffc99
...
...
@@ -18,11 +18,6 @@ export interface Device {
price
:
number
|
null
;
}
export
interface
Advertisement
{
id
:
number
;
imageUrl
:
string
;
}
export
interface
ListPageDeviceInfoResp
{
pageNo
:
1
;
pageSize
:
10
;
...
...
@@ -39,8 +34,4 @@ export default {
):
Promise
<
Response
<
ListPageDeviceInfoResp
>>
=>
{
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';
import
ContentBox
from
'~/components/contentBox'
;
import
Filter
,
{
AdapterResult
,
FilterResult
}
from
'~/components/filter'
;
import
Layout
from
'~/components/layout'
;
import
api
,
{
Advertisement
,
Device
}
from
'./api'
;
import
api
,
{
Device
}
from
'./api'
;
import
{
Box
}
from
'./styled'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
import
commonApi
from
'~/api'
;
// 此函数在构建时被调用
export
async
function
getStaticProps
()
{
//获取筛选数据,进行静态渲染
...
...
@@ -53,10 +54,10 @@ export default function EquipmentLeasing(props: Props) {
);
};
const
rightDom
=
(
item
:
Advertisement
)
=>
{
const
rightDom
=
(
item
:
{
id
:
number
;
bannerImg
:
string
}
)
=>
{
return
(
<
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
>
);
};
...
...
@@ -119,15 +120,18 @@ export default function EquipmentLeasing(props: Props) {
adapterFilterResult
.
categoryId
=
adapterFilterResult
.
categoryId
?.
map
((
item
)
=>
item
.
id
);
setFilterResult
(
adapterFilterResult
);
};
useEffect
(()
=>
{
api
.
listAdvertisementInfo
().
then
((
res
)
=>
{
const
getPropagandaCenter
=
()
=>
{
commonApi
.
listBannerImg
(
'DEVICE_RENT'
).
then
((
res
)
=>
{
setRightProductList
(
res
.
result
?
.
map
((
item
)
=>
{
(
res
.
result
||
[])
.
map
((
item
)
=>
{
return
{
element
:
rightDom
(
item
)
};
})
||
[]
,
}),
);
});
};
useEffect
(()
=>
{
getPropagandaCenter
();
},
[]);
useEffect
(()
=>
{
...
...
pages/equipmentLeasing/styled.tsx
浏览文件 @
3c1ffc99
...
...
@@ -67,7 +67,7 @@ export const Box = styled.div`
}
.right-item {
width: 180px;
height:
295
px;
height:
347
px;
background: #d8d8d8;
border-radius: 6px;
overflow: hidden;
...
...
pages/flyingHandService/index.page.tsx
浏览文件 @
3c1ffc99
...
...
@@ -21,6 +21,7 @@ import { phoneNumber } from '~/lib/validateUtils';
import
api
,
{
Flying
,
RegionResp
,
SkillsType
}
from
'./api'
;
import
{
Box
}
from
'./styled'
;
import
{
TypesResp
}
from
'~/components/filter/api'
;
import
commonApi
from
'~/api'
;
interface
FilterInfoParams
{
provinceId
?:
number
;
categoryId
?:
any
[];
...
...
@@ -221,13 +222,18 @@ export default function FlyingHandService() {
};
});
};
useEffect
((
)
=>
{
const
getPropagandaCenter
=
()
=>
{
commonApi
.
listBannerImg
(
'FLYER_TRAIN'
).
then
((
res
)
=>
{
setRightDomList
(
list
.
map
((
item
:
string
)
=>
{
return
{
element
:
rightDom
(
item
)
};
(
res
.
result
||
[]).
map
((
item
)
=>
{
return
{
element
:
rightDom
(
item
.
bannerImg
)
};
}),
);
});
};
useEffect
(()
=>
{
getPropagandaCenter
();
api
.
region
().
then
((
res
)
=>
{
setSecondDistrictInfo
(
res
.
result
||
[]);
});
...
...
pages/flyingHandService/styled.tsx
浏览文件 @
3c1ffc99
...
...
@@ -128,7 +128,7 @@ export const Box = styled.div`
}
.right-item {
width: 260px;
height:
42
0px;
height:
50
0px;
background: #ffffff;
border-radius: 6px;
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
{
Box
}
from
'./styled'
;
import
Image
from
'next/image'
;
import
commonApi
from
'~/api'
;
export
default
function
RotationChart
()
{
const
list
=
[
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/da9ebaef-8dfb-4daf-930a-155f21c7351b.jpg'
,
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/150654a8-64bc-4888-a8b9-b35d812f60c2.jpg'
,
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/a93492b7-7b60-43c0-ad51-86262b87b4de.jpg'
,
'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'
,
];
const
[
bannerList
,
setBannerList
]
=
useState
<
string
[]
>
([]);
const
getPropagandaCenter
=
()
=>
{
commonApi
.
listBannerImg
(
'OFFICIAL_BANNER'
).
then
((
res
)
=>
{
setBannerList
((
res
.
result
||
[]).
map
((
item
)
=>
item
.
bannerImg
));
});
};
useEffect
(()
=>
{
getPropagandaCenter
();
},
[]);
return
(
<
Box
>
<
Carousel
className=
'rotationChart'
autoplay
dots=
{
{
className
:
'botsBotton'
}
}
>
{
l
ist
.
map
((
item
)
=>
(
{
bannerL
ist
.
map
((
item
)
=>
(
<
div
key=
{
item
}
>
<
h3
className=
'contentStyle'
>
<
Image
src=
{
item
}
alt=
'error'
fill
/>
...
...
pages/jobServices/index.page.tsx
浏览文件 @
3c1ffc99
...
...
@@ -6,6 +6,7 @@ import ContentBox from '~/components/contentBox';
import
{
useRouter
}
from
'next/router'
;
import
Filter
,
{
FilterResult
,
AdapterResult
}
from
'~/components/filter'
;
import
api
,
{
Job
}
from
'./api'
;
import
commonApi
from
'~/api'
;
import
Image
from
'next/image'
;
// 此函数在构建时被调用
export
async
function
getServerSideProps
()
{
...
...
@@ -18,10 +19,6 @@ interface ImageListType {}
export
default
function
JobServices
()
{
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
[
rightDomList
,
setRightDomList
]
=
useState
(
Array
<
{
element
:
JSX
.
Element
}
>
);
const
leftDom
=
(
item
:
Job
)
=>
{
...
...
@@ -56,7 +53,7 @@ export default function JobServices() {
const
rightDom
=
(
item
:
string
)
=>
{
return
(
<
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
>
);
};
...
...
@@ -77,7 +74,15 @@ export default function JobServices() {
pageNo
:
page
,
});
};
const
getPropagandaCenter
=
()
=>
{
commonApi
.
listBannerImg
(
'JOB_SERVICE'
).
then
((
res
)
=>
{
setRightDomList
(
(
res
.
result
||
[]).
map
((
item
)
=>
{
return
{
element
:
rightDom
(
item
.
bannerImg
)
};
}),
);
});
};
useEffect
(()
=>
{
//中断前一次列表请求
abort
?.
abort
();
...
...
@@ -122,11 +127,7 @@ export default function JobServices() {
};
useEffect
(()
=>
{
setRightDomList
(
list
.
map
((
item
)
=>
{
return
{
element
:
rightDom
(
item
)
};
}),
);
getPropagandaCenter
();
},
[]);
useEffect
(()
=>
{
...
...
pages/mall/index.page.tsx
浏览文件 @
3c1ffc99
...
...
@@ -151,7 +151,7 @@ export default function Mall(props: Props) {
className=
{
styles
.
ad
}
src=
{
item
.
bannerImg
}
width=
{
189
}
height=
{
295
}
height=
{
364
}
preview=
{
false
}
fallback=
{
errImg
}
></
Image
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论