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

180 lines
3.2 KiB

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
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="添加标题"/>
  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.info }}
  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. <submit
  54. @submit="submit"
  55. @preview="preview"
  56. @draft="draft"
  57. submitTitle="发布帖子"
  58. />
  59. </view>
  60. </template>
  61. <script>
  62. import submit from '@/components/content/submit.vue'
  63. import uvUpload from '@/uni_modules/uv-upload/components/uv-upload/uv-upload.vue'
  64. export default {
  65. components : {
  66. submit,
  67. uvUpload,
  68. },
  69. data() {
  70. return {
  71. upTopList : [
  72. {
  73. info : '置顶1天3元',
  74. id : 1,
  75. },
  76. {
  77. info : '置顶2天3元',
  78. id : 4,
  79. },
  80. {
  81. info : '置顶3天3元',
  82. id : 3,
  83. },
  84. {
  85. info : '置顶4天3元',
  86. id : 2,
  87. },
  88. ],
  89. form : {
  90. image : [],
  91. content : '',
  92. upTop : '',
  93. },
  94. fileList: [
  95. {
  96. url: 'https://cdn.uviewui.com/uview/swiper/2.jpg'
  97. },
  98. ],
  99. };
  100. },
  101. methods : {
  102. deleteImage(e){
  103. this.fileList.splice(e.index, 1)
  104. },
  105. afterRead(e){
  106. let self = this
  107. e.file.forEach(file => {
  108. self.$Oss.ossUpload(file.url).then(url => {
  109. self.fileList.push({
  110. url
  111. })
  112. })
  113. })
  114. },
  115. submit(){},
  116. preview(){},
  117. draft(){},
  118. }
  119. }
  120. </script>
  121. <style lang="scss" scoped>
  122. .publishPost{
  123. background-color: #fff;
  124. min-height: 100vh;
  125. font-size: 28rpx;
  126. padding-bottom: 150rpx;
  127. /deep/ .uv-textarea{
  128. background-color: transparent;
  129. border: none;
  130. }
  131. /deep/ .uv-textarea__count{
  132. background-color: transparent !important;
  133. }
  134. .box{
  135. padding: 0 20rpx;
  136. }
  137. .images{
  138. display: flex;
  139. flex-wrap: wrap;
  140. padding: 20rpx;
  141. }
  142. .title-input{
  143. border-bottom: 1px solid #00000015;
  144. padding-bottom: 25rpx;
  145. margin-bottom: 15rpx;
  146. }
  147. .content-input{
  148. min-height: 400rpx;
  149. }
  150. .upTop{
  151. .title{
  152. padding-top: 20rpx;
  153. padding-left: 30rpx;
  154. border-top: 1px solid #00000015;
  155. display: flex;
  156. align-items: center;
  157. }
  158. .list{
  159. padding-top: 30rpx;
  160. width: 100%;
  161. .item{
  162. display: flex;
  163. padding: 20rpx;
  164. padding-left: 80rpx;
  165. justify-content: space-between;
  166. width: 600rpx;
  167. border-bottom: 1px solid #00000015;
  168. align-items: center;
  169. }
  170. }
  171. }
  172. }
  173. </style>