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

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