HHSLinkSLink/HSLink-app/pages/tabbar/my/settings/agreement/agreement.vue

62 lines
1.1 KiB
Vue
Raw Normal View History

2020-09-23 18:53:25 +08:00
<template>
<view class="page">
<view class="content">
<textarea v-model="content"
auto-height="true"
disabled="true"
></textarea>
</view>
</view>
</template>
<script>
import request from '@/util/request.js';
export default {
data() {
return {
title: "",
content: ""
}
},
onLoad(option) {
const TITLE = {
"UserAgreement": "用户协议",
"PrivacyAgreement": "隐私协议"
};
uni.setNavigationBarTitle({
title: TITLE[option.title]
});
this.getDictionariesData(option.title)
},
onPullDownRefresh () {
uni.startPullDownRefresh();
},
methods: {
/**
* 获取协议内容
*/
getDictionariesData(code) {
request.post("/hs/getDictionariesData",{
code: code
}).then(res => {
console.log("协议内容",res);
this.content = res.data[0].dd_detail;
},err => {
console.log("err",err);
})
}
}
}
</script>
<style scoped>
.content{
padding: 20rpx!important;
background-color: #FFFFFF;
border-radius: 10rpx;
}
uni-textarea{
width: 100%!important;
}
</style>