|
@@ -20,13 +20,13 @@
|
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
|
<view class="list-scroll-view">
|
|
|
<view class="list" v-for="(item,index) in list" :key="index"
|
|
|
- @tap="toCommon('pagesHome/market/search',item)">
|
|
|
+ @tap="toCommon('pagesHome/market/search',item,'2')">
|
|
|
<view class="title">
|
|
|
{{item.label}}
|
|
|
</view>
|
|
|
<view class="market" v-if="item.children&&item.children.length>0">
|
|
|
<view class="marketList" v-for="(tag,indexs) in item.children" :key="indexs"
|
|
|
- @tap.stop="toCommon('pagesHome/market/search',tag)">
|
|
|
+ @tap.stop="toCommon('pagesHome/market/search',tag,'3')">
|
|
|
<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
|
|
|
mode=""></image>
|
|
|
<view class="name">
|
|
@@ -35,7 +35,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="market" v-else>
|
|
|
- <view class="marketList" @tap.stop="toCommon('pagesHome/market/search',item)">
|
|
|
+ <view class="marketList" @tap.stop="toCommon('pagesHome/market/search',item,'3')">
|
|
|
<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''"
|
|
|
mode=""></image>
|
|
|
<view class="name">
|
|
@@ -61,7 +61,9 @@
|
|
|
},
|
|
|
active: '0',
|
|
|
typeList: [],
|
|
|
- list: []
|
|
|
+ list: [],
|
|
|
+ // 一级
|
|
|
+ classa: {},
|
|
|
};
|
|
|
},
|
|
|
onLoad: function() {
|
|
@@ -77,7 +79,10 @@
|
|
|
})
|
|
|
if (res.errcode == '0') {
|
|
|
that.$set(that, `typeList`, res.data);
|
|
|
- if (res.total > 0) that.searchRight(res.data[0]);
|
|
|
+ if (res.total > 0) {
|
|
|
+ that.searchRight(res.data[0]);
|
|
|
+ that.$set(that, `classa`, res.data[0]);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
toChange(index, e) {
|
|
@@ -85,6 +90,7 @@
|
|
|
that.$set(that, `list`, []);
|
|
|
that.$set(that, `active`, index);
|
|
|
that.searchRight(e);
|
|
|
+ that.$set(that, `classa`, e);
|
|
|
},
|
|
|
// 查询左侧信息
|
|
|
async searchRight(e) {
|
|
@@ -99,10 +105,17 @@
|
|
|
}
|
|
|
},
|
|
|
// 公共跳转
|
|
|
- toCommon(e, code) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/${e}?tags=${code.code}`
|
|
|
- })
|
|
|
+ toCommon(e, code, num) {
|
|
|
+ const that = this;
|
|
|
+ if (num == '2') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/${e}?tags=${code.code}&pid=${that.classa._id}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/${e}?tags=${code.code}`
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 菜单跳转
|
|
|
toPath(e) {
|