index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <script setup>
  2. import {
  3. ref
  4. } from "vue";
  5. import {
  6. onLoad,
  7. } from "@dcloudio/uni-app";
  8. import {
  9. getPolicyDetail,
  10. } from "@/api/work/policy.js";
  11. let title = ref(null);
  12. let content = ref(null);
  13. const getContent = function(id) {
  14. getPolicyDetail({
  15. id
  16. }).then(res => {
  17. content.value = res.data.content;
  18. })
  19. }
  20. onLoad(options => {
  21. title.value = options.title;
  22. getContent(options.id);
  23. })
  24. </script>
  25. <template>
  26. <view class="container">
  27. <page-title>详情</page-title>
  28. <view class="cards-list">
  29. <view class="card only-card">
  30. <view class="card-item first-card-item">
  31. <view class="card-item-announcement-detail">文件名:{{title}}</view>
  32. </view>
  33. </view>
  34. <view class="card">
  35. <view class="card-item" style="padding-top: 40rpx;margin-bottom: 40rpx;">
  36. <view class="card-item-announcement">详情内容:</view>
  37. </view>
  38. <view class="card-parse">
  39. <u-parse :content="content"></u-parse>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <style lang="scss" scoped>
  46. .card {
  47. min-height: 0;
  48. }
  49. </style>