activity-review-details.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" bgColor="rgba(255,255,255,0)"></u-navbar>
  4. <view>
  5. <u-swiper
  6. @click="clickImg"
  7. :list="imageList"
  8. imgMode="aspectFill"
  9. :height="200"
  10. :indicator="true"
  11. :autoplay="true"
  12. :circular="true"
  13. indicatorStyle="bottom: 25px"
  14. indicatorMode="dot"
  15. indicatorActiveColor="#fff"
  16. indicatorInactiveColor="rgba(255, 255, 255, 0.35)"
  17. ></u-swiper>
  18. </view>
  19. <view class="box">
  20. <view class="" style="display: flex; align-items: center; margin-left: 28rpx; margin-top: 30rpx">
  21. <view style="color: #640000; margin-right: 20rpx; font-weight: 700; font-size: 36rpx">{{ list.title }}</view>
  22. </view>
  23. <view v-if="list.intro" style="margin-left: 24rpx; display: flex; align-items: center; margin-top: 40rpx">
  24. <view style="display: flex; align-items: center">
  25. <uni-icons type="calendar" size="22" color="#940000"></uni-icons>
  26. <view class="item_tit">介绍</view>
  27. </view>
  28. </view>
  29. <view class="text">
  30. <u-parse :content="list.content"></u-parse>
  31. </view>
  32. </view>
  33. <!-- 构件 -->
  34. <view class="" v-if="association.length > 0">
  35. <view style="margin-left: 24rpx; display: flex; align-items: center; margin-top: 40rpx">
  36. <view style="display: flex; align-items: center">
  37. <uni-icons type="cloud-download" size="22" color="#940000"></uni-icons>
  38. <view class="item_tit">活动相关</view>
  39. </view>
  40. </view>
  41. <view class="jj_btm">
  42. <view @click="$common.navigateTo(item.page)" class="container" v-for="(item, index) in association" :key="item.index">
  43. <view class="mn_box">
  44. <image style="border-radius: 10rpx; width: 100%; height: 100%" :lazy-load="true" :src="item.image"></image>
  45. </view>
  46. <view class="mn_text">{{ item.title }}</view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. let that = this;
  54. export default {
  55. data() {
  56. return {
  57. list: [],
  58. association: [],
  59. showadmin: false,
  60. imageList: ['https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/sh_lb1.jpg']
  61. };
  62. },
  63. onLoad(e) {
  64. that = this;
  65. this.getContentDetail(e.id);
  66. },
  67. methods: {
  68. // 详情
  69. getContentDetail(id) {
  70. this.$api.getContentDetail(
  71. {
  72. main_body_id: 1,
  73. id: id
  74. },
  75. function (res) {
  76. // console.log(res, 666666666);
  77. that.list = res.data;
  78. let aa = Object.values(res.data.association_me_list);
  79. that.association = aa.filter((item) => item.title !== '文保牌' && item.main_body_column_name !== '我和文物的故事');
  80. if (res.data.images.length > 0) {
  81. that.imageList = res.data.images;
  82. }
  83. let auth = that.$common.userInfo();
  84. //获取用户权限
  85. if (!(auth === 'undefined' || auth === '' || auth === [] || auth === null) && auth.token !== 'undefined') {
  86. that.$api.userManageCrAuth(
  87. {
  88. main_body_id: 1,
  89. cr_code: res.data.code
  90. },
  91. function (res) {
  92. console.log(res);
  93. if (res.data === true) {
  94. that.showadmin = true;
  95. }
  96. }
  97. );
  98. }
  99. }
  100. );
  101. },
  102. // 图片预览
  103. clickImg(index) {
  104. // console.log(index, 555);
  105. var imgs = this.imageList;
  106. let temp = [imgs[index]];
  107. // console.log('temp', temp);
  108. uni.previewImage({
  109. urls: imgs,
  110. current: index,
  111. success: function (data) {
  112. console.log(data);
  113. },
  114. fail: function (err) {
  115. console.log(err.errMsg);
  116. }
  117. });
  118. }
  119. }
  120. };
  121. </script>
  122. <style>
  123. /deep/.u-swiper-indicator__wrapper__dot--active {
  124. width: 5px !important;
  125. }
  126. .box {
  127. min-height: 100%;
  128. height: auto;
  129. width: 100%;
  130. padding-bottom: 50rpx;
  131. background-image: url('https://huli-app.wenlvti.net/app_static/wuyuan/static/shouhu/wyj-feiyi3-001.png');
  132. background-repeat: repeat-y;
  133. background-attachment: fixed;
  134. background-size: 100% 100%;
  135. }
  136. .title {
  137. font-size: 28rpx;
  138. font-weight: 400;
  139. color: #444444;
  140. line-height: 44rpx;
  141. }
  142. .u-info {
  143. font-size: 28rpx;
  144. color: #444444;
  145. line-height: 44rpx;
  146. margin: 20rpx;
  147. text-align: center;
  148. }
  149. .text {
  150. margin: 20rpx;
  151. }
  152. .info {
  153. display: flex;
  154. justify-content: space-between;
  155. flex-wrap: wrap;
  156. margin: 20rpx;
  157. margin-top: 16rpx;
  158. }
  159. .info_item {
  160. }
  161. .info > view {
  162. margin-top: 20rpx;
  163. font-size: 30rpx;
  164. margin-left: 8rpx;
  165. color: #940000;
  166. /* font-weight: 900; */
  167. }
  168. .item_tit {
  169. font-size: 32rpx;
  170. color: #940000;
  171. line-height: 48rpx;
  172. font-weight: 700;
  173. }
  174. .jj_btm {
  175. width: 92%;
  176. margin: auto;
  177. display: flex;
  178. margin-top: 20rpx;
  179. flex-wrap: wrap;
  180. justify-content: space-between;
  181. }
  182. .mn_box {
  183. width: 300rpx;
  184. height: 200rpx;
  185. }
  186. .mn_text {
  187. width: 298rpx;
  188. font-size: 28rpx;
  189. text-align: center;
  190. color: #ffffff;
  191. position: absolute;
  192. top: 160rpx;
  193. left: 2rpx;
  194. line-height: 40rpx;
  195. background: rgba(0, 0, 0, 0.3);
  196. border-radius: 0px 0rpx 10rpx 10rpx;
  197. }
  198. .container {
  199. position: relative;
  200. margin-top: 20rpx;
  201. /* width: 260rpx;
  202. height: 182rpx; */
  203. }
  204. </style>