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

324 lines
6.5 KiB

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