Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-07-24 11:09:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
53c374990775cbdd5b99ac64dfaaf2c1bba93b1f
53c37499
1 parent
d1c6c4b3
feat(我的关注): 添加已售出车辆标签并阻止跳转详情页
当车辆标记为已售出时,在关注列表显示红色"已售出"标签,并阻止用户点击跳转详情页
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
src/pages/myFavorites/index.vue
src/pages/myFavorites/index.vue
View file @
53c3749
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-
18 15:19:27
* @LastEditTime: 2025-07-
24 11:09:05
* @FilePath: /jgdl/src/pages/myFavorites/index.vue
* @Description: 我的关注页面
-->
...
...
@@ -55,6 +55,7 @@
取消关注
</nut-button>
</view>
<text v-if="item.is_sold" class="sold-label ml-2" style="color: red; font-size: 26rpx;">已售出</text>
</view>
</view>
</view>
...
...
@@ -280,6 +281,13 @@ const loadMore = async () => {
* @param {Object} item - 车辆信息
*/
const onItemClick = (item) => {
if (item.is_sold) {
Taro.showToast({
title: '该车辆已售出',
icon: 'none'
})
return
}
// 跳转到车辆详情页
Taro.navigateTo({
url: `/pages/productDetail/index?id=${item.id}`
...
...
Please
register
or
login
to post a comment