帧视界壹通告,付费看视频的微信小程序
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.

252 lines
4.8 KiB

11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
  1. <template>
  2. <view class="postDetail">
  3. <navbar leftClick @leftClick="leftClick" />
  4. <view class="swipe">
  5. <uv-swiper
  6. :list="item.details.image &&
  7. item.details.image.split(',')"
  8. indicator
  9. height="420rpx"></uv-swiper>
  10. </view>
  11. <view class="box">
  12. <view class="topInfo">
  13. <view class="title">
  14. {{ item.details.name }}
  15. </view>
  16. <view class="price">
  17. {{ item.details.money }}
  18. </view>
  19. <view class="right">
  20. <view class="money30">
  21. 近30天收益{{ item.dayMoney }}
  22. </view>
  23. <view class="phone">
  24. <view class=""
  25. @click="getContact"
  26. v-if="item.details.phonePay != 'Y' || item.isPayPhone">
  27. 联系方式{{ item.details.phone }}
  28. </view>
  29. <view class=""
  30. v-else>
  31. 联系方式<text @click="getContact">付费查看</text>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="createBy">
  37. <view class="">
  38. 发布人{{ item.details.userId }}
  39. </view>
  40. <view class="">
  41. 发布时间{{ $dayjs(item.details.createTime).format('YYYY-MM-DD') }}
  42. </view>
  43. </view>
  44. <view class="controls">
  45. <contentControls
  46. :type="1"
  47. :up="item.isThumbs_up"
  48. :down="item.isThumbs_down"
  49. @loadData="getData"
  50. :detail="item.details"/>
  51. </view>
  52. <view class="content">
  53. <uv-parse :content="item.details.photographerContent"></uv-parse>
  54. </view>
  55. <view class="works">
  56. <view class="item"
  57. v-for="(t, index) in item.details.isImage && item.details.isImage.split(',')"
  58. :key="index">
  59. <view class="item-image">
  60. <video :src="t" object-fit="fill"/>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import contentControls from '@/components/content/contentControls.vue'
  69. export default {
  70. components : {
  71. contentControls
  72. },
  73. data() {
  74. return {
  75. item: {
  76. details : {}
  77. },
  78. list : [],
  79. queryParams: {
  80. pageNo: 1,
  81. pageSize: 10
  82. },
  83. total : 0,
  84. id : 0,
  85. }
  86. },
  87. onLoad(options) {
  88. // this.$route.query的参数
  89. console.log(options)
  90. this.id = options.id
  91. },
  92. onShareAppMessage(res) {
  93. return {
  94. title: this.item.details.title,
  95. desc: this.item.details.content && this.item.details.content.slice(0, 30),
  96. path: '/pages/publish/postDetail?id=' + this.id
  97. }
  98. },
  99. onShow() {
  100. this.getData()
  101. },
  102. //滚动到屏幕底部
  103. onReachBottom() {
  104. },
  105. onPullDownRefresh(){
  106. this.getData()
  107. },
  108. methods: {
  109. leftClick(){
  110. uni.navigateBack(-1)
  111. },
  112. getData(){
  113. this.$api('indexGetActorDetail', {
  114. id : this.id
  115. }, res => {
  116. uni.stopPullDownRefresh()
  117. if(res.code == 200){
  118. this.item = res.result
  119. }
  120. })
  121. },
  122. // 付费查看联系方式
  123. getContact(){
  124. let self = this
  125. this.$api('getContact', {
  126. id : this.item.details.id
  127. } , res => {
  128. if(res.code == 200){
  129. uni.requestPayment({
  130. provider: 'wxpay', // 服务提提供商
  131. timeStamp: res.result.timeStamp, // 时间戳
  132. nonceStr: res.result.nonceStr, // 随机字符串
  133. package: res.result.packageValue,
  134. signType: res.result.signType, // 签名算法
  135. paySign: res.result.paySign, // 签名
  136. success: function (res) {
  137. console.log('支付成功',res);
  138. self.getData()
  139. },
  140. fail: function (err) {
  141. console.log('支付失败',err);
  142. uni.showToast({
  143. icon:'none',
  144. title:"支付失败"
  145. })
  146. }
  147. });
  148. }
  149. })
  150. },
  151. }
  152. }
  153. </script>
  154. <style lang="scss" scoped>
  155. .postDetail {
  156. .box {
  157. padding: 20rpx;
  158. .topInfo{
  159. position: relative;
  160. .price{
  161. font-size: 34rpx;
  162. font-weight: 900;
  163. margin: 10rpx 0;
  164. }
  165. .right{
  166. position: absolute;
  167. right: 20rpx;
  168. top: 0rpx;
  169. line-height: 50rpx;
  170. text-align: right;
  171. .money30{
  172. font-size: 26rpx;
  173. color: #D43030;
  174. }
  175. .phone{
  176. text{
  177. color: #3A6BF1;
  178. margin-left: 10rpx;
  179. }
  180. }
  181. }
  182. }
  183. .title {
  184. font-size: 30rpx;
  185. font-weight: 600;
  186. color: #000;
  187. }
  188. .createBy {
  189. display: flex;
  190. margin-top: auto;
  191. margin-bottom: 10rpx;
  192. font-size: 24rpx;
  193. margin-top: 20rpx;
  194. color: #555;
  195. &>view {
  196. display: flex;
  197. align-items: center;
  198. justify-content: center;
  199. padding-right: 20rpx;
  200. }
  201. }
  202. .controls {
  203. margin-top: 30rpx;
  204. }
  205. .content {
  206. margin-top: 30rpx;
  207. color: #777;
  208. }
  209. .works{
  210. display: flex;
  211. flex-wrap: wrap;
  212. margin-top: 20rpx;
  213. .item{
  214. width: 320rpx;
  215. margin: 15rpx;
  216. .item-title{
  217. padding-bottom: 10rpx;
  218. color: #000;
  219. }
  220. .item-image{
  221. background-color: #999;
  222. width: 100%;
  223. height: 250rpx;
  224. video{
  225. width: 100%;
  226. height: 100%;
  227. }
  228. }
  229. }
  230. }
  231. }
  232. }
  233. </style>