guShi.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="文物故事" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <view style="width: 92%; margin: auto">
  5. <image mode="scaleToFill" style="width: 100%; border-radius: 10rpx" :src="list.image"></image>
  6. <view style="display: flex; justify-content: space-between; align-items: center; margin-top: 30rpx">
  7. <!-- <view lines="1" class="text_4">详情介绍</view> -->
  8. <view class="text_25">{{ list.publish_at }}</view>
  9. </view>
  10. <view v-if="list.content != null" class="text_5">
  11. <u-parse :content="list.content"></u-parse>
  12. </view>
  13. <view v-else class="">
  14. <u-empty text="暂无介绍" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"></u-empty>
  15. </view>
  16. <!-- <view class="text-img" v-if="item.association_me_list">
  17. <view style="color: #b37700; font-weight: 700; font-size: 18px">相关</view>
  18. <view class="text-img-img">
  19. <view v-for="(it, idx) in item.association_me_list" :key="idx">
  20. <view style="color: #b37700; font-size: 24rpx; margin-left: 10rpx; display: flex; align-items: center; margin-top: 40rpx"></view>
  21. <u--image width="360rpx" height="240rpx" :src="it.image" @click="$common.navigateTo('/index_fenbao/GuanLi/XiangQing?id=' + it.id)"></u--image>
  22. <view>{{ it.title }}</view>
  23. </view>
  24. </view>
  25. </view> -->
  26. <view class="text-img" style="margin-top: 30rpx" v-if="association_me_list.length > 0">
  27. <view style="color: #b37700; font-weight: 700; font-size: 18px">相关</view>
  28. <view style="position: relative">
  29. <view v-for="(it, idx) in association_me_list" :key="idx">
  30. <view style="color: #b37700; font-size: 24rpx; margin-left: 10rpx; display: flex; align-items: center; margin-top: 40rpx"></view>
  31. <u--image radius="5" width="360rpx" height="240rpx" :src="it.image" @click="$common.navigateTo('/index_fenbao/GuanLi/XiangQing?id=' + it.id)"></u--image>
  32. <view class="mn_text">{{ it.title }}</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. let that;
  41. export default {
  42. data() {
  43. return {
  44. list: {},
  45. association_me_list: []
  46. };
  47. },
  48. onLoad(o) {
  49. that = this;
  50. this.getContentDetail(o.id);
  51. },
  52. methods: {
  53. getContentDetail(id) {
  54. this.$api.getContentDetail({ main_body_id: 1, id: id }, function (res) {
  55. if (res.code == 1) {
  56. that.list = res.data;
  57. that.association_me_list = Object.values(res.data.association_me_list);
  58. // console.log(that.association_me_list, '故事详情');
  59. }
  60. });
  61. }
  62. }
  63. };
  64. </script>
  65. <style>
  66. .box {
  67. width: 100%;
  68. padding-bottom: 50rpx;
  69. background-image: url('https://huli-app.wenlvti.net/app_static/wuyuan/static/shouhu/wyj-feiyi3-001.png');
  70. background-repeat: repeat-y;
  71. background-attachment: fixed;
  72. background-size: 100% 100%;
  73. /* background-color: #fff9e9; */
  74. min-height: 100%;
  75. height: auto;
  76. }
  77. .text_4 {
  78. width: 112rpx;
  79. height: 28rpx;
  80. overflow-wrap: break-word;
  81. color: rgba(49, 37, 32, 1);
  82. font-size: 32rpx;
  83. font-family: SourceHanSansCN-Bold;
  84. font-weight: 700;
  85. text-align: left;
  86. white-space: nowrap;
  87. line-height: 28rpx;
  88. }
  89. .text_5 {
  90. font-size: 28rpx;
  91. font-family: SourceHanSansCN-Regular;
  92. font-weight: normal;
  93. text-align: justifyLeft;
  94. line-height: 48rpx;
  95. margin: 44rpx 0 0 16rpx;
  96. text-indent: 2rem;
  97. }
  98. /deep/.u-swiper-indicator__wrapper__dot--active {
  99. width: 5px !important;
  100. }
  101. .text_25 {
  102. font-size: 26rpx;
  103. color: #727070;
  104. margin-top: 10rpx;
  105. font-weight: 400;
  106. }
  107. .mn_text {
  108. width: 357rpx;
  109. font-size: 28rpx;
  110. text-align: center;
  111. color: #ffffff;
  112. position: absolute;
  113. top: 200rpx;
  114. left: 0;
  115. line-height: 40rpx;
  116. background: rgba(0, 0, 0, 0.3);
  117. border-radius: 0px 0rpx 10rpx 10rpx;
  118. }
  119. </style>