浏览代码

点击历史搜索

gjy 3 年之前
父节点
当前提交
f84955f77e

+ 1 - 1
components/luo-navBar/components/luo-navBar/luo-navBar.vue

@@ -30,7 +30,6 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				searchText:''
 			};
 			};
 		},
 		},
 		props:{
 		props:{
@@ -65,6 +64,7 @@
 					return ''
 					return ''
 				}
 				}
 			},
 			},
+			searchText:'',
 			// 左边图标
 			// 左边图标
 			leftIcon: {
 			leftIcon: {
 				type: String,
 				type: String,

+ 3 - 0
pages/mine/cargoowner/addEnerprise.vue

@@ -89,6 +89,9 @@
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		},
 		onLoad(){
 		onLoad(){
+			if(uni.getStorageSync('cargoOwnerId')){
+				this.dataDetails.cargoOwnerId=uni.getStorageSync('cargoOwnerId')
+			}
 			this.validityPeriod = this.$helper.makeValidityPeriod(0,50)
 			this.validityPeriod = this.$helper.makeValidityPeriod(0,50)
 			this.getList()
 			this.getList()
 		},
 		},

+ 8 - 4
pages/mine/cargoowner/selectcompany.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
 	<view>
 	<view>
-		<luo-nav-bar @rightClick='cancel' @input='companyInput' :isSearch="true" :isPlaceText='true' placeText='输入企业名称' rightText='取消' leftIcon='back'></luo-nav-bar>
+		<luo-nav-bar :searchText='searchText' @rightClick='cancel' @input='companyInput' :isSearch="true" :isPlaceText='true' placeText='输入企业名称' rightText='取消' leftIcon='back'></luo-nav-bar>
 		<view v-if='searching' style='padding:10px;'>
 		<view v-if='searching' style='padding:10px;'>
 			<view style='color:#999;margin-bottom:40px;font-size:14px;' v-if='more'>#输入更多关键字精准获取企业</view>
 			<view style='color:#999;margin-bottom:40px;font-size:14px;' v-if='more'>#输入更多关键字精准获取企业</view>
 			<view @click='checkcompany(item)' class='company' v-for='item in companyList'>
 			<view @click='checkcompany(item)' class='company' v-for='item in companyList'>
@@ -30,7 +30,8 @@
 				companyList:[],
 				companyList:[],
 				lastTime:0,
 				lastTime:0,
 				history:[],
 				history:[],
-				searching:false
+				searching:false,
+				searchText:''
 			}
 			}
 		},
 		},
 		components:{
 		components:{
@@ -53,6 +54,7 @@
 		},
 		},
 		methods: {
 		methods: {
 			cancel(){
 			cancel(){
+				this.searchText=''
 				this.searching=false
 				this.searching=false
 				this.companyList=[]
 				this.companyList=[]
 			},
 			},
@@ -62,8 +64,10 @@
 				return str.replace(reg, replace);
 				return str.replace(reg, replace);
 			},
 			},
 			clicksearch(item){
 			clicksearch(item){
-				this.s
-			}
+				this.searchText=item.searchContent
+				this.companyInput('',this.searchText)
+				// this.s
+			},
 			checkcompany(item){
 			checkcompany(item){
 				uni.setStorageSync('currectcompany', item)
 				uni.setStorageSync('currectcompany', item)
 				this.goDetailPage('pages/mine/cargoowner/addEnerprise')
 				this.goDetailPage('pages/mine/cargoowner/addEnerprise')

+ 1 - 1
pages/public/login.vue

@@ -78,7 +78,7 @@
 			this.$refs.loginForm.setRules(this.rules)
 			this.$refs.loginForm.setRules(this.rules)
 		},
 		},
 		onLoad() {
 		onLoad() {
-			_this = this
+			var _this = this
 		},
 		},
 		methods: {
 		methods: {
 			gonumber(){
 			gonumber(){