|
@@ -94,6 +94,17 @@
|
|
|
<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><img class="img" src="@/assets/img/mylock/item5.svg" alt=""></view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="floating-button">
|
|
|
<view class="button" @click="submit" >
|
|
@@ -110,7 +121,15 @@
|
|
|
<script>
|
|
|
import * as API from '@/apis/pagejs/mylock.js'
|
|
|
|
|
|
- export default {
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ 'u-radio-group': () => import('@/uni_modules/uview-ui/components/u-radio-group/u-radio-group'),
|
|
|
+
|
|
|
+ 'u-radio': () => import('@/uni_modules/uview-ui/components/u-radio/u-radio'),
|
|
|
+
|
|
|
+ 'u-picker': () => import('@/uni_modules/uview-ui/components/u-picker/u-picker'),
|
|
|
+
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
id:"",
|
|
@@ -164,6 +183,22 @@
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ getUserLocation(){
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
switchBtn(e){
|
|
|
this.columnsindex=[e[0]]
|
|
|
var obj=this.columns[e[0]]
|
|
@@ -292,7 +327,7 @@
|
|
|
|
|
|
}).then((res) => {
|
|
|
uni.hideLoading();
|
|
|
- if (res.data.openBind||1) {
|
|
|
+ if (res.data.openBind) {
|
|
|
|
|
|
var nowscan=res.data.floorlockInfoList;
|
|
|
if(nowscan&&nowscan.length){
|