informationDetail.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <view>
  3. <!-- pages/me.wxml -->
  4. <view class="container">
  5. <h1 class="title">{{ detailInfo.titleName }}</h1>
  6. <view class="wenzhangLy">
  7. <!-- 头像昵称 -->
  8. <!-- <view class="txTime"> -->
  9. <!-- <image :src="loadImgSrc(detailInfo.headImg!=null?detailInfo.headImg:'/profile/upload/2024/03/05/abf969632ee94bd5a429c8c2dbb2f6b4 (1)_20240305092823A002.png')" style="border-radius: 50px;"></image> -->
  10. <!-- <view class="time">
  11. <p>{{detailInfo.nickName?detailInfo.nickName:'网友'}}</p>
  12. <span>{{ detailInfo.createTime }}</span>
  13. </view> -->
  14. <!-- </view> -->
  15. <!-- 积分 -->
  16. <!-- <span class="jf">100</span> -->
  17. </view>
  18. <view class="wenzhangCont article">
  19. <span v-html="detailInfo.textDetails">
  20. </span>
  21. <view >
  22. <!-- 图片轮播 -->
  23. <swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="circular">
  24. <block v-for="(one, index) in detailInfo.urls" :key="index">
  25. <swiper-item><image :src="loadImgSrcLocalhost(one)" style="background-size: 100% 100%;"></image></swiper-item>
  26. </block>
  27. </swiper>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. anwserVal:'',
  38. anwserList:[
  39. {
  40. deptName:'国家乡村振兴局',
  41. updateTime:'2023-2-27 16:04',
  42. desc:'用好政策效果评估成果,进一步优化巩固拓展脱贫攻坚成果同乡村振兴有效衔接政策供给,为推动工作提质增效提供有力支撑保障。',
  43. }
  44. ],
  45. isCollection:false,
  46. isAdopt:false,
  47. adoptTopSize:'115',
  48. adoptIndex:null,
  49. detailInfo:{},
  50. };
  51. },
  52. methods: {
  53. // 评论回答
  54. answerFunc(){
  55. this.anwserList.push({
  56. deptName:'国家烟草局',
  57. updateTime:new Date().getFullYear() + "-" + new Date().getMonth() + "-" + new Date().getDay() + " " + (new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours()) + ':' + (new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes()),
  58. desc:this.anwserVal,
  59. })
  60. this.anwserVal = null
  61. },
  62. adoptFunc(idx){
  63. this.adoptIndex = idx
  64. this.isAdopt = true
  65. },
  66. // 标记喜欢
  67. collectionFunc(){
  68. this.isCollection = !this.isCollection
  69. }
  70. }
  71. /**
  72. * 生命周期函数--监听页面加载
  73. */,
  74. onLoad(options) {
  75. const {
  76. obj = {}
  77. } = options;
  78. this.detailInfo = JSON.parse(decodeURIComponent(obj));
  79. },
  80. /**
  81. * 生命周期函数--监听页面初次渲染完成
  82. */
  83. onReady(e) {
  84. },
  85. /**
  86. * 生命周期函数--监听页面显示
  87. */
  88. onShow() {},
  89. /**
  90. * 生命周期函数--监听页面隐藏
  91. */
  92. onHide() {},
  93. /**
  94. * 生命周期函数--监听页面卸载
  95. */
  96. onUnload() {},
  97. /**
  98. * 页面相关事件处理函数--监听用户下拉动作
  99. */
  100. onPullDownRefresh() {},
  101. /**
  102. * 页面上拉触底事件的处理函数
  103. */
  104. onReachBottom() {},
  105. /**
  106. * 用户点击右上角分享
  107. */
  108. onShareAppMessage() {},
  109. };
  110. </script>
  111. <style lang="scss">
  112. @import 'informationDetail.css';
  113. .collect{
  114. .icon-shoucang:before{
  115. color: red;
  116. }
  117. }
  118. .not-collect{
  119. }
  120. .effectBix{
  121. width: 56px;
  122. height: 56px;
  123. border-radius: 50px;
  124. font-family: 'Bebas Neue', cursive;
  125. background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
  126. border: 0;
  127. color: #fff;
  128. text-align: center;
  129. line-height: 56px;
  130. outline: transparent;
  131. position: absolute;
  132. transform: rotate(-30deg);
  133. right:3%;
  134. top: -5%;
  135. }
  136. .effectBox, .effectBox::after {
  137. width: 56px;
  138. height: 56px;
  139. border-radius: 50px;
  140. font-size: 16px;
  141. font-family: 'Bebas Neue', cursive;
  142. background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
  143. border: 0;
  144. color: #fff;
  145. opacity: 1;
  146. letter-spacing: 3px;
  147. text-align: center;
  148. line-height: 56px;
  149. outline: transparent;
  150. position: relative;
  151. left: 78%;
  152. top: 113%;
  153. transform: rotate(-30deg);
  154. z-index: 1;
  155. }
  156. .effectBox::after {
  157. --slice-0: inset(50% 50% 50% 50%);
  158. --slice-1: inset(80% -6px 0 0);
  159. --slice-2: inset(50% -6px 30% 0);
  160. --slice-3: inset(10% -6px 85% 0);
  161. --slice-4: inset(40% -6px 43% 0);
  162. --slice-5: inset(80% -6px 5% 0);
  163. content: 'AVAILABLE NOW';
  164. display: block;
  165. position: absolute;
  166. top: 0;
  167. left: 0;
  168. right: 0;
  169. bottom: 0;
  170. background: linear-gradient(45deg, transparent 3%, #00E6F6 3%, #00E6F6 5%, #FF013C 5%);
  171. text-shadow: -3px -3px 0px #F8F005, 3px 3px 0px #00E6F6;
  172. clip-path: var(--slice-0);
  173. }
  174. .effectBox:hover::after {
  175. animation: 1s glitch;
  176. animation-timing-function: steps(2, end);
  177. }
  178. @keyframes glitch {
  179. 0% {
  180. clip-path: var(--slice-1);
  181. transform: translate(-20px, -10px);
  182. }
  183. 10% {
  184. clip-path: var(--slice-3);
  185. transform: translate(10px, 10px);
  186. }
  187. 20% {
  188. clip-path: var(--slice-1);
  189. transform: translate(-10px, 10px);
  190. }
  191. 30% {
  192. clip-path: var(--slice-3);
  193. transform: translate(0px, 5px);
  194. }
  195. 40% {
  196. clip-path: var(--slice-2);
  197. transform: translate(-5px, 0px);
  198. }
  199. 50% {
  200. clip-path: var(--slice-3);
  201. transform: translate(5px, 0px);
  202. }
  203. 60% {
  204. clip-path: var(--slice-4);
  205. transform: translate(5px, 10px);
  206. }
  207. 70% {
  208. clip-path: var(--slice-2);
  209. transform: translate(-10px, 10px);
  210. }
  211. 80% {
  212. clip-path: var(--slice-5);
  213. transform: translate(20px, -10px);
  214. }
  215. 90% {
  216. clip-path: var(--slice-1);
  217. transform: translate(-10px, 0px);
  218. }
  219. 100% {
  220. clip-path: var(--slice-1);
  221. transform: translate(0);
  222. }
  223. }
  224. </style>