uForm.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="form">
  3. <view class="title">合作与咨询</view>
  4. <view class="tip">立即预约,我们将为您量身定制解决方案</view>
  5. <view class="items">
  6. <view class="item">
  7. <input type="text" placeholder="*您的称呼" v-model="info.name">
  8. </view>
  9. <view class="item">
  10. <input type="tel" placeholder="*您的电话" v-model="info.phone">
  11. </view>
  12. <view class="item">
  13. <input type="tel" placeholder="您遇到的问题" v-model="info.question">
  14. </view>
  15. </view>
  16. <view class="submit" @click="submit">立即提交</view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data(){
  22. return {
  23. info:{
  24. name:'',
  25. phone:'',
  26. question:''
  27. }
  28. }
  29. },
  30. methods:{
  31. submit(){
  32. if(!this.info.name) return this.$showToast('请输入您的称呼');
  33. if(!this.$reg.mobile(this.info.phone)) return this.$showToast('请输入正确的联系电话');
  34. this.$emit('submitSuccess');
  35. }
  36. }
  37. }
  38. </script>
  39. <style scoped lang="less">
  40. .form{
  41. width: 100%;
  42. height: 812rpx;
  43. padding: 72rpx 30rpx 0;
  44. box-sizing: border-box;
  45. background: url(../../static/imgs/hzzx_bg.png) no-repeat;
  46. background-size: 100% 100%;
  47. margin-top: 64rpx;
  48. .title{
  49. font-family: PingFang-SC, PingFang-SC;
  50. font-weight: bold;
  51. font-size: 48rpx;
  52. color: #FFFFFF;
  53. line-height: 44rpx;
  54. }
  55. .tip{
  56. font-family: PingFangSC, PingFang SC;
  57. font-weight: 400;
  58. font-size: 28rpx;
  59. color: #FFFFFF;
  60. line-height: 44rpx;
  61. margin-top: 20rpx;
  62. }
  63. .items{
  64. margin-top: 12rpx;
  65. .item{
  66. width: 100%;
  67. height: 88rpx;
  68. background: #FFFFFF;
  69. border-radius: 12rpx;
  70. padding: 22rpx 24rpx;
  71. box-sizing: border-box;
  72. margin-top: 28rpx;
  73. input{
  74. width: 100%;
  75. height: 100%;
  76. border: none;
  77. outline: none;
  78. font-family: PingFangSC, PingFang SC;
  79. font-weight: 400;
  80. font-size: 28rpx;
  81. color: #111111;
  82. line-height: 44rpx;
  83. &::placeholder{
  84. color: #999999;
  85. }
  86. }
  87. }
  88. }
  89. .submit{
  90. width: 240rpx;
  91. height: 88rpx;
  92. background: #FFB362;
  93. border-radius: 12rpx;
  94. margin-top: 48rpx;
  95. font-family: PingFang-SC, PingFang-SC;
  96. font-weight: bold;
  97. font-size: 30rpx;
  98. color: #041158;
  99. line-height: 88rpx;
  100. text-align: center;
  101. letter-spacing: 2rpx;
  102. }
  103. }
  104. </style>