|
@@ -12,7 +12,7 @@
|
|
|
{{ theRoad.roadName || '暂无' }}
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="u-m-l-10 u-p-10" @click="openPage('/pages/roadlist/roadlist')">
|
|
|
+ <view class="u-m-l-10 u-p-10" @click="openRoad">
|
|
|
<u-icon name="arrow-right" color="rgba(255,255,255,.7)" size="28"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -80,10 +80,14 @@
|
|
|
noticeList:['智慧停车车主端V0.1版本发布','智慧停车PDA端V0.1版本发布'],
|
|
|
theRoad:[],
|
|
|
spaceInfo:new Object,
|
|
|
+ latitude:'',
|
|
|
+ longitude:'',
|
|
|
+ roadList:'',
|
|
|
+ list: ''
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- this.getLocation();
|
|
|
+
|
|
|
},
|
|
|
onBackPress(options) {
|
|
|
// uni.showModal({
|
|
@@ -96,6 +100,7 @@
|
|
|
return true
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.getLocation();
|
|
|
if(this.$store.state.vuex_hasLogin){
|
|
|
this.userInfo = this.$store.state.vuex_user;
|
|
|
this.theRoad = this.$store.state.vuex_user?.roadList?.[0]||[];
|
|
@@ -112,6 +117,19 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ openRoad(){
|
|
|
+ //#ifdef APP-PLUS
|
|
|
+ let ALog = uni.requireNativePlugin("AndroidLog");
|
|
|
+ ALog.info({msg:'径度:err' + this.latitude});
|
|
|
+ //#endif
|
|
|
+ this.$u.route({
|
|
|
+ url: 'pages/roadlist/roadlist',
|
|
|
+ params: {
|
|
|
+ latitude: this.latitude,
|
|
|
+ longitude: this.longitude,
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
speaks(msg){
|
|
|
speak.speakAction(msg)
|
|
|
},
|
|
@@ -125,11 +143,20 @@
|
|
|
|
|
|
},
|
|
|
getLocation(){
|
|
|
+ let that = this;
|
|
|
uni.getLocation({
|
|
|
type:"gcj02",
|
|
|
success : function (res) {
|
|
|
var dst = '26.58751,106.78329';
|
|
|
var src = res.latitude + ',' + res.longitude;
|
|
|
+ that.latitude = res.latitude;
|
|
|
+
|
|
|
+ //#ifdef APP-PLUS
|
|
|
+ let ALog = uni.requireNativePlugin("AndroidLog");
|
|
|
+ ALog.info({msg:'精度:err' + res.latitude});
|
|
|
+ //#endif
|
|
|
+ console.log('res.latitude', res.latitude)
|
|
|
+ that.longitude = res.longitude;
|
|
|
//#ifdef APP-PLUS
|
|
|
var locRet = location.distance(src, dst)
|
|
|
//#endif
|