travelGuideDetails.vue 4.7 KB

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