Browse Source

前端gjy

gjy 3 years ago
parent
commit
18e996ef9c
3 changed files with 90 additions and 75 deletions
  1. 1 1
      config/index.js
  2. 81 69
      pageA/product/lookup.vue
  3. 8 5
      pageD/identity/companyIdentityThree.vue

+ 1 - 1
config/index.js

@@ -1,7 +1,7 @@
 const dev = {
 	// baseUrl: 'http://192.168.1.120:8090/',
 	baseUrl: 'https://www.zthymaoyi.com',
-	baseUrlNew: 'http://192.168.1.110:8090/',
+	baseUrlNew: 'http://192.168.1.120:8090/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 81 - 69
pageA/product/lookup.vue

@@ -4,10 +4,10 @@
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 			<view style='flex:6;' class="search-form round" >
 				<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-				<input type="text" v-model="searchKeyWord" placeholder="请输入货名或标题" confirm-type="search"></input>
+				<input type="text" v-model="searchKeyWord" @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
 				
 			</view>
-			<view @click='doSearch' style="width:4%;flex:1;">搜索</view>
+			<view @click='doSearch()' style="width:4%;flex:1;">搜索</view>
 			<text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text>
 			</view>
 			<!-- mSearch组件 如果使用原样式,删除组件元素-->
@@ -177,12 +177,21 @@
 				this.loadHotKeyword();
 
 			},
+			search(e){
+				if(e.detail.value.length==0){
+					this.isShowKeywordList=false
+					this.loadOldKeyword()
+					this.loadHotKeyword()
+				}
+			},
 			blur(){
 				uni.hideKeyboard()
 			},
 			doSearch(keyword){
+				console.log(keyword)
 				if(keyword){
-					this.searchKeyWord=keyword
+					this.searchKeyWord=keyword.searchContent
+
 				}
 				if(this.searchKeyWord.length>0){
 						this.isShowKeywordList=true
@@ -222,6 +231,9 @@
 			},
 			emptysearch(){
 				this.searchKeyWord=''
+				this.isShowKeywordList=false
+				this.loadOldKeyword()
+				this.loadHotKeyword()
 			},
 			loadHotKeyword(){
 				this.$api.doRequest('get', '/searchRecordsInfo/selectRecommendedSearchRecordsInfo',{pageSize:this.pageSize,
@@ -356,74 +368,74 @@
 			hotToggle() {
 				this.forbid = this.forbid ? '' : '_forbid';
 			},
-			//执行搜索
-			doSearch(e) {
-				if(e.detail){
-					if(e.detail.value.length>0){
-						this.content='取消'
-						this.isShowKeywordList=true
-						this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e.detail.value}).then(res => {
-						})
-						.catch(res => {
+			// //执行搜索
+			// doSearch(e) {
+			// 	if(e.detail){
+			// 		if(e.detail.value.length>0){
+			// 			this.content='取消'
+			// 			this.isShowKeywordList=true
+			// 			this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e.detail.value}).then(res => {
+			// 			})
+			// 			.catch(res => {
 							
-						});
-					}else{
-						this.content='搜索'
-						this.isShowKeywordList=false
-						this.loadOldKeyword()
-						this.loadHotKeyword()
-					}
-				}
-				else if(e){
-					if(e.length>0){
-						this.isShowKeywordList=true
-						this.content='取消'
-						this.searchKeyWord = e
-						this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e}).then(res => {
-						})
-						.catch(res => {
+			// 			});
+			// 		}else{
+			// 			this.content='搜索'
+			// 			this.isShowKeywordList=false
+			// 			this.loadOldKeyword()
+			// 			this.loadHotKeyword()
+			// 		}
+			// 	}
+			// 	else if(e){
+			// 		if(e.length>0){
+			// 			this.isShowKeywordList=true
+			// 			this.content='取消'
+			// 			this.searchKeyWord = e
+			// 			this.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{commonId:this.userInfo.id,searchContent:e}).then(res => {
+			// 			})
+			// 			.catch(res => {
 							
-						})
-					}else{
-						this.content='搜索'
-						this.isShowKeywordList=false
-						this.loadOldKeyword()
-						this.loadHotKeyword()
-					}
-				}
-				uni.showLoading({
-					title: '正在加载',
-					mask:true
-				})
-				var param1=''
-				if (this.TabCur == 0) {
-					param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
-				} else {
-					param1 = '/salePlanInfo/selectSalePlanInfo'
-				}
-				this.$api.doRequest('get', param1,{pageSize:this.pageSize,
-				currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
-					uni.hideLoading()
-					this.keywordList=res.data.data.records
-				})
-				.catch(res => {
-					uni.hideLoading()
-					uni.showToast({
-						title: res.errmsg,
-						icon:'none',
-						duration: 2000
-					})
-				});
-				// console.log(key)
-				// console.log(this.keyword)
-				// key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
-				// this.keyword = key;
-				// this.saveKeyword(key); //保存为历史 
-				// var TabCur = this.TabCur
-				// uni.navigateTo({
-				// 	url: `/pageA/product/querylist?keywords=${key}&TabCur=${TabCur}`
-				// })
-			},
+			// 			})
+			// 		}else{
+			// 			this.content='搜索'
+			// 			this.isShowKeywordList=false
+			// 			this.loadOldKeyword()
+			// 			this.loadHotKeyword()
+			// 		}
+			// 	}
+			// 	uni.showLoading({
+			// 		title: '正在加载',
+			// 		mask:true
+			// 	})
+			// 	var param1=''
+			// 	if (this.TabCur == 0) {
+			// 		param1 = '/procurementPlanInfo/selectProcurementPlanInfo'
+			// 	} else {
+			// 		param1 = '/salePlanInfo/selectSalePlanInfo'
+			// 	}
+			// 	this.$api.doRequest('get', param1,{pageSize:this.pageSize,
+			// 	currentPage:this.currentPage,searchKeyWord:this.searchKeyWord}).then(res => {
+			// 		uni.hideLoading()
+			// 		this.keywordList=res.data.data.records
+			// 	})
+			// 	.catch(res => {
+			// 		uni.hideLoading()
+			// 		uni.showToast({
+			// 			title: res.errmsg,
+			// 			icon:'none',
+			// 			duration: 2000
+			// 		})
+			// 	});
+			// 	// console.log(key)
+			// 	// console.log(this.keyword)
+			// 	// key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
+			// 	// this.keyword = key;
+			// 	// this.saveKeyword(key); //保存为历史 
+			// 	// var TabCur = this.TabCur
+			// 	// uni.navigateTo({
+			// 	// 	url: `/pageA/product/querylist?keywords=${key}&TabCur=${TabCur}`
+			// 	// })
+			// },
 			tabcarchange(status){
 				this.TabCur=status
 				var param1 = ''

+ 8 - 5
pageD/identity/companyIdentityThree.vue

@@ -67,13 +67,13 @@
 		<view class="c-row b-b">
 			<text class="tit">手机号</text>
 			<view class="con-list">
-				<input placeholder="请填写手机号" v-model="identityAuthenticationInfo.customerPhone"></input>
+				<input placeholder="请填写手机号" @input='phoneinput' v-model="identityAuthenticationInfo.customerPhone"></input>
 			</view>
 		</view>
 		<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
 			<button :class='codestatus&&!sendDisabled?"active":""' @click='obtain' class='getcode'>{{sendText}}</button>
-			<view style='width:70%;position:relative;margin-left: 200px;'>
-				<input v-model='verifyCode' placeholder="请输入验证码" type="number">
+			<view  class="con-list" style='width:70%;position:relative;'>
+				<input style='text-align:right;' v-model='verifyCode' placeholder="请输入验证码" type="number">
 			</view>
 		</view>
 		<view class="c-row b-b" v-if="identityAuthenticationInfo.customerTypeFlag == 2">
@@ -324,6 +324,7 @@
 
 			},
 			phoneinput(e) {
+				console.log(e.detail.value.length)
 				if (e.detail.value.length == 11) {
 					this.codestatus = true
 				}
@@ -483,6 +484,7 @@
 		align-items: center;
 		padding: 20rpx 30rpx;
 		position: relative;
+		font-size:14px;
 	}
 
 	.con-list {
@@ -500,7 +502,7 @@
 		line-height: 40rpx;
 		text-align: right;
 		padding-right: 20rpx;
-		font-size: 14px;
+		font-size: 12px;
 	}
 
 	.btn {
@@ -533,7 +535,8 @@
 	}
 
 	.getcode.active {
-		border: none;
+		background:#22C572;
+		color:#fff;
 	}
 
 	.words {