buyUsedCar.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <view class="body">
  3. <view class="content">
  4. <view style="width: 85vw; height: 12vw; border-bottom: 0.5px solid #f8f8f8;">
  5. <p style="display: flex;"><span style="color: red; line-height: 11vw;">*</span> <span
  6. style="font-size: 0.8rem; line-height: 10vw; margin-left: 1vw;">您的姓名</span> <input type="text"
  7. placeholder="请输入姓名"
  8. style="font-size: 0.8rem; height: 10vw; line-height: 10vw; margin-left: 10vw; " /> </p>
  9. </view>
  10. <view style="width: 85vw; height: 12vw; border-bottom: 0.5px solid #f8f8f8;">
  11. <view style="display: flex;"><span style="color: red; line-height: 11vw;">*</span> <span
  12. style="font-size: 0.8rem; line-height: 10vw; margin-left: 1vw;">您的性别</span>
  13. <view style="display: flex; align-items: center; margin-left: 4vw;">
  14. <u-radio-group v-model="selectRadio" @change="radioGroupChange">
  15. <u-radio
  16. @change="radioChange"
  17. active-color="red"
  18. v-for="(item, index) in list" :key="index"
  19. :name="item.name"
  20. :disabled="item.disabled"
  21. >
  22. {{item.name}}
  23. </u-radio>
  24. </u-radio-group>
  25. </view>
  26. </view>
  27. </view>
  28. <!-- 意向品牌 -->
  29. <view style="width: 85vw; height: 12vw; display: flex; border-bottom: 0.5px solid #f8f8f8;">
  30. <p style="display: flex;"><span style="color: red; line-height: 11vw;">*</span> <span
  31. style="font-size: 0.8rem; line-height: 10vw; margin-left: 1vw;">意向品牌</span> <input type="text"
  32. placeholder="请选择你的意向品牌"
  33. style="font-size: 0.8rem; width: 50vw; height: 10vw; line-height: 10vw; margin-left: 9vw; "
  34. @focus="searchList" @blur="LoseBlur" /> </p>
  35. <p style="display: flex; align-items: center;">
  36. <image style="width: 5vw; height: 5vw;" :src="jiantou"> </image>
  37. </p>
  38. <view style="position: absolute;" class="carModel" v-if="carList">
  39. <p class="carList"> 奥迪A6 </p>
  40. </view>
  41. </view>
  42. <!-- 车龄 -->
  43. <view style="width: 85vw; height: 12vw; display: flex; border-bottom: 0.5px solid #f8f8f8;">
  44. <p style="display: flex;"><span style="color: red; line-height: 11vw;">*</span> <span
  45. style="font-size: 0.8rem; line-height: 10vw; margin-left: 1vw;">车龄</span> <input type="text"
  46. placeholder="请选择你的车龄"
  47. style="font-size: 0.8rem; width: 50vw; height: 10vw; line-height: 10vw; margin-left: 16vw; "
  48. @focus="ageList" @blur="ageBlur" /> </p>
  49. <p style="display: flex; align-items: center;">
  50. <image style="width: 5vw; height: 5vw;" :src="agejiantou"> </image>
  51. </p>
  52. <view style="position: absolute;" class="ageModel" v-if="ageShow">
  53. <p class="carList" v-for="(item,index) in carage" :key="index" > {{item.age}} </p>
  54. </view>
  55. </view>
  56. <!-- 行驶里程 -->
  57. <view style="width: 85vw; height: 12vw; display: flex; border-bottom: 0.5px solid #f8f8f8;">
  58. <p style="display: flex;"><span style="color: red; line-height: 11vw;">*</span> <span
  59. style="font-size: 0.8rem; line-height: 10vw; margin-left: 1vw;">行驶里程</span> <input type="number"
  60. placeholder="请输入行驶里程"
  61. style="font-size: 0.8rem; width: 48vw; height: 10vw; line-height: 10vw; margin-left: 9vw; " />
  62. </p>
  63. <p style="display: flex; align-items: center; font-size: 0.85rem;">
  64. 公里
  65. </p>
  66. </view>
  67. <!-- 行驶里程 -->
  68. <view style="width: 85vw; height: 12vw; display: flex; border-bottom: 0.5px solid #f8f8f8;">
  69. <p style="display: flex;"><span style="color: red; line-height: 11vw;">*</span> <span
  70. style="font-size: 0.8rem; line-height: 10vw; margin-left: 1vw;">车辆所在地</span> <input type="number"
  71. placeholder="请输入车辆所在地"
  72. style="font-size: 0.8rem; width: 50vw; height: 10vw; line-height: 10vw; margin-left: 5vw; " />
  73. </p>
  74. </view>
  75. <!-- 备注说明 -->
  76. <view style="width: 85vw; height: 12vw; display: flex; border-bottom: 0.5px solid #f8f8f8;">
  77. <p style="display: flex;"><span style="color: red; line-height: 11vw;">*</span> <span
  78. style="font-size: 0.8rem; line-height: 10vw; margin-left: 1vw;">备注说明</span> <input type="number"
  79. placeholder="留言备注,我们将尽量安排"
  80. style="font-size: 0.8rem; width: 50vw; height: 10vw; line-height: 10vw; margin-left: 8vw; " />
  81. </p>
  82. </view>
  83. <view class="button" @click="submit">提交</view>
  84. </view>
  85. </view>
  86. </template>
  87. <script>
  88. export default {
  89. data() {
  90. return {
  91. selectRadio: '先生',
  92. carList: false,
  93. ageShow:false,
  94. carage:[
  95. {age:'1年内'},
  96. {age:'1-3年'},
  97. {age:'3-5年'},
  98. {age:'5-8年'},
  99. {age:'8-10年'},
  100. {age:'10年以上'}
  101. ],
  102. jiantou:'../../static/xiajiantou.png',
  103. agejiantou:'../../static/xiajiantou.png',
  104. list: [{
  105. name: '先生',
  106. disabled: false
  107. },
  108. {
  109. name: '女士',
  110. disabled: false
  111. },
  112. ]
  113. }
  114. },
  115. methods: {
  116. // submit(){
  117. // this.postUserdCar({},res=>{
  118. // if(res.code==0){
  119. // }
  120. // })
  121. // },
  122. radioGroupChange(e){
  123. console.log(e)
  124. },
  125. ageList(){
  126. this.ageShow=true
  127. this.agejiantou='../../static/shangjiantou.png'
  128. },
  129. ageBlur(){
  130. this.ageShow = false
  131. this.agejiantou='../../static/xiajiantou.png'
  132. },
  133. searchList() {
  134. this.carList = true
  135. this.jiantou='../../static/shangjiantou.png'
  136. },
  137. LoseBlur(){
  138. this.carList = false
  139. this.jiantou='../../static/xiajiantou.png'
  140. },
  141. // 选中某个单选框时,由radio时触发
  142. radioChange(e) {
  143. console.log(e);
  144. },
  145. }
  146. }
  147. </script>
  148. <style scoped lang="scss">
  149. .body {
  150. width: 100vw;
  151. height: 100vh;
  152. background-color: #f8f8f8;
  153. display: flex;
  154. // flex-direction: column;
  155. justify-content: center;
  156. .content {
  157. width: 90vw;
  158. height: 65vh;
  159. background-color: white;
  160. border-radius: 15px;
  161. box-sizing: border-box;
  162. padding: 2vw;
  163. .carModel {
  164. width: 87vw;
  165. height: 80vw;
  166. border-radius: 5vw;
  167. background-color: white;
  168. border: 0.5px solid #dbddbd;
  169. top: 33vw;
  170. left: 5vw;
  171. overflow: auto;
  172. z-index: 99;
  173. }
  174. .carList {
  175. width: 85vw;
  176. line-height: 10vw;
  177. font-size: 0.85rem;
  178. height: 10vw;
  179. border-bottom: 0.5px solid #f8f8f8;
  180. color: grey;
  181. box-sizing: border-box;
  182. padding: 0 4vw;
  183. }
  184. .ageModel{
  185. width: 87vw;
  186. height: 80vw;
  187. border-radius: 5vw;
  188. z-index: 99;
  189. background-color: white;
  190. border: 0.5px solid #dbddbd;
  191. top: 43vw;
  192. left: 5vw;
  193. text-align: center;
  194. overflow: auto;
  195. }
  196. }
  197. .button{
  198. width: 85vw;
  199. height: 10vw;
  200. margin-top: 10vw;
  201. background-color: red;
  202. line-height: 10vw;
  203. border-radius: 5vw;
  204. color: white;
  205. text-align: center;
  206. }
  207. }
  208. </style>