Commit 5cb3e2a7 authored by 高宇's avatar 高宇

停车服务子页面

parent e3842db1
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view style="display: flex;flex-direction: column;"> <view style="display: flex;flex-direction: column;">
<span class="twotitle">{{res.name}}</span> <span class="twotitle">{{res.name}}</span>
<span class="threetitle" style="white-space: normal;max-width: 60vw;">{{res.address}}</span> <span class="threetitle" style="white-space: normal;max-width: 60vw;">{{res.address}}</span>
<span class="threetitle">1126.6652km</span> <span class="threetitle">{{distance}}km</span>
</view> </view>
</view> </view>
</u-radio> </u-radio>
...@@ -40,11 +40,16 @@ ...@@ -40,11 +40,16 @@
city: '北京市', city: '北京市',
value: '', value: '',
shopMessage: [], shopMessage: [],
distance: '' // 距离 distance: 0, // 距离
}; };
}, },
onShow() { onShow() {
this.getLocation()
this.$nextTick(()=>{
this.showFirstAddress() this.showFirstAddress()
},300)
}, },
methods: { methods: {
// 选中某个单选框时,由radio时触发 // 选中某个单选框时,由radio时触发
...@@ -63,12 +68,38 @@ ...@@ -63,12 +68,38 @@
this.$u.get('/shop/tenant/mobile/list?cityId=' + res[0].id).then(res => { this.$u.get('/shop/tenant/mobile/list?cityId=' + res[0].id).then(res => {
this.list = res this.list = res
this.value = this.list[0].name this.value = this.list[0].name
const longitude = '' console.log('value',this.list[0])
const dimension = '' var latitude = this.list[0].latitude.split(',')
console.log('latitude',latitude)
const longitude = Number(latitude[0])
const dimension = Number(latitude[1])
var currentlo = ''
var currentla = ''
var distance = ''
const that = this
uni.getStorage({
key: 'currentlo',
success: function (res) {
console.log('data',res.data);
currentlo = res.data[0]
currentla = res.data[1]
console.log('currentla', currentla)
console.log('currentlo',currentlo)
console.log('distance',that.distance)
that.distance = that.getDistance(currentla,currentlo,dimension,currentlo)
console.log('lastdistance',that.distance)
}
});
// that.distance = that.getDistance(this.currentlo,this.currentla,this.thlongitude,this.dimension)
// console.log('distance',that.distance)
console.log("sss", this.list) console.log("sss", this.list)
}) })
// console.log("this.addressList",this.addressList) // console.log("this.addressList",this.addressList)
}) })
}, },
// 城市数据 // 城市数据
showaddress() { showaddress() {
...@@ -99,11 +130,22 @@ ...@@ -99,11 +130,22 @@
}, },
//获取当前位置 //获取当前位置
getLocation() { getLocation() {
const that = this
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function(res) { success: function(res) {
console.log('当前位置的经度:' + res.longitude); console.log('当前位置的经度:' + res.longitude);
this.currentlo = res.longitude
console.log("aaa",this.currentlo)
console.log('当前位置的纬度:' + res.latitude); console.log('当前位置的纬度:' + res.latitude);
this.currentla = res.latitude
var list = []
list.push(this.currentlo)
list.push(this.currentla)
uni.setStorage({
key: 'currentlo',
data: list
});
}, },
fail(err) { fail(err) {
console.log("错误信息", err) console.log("错误信息", err)
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</view> </view>
<!-- 请选择店铺 --> <!-- 请选择店铺 -->
<view class="list"> <view class="list">
<view class="list-trim"> <view class="list-trim" @click="goshopList">
<view class="left"> <view class="left">
<view class="trim-title">请选择店铺</view> <view class="trim-title">请选择店铺</view>
</view> </view>
...@@ -49,6 +49,13 @@ ...@@ -49,6 +49,13 @@
baseURL: 'http://192.144.239.97:20043/file/', baseURL: 'http://192.144.239.97:20043/file/',
img: 'http://192.144.239.97:20043/file/banner/20230605/6F749760FE1148369C4081EBD3248C6C.jpeg', img: 'http://192.144.239.97:20043/file/banner/20230605/6F749760FE1148369C4081EBD3248C6C.jpeg',
} }
},
methods: {
goshopList(){
uni.navigateTo({
url:'/homePage/parkingService/plateManagement/index'
})
}
} }
} }
</script> </script>
......
<template> <template>
<view class="choose"> <view class="choose">
<u-search placeholder="输入停车场名称" bg-color="#eee" :show-action="false" input-align="center"></u-search> <!-- <u-search placeholder="输入停车场名称" bg-color="#eee" :show-action="false" input-align="center"></u-search> -->
<view> <view>
<u-radio-group v-model="value" @change="radioGroupChange" iconPlacement="right"> <u-radio-group v-model="value" @change="radioGroupChange" iconPlacement="right">
<u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name" <u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view> <view>
<image :src="cardImg" class="cardImg" ></image> <image :src="cardImg" class="cardImg" ></image>
</view> </view>
<view class="bottom-button"> <view class="bottom-button" @click="goPlateManagement">
<view class="button">添加车牌</view> <view class="button">添加车牌</view>
</view> </view>
</view> </view>
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
</view> </view>
</view> </view>
<!-- 车牌管理--> <!-- 车牌管理-->
<view class="itemButton"> <view class="itemButton" @click="goPlateManagement">
<image :src="icon" class="iconImg"></image> <image :src="icon" class="iconImg"></image>
<span class="test">车牌管理</span> <span class="test">车牌管理</span>
</view> </view>
<!-- 停车记录 --> <!-- 停车记录 -->
<view class="itemButton" @click="goRecord"> <view class="itemButton" @click="goRecord">
<image :src="icon" class="iconImg"></image> <image :src="icon" class="iconImg" ></image>
<span class="test">停车记录</span> <span class="test">停车记录</span>
</view> </view>
</view> </view>
...@@ -94,10 +94,15 @@ ...@@ -94,10 +94,15 @@
url:'/homePage/parkingService/choose/index' url:'/homePage/parkingService/choose/index'
}) })
}, },
goRecord(){ goPlateManagement(){
uni.navigateTo({ uni.navigateTo({
url:'/homePage/parkingService/plateManagement/index' url:'/homePage/parkingService/plateManagement/index'
}) })
},
goRecord(){
uni.navigateTo({
url:'/homePage/parkingService/ParkingRecord/index'
})
} }
} }
}; };
......
...@@ -239,6 +239,18 @@ ...@@ -239,6 +239,18 @@
"navigationBarTitleText": "拍摄小票" "navigationBarTitleText": "拍摄小票"
} }
}, },
{
"path": "filmReceipt/pointsApplication/index",
"style": {
"navigationBarTitleText": "商圈积分快速申请"
}
},
{
"path": "filmReceipt/shopList/index",
"style": {
"navigationBarTitleText": "店铺列表"
}
},
{ {
"path": "shop/index", "path": "shop/index",
"style": { "style": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment