putSupply.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view class="content">
  3. <view class="supplyInfo">
  4. <view class="flex">
  5. <label>发布标题:</label>
  6. <input type="text" v-model="supplyInfo.title" class="input card" />
  7. </view>
  8. <view class="flex">
  9. <label>选择类型:</label>
  10. <view class="picker">
  11. <picker
  12. @change="bindPickerChange"
  13. :value="index"
  14. :range="array"
  15. range-key="name" class="pick"
  16. >
  17. <view class="picker_title">
  18. <view class="pickername">
  19. <view>
  20. {{ array[index].name }}
  21. </view>
  22. </view>
  23. <view class="triangle-down"></view>
  24. </view>
  25. </picker>
  26. </view>
  27. </view>
  28. <view class="flex">
  29. <label>详情:</label>
  30. <textarea v-model="supplyInfo.msg" class="area card"></textarea>
  31. </view>
  32. <view class="update_photo">
  33. <view class="title"></view>
  34. <view>上传图片:</view>
  35. <view class="update_container card">
  36. <view class="update_button">
  37. <view>
  38. <image src="/static/appeal/photo.png" />
  39. </view>
  40. <view class="txt">上传</view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="info">
  46. <view class="title">企业信息</view>
  47. <view class="name flex">
  48. <label>企业名称:</label>
  49. <input type="text" class="card input" v-model="company.name" />
  50. </view>
  51. <view class="tel flex">
  52. <label>统一社会信用代码:</label>
  53. <input type="text" class="card input" v-model="company.code" />
  54. </view>
  55. <view class="tel flex">
  56. <label>联系电话:</label>
  57. <input type="text" class="card input" v-model="company.tel" />
  58. </view>
  59. </view>
  60. <button class="submit" @tap="submit">提交</button>
  61. </view>
  62. </template>
  63. <script>
  64. export default {
  65. data() {
  66. return {
  67. array: [{ name: "供需" }, { name: "需求" }],
  68. index: 0,
  69. supplyInfo: {
  70. title: "",
  71. msg:"",
  72. },
  73. company:{
  74. name:"",
  75. code:"",
  76. tel:""
  77. }
  78. };
  79. },
  80. methods: {
  81. submit() {
  82. console.log(this.supplyInfo);
  83. console.log(this.company);
  84. },
  85. bindPickerChange(e) {
  86. this.index = e.detail.value;
  87. },
  88. },
  89. };
  90. </script>
  91. <style lang="scss" scoped>
  92. .content {
  93. font-size: 25rpx;
  94. font-weight: 200;
  95. padding:1% 2%;
  96. .title {
  97. font-size: 30rpx;
  98. margin: 4% 0;
  99. }
  100. label {
  101. display: inline-block;
  102. width: 20%;
  103. vertical-align: middle;
  104. }
  105. .card {
  106. background-color: rgb(248, 247, 247);
  107. border-radius: 10rpx;
  108. }
  109. .flex {
  110. display: flex;
  111. align-items: center;
  112. margin-bottom: 2%;
  113. }
  114. .input {
  115. padding: 0 2%;
  116. margin: 2% 0;
  117. display: inline-block;
  118. width: 80%;
  119. height: 70rpx;
  120. }
  121. .supplyInfo {
  122. border-radius: 40rpx;
  123. padding: 4%;
  124. box-shadow: rgba(100, 100, 111, 0.2) 14rpx 14rpx 40rpx 14rpx;
  125. .area{
  126. height: 200rpx;
  127. }
  128. .picker {
  129. width: 80%;
  130. height: 70rpx;
  131. background: rgb(248, 247, 247);
  132. display: flex;
  133. align-items: center;
  134. position: relative;
  135. .pick{
  136. width: 100%;
  137. }
  138. .picker_title {
  139. display: flex;
  140. width:100%;
  141. margin-left: 30rpx;
  142. align-items: center;
  143. justify-content: space-between;
  144. .triangle-down {
  145. width: 0;
  146. height: 0;
  147. border-top: 15rpx solid rgb(173, 173, 173);
  148. border-left: 15rpx solid transparent;
  149. border-right: 15rpx solid transparent;
  150. position: absolute;
  151. right: 0;
  152. }
  153. .pickername {
  154. font-weight: 100;
  155. }
  156. }
  157. }
  158. image {
  159. width: 100rpx;
  160. height: 100rpx;
  161. }
  162. .update_button {
  163. text-align: center;
  164. }
  165. }
  166. .info{
  167. margin-top: 2%;
  168. border-radius: 40rpx;
  169. padding: 2% 4%;
  170. box-shadow: rgba(100, 100, 111, 0.2) 14rpx 14rpx 40rpx 14rpx;
  171. }
  172. .submit {
  173. color: white;
  174. font-weight: normal;
  175. width: 75%;
  176. border-radius: 20rpx;
  177. background-color: #02a7f0;
  178. margin: 2% auto;
  179. }
  180. }
  181. </style>