From 18d59ca85b2bc9ccac4a90203c3b2486acf3b113 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期四, 12 九月 2024 09:19:55 +0800
Subject: [PATCH] Merge branch 'master-2.0' of http://47.96.225.205:8888/r/hmy_farmer-main into master-2.0

---
 sub_pages/customer/trade/trade.vue |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/sub_pages/customer/trade/trade.vue b/sub_pages/customer/trade/trade.vue
index 2617e1b..ea80d4b 100644
--- a/sub_pages/customer/trade/trade.vue
+++ b/sub_pages/customer/trade/trade.vue
@@ -1,22 +1,37 @@
 <template>
 	<view class="container-trade" :style="{'min-height':hidefooter?'':'calc(100vh - 20rpx)'}">
 		<view class="search-container m-t-12 flex" v-if="!hidefooter">
-			<view class="flex m-r-20">
+			<!-- <view class="flex m-r-20">
 				<view class="m-r-10" style="line-height: 80rpx;" @click="changeSearchType">
 					{{type=='category'?'按分类':'按店铺'}}
 				</view>
 				<u-icon name="arrow-down"></u-icon>
 
+			</view> -->
+			<view class="flex m-r-20">
+				<um-dropdown width="200rpx" style="line-height: 80rpx;" @change="fnChange" :defaultIndex="def" rangeKey="label" :optionList="typeList"></um-dropdown>
 			</view>
+					 
 			<view class="flex1 input">
-				<u-input :placeholder="type==='category'?'请输入分类名称':'请输入店铺名称'" v-model="query.name" clearable
+				<!-- <u-input :placeholder="type==='category'?'请输入分类名称':'请输入店铺名称'" v-model="query.name" clearable
 					@confirm="buttonSearchFlow" @clear="()=>{
 					$nextTick(()=>{buttonSearchFlow()})
 				}">
 					<template slot="suffix">
 						<uni-icons color="#20613D" type="search" size="24" @click="buttonSearchFlow"></uni-icons>
 					</template>
+				</u-input> -->
+				<u-input :placeholder="search_home_placeholder" v-model="search_flow" clearable @confirm="buttonSearchFlow" @clear="()=>{
+					$nextTick(()=>{buttonSearchFlow()})
+				}">
+					<!-- <u--text text="http://" slot="prefix" margin="0 3px 0 0" type="tips"></u--text> -->
+			
+			
+					<template slot="suffix">
+						<uni-icons color="#20613D" type="search" size="24" @click="buttonSearchFlow"></uni-icons>
+					</template>
 				</u-input>
+								
 			</view>
 		</view>
 		<view class="canteen-items" :style="{'min-height':hidefooter?'':'calc(100vh - 340rpx)'}">
@@ -126,6 +141,18 @@
 				},
 				currentCategory: {},
 				type: 'category', //supplier
+				def: 0,
+				typeList:[
+					{
+						label: '按鲜花',
+						value: 'flower',
+					},
+					{
+						label: '按店铺',
+						value: 'supplier',
+					},
+				],
+				search_home_placeholder:"请输入花名",
 
 
 			}
@@ -192,6 +219,28 @@
 			})
 		},
 		methods: {
+			fnChange(e) {
+				this.type = e.value
+				if (this.type == 'flower') {
+					this.search_home_placeholder = '请输入花名'
+					uni.setNavigationBarTitle({
+					  title: '搜鲜花',
+					  success: function() {
+					    // console.log('标题搜鲜花修改成功');
+					  }
+					});
+		
+				} else {
+					this.search_home_placeholder = '请输入店铺名'
+					uni.setNavigationBarTitle({
+					  title: '搜店铺',
+					  success: function() {
+					    // console.log('标题搜店铺修改成功');
+					  }
+					});
+				}
+			},
+						
 			changeSearchType() {
 				if (this.type == 'category') {
 					this.type = 'supplier'

--
Gitblit v1.9.3