index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <div class="surrounding">
  3. <van-tabs :active="active" @change="onChange">
  4. <van-tab title="新增发布" :name="0">
  5. <newRelease_com></newRelease_com>
  6. </van-tab>
  7. <van-tab title="发布记录" :name="1">
  8. <releaseRecord_com/>
  9. </van-tab>
  10. </van-tabs>
  11. </div>
  12. </template>
  13. <script>
  14. import newRelease_com from "./components/newRelease_com.vue";
  15. import releaseRecord_com from "./components/releaseRecord_com.vue";
  16. export default {
  17. name: "index",
  18. components:{
  19. newRelease_com,
  20. releaseRecord_com
  21. },
  22. data(){
  23. return{
  24. active: 0,
  25. postData:{},
  26. checkList:[
  27. {name:'干洗',isCheck:true},
  28. {name:'维修',isCheck:false},
  29. {name:'家政服务',isCheck:false},
  30. {name:'桶装水',isCheck:false},
  31. {name:'其他',isCheck:false},
  32. ],
  33. checkedName:'干洗'
  34. }
  35. },
  36. methods:{
  37. onChange(e) {
  38. },
  39. clickCheck(item) {
  40. this.checkedName = item.name
  41. },
  42. deleteRYXXZP(event) {
  43. this.fileList.splice(event.detail.index, 1);
  44. this.$forceUpdate();
  45. },
  46. uploadRYXXZP(event) {
  47. console.log(event)
  48. let that = this;
  49. const { file } = event.detail;
  50. uni.uploadFile({
  51. url: that.$constant.BASE_URI + "/wx/fileController/upload",
  52. filePath: file.url,
  53. name: "file",
  54. formData: { user: "test" },
  55. success(res) {
  56. // 上传完成需要更新 fileList
  57. let data = JSON.parse(res.data);
  58. that.fileList.push({
  59. imgUrl: "/FileController/download/" + data.data[0],
  60. id: data.data[0],
  61. url:
  62. that.$constant.BASE_URI +
  63. "/FileController/download/" +
  64. data.data[0],
  65. isImage: true,
  66. });
  67. },
  68. fail(res) {},
  69. });
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss">
  75. .surrounding{
  76. .newRelease_com{
  77. .predetermineUl{
  78. margin: 24rpx 0;
  79. background: white;
  80. box-sizing: border-box;
  81. padding: 0 32rpx;
  82. .predetermineLi{
  83. padding: 32rpx 0;
  84. border-bottom: 1px solid rgba(230, 230, 230, 1);
  85. display: flex;
  86. justify-content: space-between;
  87. }
  88. .predetermineLi2{
  89. padding: 32rpx 0;
  90. border-bottom: 1px solid rgba(230, 230, 230, 1);
  91. display: flex;
  92. flex-direction: column;
  93. }
  94. .van-cell {
  95. background: #F5F7FA !important;
  96. border-radius: 8rpx;
  97. font-size: 28rpx;
  98. margin-top: 16rpx;
  99. }
  100. .liName{
  101. color: rgba(51, 51, 51, 1);
  102. font-size: 32rpx;
  103. }
  104. .liIpt{
  105. color: rgba(102, 102, 102, 1);
  106. font-size: 32rpx;
  107. text-align: right;
  108. }
  109. .detailLi{
  110. display: flex;
  111. justify-content: space-between;
  112. align-items: center;
  113. padding: 32rpx 0;
  114. border-bottom: 2rpx solid #E6E6E6;
  115. .liInfo{
  116. display: inline-block;
  117. text-align: right;
  118. max-width: 428rpx;
  119. color: rgba(102, 102, 102, 1);
  120. font-size: 32rpx;
  121. line-height: 38rpx;
  122. .radio{
  123. margin-left: 64rpx;
  124. }
  125. }
  126. }
  127. .detailLi2{
  128. display: flex;
  129. flex-direction: column;
  130. padding: 32rpx 0;
  131. border-bottom: 2rpx solid #E6E6E6;
  132. .detailLi2BoxTop{
  133. display: flex;
  134. flex-wrap: wrap;
  135. justify-content: space-between;
  136. margin: 12rpx 0;
  137. .checkItem{
  138. width: 128rpx;
  139. height: 64rpx;
  140. font-size: 28rpx;
  141. color: #666666;
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. background: #F5F7FA;
  146. border-radius: 8rpx;
  147. margin: 12rpx 0;
  148. }
  149. .checked{
  150. background: #0365F9;
  151. color: white;
  152. }
  153. }
  154. }
  155. }
  156. .titleBox{
  157. display: flex;
  158. align-items: center;
  159. .titleName{
  160. color: rgba(24, 23, 42, 1);
  161. font-size: 32rpx;
  162. font-weight: 600;
  163. margin-right: 16rpx;
  164. }
  165. .tips{
  166. font-size: 28rpx;
  167. color: rgba(179, 179, 179, 1);
  168. }
  169. }
  170. .buttonBox{
  171. display: flex;
  172. justify-content: center;
  173. .btn{
  174. width: 240rpx;
  175. height: 80rpx;
  176. display: flex;
  177. border-radius: 8rpx;
  178. align-items: center;
  179. justify-content: center;
  180. margin: 48rpx 16rpx 150rpx 16rpx;
  181. color: white;
  182. letter-spacing: 2rpx;
  183. text-indent: 2rpx;
  184. }
  185. .zcBtn{
  186. background: #FE8643;
  187. }
  188. .tjBtn{
  189. background: #0365F9;
  190. }
  191. }
  192. }
  193. }
  194. </style>