agreement.vue 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view class="agreement-page">
  3. <!-- 1. 自定义导航栏:解决蓝线 -->
  4. <view class="custom-navbar" :style="{ paddingTop: statusBarHeight + 'px' }">
  5. <view class="nav-content">
  6. <view class="back-area" @click="goBack">
  7. <text class="back-arrow"></text>
  8. </view>
  9. <view class="nav-title">用户协议</view>
  10. <view class="right-placeholder"></view>
  11. </view>
  12. </view>
  13. <scroll-view scroll-y class="content-scroll" :style="{ height: scrollHeight }">
  14. <view class="article-body">
  15. <view class="title">ERP 系统用户服务协议</view>
  16. <view class="update-time">最近更新日期:2024年04月28日</view>
  17. <rich-text :nodes="agreementNodes"></rich-text>
  18. <view class="footer-tip">本协议由广东粤铝材实业有限公司负责解释。</view>
  19. </view>
  20. </scroll-view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. statusBarHeight: 20,
  28. agreementNodes: `
  29. <div style="line-height: 1.8; color: #444; font-size: 14px;">
  30. <h3 style="color: #000; margin-top: 20px;">1. 账户注册与安全</h3>
  31. <p>您必须使用真实手机号进行授权登录。您应对账号下的所有活动负责,严禁将账号转借或转让他人使用。</p>
  32. <h3 style="color: #000; margin-top: 20px;">2. 订购规范</h3>
  33. <p>用户在提交订单前应核实型号、规格及数量。订单一旦系统确认进入生产环节,不可随意撤回。</p>
  34. <h3 style="color: #000; margin-top: 20px;">3. 知识产权</h3>
  35. <p>本平台所有技术文档、图纸及界面设计均受法律保护,未经许可不得擅自抓取或仿造。</p>
  36. </div>
  37. `
  38. }
  39. },
  40. computed: {
  41. scrollHeight() {
  42. return `calc(100vh - ${this.statusBarHeight + 44}px)`;
  43. }
  44. },
  45. onLoad() {
  46. const info = uni.getSystemInfoSync();
  47. this.statusBarHeight = info.statusBarHeight;
  48. },
  49. methods: {
  50. goBack() { uni.navigateBack(); }
  51. }
  52. }
  53. </script>
  54. <style scoped>
  55. .agreement-page { width: 100vw; height: 100vh; background: #ffffff; display: flex; flex-direction: column; }
  56. /* 自定义导航栏样式 */
  57. .custom-navbar { background: #fff; flex-shrink: 0; }
  58. .nav-content { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 30rpx; }
  59. .back-area { width: 60rpx; height: 44px; display: flex; align-items: center; }
  60. .back-arrow { width: 22rpx; height: 22rpx; border-left: 4rpx solid #333; border-bottom: 4rpx solid #333; transform: rotate(45deg); margin-left: 10rpx; }
  61. .nav-title { font-size: 34rpx; font-weight: bold; color: #333; }
  62. .right-placeholder { width: 60rpx; }
  63. .content-scroll { width: 100%; }
  64. .article-body { padding: 40rpx; padding-top: 20rpx; }
  65. .title { font-size: 40rpx; font-weight: bold; color: #1a1a1a; margin-bottom: 16rpx; text-align: center; }
  66. .update-time { font-size: 24rpx; color: #999; margin-bottom: 40rpx; text-align: center; }
  67. .footer-tip { margin-top: 60rpx; padding: 30rpx; background: #f8fafc; font-size: 24rpx; color: #888; text-align: center; }
  68. </style>