zhiyin.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <u-parse :html="data.content" :selectable="true" :show-with-animation="true" style="width: 100%;"></u-parse>
  5. </view>
  6. </view>
  7. </template>
  8. <script setup>
  9. import { ref } from 'vue'
  10. import { onLoad } from '@dcloudio/uni-app'
  11. // import { query } from '@/api/contactUs.js'
  12. const pageTitle = ref('')
  13. const data = ref({
  14. content: '指引页面,待确认'
  15. })
  16. onLoad((load) => {
  17. pageTitle.value = load.title
  18. uni.setNavigationBarTitle({
  19. title: pageTitle.value
  20. })
  21. // query().then(res => {
  22. // if (res && res.message === 'success') {
  23. // data.value = res.data
  24. // }
  25. // })
  26. })
  27. </script>
  28. <style lang="scss" scoped>
  29. .container {
  30. padding: 20px;
  31. background-color: #ffffff;
  32. display: flex;
  33. flex-direction: column;
  34. justify-content: space-between;
  35. /* height: 100vh; */
  36. /* 让页面高度撑满 */
  37. margin-bottom: env(safe-area-inset-bottom, 0);
  38. .title {
  39. font-size: 24px;
  40. font-weight: bold;
  41. color: #333;
  42. text-align: center;
  43. /* 标题居中 */
  44. margin-bottom: 15px;
  45. }
  46. .content {
  47. flex: 1;
  48. /* 占据剩余空间 */
  49. display: flex;
  50. flex-direction: column;
  51. align-items: flex-start;
  52. /* 内容左对齐 */
  53. }
  54. .body {
  55. font-size: 16px;
  56. color: #555;
  57. text-align: left;
  58. /* 内容左对齐 */
  59. }
  60. .body img {
  61. width: 50%;
  62. height: auto;
  63. }
  64. .date {
  65. font-size: 14px;
  66. color: #999;
  67. text-align: right;
  68. /* 时间右对齐 */
  69. margin-top: 10px;
  70. /* 与内容分离 */
  71. }
  72. }
  73. </style>