|
@@ -2,13 +2,15 @@
|
|
<mobile-frame>
|
|
<mobile-frame>
|
|
<view class="main">
|
|
<view class="main">
|
|
<view class="one">
|
|
<view class="one">
|
|
- <input type="text" placeholder="寻找您喜爱的商品" @tap="toCommon('pagesHome/market/search')" placeholder-class="placss">
|
|
|
|
|
|
+ <input type="text" placeholder="寻找您喜爱的商品" @tap="toCommon('pagesHome/market/search')"
|
|
|
|
+ placeholder-class="placss">
|
|
</view>
|
|
</view>
|
|
<view class="two">
|
|
<view class="two">
|
|
<view class="two_1">
|
|
<view class="two_1">
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
- <view class="list" :class="[active==index?'listActive':'']" v-for="(item,index) in typeList" :key="index" @tap="toChange(index,item)">
|
|
|
|
|
|
+ <view class="list" :class="[active==index?'listActive':'']" v-for="(item,index) in typeList"
|
|
|
|
+ :key="index" @tap="toChange(index,item)">
|
|
<text>{{item.label}}</text>
|
|
<text>{{item.label}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -17,18 +19,30 @@
|
|
<view class="two_2">
|
|
<view class="two_2">
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
- <view class="list" v-for="(item,index) in list" :key="index" @tap="toCommon('pagesHome/market/search')">
|
|
|
|
|
|
+ <view class="list" v-for="(item,index) in list" :key="index"
|
|
|
|
+ @tap="toCommon('pagesHome/market/search',item)">
|
|
<view class="title">
|
|
<view class="title">
|
|
{{item.label}}
|
|
{{item.label}}
|
|
</view>
|
|
</view>
|
|
- <view class="market">
|
|
|
|
- <view class="marketList" v-for="(tag,indexs) in item.children" :key="indexs">
|
|
|
|
- <image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''" mode=""></image>
|
|
|
|
|
|
+ <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)">
|
|
|
|
+ <image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
|
|
|
|
+ mode=""></image>
|
|
<view class="name">
|
|
<view class="name">
|
|
{{tag.label}}
|
|
{{tag.label}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="market" v-else>
|
|
|
|
+ <view class="marketList" @tap.stop="toCommon('pagesHome/market/search',item)">
|
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''"
|
|
|
|
+ mode=""></image>
|
|
|
|
+ <view class="name">
|
|
|
|
+ {{item.label}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -47,7 +61,7 @@
|
|
list: []
|
|
list: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- onShow: function() {
|
|
|
|
|
|
+ onLoad: function() {
|
|
const that = this;
|
|
const that = this;
|
|
that.searchOther();
|
|
that.searchOther();
|
|
|
|
|
|
@@ -66,6 +80,7 @@
|
|
},
|
|
},
|
|
toChange(index, e) {
|
|
toChange(index, e) {
|
|
const that = this;
|
|
const that = this;
|
|
|
|
+ that.$set(that, `list`, []);
|
|
that.$set(that, `active`, index);
|
|
that.$set(that, `active`, index);
|
|
that.searchRight(e);
|
|
that.searchRight(e);
|
|
},
|
|
},
|
|
@@ -82,9 +97,9 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 公共跳转
|
|
// 公共跳转
|
|
- toCommon(e) {
|
|
|
|
|
|
+ toCommon(e, code) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/${e}`
|
|
|
|
|
|
+ url: `/${e}?tags=${code.code}`
|
|
})
|
|
})
|
|
},
|
|
},
|
|
},
|
|
},
|