postMessage.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view>
  3. <u-navbar back-text="发布信息" back-icon-size="28" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <!-- 发布标题 -->
  6. <view class="post-title">
  7. <view class="title">
  8. 发布标题
  9. </view>
  10. <view class="title-content">
  11. <input class="input" type="text" value="" placeholder="请填写标题内容"/>
  12. </view>
  13. <!-- 类型选择 -->
  14. <view class="type">
  15. <view class="name">
  16. <text>*</text>共享类型
  17. </view>
  18. <!-- 单选框 -->
  19. <u-radio-group v-model="value" @change="radioGroupChange">
  20. <u-radio
  21. @change="radioChange"
  22. v-for="(item, index) in list" :key="index"
  23. :name="item.name"
  24. :disabled="item.disabled"
  25. >
  26. {{item.name}}
  27. </u-radio>
  28. </u-radio-group>
  29. </view>
  30. </view>
  31. <!-- 内容描述 -->
  32. <view class="content-description">
  33. <view class="title">
  34. 内容描述
  35. </view>
  36. <view class="content-textarea">
  37. <textarea class="textarea" value="" placeholder="请描述共享用工需求内容,并留下您的联系方式。" />
  38. </view>
  39. </view>
  40. <!-- 底部按钮 -->
  41. <button class="btn">发布信息</button>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. list: [
  49. {
  50. name: '急需用工',
  51. disabled: false
  52. },
  53. {
  54. name: '资源共享',
  55. disabled: false
  56. },
  57. ],
  58. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  59. value: '急需用工',
  60. };
  61. },
  62. methods: {
  63. // 选中某个单选框时,由radio时触发
  64. radioChange(e) {
  65. // console.log(e);
  66. },
  67. // 选中任一radio时,由radio-group触发
  68. radioGroupChange(e) {
  69. // console.log(e);
  70. }
  71. }
  72. };
  73. </script>
  74. <style>
  75. page {
  76. background: #F0F0F2;
  77. padding-bottom: 50px;
  78. }
  79. </style>
  80. <style scoped lang="scss">
  81. // 发布标题
  82. .post-title{
  83. margin: 24rpx 32rpx 0;
  84. padding: 24rpx 32rpx;
  85. color: rgba(16, 16, 16, 1);
  86. font-size: 36rpx;
  87. background-color: #fff;
  88. border-radius: 24rpx;
  89. .title{
  90. font-family: 'PingFangSC-medium';
  91. }
  92. .title-content{
  93. .input{
  94. width: 100%;
  95. height: 96rpx;
  96. line-height: 96rpx;
  97. color: rgba(136, 136, 136, 1);
  98. font-family: Microsoft Yahei;
  99. }
  100. }
  101. // 类型选择
  102. .type{
  103. display: flex;
  104. align-items: center;
  105. margin-top: 16rpx;
  106. .name{
  107. font-size: 32rpx;
  108. color: #101010;
  109. margin-right: 40rpx;
  110. text{
  111. color:#EE3138
  112. }
  113. }
  114. }
  115. }
  116. // 内容描述
  117. .content-description{
  118. margin: 24rpx 32rpx 0;
  119. padding: 24rpx 32rpx;
  120. color: rgba(16, 16, 16, 1);
  121. font-size: 36rpx;
  122. background-color: #fff;
  123. border-radius: 24rpx;
  124. .title{
  125. font-family: 'PingFangSC-medium';
  126. }
  127. .content-textarea{
  128. margin-top: 24rpx;
  129. .textarea{
  130. width: 100%;
  131. height: 640rpx;
  132. color: rgba(136, 136, 136, 1);
  133. font-family: Microsoft Yahei;
  134. line-height: 40rpx;
  135. }
  136. }
  137. }
  138. // 底部按钮
  139. .btn{
  140. position: fixed;
  141. bottom: 32rpx;
  142. left: 0;
  143. right: 0;
  144. background-color:#F0F0F2;
  145. padding: 0 32rpx;
  146. border-radius: 50px;
  147. background-color: rgba(34, 149, 255, 1);
  148. color: rgba(241, 241, 241, 1);
  149. font-size: 36rpx;
  150. margin: 0 32rpx;
  151. box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.03);
  152. }
  153. </style>