luban-mall/pagesB/about/about.vue

86 lines
2.0 KiB
Vue

<template>
<view>
<status-nav :ifReturn="true" navBarTitle="关于我们" :marginBottom="0"></status-nav>
<view class="about-bg" :style="{'min-height':aboutHeight}">
<!-- 地图 -->
<view class="about-map">
<map style="width: 100%; height: 390rpx;" :latitude="latitude" :longitude="longitude" :markers="markers"></map>
</view>
<!-- 导航 -->
<view class="navigation-btn" @tap="goThere"></view>
<!-- -->
<view class="about">
<view class="about-title">免责条款</view>
<view class="about-txt">
<rich-text :nodes="aboutData"></rich-text>
</view>
</view>
</view>
</view>
</template>
<script>
import statusNav from '@/components/status-navs/status-nav';
import {getCartNum} from '@/jsFile/public-api.js';
import { mapState } from 'vuex'//引入mapState
export default {
components:{
statusNav
},
data() {
return {
aboutHeight: `calc(100vh - ${uni.getSystemInfoSync().statusBarHeight + 50}px)`,
latitude: 39.909,
longitude: 116.39742,
address:'',
markers: [{
width : 30,
height: 32,
latitude: 39.909,
longitude: 116.39742,
iconPath: '/static/public/icon-addr.png'
}],
aboutData:'',
}
},
onLoad() {
this.getAboutData();
},
// 分享到微信
onShareAppMessage() {
},
// 分享到朋友圈
onShareTimeline(){
},
methods: {
// 查询关于我们
getAboutData(){
uni.showLoading();
this.$requst.get('/api/index/about').then(res=>{
if(res.code==0){
this.aboutData = this.$toolAll.tools.escape2Html(res.data.content);
this.latitude = res.data.lat;
this.longitude = res.data.lon;
this.address = res.data.address;
this.markers[0].latitude = res.data.lat;
this.markers[0].longitude = res.data.lon;
} else {
this.$toolAll.tools.showToast(res.msg);
}
uni.hideLoading();
})
},
// 导航
goThere() {
this.$toolAll.tools.goThere(this.lat,this.lng,this.address);
}
}
}
</script>
<style>
</style>