details.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <view>
  3. <!-- 金融基建详情 -->
  4. <view class="container">
  5. <h1 class="title">{{fromData.titleName}}</h1>
  6. <view class="wenzhangLy">
  7. <!-- 头像昵称 -->
  8. <view class="txTime">
  9. <image :src="(detailInfo.headImg!=null)?loadImgSrcLocalhost(detailInfo.headImg):'https://tse4-mm.cn.bing.net/th/id/OIP-C.cYyiJYfTo1SY1cj26FQpAQHaHa?rs=1&pid=ImgDetMain'" 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. </view>
  16. <view class="wenzhangCont article">
  17. <view v-html="fromData.textDetails"></view>
  18. <view v-for="(item, index) in fromData.pictureList" :key="index">
  19. <image :src="loadImgSrcLocalhost(item)"></image>
  20. </view>
  21. </view>
  22. <view class="fengexian"></view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import { getDetails } from '@/api/specialService/financialInfrastructure.js';
  28. export default {
  29. data() {
  30. return {
  31. parentId: "",
  32. fromData: {},
  33. content: "",
  34. initInfo: {
  35. userId: null,
  36. scoreNum: 0,
  37. wechatName: "微信用户",
  38. name: null,
  39. headImg: null,
  40. },
  41. };
  42. },
  43. methods: {
  44. // 获取数据
  45. getDetails() {
  46. getDetails(this.parentId).then(res => {
  47. if (res.code == 200) {
  48. this.fromData = res.data
  49. }
  50. })
  51. },
  52. // getUserInfoByUserId(userId) {
  53. // getUserInfo(userId).then(res => {
  54. // this.initInfo = res.data;
  55. // })
  56. // },
  57. }
  58. /**
  59. * 生命周期函数--监听页面加载
  60. */
  61. ,
  62. onLoad(options) {
  63. this.parentId = options.id
  64. this.getDetails()
  65. },
  66. /**
  67. * 生命周期函数--监听页面初次渲染完成
  68. */
  69. onReady() {
  70. this.userId = getApp().globalData.userId
  71. // this.getUserInfoByUserId(this.userId)
  72. },
  73. /**
  74. * 生命周期函数--监听页面显示
  75. */
  76. onShow() {},
  77. /**
  78. * 生命周期函数--监听页面隐藏
  79. */
  80. onHide() {},
  81. /**
  82. * 生命周期函数--监听页面卸载
  83. */
  84. onUnload() {},
  85. /**
  86. * 页面相关事件处理函数--监听用户下拉动作
  87. */
  88. onPullDownRefresh() {},
  89. /**
  90. * 页面上拉触底事件的处理函数
  91. */
  92. onReachBottom() {},
  93. /**
  94. * 用户点击右上角分享
  95. */
  96. onShareAppMessage() {},
  97. };
  98. </script>
  99. <style lang="scss">
  100. @import './details.css';
  101. .collect {
  102. .icon-shoucang:before {
  103. color: red;
  104. }
  105. }
  106. .not-collect {}
  107. .effectBix {
  108. width: 56px;
  109. height: 56px;
  110. border-radius: 50px;
  111. font-family: 'Bebas Neue', cursive;
  112. background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
  113. border: 0;
  114. color: #fff;
  115. text-align: center;
  116. line-height: 56px;
  117. outline: transparent;
  118. position: absolute;
  119. transform: rotate(-30deg);
  120. right: 3%;
  121. top: -5%;
  122. }
  123. .effectBox,
  124. .effectBox::after {
  125. width: 56px;
  126. height: 56px;
  127. border-radius: 50px;
  128. font-size: 16px;
  129. font-family: 'Bebas Neue', cursive;
  130. background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
  131. border: 0;
  132. color: #fff;
  133. opacity: 1;
  134. letter-spacing: 3px;
  135. text-align: center;
  136. line-height: 56px;
  137. outline: transparent;
  138. position: relative;
  139. left: 78%;
  140. top: 113%;
  141. transform: rotate(-30deg);
  142. z-index: 1;
  143. }
  144. .effectBox::after {
  145. --slice-0: inset(50% 50% 50% 50%);
  146. --slice-1: inset(80% -6px 0 0);
  147. --slice-2: inset(50% -6px 30% 0);
  148. --slice-3: inset(10% -6px 85% 0);
  149. --slice-4: inset(40% -6px 43% 0);
  150. --slice-5: inset(80% -6px 5% 0);
  151. content: 'AVAILABLE NOW';
  152. display: block;
  153. position: absolute;
  154. top: 0;
  155. left: 0;
  156. right: 0;
  157. bottom: 0;
  158. background: linear-gradient(45deg, transparent 3%, #00E6F6 3%, #00E6F6 5%, #FF013C 5%);
  159. text-shadow: -3px -3px 0px #F8F005, 3px 3px 0px #00E6F6;
  160. clip-path: var(--slice-0);
  161. }
  162. .effectBox:hover::after {
  163. animation: 1s glitch;
  164. animation-timing-function: steps(2, end);
  165. }
  166. @keyframes glitch {
  167. 0% {
  168. clip-path: var(--slice-1);
  169. transform: translate(-20px, -10px);
  170. }
  171. 10% {
  172. clip-path: var(--slice-3);
  173. transform: translate(10px, 10px);
  174. }
  175. 20% {
  176. clip-path: var(--slice-1);
  177. transform: translate(-10px, 10px);
  178. }
  179. 30% {
  180. clip-path: var(--slice-3);
  181. transform: translate(0px, 5px);
  182. }
  183. 40% {
  184. clip-path: var(--slice-2);
  185. transform: translate(-5px, 0px);
  186. }
  187. 50% {
  188. clip-path: var(--slice-3);
  189. transform: translate(5px, 0px);
  190. }
  191. 60% {
  192. clip-path: var(--slice-4);
  193. transform: translate(5px, 10px);
  194. }
  195. 70% {
  196. clip-path: var(--slice-2);
  197. transform: translate(-10px, 10px);
  198. }
  199. 80% {
  200. clip-path: var(--slice-5);
  201. transform: translate(20px, -10px);
  202. }
  203. 90% {
  204. clip-path: var(--slice-1);
  205. transform: translate(-10px, 0px);
  206. }
  207. 100% {
  208. clip-path: var(--slice-1);
  209. transform: translate(0);
  210. }
  211. }
  212. </style>