Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7a14b572
authored
Mar 18, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 车辆详情自定义跳转
1 parent
a230e8ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
5 deletions
aus-front/app/src/module/auction/AuctionVehiclePage.vue
aus-front/app/src/module/auction/customNav.vue
aus-front/app/src/pages.json
aus-front/app/src/module/auction/AuctionVehiclePage.vue
View file @
7a14b57
<
template
>
<
template
>
<page-meta
:page-style=
"'overflow:'+(show?'hidden':'visible')"
></page-meta>
<page-meta
:page-style=
"'overflow:'+(show?'hidden':'visible')"
></page-meta>
<customNav
:status-bar-height=
"statusBarHeight"
></customNav>
<view
class=
"page"
:style=
"
{ paddingTop: statusBarHeight + 44 + 'px' }" >
<view
class=
"car-detail-container"
v-if=
"auctionVehicle"
>
<view
class=
"car-detail-container"
v-if=
"auctionVehicle"
>
<view
v-if=
"currentAnchorId && currentAnchorId != 'section0'"
class=
"header-anchor"
>
<view
v-if=
"currentAnchorId && currentAnchorId != 'section0'"
class=
"header-anchor"
:style=
"
{ top: statusBarHeight + 44 + 'px' }"
>
<view
class=
"header-anchor-list"
:class=
"
{ headerActive: currentAnchorId === 'section1' }" @click="scrollToSection('section1')">
<view
class=
"header-anchor-list"
:class=
"
{ headerActive: currentAnchorId === 'section1' }" @click="scrollToSection('section1')">
车辆档案
车辆档案
<view
v-if=
"currentAnchorId === 'section1'"
class=
"header-anchor-absolute"
></view>
<view
v-if=
"currentAnchorId === 'section1'"
class=
"header-anchor-absolute"
></view>
...
@@ -327,6 +329,7 @@
...
@@ -327,6 +329,7 @@
<bid-success-dialog
:order-id=
"orderId"
ref=
"bidSuccessDialogRef"
:auctionVehicle=
"auctionVehicle"
@
close=
"closeBidSuccessDialog"
></bid-success-dialog>
<bid-success-dialog
:order-id=
"orderId"
ref=
"bidSuccessDialogRef"
:auctionVehicle=
"auctionVehicle"
@
close=
"closeBidSuccessDialog"
></bid-success-dialog>
</van-dialog>
</van-dialog>
</view>
</view>
</view>
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Hook
,
Ref
,
Vue
}
from
"vue-facing-decorator"
;
import
{
Component
,
Hook
,
Ref
,
Vue
}
from
"vue-facing-decorator"
;
...
@@ -351,11 +354,16 @@ import {DepositController} from "@/api/DepositController";
...
@@ -351,11 +354,16 @@ import {DepositController} from "@/api/DepositController";
import
roundBidBottom
from
"@/module/auction/roundBidBottom.vue"
;
import
roundBidBottom
from
"@/module/auction/roundBidBottom.vue"
;
import
RoundBidPopup
from
"@/components/RoundBidPopup.vue"
;
import
RoundBidPopup
from
"@/components/RoundBidPopup.vue"
;
import
customNav
from
"@/module/auction/customNav.vue"
;
@
Component
({
@
Component
({
components
:
{
BidSuccessDialog
,
roundBidBottom
,
RoundBidPopup
}
components
:
{
BidSuccessDialog
,
roundBidBottom
,
RoundBidPopup
,
customNav
}
})
})
export
default
class
AuctionVehiclePage
extends
Vue
{
export
default
class
AuctionVehiclePage
extends
Vue
{
statusBarHeight
=
0
;
// 用于接收头部总高度,设置内容区 padding
amountStyle
=
{
'font-size'
:
'20px'
};
amountStyle
=
{
'font-size'
:
'20px'
};
@
Ref
()
@
Ref
()
...
@@ -527,6 +535,7 @@ export default class AuctionVehiclePage extends Vue {
...
@@ -527,6 +535,7 @@ export default class AuctionVehiclePage extends Vue {
const
that
=
this
;
const
that
=
this
;
onLoad
((
option
)
=>
{
onLoad
((
option
)
=>
{
this
.
aucvehId
=
option
.
aucvehId
;
this
.
aucvehId
=
option
.
aucvehId
;
this
.
statusBarHeight
=
uni
.
getWindowInfo
().
statusBarHeight
;
this
.
loadBidPriceRange
();
this
.
loadBidPriceRange
();
FavoriteController
.
getFavoriteCountByAucvehId
(
this
.
axios
,
this
.
aucvehId
).
then
(
res
=>
{
FavoriteController
.
getFavoriteCountByAucvehId
(
this
.
axios
,
this
.
aucvehId
).
then
(
res
=>
{
this
.
favoriteCount
=
res
.
data
;
this
.
favoriteCount
=
res
.
data
;
...
@@ -946,7 +955,7 @@ export default class AuctionVehiclePage extends Vue {
...
@@ -946,7 +955,7 @@ export default class AuctionVehiclePage extends Vue {
// 使用 selector 方式滚动,更准确
// 使用 selector 方式滚动,更准确
uni
.
pageScrollTo
({
uni
.
pageScrollTo
({
selector
:
`#
${
sectionId
}
`
,
selector
:
`#
${
sectionId
}
`
,
offsetTop
:
-
40
,
// 偏移量,减去头部锚点的高度
offsetTop
:
-
88
,
// 偏移量,减去头部锚点的高度
duration
:
300
duration
:
300
});
});
// 延迟更新当前激活的锚点
// 延迟更新当前激活的锚点
...
@@ -979,6 +988,11 @@ export default class AuctionVehiclePage extends Vue {
...
@@ -979,6 +988,11 @@ export default class AuctionVehiclePage extends Vue {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.page
{
width
:
100vw
;
height
:
100vh
;
position
:
relative
;
}
.protocolBox
{
.protocolBox
{
width
:
-webkit-calc
(
100%
-
20px
);
width
:
-webkit-calc
(
100%
-
20px
);
...
...
aus-front/app/src/module/auction/customNav.vue
0 → 100644
View file @
7a14b57
<
template
>
<view
class=
"custom-nav"
:style=
"
{ height: statusBarHeight + 'px' }">
<view
:style=
"
{ height: statusBarHeight + 'px' }">
</view>
<view
class=
"nav-content"
>
<view
class=
"nav-left"
@
click=
"onBack"
>
<uni-icons
type=
"left"
size=
"24"
color=
"#333"
/>
</view>
<view
class=
"nav-title"
>
车辆详情
</view>
</view>
</view>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
}
from
'vue-facing-decorator'
;
@
Component
({})
export
default
class
customNav
extends
Vue
{
// 状态栏高度(微信小程序中由系统提供)
@
Prop
({
type
:
Number
,
required
:
false
,
default
:
48
})
statusBarHeight
:
number
;
onBack
()
{
if
(
this
.
getPreviousPageOptions
()
==
'module/auction/AuctionVehiclePage'
)
{
uni
.
switchTab
({
url
:
'/pages/tabbar/AuctionPage'
});
}
else
{
uni
.
navigateBack
();
}
}
//获取上一个页面传递的参数
getPreviousPageOptions
():
any
{
const
pages
=
getCurrentPages
();
const
previousPage
=
pages
[
pages
.
length
-
2
];
return
previousPage
?.
route
||
''
;
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.custom-nav
{
width
:
100%
;
position
:
fixed
;
top
:
-1px
;
left
:
0
;
z-index
:
999
;
//
确保在页面内容上方
background
:
#ffffff
;
}
.nav-content
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
relative
;
height
:
44px
;
background
:
#ffffff
;
}
.nav-left
{
position
:
absolute
;
left
:
2px
;
width
:
80
rpx
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.back-icon
{
font-size
:
36
rpx
;
color
:
#333
;
}
.nav-title
{
font-size
:
32
rpx
;
color
:
#333
;
font-weight
:
400
;
}
.nav-right
{
position
:
absolute
;
right
:
16
rpx
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
}
</
style
>
aus-front/app/src/pages.json
View file @
7a14b57
...
@@ -72,8 +72,8 @@
...
@@ -72,8 +72,8 @@
{
{
"path"
:
"AuctionVehiclePage"
,
"path"
:
"AuctionVehiclePage"
,
"style"
:
{
"style"
:
{
"
navigationBarTitleText"
:
"车辆详情"
,
"
disableScroll"
:
true
,
"
enablePullDownRefresh"
:
true
"
navigationStyle"
:
"custom"
}
}
},
},
{
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment