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

365 lines
7.7 KiB

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
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="actorRelease">
  3. <navbar leftClick @leftClick="$utils.navigateBack" title="演员发布" />
  4. <view class="images box">
  5. <view class="">
  6. 封面
  7. </view>
  8. <uv-upload
  9. :fileList="fileListImage"
  10. :maxCount="1"
  11. multiple
  12. width="150rpx"
  13. height="150rpx"
  14. @delete="deleteImage2"
  15. @afterRead="afterRead2"
  16. :previewFullImage="true"></uv-upload>
  17. </view>
  18. <view class="form">
  19. <view class="form-item">
  20. <view class="label">
  21. 标题
  22. </view>
  23. <input type="text" placeholder="请输入标题" v-model="form.title" />
  24. </view>
  25. <!-- <view class="form-item">
  26. <view class="label">
  27. 价格
  28. </view>
  29. <input type="number" placeholder="请输入价格" v-model="form.money" />
  30. </view> -->
  31. <!-- <view class="form-item">
  32. <view class="label">
  33. 地点
  34. </view>
  35. <input type="text" placeholder="请输入地点"/>
  36. </view>
  37. <view class="form-item">
  38. <view class="label">
  39. 时间
  40. </view>
  41. <input type="text" placeholder="请选择时间"/>
  42. </view> -->
  43. <!-- <view class="form-item">
  44. <view class="label">
  45. 联系方式
  46. </view>
  47. <input type="text" placeholder="请输入联系方式" v-model="form.phone" />
  48. </view> -->
  49. <view class="form-item-content">
  50. <view class="label">
  51. 详情介绍
  52. </view>
  53. <view class="textarea">
  54. <uv-textarea v-model="form.context" :maxlength="200" count placeholder="输入详情介绍"></uv-textarea>
  55. </view>
  56. </view>
  57. <!-- <view class="form-item-content">
  58. <view class="label">
  59. 发布人
  60. </view>
  61. <view class="textarea">
  62. <uv-radio-group v-model="form.isUser">
  63. <uv-radio size="35rpx"
  64. icon-size="35rpx"
  65. label="本人发布"
  66. labelSize="28rpx" name="1">
  67. </uv-radio>
  68. <uv-radio size="35rpx"
  69. icon-size="35rpx"
  70. label="经纪人发布"
  71. labelSize="28rpx" name="0">
  72. </uv-radio>
  73. </uv-radio-group>
  74. </view>
  75. </view> -->
  76. <!-- <view class="form-item-content">
  77. <view class="label">
  78. 联系方式是否付费查看建议付费避免无效联系
  79. </view>
  80. <view class="textarea">
  81. <uv-radio-group v-model="form.phonePay">
  82. <uv-radio size="35rpx" icon-size="35rpx" label="是" labelSize="28rpx" name="1">
  83. </uv-radio>
  84. <uv-radio size="35rpx" icon-size="35rpx" label="否" labelSize="28rpx" name="0">
  85. </uv-radio>
  86. </uv-radio-group>
  87. </view>
  88. </view> -->
  89. <view class="form-item-content">
  90. <view class="label">
  91. 作品
  92. </view>
  93. <view class="upload">
  94. <uv-upload :fileList="fileList" :maxCount="5" multiple accept="video" width="150rpx" height="150rpx"
  95. @delete="deleteImage" @afterRead="afterRead" :previewFullImage="true"></uv-upload>
  96. </view>
  97. </view>
  98. </view>
  99. <submit @submit="submit" @preview="preview" @draft="draft" />
  100. <!-- <confirmationPopup
  101. ref="confirmationPopup"
  102. title="提示"
  103. @confirm="pay"
  104. confirmText="确认支付">
  105. <view class="confirmationPopup">
  106. <image src="/static/image/publish/pay.png"
  107. style="width: 150rpx;height: 150rpx;"
  108. mode=""></image>
  109. <view class="info">
  110. 确认支付{{ topInfo.money }}可置顶{{ topInfo.day }}
  111. </view>
  112. </view>
  113. </confirmationPopup> -->
  114. <confirmationPopup ref="confirmationPopupUpload" title="提示" confirmText="确认" @confirm="confirm()">
  115. <view class="confirmationPopup">
  116. <image src="/static/image/publish/upload.png" style="width: 150rpx;height: 150rpx;" mode=""></image>
  117. <view class="info">
  118. 已由平台进行审核时间周期为24小时
  119. </view>
  120. </view>
  121. </confirmationPopup>
  122. </view>
  123. </template>
  124. <script>
  125. import submit from '@/components/content/submit.vue'
  126. import confirmationPopup from '@/components/toast/confirmationPopup.vue'
  127. import {
  128. mapState
  129. } from 'vuex'
  130. export default {
  131. components: {
  132. submit,
  133. confirmationPopup
  134. },
  135. data() {
  136. return {
  137. form: {
  138. title : '',
  139. context : '',//演员介绍
  140. },
  141. fileList: [//代表作
  142. // {
  143. // url: 'https://cdn.uviewui.com/uview/swiper/2.jpg'
  144. // },
  145. ],
  146. fileListImage: [],//封面
  147. upTopList: [],
  148. };
  149. },
  150. computed : {
  151. topInfo(){
  152. for (var i = 0; i < this.upTopList.length; i++) {
  153. if(this.upTopList[i].id == this.form.topId){
  154. return this.upTopList[i]
  155. }
  156. }
  157. return {}
  158. }
  159. },
  160. onShow() {
  161. // this.indexTopPayList()
  162. },
  163. methods: {
  164. // 获取置顶方式
  165. indexTopPayList() {
  166. this.$api('indexTopPayList', res => {
  167. if (res.code == 200) {
  168. this.upTopList = res.result
  169. }
  170. })
  171. },
  172. // 删除图片
  173. deleteImage(e) {
  174. this.fileList.splice(e.index, 1)
  175. },
  176. // 上传作品
  177. afterRead(e) {
  178. let self = this
  179. e.file.forEach(file => {
  180. self.$Oss.ossUpload(file.url).then(url => {
  181. self.fileList.push({
  182. url
  183. })
  184. })
  185. })
  186. },
  187. deleteImage2(e) {
  188. this.fileListImage.splice(e.index, 1)
  189. },
  190. afterRead2(e) {
  191. let self = this
  192. e.file.forEach(file => {
  193. self.$Oss.ossUpload(file.url).then(url => {
  194. self.fileListImage.push({
  195. url
  196. })
  197. })
  198. })
  199. },
  200. pay() {
  201. let data = {
  202. ...this.form,
  203. isCard: 1,
  204. vod : this.fileList.map((item) => item.url).join(","),
  205. image : this.fileListImage.map((item) => item.url).join(","),
  206. }
  207. this.$api('releaseWorks', data,
  208. res => {
  209. if (res.code == 200) {
  210. this.$refs.confirmationPopupUpload.open()
  211. }
  212. })
  213. },
  214. submit() {
  215. if(this.fileListImage.length == 0){
  216. return uni.showToast({
  217. title: '请上传封面',
  218. icon : 'none'
  219. })
  220. }
  221. if(this.fileList.length == 0){
  222. return uni.showToast({
  223. title: '请上传作品',
  224. icon : 'none'
  225. })
  226. }
  227. if (this.$utils.verificationAll(this.form, {
  228. title: '请输入标题',
  229. context: '请输入介绍',
  230. })) {
  231. return
  232. }
  233. if(this.form.topId){
  234. // 选择付费模式
  235. this.$refs.confirmationPopup.open()
  236. }else{
  237. // 没有选择付费
  238. this.pay()
  239. }
  240. },
  241. confirm() {
  242. // this.$refs.confirmationPopupUpload.close()
  243. // uni.navigateTo({
  244. // url: "/pages_mine/publish/competition"
  245. // })
  246. uni.navigateBack(-1)
  247. },
  248. }
  249. }
  250. </script>
  251. <style lang="scss" scoped>
  252. .actorRelease {
  253. background-color: #fff;
  254. min-height: 100vh;
  255. font-size: 28rpx;
  256. padding-bottom: 150rpx;
  257. /deep/ .uv-radio {
  258. margin-right: 25rpx;
  259. margin-top: 10rpx;
  260. }
  261. .box {
  262. padding: 0 20rpx;
  263. }
  264. .avatarFace {
  265. width: 150rpx;
  266. height: 150rpx;
  267. // border: 1px solid #000000;
  268. margin-left: 10rpx;
  269. }
  270. .upTop{
  271. margin-top: 40rpx;
  272. .title{
  273. padding-top: 20rpx;
  274. padding-left: 30rpx;
  275. border-top: 1px solid #00000015;
  276. display: flex;
  277. align-items: center;
  278. }
  279. .list{
  280. padding-top: 30rpx;
  281. width: 100%;
  282. .item{
  283. display: flex;
  284. padding: 20rpx;
  285. padding-left: 80rpx;
  286. justify-content: space-between;
  287. width: 600rpx;
  288. border-bottom: 1px solid #00000015;
  289. align-items: center;
  290. }
  291. }
  292. }
  293. .form {
  294. .label {
  295. padding: 20rpx;
  296. }
  297. .form-item {
  298. display: flex;
  299. align-items: center;
  300. justify-content: space-between;
  301. padding: 20rpx 0;
  302. padding-right: 30rpx;
  303. input {
  304. text-align: right;
  305. flex: 1;
  306. }
  307. }
  308. .form-item-content {
  309. padding-right: 30rpx;
  310. padding-top: 30rpx;
  311. .textarea {
  312. padding-left: 20rpx;
  313. }
  314. .upload {
  315. padding-left: 20rpx;
  316. }
  317. }
  318. }
  319. .confirmationPopup {
  320. display: flex;
  321. flex-direction: column;
  322. align-items: center;
  323. justify-content: center;
  324. width: 100%;
  325. height: 300rpx;
  326. image {
  327. margin-top: 40rpx;
  328. }
  329. .info {
  330. margin-top: 40rpx;
  331. font-size: 26rpx;
  332. }
  333. }
  334. }
  335. </style>