zhengkaixin 1 månad sedan
förälder
incheckning
f95d21d23c
3 ändrade filer med 214 tillägg och 191 borttagningar
  1. 4 1
      config/.env.dev.js
  2. 2 2
      pages/business/index.vue
  3. 208 188
      pages/mylock/selectParking.vue

+ 4 - 1
config/.env.dev.js

@@ -2,7 +2,7 @@ const UNI_APP = {
 	ProjectName :"智泊e家",
 	ProjectName :"智泊e家",
 	BASE_URL: 'http://192.168.8.162:8081/floorlock/',
 	BASE_URL: 'http://192.168.8.162:8081/floorlock/',
 	BASE_URL:"https://youdian-test.hbjp.com.cn/floorlock-server/",
 	BASE_URL:"https://youdian-test.hbjp.com.cn/floorlock-server/",
-	BASE_URL:"https://zbyj.hbjp.com.cn/floorlock-server/",
+	//BASE_URL:"https://zbyj.hbjp.com.cn/floorlock-server/",
 	
 	
 	PREFIX : "jp-floorlock-phone",
 	PREFIX : "jp-floorlock-phone",
 	NODE_ENV :"dev",
 	NODE_ENV :"dev",
@@ -16,6 +16,9 @@ const UNI_APP = {
 	//openId:"oZqT967cBtMmxcW7g3Z0HYJHd_fc",//fjj
 	//openId:"oZqT967cBtMmxcW7g3Z0HYJHd_fc",//fjj
 	//openId:"zkx001",
 	//openId:"zkx001",
 	//openId:"oZqT96yYgpeKs-pRM1hA9bdC6e_0",
 	//openId:"oZqT96yYgpeKs-pRM1hA9bdC6e_0",
+	// #ifdef MP-WEIXIN
+	BASE_URL:"https://zbyj.hbjp.com.cn/floorlock-server/",
+	// #endif
 }  
 }  
 
 
 module.exports = UNI_APP;
 module.exports = UNI_APP;

+ 2 - 2
pages/business/index.vue

@@ -434,10 +434,10 @@
 	}
 	}
 	.buildMode1{
 	.buildMode1{
 		color: #1677ff;
 		color: #1677ff;
-		border: 1px solid #1677ff;
+		//border: 1px solid #1677ff;
 	}
 	}
 	.buildMode2{
 	.buildMode2{
 		color:#4CAF50;
 		color:#4CAF50;
-		border: 1px solid #4CAF50;
+		//border: 1px solid #4CAF50;
 	}
 	}
 </style>
 </style>

+ 208 - 188
pages/mylock/selectParking.vue

@@ -1,188 +1,208 @@
-<template>
-	<view>
-		<view class="top">
-			<view class="search">
-				<view class="searchBox">
-					<u-search shape="square" placeholder="搜索停车场" v-model="testName" :show-action="false" :animation="true"></u-search>
-					<u-button type="primary" size="mini" @click="testBtn">搜素</u-button>
-				</view>
-			</view>
-		</view>
-		<view class="body2">
-			<view class="item"
-			v-for="(item,i) in list" :key="i"   @click="returnName(item.name,item.id,item.buildMode,item)" >
-				<view class="vquery">
-					<view class="buildMode buildMode1" v-if="item.buildMode==1" >
-						用户自建
-					</view>
-					<view class="buildMode buildMode2" v-if="item.buildMode==2" >
-						平台运营
-					</view>
-					
-					<view class="v1" v-html="item.html"></view>
-				</view>
-				<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
-			</view>
-			
-			<view class="item"  v-if="queryName!=''&&testName==queryName&&(list.length==0)">
-				<view class="v" @click="returnName(queryName,'',1)">
-					<view class="v1">未查询到“<span class="qName">{{queryName}}</span>”相关结果</view>
-					<view class="v2">点击创建“<span class="qName">{{queryName}}</span>”停车场</view>
-				</view>
-				<view class="button" @click="returnName(queryName,'',1)">
-					<u-button  type="primary"  >创建</u-button>
-				</view>
-			</view>
-		</view>
-		
-		<u-divider  color="#B6BDC3"  :isnone="list.length==0" >已经到底了</u-divider>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/pagejs/pagesMylock.js'
-	
-	export default {
-		data() {
-			return {
-				list: [],
-				testName:"",
-				queryName:"",
-				type:1,
-			};
-		},
-		onLoad(op) {
-			if(op.type){
-				this.type=op.type
-			}
-			this.getList()
-		},
-		methods:{
-			getList() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				var obj={
-					name:this.testName
-				}
-				if(this.type==3){
-					obj.buildMode=2
-				}
-				API.findParking(obj).then((res) => {
-					this.queryName=this.testName
-					var list=res.data.parkingInfoList
-					if(list==null){
-						list=[]
-					}
-					this.list =list
-					
-					if(this.testName){
-						for (var i = 0; i < this.list.length; i++) {
-							var item=this.list[i]
-							var targetChar=this.testName
-							item.html=item.name.replace(new RegExp(`(${targetChar})`, 'g'), '<span style="color:#FF5100 ">$1</span>');
-							console.log(item.html)
-						}
-					}
-					
-					uni.hideLoading();
-			
-				}).catch(error => {
-			
-					uni.hideLoading();
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			returnName(name,id,type,obj){
-				const eventChannel = this.getOpenerEventChannel();
-				
-				eventChannel.emit('acceptDataFromOpenerPage', { data: name,
-				dataid: id,datatype: type,item:obj})
-				uni.navigateBack()
-			},
-			testBtn(){
-				
-				this.list=[]
-				//this.listForm.pageIndex=1
-				this.getList()
-			},
-			getInfo(){
-				
-			}
-			
-		}
-	}
-</script>
-<style>
-	page {
-		background-color: rgba(242, 244, 246, 1);
-	}
-</style>
-<style lang="scss" scoped>
-::v-deep .u-content{
-		width: 380% !important;
-	}
-	.search {
-	
-		padding: 16rpx 32rpx;
-		background: #fff;
-	
-		.searchBox {
-			display: flex;
-			align-items: center;
-			background: #F2F2F2;
-			padding: 1px 16rpx;
-			border-radius: 8px;
-			    justify-content: space-between;
-		}
-	}
-	.body2{
-		.item:not(:last-child) {
-		  border-bottom:1px solid rgba(232,232,232,1);
-		}
-		
-		.item{
-			   padding: 24rpx 32rpx;
-				background: #fff;
-				    display: flex;
-				    justify-content: space-between;
-					.vquery{
-						display: flex;
-						    align-items: center;
-					}
-					.buildMode{
-						font-size: 24rpx;
-						    border: 1px solid #bbbbbb;
-						    border-radius: 4px;
-						    color: #1677ff;
-						    padding: 2rpx 8rpx;
-						    margin:0 8rpx;
-							
-					}
-					.buildMode1{
-						color: #1677ff;
-						border: 1px solid #1677ff;
-					}
-					.buildMode2{
-						color:#4CAF50;
-						border: 1px solid #4CAF50;
-					}
-				.qName{
-					color:#FF5100 
-				}
-				.v1{
-					color: rgba(16,16,16,1);
-					font-size: 32rpx;
-				}
-				.v2{
-					color: rgba(119,119,119,1);
-					font-size: 24rpx;
-				}
-			
-		}
-	}
-</style>
+<template>
+	<view>
+		<view class="top">
+			<view class="search">
+				<view class="searchBox">
+					<u-search shape="square" placeholder="搜索停车场" maxlength="12" v-model="testName" :show-action="false"
+						:animation="true"></u-search>
+					<u-button type="primary" size="mini" @click="testBtn">搜素</u-button>
+				</view>
+			</view>
+		</view>
+		<view class="body2">
+			<view class="item" v-for="(item,i) in list" :key="i"
+				@click="returnName(item.name,item.id,item.buildMode,item)">
+				<view class="vquery">
+					<view class="buildMode buildMode1" v-if="item.buildMode==1">
+						用户自建
+					</view>
+					<view class="buildMode buildMode2" v-if="item.buildMode==2">
+						平台运营
+					</view>
+
+					<view class="v1" v-html="item.html"></view>
+				</view>
+				<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
+			</view>
+
+			<view class="item" v-if="queryName!=''&&testName==queryName&&(list.length==0)">
+				<view class="v" @click="returnName(queryName,'',1)">
+					<view class="v1">未查询到“<span class="qName">{{queryName}}</span>”相关结果</view>
+					<view class="v2">点击创建“<span class="qName">{{queryName}}</span>”停车场</view>
+				</view>
+				<view class="button" @click="returnName(queryName,'',1)">
+					<u-button type="primary">创建</u-button>
+				</view>
+			</view>
+		</view>
+
+		<u-divider color="#B6BDC3" :isnone="list.length==0">已经到底了</u-divider>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/pagesMylock.js'
+
+	export default {
+		data() {
+			return {
+				list: [],
+				testName: "",
+				queryName: "",
+				type: 1,
+			};
+		},
+		onLoad(op) {
+			if (op.type) {
+				this.type = op.type
+			}
+			this.getList()
+		},
+		methods: {
+			getList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				var obj = {
+					name: this.testName
+				}
+				if (this.type == 3) {
+					obj.buildMode = 2
+				}
+				API.findParking(obj).then((res) => {
+					this.queryName = this.testName
+					var list = res.data.parkingInfoList
+					if (list == null) {
+						list = []
+					}
+					this.list = list
+
+
+					for (var i = 0; i < this.list.length; i++) {
+						var item = this.list[i]
+						if (this.testName) {
+							var targetChar = this.testName
+							item.html = item.name.replace(new RegExp(`(${targetChar})`, 'g'),
+								'<span style="color:#FF5100 ">$1</span>');
+							console.log(item.html)
+						} else {
+							item.html = item.name
+						}
+
+					}
+
+
+					uni.hideLoading();
+
+				}).catch(error => {
+
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			returnName(name, id, type, obj) {
+				const eventChannel = this.getOpenerEventChannel();
+
+				eventChannel.emit('acceptDataFromOpenerPage', {
+					data: name,
+					dataid: id,
+					datatype: type,
+					item: obj
+				})
+				uni.navigateBack()
+			},
+			testBtn() {
+
+				this.list = []
+				//this.listForm.pageIndex=1
+				this.getList()
+			},
+			getInfo() {
+
+			}
+
+		}
+	}
+</script>
+<style>
+	page {
+		background-color: rgba(242, 244, 246, 1);
+	}
+</style>
+<style lang="scss" scoped>
+	::v-deep .u-content {
+		width: 380% !important;
+	}
+
+	.search {
+
+		padding: 16rpx 32rpx;
+		background: #fff;
+
+		.searchBox {
+			display: flex;
+			align-items: center;
+			background: #F2F2F2;
+			padding: 1px 16rpx;
+			border-radius: 8px;
+			justify-content: space-between;
+		}
+	}
+
+	.body2 {
+		.item:not(:last-child) {
+			border-bottom: 1px solid rgba(232, 232, 232, 1);
+		}
+
+		.item {
+			padding: 24rpx 32rpx;
+			background: #fff;
+			display: flex;
+			justify-content: space-between;
+
+			.vquery {
+				display: flex;
+				align-items: center;
+			}
+
+			.buildMode {
+				font-size: 24rpx;
+				border: 1px solid #bbbbbb;
+				border-radius: 4px;
+				color: #1677ff;
+				padding: 2rpx 8rpx;
+				margin: 0 8rpx;
+
+			}
+
+			.buildMode1 {
+				color: #1677ff;
+				border: 1px solid #1677ff;
+			}
+
+			.buildMode2 {
+				color: #4CAF50;
+				border: 1px solid #4CAF50;
+			}
+
+			.qName {
+				color: #FF5100
+			}
+
+			.v1 {
+				color: rgba(16, 16, 16, 1);
+				font-size: 32rpx;
+			}
+
+			.v2 {
+				color: rgba(119, 119, 119, 1);
+				font-size: 24rpx;
+			}
+
+		}
+	}
+</style>