['处理搜索全部类型及查看全部跳转页面逻辑处理']
This commit is contained in:
15
pages.json
15
pages.json
@@ -28,7 +28,7 @@
|
||||
"path": "pages/equity/index",
|
||||
"name": "equity",
|
||||
"style": {
|
||||
"navigationBarTitleText": "通证商城 购你所想",
|
||||
"navigationBarTitleText": "权证商城 购你所想",
|
||||
"navigationBarTextStyle": "white",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
@@ -54,7 +54,16 @@
|
||||
"name": "goodsClassify",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品分类",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"buttons": [{
|
||||
"text": "全部分类",
|
||||
"fontSize": "14",
|
||||
"color": "#8b64fd"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -836,7 +845,7 @@
|
||||
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
|
||||
"pagePath": "pages/found/index"
|
||||
}, {
|
||||
"text": "通证商城",
|
||||
"text": "权证商城",
|
||||
"iconPath": "static/tabBar/tabBar_icon_03.png",
|
||||
"selectedIconPath": "static/tabBar/tabBar_show_03.png",
|
||||
"pagePath": "pages/equity/index"
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
<!-- 分类 -->
|
||||
<view class="classify">
|
||||
<view class="classify-item" v-for="(item, index) in classify" :key="index"
|
||||
@click="onClassify(item.category_id)">
|
||||
@click="onClassify(item.category_id,item.name)">
|
||||
<image class="cover" :src="item.cover" mode="aspectFill"></image>
|
||||
<view class="title">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="classify-item" @click="onClassify('')">
|
||||
<view class="classify-item" @click="onClassify('','全部')">
|
||||
<image class="cover" src="../../static/icons/equity_nav.png" mode="aspectFill"></image>
|
||||
<view class="title">查看全部</view>
|
||||
</view>
|
||||
@@ -183,10 +183,16 @@
|
||||
})
|
||||
},
|
||||
// 易货分类
|
||||
onClassify(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/lists?type=id&id=${id}`
|
||||
})
|
||||
onClassify(id,name) {
|
||||
if(id){
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/lists?type=id&id=${id}&name=${name}`
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/goodsClassify`
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
// 下拉加载
|
||||
@@ -860,4 +866,4 @@
|
||||
color: $text-gray;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -8,7 +8,7 @@
|
||||
<scroll-view class="second" scroll-y>
|
||||
<!-- @click="goList(item.category_id)" -->
|
||||
<!-- @click="$Router.push({name:'goodsList',query:{id:item.category_id}})" -->
|
||||
<view class="second-item" v-for="(item, index) in category[stairIndex].children" :key="index" @click="goList(item.category_id)">
|
||||
<view class="second-item" v-for="(item, index) in category[stairIndex].children" :key="index" @click="goList(item.category_id,item.name)">
|
||||
{{item.name}}
|
||||
<uni-icons class="arrow-icon" type="arrowright" color="#999" size="14"></uni-icons>
|
||||
</view>
|
||||
@@ -36,11 +36,18 @@
|
||||
this.category = res
|
||||
})
|
||||
},
|
||||
// 点击全部分类跳转页面
|
||||
|
||||
onNavigationBarButtonTap() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/lists?id=&name=全部商品`
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 跳转列表页面
|
||||
goList(id) {
|
||||
goList(id,name) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/lists?id=${id}`
|
||||
url: `/pages/goods/lists?id=${id}&name=${name}`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
{{goodsType[goodsTypeIndex].name}}
|
||||
<image class="tabs-item-arrow" src="@/static/icons/search_row.png" mode="" />
|
||||
</view>
|
||||
<!-- <view class="tabs-item" :class="{'show': tabIndex == 0}" @click="onTabs" data-index="0">最新</view> -->
|
||||
<view class="tabs-item" :class="{'show': tabIndex == 1 && marketType !== ''}" @click="onTabs" data-index="1">
|
||||
价格
|
||||
<image class="icon" mode="widthFix"
|
||||
@@ -17,6 +16,12 @@
|
||||
<image class="icon" mode="widthFix"
|
||||
:src="require(pvType == 'asc' ? '@/static/icons/market_icon_low.png': pvType === ''? '@/static/icons/market_icon_null.png':'@/static/icons/market_icon_high.png')" />
|
||||
</view>
|
||||
|
||||
<view v-if="$Route.query.type !== 'baodan'" class="tabs-item" @click="$Router.push({name:'goodsClassify'})">
|
||||
{{$Route.query.name}}
|
||||
<image class="tabs-item-arrow" src="@/static/icons/search_row.png" mode="" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="lists">
|
||||
<goods-list :list="goods" priceType="CNY" @on-goods="onGoods" />
|
||||
@@ -68,6 +73,13 @@
|
||||
title: '报单通证'
|
||||
})
|
||||
}
|
||||
// else{
|
||||
// if(this.$Route.query.name){
|
||||
// uni.setNavigationBarTitle({
|
||||
// title: this.$Route.query.name+'商品列表' || '商品列表'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
getShopSelf(){
|
||||
@@ -178,12 +190,13 @@
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
vertical-align: middle;
|
||||
margin-left: $margin / 3;
|
||||
margin-bottom: 4rpx;
|
||||
|
||||
}
|
||||
&.show {
|
||||
color: $mian-color;
|
||||
|
||||
Reference in New Issue
Block a user