miao33: 从 main 同步 single_uniapp22miao,dart-sass 兼容修复,DEPLOY.md 更新
- 从 main 获取 single_uniapp22miao 子项目 - dart-sass: /deep/ -> ::v-deep,calc 运算符加空格 - DEPLOY.md 采用 shccd159 版本(4 子项目架构说明) Made-with: Cursor
This commit is contained in:
72
single_uniapp22miao/pages/sub-pages/agreement/contract.vue
Normal file
72
single_uniapp22miao/pages/sub-pages/agreement/contract.vue
Normal file
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<view class="contract-page">
|
||||
<view class="content">
|
||||
<view class="title">{{ agreementTitle }}</view>
|
||||
<view class="article">
|
||||
<rich-text :nodes="agreementContent"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
agreementTitle: '',
|
||||
agreementContent: ''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.type = options.type || 'user';
|
||||
this.loadAgreement();
|
||||
},
|
||||
|
||||
methods: {
|
||||
async loadAgreement() {
|
||||
try {
|
||||
const res = await this.$http.get('/api/setting/agreement', {
|
||||
type: this.type
|
||||
});
|
||||
|
||||
if (res.code === 0) {
|
||||
this.agreementTitle = res.data.title;
|
||||
this.agreementContent = res.data.content;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载协议失败:', error);
|
||||
// 显示默认内容
|
||||
this.agreementTitle = '用户协议';
|
||||
this.agreementContent = '<p>协议内容加载中...</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contract-page {
|
||||
min-height: 100vh;
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.article {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.8;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user