87 lines
1.8 KiB
Vue
87 lines
1.8 KiB
Vue
<template>
|
|
<view class="page">
|
|
<u-navbar :title="title" :autoBack="true" safeAreaInsetTop placeholder>
|
|
</u-navbar>
|
|
<u-parse :content="content"></u-parse>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getUserprivacyinfo,
|
|
getInviteRule,
|
|
getAboutusinfo,
|
|
getClockRule
|
|
} from '@/api/system/config.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
title: '',
|
|
content: '',
|
|
type: 0
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
console.log(options);
|
|
this.title = options.title
|
|
if (options.title == '邀请规则') this.getInviteRuleFn()
|
|
if (options.title == '用户协议') this.getUserAgreement()
|
|
if (options.title == '隐私政策') this.getPrivacyPolicy()
|
|
//天天打卡
|
|
if (options.title == '规则详情') this.getClockRuleFn()
|
|
},
|
|
methods: {
|
|
//获取天天打卡规则
|
|
getClockRuleFn() {
|
|
getClockRule().then(res => {
|
|
console.log(res.data);
|
|
this.content = JSON.parse(res.data).agreement
|
|
})
|
|
},
|
|
//获取邀请规则
|
|
getInviteRuleFn() {
|
|
getInviteRule().then(res => {
|
|
console.log(res.data);
|
|
this.content = JSON.parse(res.data).agreement
|
|
})
|
|
},
|
|
// 获取用户协议
|
|
getUserAgreement() {
|
|
getAboutusinfo().then(res => {
|
|
// console.log(JSON.parse(res.data) );
|
|
this.content = JSON.parse(res.data).agreement
|
|
})
|
|
},
|
|
// 获取隐私政策
|
|
getPrivacyPolicy() {
|
|
getUserprivacyinfo().then(res => {
|
|
// console.log(res.data);
|
|
this.content = JSON.parse(res.data).agreement
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
page {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.page {
|
|
padding: 48rpx 40rpx;
|
|
border-top: 1rpx solid #ededed;
|
|
}
|
|
|
|
.view-title {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.view-content {
|
|
font-size: 26rpx;
|
|
padding: 12px 5px 0;
|
|
color: #333;
|
|
line-height: 24px;
|
|
font-weight: normal;
|
|
}
|
|
</style> |