Files
wdsxh/pages/mine/settings/agreement.vue
2026-04-29 15:33:58 +08:00

94 lines
2.3 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- +----------------------------------------------------------------------
| 麦沃德科技赋能开发者助力商协会发展
+----------------------------------------------------------------------
| Copyright (c) 20172024 www.wdsxh.cn All rights reserved.
+----------------------------------------------------------------------
| 沃德商协会系统并不是自由软件不加密并不代表开源未经许可不可自由转售和商用
+----------------------------------------------------------------------
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
+----------------------------------------------------------------------
| 协议 开发者: 麦沃德科技-半夏
+---------------------------------------------------------------------- -->
<template>
<view class="container">
<!-- 标题栏 -->
<title-bar :title="agreementTitle"></title-bar>
<!-- 内容区 -->
<view class="container-main" v-if="loadEnd">
<mp-html :content="content"></mp-html>
</view>
<!-- 底部导航 -->
<tab-bar></tab-bar>
</view>
</template>
<script>
export default {
data() {
return {
// 加载完成
loadEnd: false,
// 协议类型 1.用户协议2.隐私政策3.入会协议
agreementType: 0,
// 协议标题
agreementTitle: "",
// 协议内容
content: "",
}
},
onLoad(option) {
this.agreementType = option.type
if (option.type == 1) {
this.agreementTitle = "用户协议"
} else if (option.type == 2) {
this.agreementTitle = "隐私政策"
} else if (option.type == 3) {
this.agreementTitle = "入会协议"
}
uni.showLoading({
title: "加载中"
})
this.getConfigInfo(() => {
this.loadEnd = true
uni.hideLoading()
})
},
methods: {
// 获取协议内容
getConfigInfo(fn) {
this.$util.request("main.agreement", {
type: this.agreementType
}).then(res => {
if (fn) fn()
if (res.code == 1) {
this.content = res.data.content
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
}).catch(error => {
if (fn) fn()
console.error('获取协议内容 ', error)
})
},
}
}
</script>
<style lang="scss">
page {
background: #fff;
}
.container {
.container-main {
padding: 32rpx;
color: #333;
font-size: 32rpx;
line-height: 60rpx;
}
}
</style>