luban-mall/pages/login/agreement.vue

48 lines
1.0 KiB
Vue
Raw Normal View History

2022-07-08 16:15:29 +08:00
<template>
<view>
<status-nav :ifReturn="true" navBarTitle="用户服务协议" :marginBottom="0"></status-nav>
<!-- 内容 -->
<view class="disclaimers" :style="{'min-height':agreementHeight}">
<view class="disclaimers-txt">
<rich-text :nodes="agreement"></rich-text>
</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 {
agreementHeight: `calc(100vh - ${uni.getSystemInfoSync().statusBarHeight + 50}px)`,
agreement:'',
}
},
onLoad() {
this.getDisclaimers();
},
methods: {
// 查询免责声明
getDisclaimers(){
this.$requst.get('/api/index/agreement').then(res=>{
if(res.code==0){
this.agreement = this.$toolAll.tools.escape2Html(res.data.content);
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
}
}
}
</script>
<style>
</style>