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

281 lines
5.2 KiB

11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 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
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <view class="publishPost">
  3. <navbar
  4. leftClick
  5. @leftClick="$utils.navigateBack"
  6. title="发布帖子"/>
  7. <view class="images box">
  8. <uv-upload
  9. :fileList="fileList"
  10. :maxCount="5"
  11. multiple
  12. width="150rpx"
  13. height="150rpx"
  14. @delete="deleteImage"
  15. @afterRead="afterRead"
  16. :previewFullImage="true"></uv-upload>
  17. </view>
  18. <view class="title-input box">
  19. <input type="text" placeholder="添加标题" v-model="form.title"/>
  20. </view>
  21. <view class="content-input">
  22. <uv-textarea
  23. v-model="form.content"
  24. :maxlength="200"
  25. autoHeight
  26. count
  27. placeholder="添加正文"></uv-textarea>
  28. </view>
  29. <view class="upTop">
  30. <view class="title">
  31. <uv-icon name="pushpin-fill"></uv-icon>
  32. 是否置顶
  33. </view>
  34. <uv-radio-group v-model="form.upTop">
  35. <view class="list">
  36. <view class="item"
  37. v-for="(item, index) in upTopList"
  38. :key="index">
  39. <view class="left">
  40. 置顶{{ item.day }}{{ item.money }}
  41. </view>
  42. <view class="right">
  43. <uv-radio
  44. size="35rpx"
  45. icon-size="35rpx"
  46. :name="item.id">
  47. </uv-radio>
  48. </view>
  49. </view>
  50. </view>
  51. </uv-radio-group>
  52. </view>
  53. <view class="configBtn"
  54. @click="$refs.configPopup.open()">
  55. 发布须知
  56. </view>
  57. <submit
  58. @submit="submit"
  59. @preview="preview"
  60. @draft="draft"
  61. submitTitle="发布帖子"
  62. />
  63. <confirmationPopup
  64. ref="confirmationPopup"
  65. title="提示"
  66. @confirm="pay"
  67. confirmText="确认支付">
  68. <view class="confirmationPopup">
  69. <image src="/static/image/publish/pay.png"
  70. style="width: 150rpx;height: 150rpx;"
  71. mode=""></image>
  72. <view class="info">
  73. 确认支付3元可置顶1天
  74. </view>
  75. </view>
  76. </confirmationPopup>
  77. <confirmationPopup
  78. ref="confirmationPopupUpload"
  79. title="提示"
  80. @confirm="$utils.navigateTo('/index/index')"
  81. confirmText="确认">
  82. <view class="confirmationPopup">
  83. <image src="/static/image/publish/upload.png"
  84. style="width: 150rpx;height: 150rpx;"
  85. mode=""></image>
  86. <view class="info">
  87. 已由平台进行审核时间周期为24小时
  88. </view>
  89. </view>
  90. </confirmationPopup>
  91. <configPopup
  92. ref="configPopup"
  93. />
  94. </view>
  95. </template>
  96. <script>
  97. import submit from '@/components/content/submit.vue'
  98. import confirmationPopup from '@/components/toast/confirmationPopup.vue'
  99. export default {
  100. components : {
  101. submit,
  102. confirmationPopup
  103. },
  104. data() {
  105. return {
  106. upTopList : [],
  107. form : {
  108. // image : [],
  109. content : '',
  110. // upTop : '',
  111. title : '',
  112. },
  113. fileList: [
  114. // {
  115. // url: 'https://cdn.uviewui.com/uview/swiper/2.jpg'
  116. // },
  117. ],
  118. };
  119. },
  120. onShow() {
  121. this.indexTopPayList()
  122. },
  123. methods : {
  124. deleteImage(e){
  125. this.fileList.splice(e.index, 1)
  126. },
  127. afterRead(e){
  128. let self = this
  129. e.file.forEach(file => {
  130. self.$Oss.ossUpload(file.url).then(url => {
  131. self.fileList.push({
  132. url
  133. })
  134. })
  135. })
  136. },
  137. indexTopPayList(){
  138. this.$api('indexTopPayList', res => {
  139. if(res.code == 200){
  140. this.upTopList = res.result
  141. }
  142. })
  143. },
  144. pay(){
  145. let arr = []
  146. this.fileList.forEach(n => {
  147. arr.push(n.url)
  148. })
  149. let data = {
  150. ...this.form,
  151. isCard : 1,
  152. image : arr.join(',')
  153. }
  154. this.$api('infoReleaseTrends', data,
  155. res => {
  156. if(res.code == 200){
  157. this.$refs.confirmationPopupUpload.open()
  158. }
  159. })
  160. },
  161. submit(){
  162. console.log(this.form);
  163. if(this.fileList.length == 0){
  164. return uni.showToast({
  165. title: '请上传图片',
  166. icon : 'none'
  167. })
  168. }
  169. if (this.$utils.verificationAll(this.form, {
  170. title: '请输入标题',
  171. content: '请输入正文',
  172. })) {
  173. return
  174. }
  175. if(this.form.upTop){
  176. }else{
  177. this.$refs.confirmationPopup.open()
  178. }
  179. },
  180. preview(){},
  181. draft(){},
  182. }
  183. }
  184. </script>
  185. <style lang="scss" scoped>
  186. .publishPost{
  187. background-color: #fff;
  188. min-height: 100vh;
  189. font-size: 28rpx;
  190. padding-bottom: 150rpx;
  191. /deep/ .uv-textarea{
  192. background-color: transparent;
  193. border: none;
  194. }
  195. /deep/ .uv-textarea__count{
  196. background-color: transparent !important;
  197. }
  198. .box{
  199. padding: 0 20rpx;
  200. }
  201. .images{
  202. display: flex;
  203. flex-wrap: wrap;
  204. padding: 20rpx;
  205. }
  206. .title-input{
  207. border-bottom: 1px solid #00000015;
  208. padding-bottom: 25rpx;
  209. margin-bottom: 15rpx;
  210. }
  211. .content-input{
  212. min-height: 400rpx;
  213. }
  214. .upTop{
  215. .title{
  216. padding-top: 20rpx;
  217. padding-left: 30rpx;
  218. border-top: 1px solid #00000015;
  219. display: flex;
  220. align-items: center;
  221. }
  222. .list{
  223. padding-top: 30rpx;
  224. width: 100%;
  225. .item{
  226. display: flex;
  227. padding: 20rpx;
  228. padding-left: 80rpx;
  229. justify-content: space-between;
  230. width: 600rpx;
  231. border-bottom: 1px solid #00000015;
  232. align-items: center;
  233. }
  234. }
  235. }
  236. .configBtn{
  237. padding: 20rpx;
  238. color: #777;
  239. padding-top: 40rpx;
  240. font-size: 28rpx;
  241. }
  242. .confirmationPopup{
  243. display: flex;
  244. flex-direction: column;
  245. align-items: center;
  246. justify-content: center;
  247. width: 100%;
  248. height: 300rpx;
  249. image{
  250. margin-top: 40rpx;
  251. }
  252. .info{
  253. margin-top: 40rpx;
  254. font-size: 26rpx;
  255. }
  256. }
  257. }
  258. </style>