update: 新增发现和我的栏目

This commit is contained in:
mixtan 2025-07-09 17:16:34 +08:00
parent b6c4e65ed9
commit 2fe7fbbbd9
2 changed files with 101 additions and 12 deletions

View File

@ -0,0 +1,61 @@
<template>
<view class="wf-item-page">
<image :src="item.story_file[0]" class="item-img" />
<view class="item-desc">
{{item.story_title || ''}}
</view>
<view class="item-info">
<image :src="item.user_avatar" mode="aspectFill" class="info-avatar" />
<view class="info-nickname">{{item.user_nickname}}</view>
</view>
</view>
</template>
<script>
export default {
props:{
item:{
type:Object,
require:true
}
}
}
</script>
<style lang="scss" scoped>
.wf-item-page{
background: #fff;
overflow: hidden;
border-radius: 5px;
position: relative;
}
.item-img{
width: 100%;
}
.item-info{
display: flex;
align-items: center;
padding: 5px;
}
.info-avatar{
width: 25px;
height: 25px;
border-radius: 50%;
margin-right: 5px;
}
.info-nickname{
font-size: 12px;
color: #333;
}
.item-desc{
display: flex;
align-items: center;
padding: 5px 5px 0px 5px;
font-size: 12px;
}
</style>

View File

@ -14,6 +14,7 @@
<view class="desc">首页</view>
</view>
</view>
<view
:class="['item', { current: current == 2 }]"
@click="
@ -33,14 +34,25 @@
<view class="desc">分类</view>
</view>
</view>
<!-- <view
<view
:class="['item', { current: current == 3 }]"
@click="gopage(3,'/pagesub/index/feed')"
>发现</view
> -->
@click=" gopage(3,`/pages/index/image?category_id=${categoryId}&store_id=${storeId}`)"
>
<view class="box">
<image
v-if="current == 3"
class="icon"
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/icon/icon_feed_cur.png"
/>
<image v-else class="icon" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/icon/icon_feed.png" />
<view class="desc">发现</view>
</view>
</view>
<view
:class="['item', { current: current == 4 }]"
@click="gopage(4, '/pages/index/cart')"
@click="gopage(4, `/pages/index/cart?category_id=${categoryId}&store_id=${storeId}`)"
>
<view class="box">
<image
@ -53,11 +65,21 @@
<text class="icon_badge">{{ goodsNum }}</text>
</view>
</view>
<!-- <view
<view
:class="['item', { current: current == 5 }]"
@click="gopage(5,`/pagesub/index/goods?store_id=${storeId}`)"
>商品</view
> -->
@click="gopage(5,`/pages/index/member?category_id=${categoryId}&store_id=${storeId}`)"
>
<view class="box">
<image
v-if="current == 5"
class="icon"
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/icon/icon_mine_cur.png"
/>
<image v-else class="icon" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/icon/icon_mine.png" />
<view class="desc">我的</view>
</view>
</view>
</view>
</template>
@ -100,9 +122,15 @@ export default {
console.log("当前页面,不执行跳转");
return;
}
this.$.navigateTo({
url,
});
if([3,5].includes(tabIndex)){
this.$.switchTab({
url,
});
} else {
this.$.navigateTo({
url,
});
}
},
},
};