guhongwei 2 年之前
父節點
當前提交
5d22654bb5
共有 1 個文件被更改,包括 21 次插入19 次删除
  1. 21 19
      pages/week/index.vue

+ 21 - 19
pages/week/index.vue

@@ -2,13 +2,15 @@
 	<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>
@@ -19,10 +21,13 @@
 						<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>
@@ -30,7 +35,8 @@
 							<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">
@@ -87,7 +93,6 @@
 			const that = this;
 			that.searchConfig();
 			that.search();
-			
 		},
 		methods: {
 			// 查询基本设置
@@ -203,6 +208,14 @@
 				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;
@@ -230,18 +243,7 @@
 						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;