zs 2 年 前
コミット
a94b5b8bd0
3 ファイル変更41 行追加16 行削除
  1. 23 8
      pages/week/index.vue
  2. 13 6
      pagesHome/market/search.vue
  3. 5 2
      pagesHome/order/detail.vue

+ 23 - 8
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>
@@ -17,18 +19,30 @@
 				<view class="two_2">
 					<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')">
+							<view class="list" v-for="(item,index) in list" :key="index"
+								@tap="toCommon('pagesHome/market/search',item)">
 								<view class="title">
 									{{item.label}}
 								</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">
 											{{tag.label}}
 										</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>
 					</scroll-view>
@@ -68,6 +82,7 @@
 			},
 			toChange(index, e) {
 				const that = this;
+				that.$set(that, `list`, []);
 				that.$set(that, `active`, index);
 				that.searchRight(e);
 			},
@@ -84,9 +99,9 @@
 				}
 			},
 			// 公共跳转
-			toCommon(e) {
+			toCommon(e, code) {
 				uni.navigateTo({
-					url: `/${e}`
+					url: `/${e}?tags=${code.code}`
 				})
 			},
 			// 菜单跳转

+ 13 - 6
pagesHome/market/search.vue

@@ -8,17 +8,20 @@
 				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
 					<view class="list-scroll-view">
 						<view class="two_1">
-							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
+							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList"
+								:key="index" @tap="toCond(index,item)">
 								<view class="name">
 									{{item.name}}
 								</view>
 								<view class="icon">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]"
+											v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 									<view class="icon_1">
-										<text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia=='-1'"></text>
+										<text :class="['iconfont', item.xiaActive]"
+											v-if="condActive==index&&xia=='-1'"></text>
 										<text :class="['iconfont', item.xia]" v-else></text>
 									</view>
 								</view>
@@ -26,7 +29,8 @@
 						</view>
 						<view class="two_2">
 							<view class="list" v-for="(item,index) in list" :key="index" @tap="toBuy(item)">
-								<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
+								<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
+								</image>
 								<view class="sale" v-if="item.is_sale==true">
 									<text>已售尽</text>
 								</view>
@@ -55,6 +59,7 @@
 	export default {
 		data() {
 			return {
+				tags: '',
 				searchInfo: {},
 				list: [],
 				total: 0,
@@ -92,8 +97,9 @@
 				]
 			};
 		},
-		onShow: function() {
+		onLoad: async function(e) {
 			const that = this;
+			that.$set(that, `tags`, e.tags || '');
 			that.search();
 		},
 		methods: {
@@ -101,7 +107,8 @@
 				const that = this;
 				let info = {
 					skip: that.skip,
-					limit: that.limit
+					limit: that.limit,
+					tags:that.tags
 				}
 				const res = await that.$api(`/viewGoods/indexGoodsList`, `GET`, {
 					...info,

+ 5 - 2
pagesHome/order/detail.vue

@@ -37,7 +37,7 @@
 								<view class="title">选择规格</view>
 								<text class="iconfont icon-jiantouyou"></text>
 							</view>
-							<view class="thr_1" @click="toAppraise">
+							<view class="thr_1" >
 								<view class="title">商品评价({{info.comment||0}})</view>
 								<text class="iconfont icon-jiantouyou"></text>
 							</view>
@@ -806,10 +806,13 @@
 			border-bottom: 1px solid var(--f9Color);
 
 			.two_2 {
+				display: flex;
+				flex-wrap: wrap;
 				padding: 1vw;
+				margin: 1vw 0 0 0;
 
 				text {
-					margin: 0 2vw 0 0;
+					margin: 1vw 2vw 0 0;
 					padding: 1vw;
 					border-radius: 1vw;
 					background-color: var(--f9Color);