| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <view class="Body">
- <view class="content ql-editor-box" v-html="detail.protocolContent"></view>
- </view>
- </template>
- <script>
- import {
- protocolInfo
- } from "@/api/index.js"
- export default {
- data() {
- return {
- detail: {}
- }
- },
- onLoad(options) {
- console.log(options)
- if (options.code) {
- this.getDetail(options.code)
- uni.setNavigationBarTitle({
- title: options.code == 'user_protocol' ? '用户协议' : options.code == 'privacy_protocol' ? '隐私协议' : ''
- })
- }
- },
- methods: {
- getDetail(code) {
- protocolInfo({
- code: code
- }).then(res => {
- console.log(res)
- this.detail = res
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .Body {
- padding-top: 40rpx;
- .content {
- padding: 0 30rpx;
- ::v-deep a {
- word-break: break-all;
- }
- ::v-deep img {
- max-width: 100%;
- }
- }
- }
- </style>
|