|
@@ -2,15 +2,13 @@
|
|
|
<mobile-frame :frameStyle="frameStyle" @toPath="toPath">
|
|
|
<view class="main">
|
|
|
<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 class="two">
|
|
|
<view class="two_1">
|
|
|
<scroll-view scroll-y="true" class="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>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -21,13 +19,10 @@
|
|
|
<view class="list-scroll-view">
|
|
|
<view class="two_2_1">
|
|
|
<scroll-view scroll-x="true" class="typeScrollview">
|
|
|
- <view class="list" v-for="(item,index) in list" :key="index"
|
|
|
- @tap="twoChange(item,index)">
|
|
|
- <image class="image"
|
|
|
- :src="item.file&&item.file.length>0?item.file[0].url:logoUrl" mode="">
|
|
|
+ <view class="list" v-for="(item,index) in list" :key="index" @tap="twoChange(item,index)">
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:logoUrl" mode="">
|
|
|
</image>
|
|
|
- <view class="label textOver"><text
|
|
|
- :style="{color:twoActive==index?'#ff0000':'#000000'}">{{item.label}}</text>
|
|
|
+ <view class="label textOver"><text :style="{color:twoActive==index?'#ff0000':'#000000'}">{{item.label}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
@@ -35,8 +30,7 @@
|
|
|
<view class=" two_2_2">
|
|
|
<view class="list" v-for="(tag,index) in marketList" :key="index" @tap="toBuy(tag)">
|
|
|
<view class="img">
|
|
|
- <image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
|
|
|
- mode=""></image>
|
|
|
+ <image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''" mode=""></image>
|
|
|
</view>
|
|
|
<view class="info">
|
|
|
<view class="name textOver">
|
|
@@ -93,7 +87,7 @@
|
|
|
const that = this;
|
|
|
that.searchConfig();
|
|
|
that.search();
|
|
|
- uni.startPullDownRefresh();
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
// 查询基本设置
|
|
@@ -209,14 +203,6 @@
|
|
|
that.$set(that, `twoActive`, index);
|
|
|
that.searchMarket();
|
|
|
},
|
|
|
- // 清空列表
|
|
|
- clearPage() {
|
|
|
- const that = this;
|
|
|
- that.$set(that, `marketList`, []);
|
|
|
- that.$set(that, `skip`, 0)
|
|
|
- that.$set(that, `limit`, 6)
|
|
|
- that.$set(that, `page`, 0)
|
|
|
- },
|
|
|
// 搜索商品
|
|
|
toCommon(e) {
|
|
|
const that = this;
|
|
@@ -244,7 +230,18 @@
|
|
|
url: `/${e.route}`
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 清空列表
|
|
|
+ clearPage() {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that, `list`, [])
|
|
|
+ that.$set(that, `marketList`, [])
|
|
|
+ that.$set(that, `typeList`, [])
|
|
|
+ that.$set(that, `active`, '0')
|
|
|
+ that.$set(that, `skip`, 0)
|
|
|
+ that.$set(that, `limit`, 6)
|
|
|
+ that.$set(that, `page`, 0)
|
|
|
+ },
|
|
|
},
|
|
|
onPullDownRefresh: async function() {
|
|
|
const that = this;
|