帧视界壹通告,付费看视频的微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

241 lines
4.4 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="postDetail">
  3. <navbar leftClick @leftClick="leftClick" />
  4. <view class="swipe">
  5. <uv-swiper
  6. :list="vedioList"
  7. indicator
  8. height="420rpx"></uv-swiper>
  9. </view>
  10. <view class="box">
  11. <view class="topInfo">
  12. <!-- <view class="title title1">
  13. 当前排名<text>{{ item.money || 1 }}</text>
  14. </view> -->
  15. <view class="price">
  16. <view class="">
  17. {{ item.title }}
  18. </view>
  19. <view class="">
  20. 票数 {{ item.num }}
  21. </view>
  22. </view>
  23. <!-- <view class="right">
  24. <view class="money30">
  25. 近30天收益
  26. </view>
  27. <view class="phone">
  28. 联系方式<text>付费查看</text>
  29. </view>
  30. </view> -->
  31. </view>
  32. <view class="createBy">
  33. <view class="">
  34. 发布人{{ item.userId }}
  35. </view>
  36. <view class="">
  37. 发布时间{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
  38. </view>
  39. </view>
  40. <view class="controls">
  41. <contentControls
  42. :type="0"
  43. isWork
  44. :up="isThumbs_up"
  45. @loadData="getData"
  46. :detail="item"/>
  47. </view>
  48. <view class="content">
  49. <uv-parse :content="item.context"></uv-parse>
  50. </view>
  51. <view class="works"
  52. v-if="isVedio">
  53. <view class="item"
  54. v-for="(t, index) in item.vod && item.vod.split(',')"
  55. :key="index">
  56. <view class="item-image">
  57. <video :src="t" object-fit="fill"/>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. import contentControls from '@/components/content/contentControls.vue'
  66. import { mapGetters } from 'vuex'
  67. export default {
  68. components : {
  69. contentControls
  70. },
  71. data() {
  72. return {
  73. item: {},
  74. total : 0,
  75. isThumbs_up: {},//是否点赞
  76. id : 0,
  77. }
  78. },
  79. computed : {
  80. ...mapGetters(['isVedio']),
  81. vedioList(){
  82. return this.isVedio ?
  83. this.item.vod && this.item.vod.split(',') :
  84. this.item.image && this.item.image.split(',')
  85. },
  86. },
  87. onLoad(options) {
  88. // this.$route.query的参数
  89. console.log(options)
  90. this.id = options.id
  91. },
  92. onPullDownRefresh(){
  93. this.getData()
  94. },
  95. onShow() {
  96. this.getData()
  97. },
  98. onShareAppMessage(res) {
  99. return {
  100. title: this.item.title,
  101. desc: this.item.content && this.item.content.slice(0, 30),
  102. path: '/pages_mine/publish/worksDetail?id=' + this.id
  103. }
  104. },
  105. //2.分享到朋友圈
  106. onShareTimeline(res) {
  107. return {
  108. title: this.item.title,
  109. desc: this.item.content && this.item.content.slice(0, 30),
  110. path: '/pages_mine/publish/worksDetail?id=' + this.id
  111. }
  112. },
  113. methods: {
  114. leftClick(){
  115. uni.navigateBack(-1)
  116. },
  117. getData(id){
  118. this.$api('indexGetGetWorkDetail', {
  119. id : this.id
  120. }, res => {
  121. uni.stopPullDownRefresh()
  122. if(res.code == 200){
  123. this.item = res.result.details
  124. this.isThumbs_up = res.result.isThumbs_up//是否点赞
  125. }
  126. })
  127. },
  128. }
  129. }
  130. </script>
  131. <style lang="scss" scoped>
  132. .postDetail {
  133. .box {
  134. padding: 20rpx;
  135. .topInfo{
  136. position: relative;
  137. .price{
  138. display: flex;
  139. justify-content: space-between;
  140. margin: 10rpx 0;
  141. }
  142. .right{
  143. position: absolute;
  144. right: 20rpx;
  145. top: 0rpx;
  146. line-height: 50rpx;
  147. text-align: right;
  148. .money30{
  149. font-size: 26rpx;
  150. color: #D43030;
  151. }
  152. .phone{
  153. text{
  154. color: #3A6BF1;
  155. margin-left: 10rpx;
  156. }
  157. }
  158. }
  159. }
  160. .title {
  161. font-size: 36rpx;
  162. font-weight: 600;
  163. display: flex;
  164. justify-content: center;
  165. align-items: center;
  166. font-style: italic;
  167. text{
  168. margin-left: 10rpx;
  169. }
  170. }
  171. .title1{
  172. color: #f00;
  173. }
  174. .title2{
  175. color: #FFA200;
  176. }
  177. .title3{
  178. color: #4739EA;
  179. }
  180. .createBy {
  181. display: flex;
  182. margin-top: auto;
  183. margin-bottom: 10rpx;
  184. font-size: 24rpx;
  185. margin-top: 20rpx;
  186. color: #555;
  187. &>view {
  188. display: flex;
  189. align-items: center;
  190. justify-content: center;
  191. padding-right: 20rpx;
  192. }
  193. }
  194. .controls {
  195. margin-top: 30rpx;
  196. }
  197. .content {
  198. margin-top: 30rpx;
  199. color: #777;
  200. }
  201. .works{
  202. display: flex;
  203. flex-wrap: wrap;
  204. margin-top: 20rpx;
  205. .item{
  206. width: 320rpx;
  207. margin: 15rpx;
  208. .item-title{
  209. padding-bottom: 10rpx;
  210. color: #000;
  211. }
  212. .item-image{
  213. background-color: #999;
  214. width: 100%;
  215. height: 250rpx;
  216. video{
  217. width: 100%;
  218. height: 100%;
  219. }
  220. }
  221. }
  222. }
  223. }
  224. }
  225. </style>