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

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