瀏覽代碼

流程调整

zhengkaixin 1 月之前
父節點
當前提交
2c656a8222

+ 27 - 0
apis/pagejs/pagesIndex.js

@@ -0,0 +1,27 @@
+import requestWhite from '@/apis/utils/requestWhite'
+
+ export function floorList(data) {
+  	return requestWhite({
+  		method: 'post',
+  		data: data,
+  		url: '/mobile/floorlock/floorList'
+  	})
+ }
+ 
+ 
+ export function myParkingSpot(data) {
+  	return requestWhite({
+  		method: 'post',
+  		data: data,
+  		url: '/mobile/floorlock/myParkingSpot'
+  	})
+ }
+ 
+ 
+export function floorlockDetails(data) {
+ 	return requestWhite({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/floorlock/floorlockDetails'
+ 	})
+}

+ 11 - 0
apis/pagejs/pagesMylock.js

@@ -0,0 +1,11 @@
+import requestWhite from '@/apis/utils/requestWhite'
+
+
+ export function findParking(data) {
+  	return requestWhite({
+  		method: 'post',
+  		data: data,
+  		url: 'mobile/parking/findParking'
+  	})
+ }
+ 

+ 1 - 1
components/Tabbar.vue

@@ -30,7 +30,7 @@
 					 	iconPath: require("@/assets/img/tabBar/parking_icon.png"),
 					 	selectedIconPath: require("@/assets/img/tabBar/parking_icon.png"),
 					 	text: '',
-						pagePath2: "/pages/business/lockInfo?showtabbar=1",
+						pagePath2: "/pages/index/lockInfo",
 					 	midButton: true,
 					 },
 					

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

@@ -2,7 +2,7 @@ const UNI_APP = {
 	ProjectName :"智泊e家",
 	BASE_URL: 'http://192.168.8.162:8081/floorlock/',
 	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",
 	NODE_ENV :"dev",

+ 8 - 0
main.js

@@ -87,6 +87,14 @@ Vue.mixin({
 					return 
 				}
 			}
+			// if(url.indexOf('pages/index/lockInfo')>-1){
+			// 	uni.reLaunch({
+			// 		url: "/" + url
+			// 	})
+				
+			// }else{
+				
+			// }
 			uni.navigateTo({
 				url: "/" + url
 			})

+ 14 - 24
pages.json

@@ -1,7 +1,13 @@
 {
 
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
-
+		
+		{
+			"path": "pages/index/lockInfo",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
 		{
 			"path": "pages/index/index",
 			"style": {
@@ -9,27 +15,23 @@
 			}
 		},
 
-		{
-			"path": "pages/index/main/parkingDetails",
-			"style": {
-
-
-			}
-		},
+		
 
 		{
 			"path": "pages/index/center",
 			"style": {
 				"navigationBarTitleText": "个人中心"
 			}
-		}
-
+		}
+		
+		
+		
 
 	],
 	"preloadRule": {
 		"pages/index/center": {
 			"network": "all",
-			"packages": ["pages/business", "pages/mylock", "pages/information"]
+			"packages": [ "pages/mylock", "pages/information"]
 		}
 	},
 	"easycom": {
@@ -42,19 +44,7 @@
 			"root": "subpackage/uview-ui",
 			"pages": [] // 无需页面,仅存放组件
 		},
-		{
-			"root": "pages/business",
-			"pages": [
-
-				{
-					"path": "lockInfo",
-					"style": {
-
-					}
-				}
-
-			]
-		},
+		
 		{
 			"root": "pages/information",
 			"pages": [{

文件差異過大導致無法顯示
+ 436 - 363
pages/business/lockInfo.vue


+ 1 - 1
pages/index/center.vue

@@ -140,7 +140,7 @@
 				this.userInfo = this.jphelp.getPersonInfo()	
 				this.userInfoPlus=this.jphelp.getPersonInfoPlus()
 				this.isReady=true;
-				this.getWhiteFloorlockList()
+				//this.getWhiteFloorlockList()
 			}
 		}
 	}

+ 27 - 11
pages/index/index.vue

@@ -5,7 +5,7 @@
 
 		<view class="Area Area1" v-if="pointAuthorize">
 			<view class="top">
-				<view class="name">附近停车场</view>
+				<view class="name">附近地锁</view>
 				<view class="value" @click="getUserLocation()">
 					<img class="img" src="@/assets/img/homepage/riLine-restart-line.svg" alt="">
 					重新定位
@@ -27,7 +27,7 @@
 								
 							</view>
 							<view class="item2"   >
-								地锁共<span style="color:#333">{{item.totalNum}}</span>个 | 空闲<span  style="color:#8BC34A">{{item.idleNum}}</span>个
+								<span class="span" :class="' lockStatus lockStatus'+item.lockStatus">{{item.lockStatusN}}</span><span class="span">|</span><span  class="span" >{{item.parkingName}}</span>
 							</view>
 						</view>
 						
@@ -39,7 +39,7 @@
 				</view>
 			</view>
 			
-			<u-empty text="50米内没有停车场" mode="list" margin-top="80" v-if="!nearList.length">
+			<u-empty text="50米内没有地锁" mode="list" margin-top="80" v-if="!nearList.length">
 				<view slot="bottom">
 					<view class="value-slot" @click="getUserLocation()">
 						<img class="img" src="@/assets/img/homepage/riLine-restart-line.svg" alt="">
@@ -52,7 +52,7 @@
 
 		<view class="Area Area2" v-if="otherList.length">
 			<view class="top">
-				<view class="name">全部停车场</view>
+				<view class="name">全部地锁</view>
 
 			</view>
 			<view class="list">
@@ -71,12 +71,13 @@
 								<span class="tag"  v-if="item.userPreferred" > <u-icon name="star-fill" color="#FFAE00" size="24"></u-icon> 常用 </span>
 							</view>
 							<view class="item2"   >
-								地锁共<span style="color:#333">{{item.totalNum}}</span>个 | 空闲<span  style="color:#8BC34A">{{item.idleNum}}</span>个
+								<span class="span" :class="' lockStatus lockStatus'+item.lockStatus">{{item.lockStatusN}}</span><span class="span">|</span><span  class="span" >{{item.parkingName}}</span>
 							</view>
 						</view>
 						
 					</view>
 					<view class="value" v-if="item.distance" >{{distanceN(item.distance)}}<u-icon name="arrow-right" color="#CCCCCC"></u-icon></view>
+					<view class="value" v-else ><u-icon name="arrow-right" color="#CCCCCC"></u-icon></view>
 					
 					
 				</view>
@@ -88,7 +89,7 @@
 </template>
 
 <script>
-	import * as API from '@/apis/pagejs/index.js'
+	import * as API from '@/apis/pagejs/pagesIndex.js'
 	import componentLogin from '@/components/componentLogin.vue';
 	import tabbar from '@/components/Tabbar.vue';
 	
@@ -183,10 +184,11 @@
 		},
 		methods: {
 			gotoInfo(item){
-				var url='pages/index/main/parkingDetails?id='+item.id;
+				var url='pages/index/lockInfo?id='+item.id;
 				if (this.point) {
 					url+=`&point=1&longitude=${this.longitude}&latitude=${this.latitude}`
 				}
+				url+="&d="+new Date().getTime()
 				this.gotoUrl(url)
 			},
 			getParkingList() {
@@ -196,14 +198,14 @@
 				})
 				var obj = {
 					pageIndex: 1,
-					pageSize: 20,
+					pageSize: 999,
 					radius: 50,
 				}
 				if (this.point) {
 					obj.longitude = this.longitude
 					obj.latitude = this.latitude
 				}
-				API.parkingList(obj).then((res) => {
+				API.floorList(obj).then((res) => {
 
 					this.allList = res.data.data
 					console.log(this.nearList)
@@ -329,7 +331,7 @@
 						font-size: 32rpx;
 						display: flex;
 						align-items: center;
-						padding-bottom: 8rpx;
+						//padding-bottom: 8rpx;
 						
 						.tag{
 							font-size: 24rpx;
@@ -354,7 +356,21 @@
 						color: rgba(119, 119, 119, 1);
 								
 						font-size: 24rpx;
-					
+						.span{
+							margin-right: 12rpx;
+						}
+						.lockStatus{
+							color: #4CAF50;
+						}
+						.lockStatus1{
+							color: #4CAF50;
+						}
+						.lockStatus2{
+							color: #ff9800;
+						}
+						.lockStatus4{
+							color: red;
+						}
 				}
 			}
 			

+ 183 - 21
pages/business/quickInfo.vue → pages/index/lockInfo.vue

@@ -1,12 +1,48 @@
 <template>
 	<view>
+		<u-navbar   title="绑定地锁" :isBack="!showtabbar" ></u-navbar>
+		<componentLogin ref="refLogin"
+		@findByOpenId="findByOpenId"></componentLogin>
+		
+		<u-modal v-model="openLockBl" @confirm="lockStatus1" confirm-color="#00B962" :show-cancel-button="true"
+			ref="uModal" title="提示" content="是否下降当前地锁?" confirm-text="开启"></u-modal>
+		<u-modal v-model="closeLockBl" @confirm="lockStatus2" confirm-color="#fa3534" :show-cancel-button="true"
+			ref="uModal" title="提示" content="是否结束使用当前地锁?" confirm-text="结束"></u-modal>
+		
+		
+		<u-modal v-model="loginBl" @confirm="loginconfirm"  :show-cancel-button="true"
+			ref="uModal" title="提示" content="当前用户未登录,是否前往登录" confirm-text="登录"></u-modal>
+		
+		
+		<u-modal v-model="openModalBl" @confirm="confirmPhone" confirm-text="拨打电话" confirm-color="#606266"
+			:show-cancel-button="true" ref="uModal" :asyncClose="true" title="客服电话" :content="content"
+			:content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
+		
+		
+		
+		<u-popup v-model="showMessage" mode="bottom" border-radius="30">
+			<view class="showMessage">
+				<view class="title">降锁成功</view>
+				<view class="body">
+					车位锁已经降锁,请尽快驶入车位!<br />
+		
+					若超过3分钟未停车,车位锁将自动升起上锁,如需继续使用请重新扫码降锁。
+		
+				</view>
+				<view class="botton">
+					<u-button @click="showMessage=false" type="primary" shape="square">知道了</u-button>
+				</view>
+			</view>
+		</u-popup>
+		
+		
 		<view v-if="isReady" class="isReady">
 			<view class="gradient-header">
 				<view class="jpback">
 			
 				</view>
 			</view>
-			<view v-if="id" class="isReady_1">
+			<view v-if="floorlockInfo.id" class="isReady_1">
 				 
 
 				<view class="body">
@@ -163,7 +199,7 @@
 							</view>
 						</view>
 					</view>
-					<view class="page  ">
+					<view class="page  "  >
 					<u-collapse   :itemStyle="{
 								'border':'1px solid rgba(187, 187, 187, 0.43);'
 							}">
@@ -196,7 +232,12 @@
 
 
 		</view>
-
+		<view class="page-role" v-else>
+			<img class="img" src="@/assets/img/nonwhitelist/info.png" alt="">
+			<view class="text1">{{permission?'暂无权限':'加载中...'}}</view>
+			<view class="text2" v-if="permission">此车位仅限车主及授权用户使用</view>
+			<view class="botton" @click="gotoIndex" v-if="permission">返回首页</view>
+		</view>
 		<tabbar  v-if="showtabbar"  ></tabbar>
 	</view>
 </template>
@@ -204,7 +245,7 @@
 <script>
 	import componentLogin from '@/components/componentLogin.vue';
 	import tabbar from '@/components/Tabbar.vue';
-	import * as API from '@/apis/pagejs/mylock.js'
+	import * as API from '@/apis/pagejs/pagesIndex.js'
 
 	export default {
 		components: {
@@ -241,28 +282,142 @@
 								}],
 				content: "400-8899-619",
 				setIntervalId: "",
+				userInfo:{},
+				userInfoPlus:{
+					whiteList:[],
+					myAllList:[]
+				},
+				
+				showMessage: 0,
+			
+				openLockBl:false,
+				closeLockBl:false,
+				openModalBl: false,
+				
 			}
 		},
 		onLoad(op) {
 			
-			if(op.showtabbar){
-				this.showtabbar=1
-				this.isReady = 1
+			if(op.q){
+				var val =decodeURIComponent(op.q);
+				
+				if(val&&val.indexOf("?id=")>-1){
+					val=val.split("?id=")[1]
+					if(val.indexOf("&")>-1){
+						val=val.split("&")[0]	
+					}
+					this.id = val
+				}
+				
 			}
-			if (op.id) {
+			
+			
+			this.userInfo = this.jphelp.getPersonInfo()
+			this.userInfoPlus=this.jphelp.getPersonInfoPlus()
+			if(this.userInfo.id){
+				
+			}
+			uni.setNavigationBarTitle({
+				title: "加载中..."
+			})
+			
+			if(this.id ){
+				this.showtabbar=0
+				this.isReady = 1			
+				this.getFloorlockDetails()
+				
+			}else if (op.id) {
+				this.showtabbar=0
 				this.id = op.id
 				this.isReady = 1
-			
+				
 				this.getFloorlockDetails()
+			}else{
+				this.showtabbar=1
+				this.isReady = 1
+				uni.setNavigationBarTitle({
+					title: "快捷停车"
+				})
 			}
 			
+			
+		},
+		onShow(){
+			if(this.id ){}
+		},
+		onReady() {
+			this.$refs.refLogin.findByOpenId()
+			this.setIntervalId = setInterval(() => {
+				this.getFloorlockDetails(1)
+			}, 1000 * 3)
+			
+			this.jphelp.setInterval("lockInfo",this.setIntervalId)
+			
+			this.getFloorlockDetails(0,1)
+			
+		},
+		onShareTimeline(){
+			return {
+				title: '智泊e家',
+			}
+		},
+		onShareAppMessage(res) {
+			return {
+				title: '智泊e家',
+			}
 		},
 		methods: {
+			findByOpenId(res) {
+				
+				this.getFloorlockList()
+				
+			},
+			confirmPhone() {
+				this.openModalBl = false;
+				
+				uni.makePhoneCall({
+					phoneNumber: this.content //仅为示例
+				});
+			},
+			lockStatus3(){
+				uni.showToast({
+					title: "下降中...",
+					icon: "none"
+				})
+			},
+			lockStatus0(){
+				this.openModalBl=true;
+			},
+			loginconfirm(){
+				this.$refs.refLogin.ashow()
+			},
 			gotoMain(){
 				uni.switchTab({
 					url:"/pages/index/index"
 				})
 			},
+			operateBtn() {
+				if(!this.jphelp.getPersonInfo().id){
+					this.loginBl=true;
+					
+				}else if(this.floorlockInfo.status==0){
+					this.lockStatus0()
+				}else{
+					if(this.floorlockInfo.lockStatus==4){
+						this.lockStatus0() //异常
+					}else if(this.floorlockInfo.lockStatus==1){
+						//this.lockStatus1()  //未使用
+						this.openLockBl=true;
+					}else if(this.floorlockInfo.lockStatus==2){
+						//this.lockStatus2() 
+						//this.closeLockBl=true;
+						 //使用
+					}else if(this.floorlockInfo.lockStatus==3){
+						this.lockStatus3()  //过程
+					}
+				}
+				
+			},
 			getFloorlockList() {
 				uni.showLoading({
 					title: "加载中",
@@ -272,19 +427,24 @@
 				API.myParkingSpot().then((res) => {
 
 					this.mylist = res.data.floorList
-					this.whiteList = res.data.whiteList
-
-					for (var i in this.mylist) {
-						var item = this.mylist[i]
-						item.phonetype = 1
-						this.list.push(item)
+					for(var i in this.mylist){
+						var item=this.mylist[i]
+						if(item.id==this.id){
+							this.isMy=1
+						}
 					}
-					for (var i in this.whiteList) {
-						var item = this.whiteList[i]
-						item.phonetype = 2
-						this.list.push(item)
+					
+					this.whiteList = res.data.whiteList
+					
+					
+					if(this.mylist.length){
+						this.id = this.mylist[0].id
+						this.getFloorlockDetails()
+					}else if(this.whiteList.length){
+						this.id = this.whiteList[0].id
+						this.getFloorlockDetails()
 					}
-
+					
 					uni.hideLoading();
 
 				}).catch(error => {
@@ -426,6 +586,7 @@
 	}
 	.pagemanage{
 		margin-top: 80rpx;
+		margin-bottom: 80rpx;
 		.mitem{
 			width: 33%;
 			display: flex;
@@ -615,7 +776,8 @@
 	
 	
 	.jpbutton {
-		    margin-top: 60rpx;
+		   margin-top: 30rpx;
+		   margin-bottom: 30rpx;
 		border-radius: 100rpx;
 		width: 400rpx;
 		height: 84rpx;

+ 2 - 2
pages/index/main/parkingDetails.vue

@@ -45,7 +45,7 @@
 					<view class="item-b">
 						空闲地锁:<span>{{idleNum}}个</span>
 					</view>
-					<view class="item-c" @click="gotoUrl('pages/business/lockInfo')">
+					<view class="item-c" @click="gotoUrl('pages/index/lockInfo')">
 						
 						<u-icon name="question-circle" color="#1677FF" label-color="#1677FF" label-size	="32" size="32" :margin-left="8" label="降锁说明"></u-icon>
 						
@@ -307,7 +307,7 @@
 				})
 			},
 			gotoInfoLock(item){
-				this.gotoUrl('pages/business/lockInfo?id='+item.id)
+				this.gotoUrl('pages/index/lockInfo?id='+item.id)
 				
 			},
 			getParkingFloorlockList(bl){

+ 119 - 47
pages/mylock/bindLock.vue

@@ -16,30 +16,30 @@
 					</view>
 				</view>
 		
-				
+				<view class="item">
+					<view class="name">
+						<span>*</span>管理者
+
+				
+					</view>
+					<view class="value">
+						
+						<input v-model="bindInfo.name" placeholder="请填写用户真实姓名" />
+					</view>
+				</view>
 				<view class="item">
 					<view class="name">
-						联系电话
-
+						<span>*</span>联系电话
 					</view>
 					<view class="value">
-						{{bindInfo.phone}}
+						
+						<input v-model="bindInfo.phone" placeholder="请填写手机号码" />
 					</view>
 				</view>
 			</view>
 
 			<view class="list">
-				<view class="item"  >
-					<view class="name">
-						<span>*</span>所属停车场
-
-					</view>
-					<view class="value" @click="isswitchshowBtn">
-						<view :style="bindInfo.parkingIdN?'':'color:#BBB'"
-						>{{bindInfo.parkingIdN?bindInfo.parkingIdN:'请选择所属停车场'}}</view>
-						<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
-					</view>
-				</view>
+				
 				<view class="item" >
 					<view class="name">
 						<span>*</span>地锁类型
@@ -61,6 +61,18 @@
 						<!-- <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon> -->
 					</view>
 				</view>
+				<view class="item"  >
+					<view class="name">
+						<span>*</span>所属停车场
+				
+					</view>
+					<view class="value" @click="gotoSelectParking()">
+						<view :style="bindInfo.parkingIdN?'':'color:#BBB'"
+						>{{bindInfo.parkingIdN?bindInfo.parkingIdN:'请选择所属停车场'}}</view>
+						<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
+					</view>
+				</view>
+				
 				<view class="item">
 					<view class="name">
 						<span>*</span>地锁名称
@@ -68,42 +80,24 @@
 				
 					</view>
 					<view class="value">
-						<input placeholder="如智泊地锁" v-model="bindInfo.name" />
+						<input placeholder="如智泊地锁" v-model="bindInfo.lockName" />
 					</view>
 				</view>
-				<view class="item">
-					<view class="name">
-						<span></span>停车位编号
-
-
-					</view>
-					<view class="value">
-						<input placeholder="如1号车位" v-model="bindInfo.parkingNumber" />
-					</view>
-				</view>
-				<view class="item">
-					<view class="name">
-						位置描述
-
-					</view>
-					<view class="value">
-						<input v-model="bindInfo.describe" placeholder="请描述车位位置信息" />
-					</view>
-				</view>
+				
+				
 				<view class="item">
 					<view class="name">
-						获取定位
+						地锁定位
 				
 					</view>
 					<view class="value" @click="getUserLocation" >
-						<view :style="bindInfo.parkingIdN?'':'color:#BBB'"
-						>{{bindInfo.parkingIdN?bindInfo.parkingIdN:'点击获取地锁定位信息'}}</view>
+						<view :style="bindInfo.address?'':'color:#BBB'"
+						>{{bindInfo.address?bindInfo.address:'点击获取地锁定位信息'}}</view>
 						<view><img class="img" src="@/assets/img/mylock/item5.svg" alt=""></view>
 					</view>
 				</view>
 			<view class="floating-button">
 				<view class="button"  @click="submit" >
-					
 					提交
 				</view>
 				
@@ -134,12 +128,14 @@
 				columnsindex:[0],
 				bindInfo:{
 					name:"",
+					lockName:"",
 					phone:"",
 					lockNo:"",
 					type:"",
 					remark:"",
 					describe:"",
-					parkingNumber:""
+					parkingNumber:"",
+					address:"",
 				},
 				bindInfotypelist:[
 					{id:"1",name:"公共地锁"},
@@ -181,21 +177,60 @@
 			}
 		},
 		methods:{
+			gotoSelectParking(){
+				uni.navigateTo({
+				  url: '/pages/mylock/selectParking',
+				  events: {
+				    // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
+				    acceptDataFromOpenerPage: (item)=>{
+						console.log(item)
+						this.bindInfo.parkingIdN=item.data
+						this.bindInfo.parkingId=item.dataid
+						this.bindInfo.parkingName=item.data
+						this.$forceUpdate()
+						
+				    },
+				 
+				  }
+				  // ,
+				  // success: function(res) {
+				  //   // 通过eventChannel向被打开页面传送数据
+				  //  
+				  // }
+				})
+			},
+			chooseLocationsuccess(res){
+				console.log('位置名称:' + res.name);
+				console.log('详细地址:' + res.address);
+				console.log('纬度:' + res.latitude);
+				console.log('经度:' + res.longitude);
+				this.bindInfo.address=res.address
+				this.bindInfo.latitude=res.latitude
+				this.bindInfo.longitude=res.longitude
+			},
 			getUserLocation(){
+				
+				var _this=this;
+				// #ifdef H5
+					
+					this.bindInfo.address='湖北省荆州市'
+					this.bindInfo.latitude='30.31098'
+					this.bindInfo.longitude='112.25494'
+					
+				// #endif
+				// #ifdef MP-WEIXIN
 				uni.authorize({
 					scope: 'scope.userLocation',
 					success() {
 						
 						uni.chooseLocation({
 							success: function (res) {
-								console.log('位置名称:' + res.name);
-								console.log('详细地址:' + res.address);
-								console.log('纬度:' + res.latitude);
-								console.log('经度:' + res.longitude);
+								_this.chooseLocationsuccess(res)
 							}
 						});
 					}
 				})
+					// #endif
 				
 			},
 			switchBtn(e){
@@ -249,9 +284,16 @@
 					})
 					return
 				}
-				if(!this.bindInfo.parkingId){
+				if(!this.bindInfo.name){
 					uni.showToast({
-						title: "请选择所属停车场",
+						title: "请填写用户真实姓名",
+						icon: "none"
+					})
+					return
+				}
+				if(!this.bindInfo.phone){
+					uni.showToast({
+						title: "请填写手机号码",
 						icon: "none"
 					})
 					return
@@ -263,8 +305,16 @@
 					})
 					return
 				}
+				if(!this.bindInfo.parkingIdN){
+					uni.showToast({
+						title: "请选择所属停车场",
+						icon: "none"
+					})
+					return
+				}
 				
-				if(!this.bindInfo.name){
+				
+				if(!this.bindInfo.lockName){
 					uni.showToast({
 						title: "请填写地锁名称",
 						icon: "none"
@@ -272,6 +322,13 @@
 					return
 				}
 				
+				if(!this.bindInfo.address){
+					uni.showToast({
+						title: "点击获取地锁定位信息",
+						icon: "none"
+					})
+					return
+				}
 				
 				uni.showLoading({
 					title: "加载中",
@@ -326,6 +383,21 @@
 			 
 			 	}).then((res) => {
 			 		uni.hideLoading();
+					 if (process.env.NODE_ENV === "development") {  
+						 var nowscan=res.data.floorlockInfoList;
+						 if(nowscan&&nowscan.length){
+						 	this.nowscan=nowscan[0];
+						 	this.bindInfo.lockNo=nowscan[0].lockNo
+						 	this.bindInfo.type=nowscan[0].type
+						 
+						 	this.bindInfo.lockName="智泊地锁"
+						 }
+						 
+						 uni.showToast({
+						 	title: "扫码成功",
+						 	icon: "none"
+						 })
+					 }
 			 		if (res.data.openBind) {
 			 			
 			 			var nowscan=res.data.floorlockInfoList;

+ 2 - 2
pages/mylock/editLock.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="jpmain  ">
-		<u-picker mode="selector"
+		<!-- <u-picker mode="selector"
 		 v-model="isswitchshow" 
 		 :range="columns" range-key="label"
 		  :default-selector="columnsindex"
-		   @confirm="switchBtn" ></u-picker>
+		   @confirm="switchBtn" ></u-picker> -->
 		
 	<!-- 	<view class="body">
 			<u-steps :list="numList" mode="number" :current="current" un-active-color="#999999"></u-steps >

+ 1 - 1
pages/mylock/infoLock.vue

@@ -177,7 +177,7 @@
 			ref="uModal" title="删除授权用户" content="是否删除当前授权用户?" confirm-text="删除"></u-modal>
 
 		<view class="floating-button">
-			<view class="button" @click="gotoUrl('pages/business/lockInfo?id='+id)" >
+			<view class="button" @click="gotoUrl('pages/index/lockInfo?id='+id)" >
 
 				查看地锁
 			</view>

+ 2 - 8
pages/mylock/myLock.vue

@@ -121,13 +121,7 @@
 
 	export default {
 		components: {
-		//'u-button': () => import('@/uni_modules/uview-ui/components/u-button/u-button'),
-		//'u-keyboard': () => import('@/uni_modules/uview-ui/components/u-keyboard/u-keyboard'),
-		
-			//'u-popup': () => import('@/uni_modules/uview-ui/components/u-popup/u-popup'),
-			//'u-select': () => import('@/uni_modules/uview-ui/components/u-select/u-select'),
-			//'u-input': () => import('@/uni_modules/uview-ui/components/u-input/u-input'),
-			
+	
 		},
 		data() {
 			return {
@@ -271,7 +265,7 @@
 					this.gotoUrl('pages/mylock/infoLock?id='+item.id)
 				}
 				if(item.phonetype==2){
-					this.gotoUrl('pages/business/lockInfo?id='+item.id)
+					this.gotoUrl('pages/index/lockInfo?id='+item.id)
 				}
 			},
 			

+ 1 - 1
pages/mylock/myWhite.vue

@@ -11,7 +11,7 @@
 					
 					
 					<view class="item" v-for="(item,i) in list"
-					 @click="gotoUrl('pages/business/lockInfo?id='+item.id)">
+					 @click="gotoUrl('pages/index/lockInfo?id='+item.id)">
 						<view class="title">
 
 							<view class="name">

+ 129 - 4
pages/mylock/selectParking.vue

@@ -1,19 +1,144 @@
 <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)" >
+				
+				<view class="v1" v-html="item.html"></view>
+				
+			</view>
+			
+			<view class="item" @click="returnName(queryName,'')" v-if="queryName!=''&&testName==queryName&&(list.length==0)">
+				<view class="v1">未查询到“<span class="qName">{{queryName}}</span>”相关结果</view>
+				<view class="v2">点击创建“<span class="qName">{{queryName}}</span>”停车场</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:"",
 			};
+		},
+		onLoad() {
+			this.getList()
+		},
+		methods:{
+			getList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+			
+				API.findParking({
+					name:this.testName
+				}).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(item,id){
+				const eventChannel = this.getOpenerEventChannel();
+				
+				eventChannel.emit('acceptDataFromOpenerPage', { data: item,dataid: id})
+				uni.navigateBack()
+			},
+			testBtn(){
+				
+				this.list=[]
+				//this.listForm.pageIndex=1
+				this.getList()
+			},
+			getInfo(){
+				
+			}
+			
 		}
 	}
 </script>
-
-<style lang="scss">
-
+<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;
+				
+				.qName{
+					color:#FF5100 
+				}
+				.v1{
+					color: rgba(16,16,16,1);
+					font-size: 32rpx;
+				}
+				.v2{
+					color: rgba(119,119,119,1);
+					font-size: 24rpx;
+				}
+			
+		}
+	}
 </style>

+ 1 - 1
subpackage/uview-ui/components/u-navbar/u-navbar.vue

@@ -142,7 +142,7 @@
 				type: Object,
 				default () {
 					return {
-						background: 'linear-gradient(180deg, #bed3f0 0%, #f4f4f6 100%)'
+						background: '#fff'
 					}
 				}
 			},

部分文件因文件數量過多而無法顯示