Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
p x
SuZhouAvp
Commits
bde6fc86
Commit
bde6fc86
authored
Aug 26, 2025
by
p x
Browse files
對通車輛詳情
parent
066a88e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/sd/cavphmi/bean/VehDetailBean.kt
View file @
bde6fc86
...
...
@@ -4,11 +4,11 @@ package com.sd.cavphmi.bean
data class
VehDetailBean
(
val
code
:
Int
,
val
msg
:
String
,
val
result
:
Result
,
val
result
:
V
Result
,
val
success
:
Boolean
)
data class
Result
(
data class
V
Result
(
val
offlineCount
:
Int
,
val
onlineCount
:
Int
,
val
vehicleInfos
:
List
<
VehicleInfo
>
...
...
app/src/main/java/com/sd/cavphmi/net/HeadParamsInterceptor.kt
View file @
bde6fc86
...
...
@@ -21,6 +21,7 @@ class HeadParamsInterceptor @Inject constructor() : Interceptor {
request
.
header
(
"token"
,
MyContants
.
HTTP_TOKEN
)
request
.
header
(
"Authorization"
,
MyContants
.
HTTP_TOKEN
)
}
request
.
header
(
"Referer"
,
"${MyContants.HOST}/itdts-portal-v5/intelligence-parking"
)
return
chain
.
proceed
(
request
.
build
())
}
...
...
app/src/main/java/com/sd/cavphmi/repositorys/AvpDataRepo.kt
View file @
bde6fc86
...
...
@@ -12,9 +12,9 @@ import javax.inject.Inject
class
AvpDataRepo
@Inject
constructor
(
private
var
clientRetrofitMethod
:
ClientRetrofitMethod
)
{
/***获取车辆详情
* @param id
车辆id
* @param id
正常应该是传场地ID,但是亦庄这个和太和桥车是一样的
* **/
suspend
fun
getVehDetail
(
id
:
String
=
"
1
"
):
MyResult
<
VehDetailBean
>
{
suspend
fun
getVehDetail
(
id
:
String
=
""
):
MyResult
<
VehDetailBean
>
{
if
(
id
.
isNullOrEmpty
())
{
return
MyResult
.
Error
(
MyContants
.
HTTP_ERROR
,
"error"
)
}
...
...
app/src/main/java/com/sd/cavphmi/viewmodels/MainVm.kt
View file @
bde6fc86
...
...
@@ -122,7 +122,7 @@ class MainVm @Inject constructor(
}
//获取车辆详情
fun
getVehDetail
(
id
:
String
=
"
1
"
)
{
fun
getVehDetail
(
id
:
String
=
""
)
{
viewModelScope
.
launch
{
var
result
=
avpDataRepo
.
getVehDetail
(
id
)
when
(
result
)
{
...
...
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