helpDetails.vue 4.8 KB

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