| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <template>
- <view class="privacy-page">
- <erp-nav-bar :title="title" />
- <scroll-view scroll-y class="content-scroll" :style="{ height: scrollHeight }">
- <view class="article-body">
- <rich-text :nodes="privacyNodes"></rich-text>
- </view>
- </scroll-view>
- </view>
- </template>
- <script>
- import { getAgreement } from '@/api/system/agreement.js';
- import ErpNavBar from '@/components/erp-nav-bar.vue';
- export default {
- components: { ErpNavBar },
- data() {
- return {
- statusBarHeight: 20,
- title: '',
- privacyNodes: ''
- }
- },
- computed: {
- scrollHeight() {
- return `calc(100vh - ${this.statusBarHeight + 44}px)`;
- }
- },
- async onLoad() {
- const winInfo = uni.getWindowInfo ? uni.getWindowInfo() : uni.getSystemInfoSync();
- this.statusBarHeight = winInfo.statusBarHeight || 20;
- try {
- const res = await getAgreement(2);
- this.title = res.data.title;
- this.privacyNodes = res.data.content;
- } catch (e) {
- console.error('[隐私政策] 加载失败', e);
- uni.showToast({ title: e || '加载隐私政策失败', icon: 'none' });
- }
- },
- methods: {
- goBack() { uni.navigateBack(); }
- }
- }
- </script>
- <style scoped>
- .privacy-page {
- width: 100vw;
- height: 100vh;
- background: #ffffff;
- display: flex;
- flex-direction: column;
- }
- .content-scroll {
- width: 100%;
- }
- .article-body {
- padding: 40rpx;
- padding-top: 20rpx;
- }
- .title {
- font-size: 40rpx;
- font-weight: bold;
- color: #1a1a1a;
- margin-bottom: 16rpx;
- text-align: center;
- }
- .update-time {
- font-size: 24rpx;
- color: #999;
- margin-bottom: 40rpx;
- text-align: center;
- }
- .safe-bottom-hint {
- margin-top: 80rpx;
- text-align: center;
- color: #52c41a;
- font-size: 24rpx;
- opacity: 0.6;
- }
- </style>
|