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

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