2022-02-12 11:33:47 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<!-- 状态栏 -->
|
2022-02-19 13:28:10 +00:00
|
|
|
|
<status-nav :navBarTitle="'关于我们'"></status-nav>
|
2022-02-23 11:08:25 +00:00
|
|
|
|
<!-- 容器 -->
|
2022-02-24 03:21:51 +00:00
|
|
|
|
<container-subgroup>
|
|
|
|
|
<view slot="content">
|
|
|
|
|
<!-- 地图 -->
|
|
|
|
|
<view class="radius30" style="overflow: hidden;border: 2rpx solid #8c8c9b;">
|
|
|
|
|
<map :latitude="lat" :longitude="lng" :enable-scroll="enableScroll" :enable-zoom="enableZoom" scale="11" style="height: 390rpx;width: 100%;"></map>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 导航按钮 -->
|
|
|
|
|
<view @tap="goThere" class="navigate-to-where mar-s30 radius30 bac0 colf fon36 tcenter">导航至佩丽</view>
|
|
|
|
|
<!-- 关于佩丽 -->
|
|
|
|
|
<view class="fon48 col0 mar-sx50">关于佩丽</view>
|
|
|
|
|
<rich-text :nodes="richText" class="fon30 colpeili line-h50"></rich-text>
|
2022-02-12 11:33:47 +00:00
|
|
|
|
</view>
|
2022-02-23 11:08:25 +00:00
|
|
|
|
</container-subgroup>
|
2022-02-12 11:33:47 +00:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
components:{
|
2022-02-19 13:28:10 +00:00
|
|
|
|
|
2022-02-12 11:33:47 +00:00
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2022-02-19 13:28:10 +00:00
|
|
|
|
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
|
2022-02-12 11:33:47 +00:00
|
|
|
|
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
2022-02-19 13:28:10 +00:00
|
|
|
|
lat:25.603183,
|
|
|
|
|
lng:100.211328,
|
|
|
|
|
enableZoom:true,//是否支持缩放
|
|
|
|
|
enableScroll:true,//是否支持拖动
|
2022-02-23 11:08:25 +00:00
|
|
|
|
richText:'',//富文本
|
|
|
|
|
address:'',//目的地
|
|
|
|
|
flag:true
|
2022-02-12 11:33:47 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
2022-02-23 11:08:25 +00:00
|
|
|
|
// 调取关于我们信息事件
|
|
|
|
|
this.checkAboutUs();
|
2022-02-12 11:33:47 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2022-02-23 11:08:25 +00:00
|
|
|
|
// 查询关于我们信息
|
|
|
|
|
checkAboutUs(){
|
|
|
|
|
this.$requst.post('/api/index/about').then(res=>{
|
|
|
|
|
if(res.code==0){
|
|
|
|
|
this.lat = res.data.lat;
|
|
|
|
|
this.lng = res.data.lon;
|
|
|
|
|
this.richText = this.$toolAll.tools.escape2Html(res.data.content);
|
|
|
|
|
this.address = res.data.address;
|
|
|
|
|
} else {
|
|
|
|
|
this.$toolAll.tools.showToast(res.msg);
|
|
|
|
|
}
|
|
|
|
|
}).catch(err=>{
|
|
|
|
|
this.$toolAll.tools.showToast(err.msg);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
goThere(){//去这里
|
|
|
|
|
if(this.flag){
|
|
|
|
|
this.flag = false;
|
|
|
|
|
wx.getLocation({//获取当前经纬度
|
|
|
|
|
type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
|
|
|
|
|
success: (res)=> {
|
|
|
|
|
wx.openLocation({//使用微信内置地图查看位置。
|
|
|
|
|
latitude: this.lat*1,//要去的纬度-地址
|
|
|
|
|
longitude: this.lng*1,//要去的经度-地址
|
|
|
|
|
name: this.address,
|
|
|
|
|
address: this.address,
|
|
|
|
|
fail:err=>{
|
|
|
|
|
this.$toolAll.tools.showToast('地址信息错误');
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.flag = true;
|
|
|
|
|
},2000)
|
|
|
|
|
} else {
|
|
|
|
|
this.$toolAll.tools.showToast('请勿多次点击');
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-02-12 11:33:47 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
</style>
|