ContactView.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <script setup>
  2. import { reactive, ref } from "vue";
  3. import PageHero from "../components/PageHero.vue";
  4. const submitted = ref(false);
  5. const form = reactive({
  6. company: "",
  7. name: "",
  8. phone: "",
  9. email: "",
  10. need: "",
  11. });
  12. function submit() {
  13. submitted.value = true;
  14. }
  15. </script>
  16. <template>
  17. <div>
  18. <PageHero
  19. kicker=""
  20. title="获取演示与试点建议"
  21. subtitle="填写需求信息,我们会在 1 个工作日内与你联系。"
  22. />
  23. <section class="section">
  24. <div class="container grid contactGrid">
  25. <div class="card card-pad">
  26. <div class="blockTitle">联系方式</div>
  27. <div class="muted">热线:400-000-0000</div>
  28. <div class="muted">邮箱:wubj@keruigroup.com</div>
  29. <div class="muted">地址:山东省东营市东营区南二路233号</div>
  30. <div class="divider blockDivider"></div>
  31. <div class="blockTitle">咨询方向</div>
  32. <div class="tags">
  33. <span class="pill">设备接入</span>
  34. <span class="pill">数据治理</span>
  35. <span class="pill">低代码应用</span>
  36. <span class="pill">AI 质检</span>
  37. <span class="pill">能效优化</span>
  38. </div>
  39. </div>
  40. <div class="card card-pad">
  41. <div class="blockTitle">需求表单</div>
  42. <div v-if="submitted" class="success">
  43. <div class="successTitle">已收到你的需求</div>
  44. <div class="muted">
  45. 你可以继续修改信息再次提交,或直接通过电话/邮箱联系我们。
  46. </div>
  47. </div>
  48. <form class="form" @submit.prevent="submit">
  49. <label class="field">
  50. <span class="label">公司名称</span>
  51. <input
  52. v-model="form.company"
  53. class="input"
  54. type="text"
  55. placeholder="例如:某某制造有限公司"
  56. />
  57. </label>
  58. <label class="field">
  59. <span class="label">联系人</span>
  60. <input
  61. v-model="form.name"
  62. class="input"
  63. type="text"
  64. placeholder="你的姓名"
  65. />
  66. </label>
  67. <label class="field">
  68. <span class="label">联系电话</span>
  69. <input
  70. v-model="form.phone"
  71. class="input"
  72. type="tel"
  73. placeholder="手机/座机"
  74. />
  75. </label>
  76. <label class="field">
  77. <span class="label">邮箱</span>
  78. <input
  79. v-model="form.email"
  80. class="input"
  81. type="email"
  82. placeholder="name@company.com"
  83. />
  84. </label>
  85. <label class="field fieldFull">
  86. <span class="label">需求描述</span>
  87. <textarea
  88. v-model="form.need"
  89. class="input textarea"
  90. rows="4"
  91. placeholder="简单描述你的场景与目标"
  92. ></textarea>
  93. </label>
  94. <div class="formActions">
  95. <button class="btn btn-primary" type="submit">提交需求</button>
  96. </div>
  97. </form>
  98. </div>
  99. </div>
  100. </section>
  101. </div>
  102. </template>
  103. <style scoped>
  104. .contactGrid {
  105. grid-template-columns: 0.9fr 1.1fr;
  106. gap: 18px;
  107. }
  108. .blockTitle {
  109. font-weight: 700;
  110. letter-spacing: -0.02em;
  111. margin-bottom: 10px;
  112. }
  113. .blockDivider {
  114. margin: 16px 0;
  115. }
  116. .tags {
  117. display: flex;
  118. flex-wrap: wrap;
  119. gap: 10px;
  120. }
  121. .success {
  122. margin-bottom: 14px;
  123. padding: 12px;
  124. /* border-radius: var(--radius-md); */
  125. border: 1px solid rgba(16, 185, 129, 0.25);
  126. background: rgba(16, 185, 129, 0.06);
  127. }
  128. .successTitle {
  129. font-weight: 700;
  130. margin-bottom: 4px;
  131. }
  132. .form {
  133. display: grid;
  134. grid-template-columns: repeat(2, minmax(0, 1fr));
  135. gap: 12px;
  136. }
  137. .field {
  138. display: grid;
  139. gap: 6px;
  140. }
  141. .fieldFull {
  142. grid-column: 1 / -1;
  143. }
  144. .label {
  145. font-size: 12px;
  146. /* font-weight: 800; */
  147. color: var(--slate-700);
  148. }
  149. .input {
  150. width: 100%;
  151. /* border-radius: 12px; */
  152. border: 1px solid var(--border);
  153. padding: 10px 12px;
  154. outline: none;
  155. background: #fff;
  156. transition: 160ms ease;
  157. }
  158. .input:focus {
  159. border-color: rgba(37, 99, 235, 0.4);
  160. box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  161. }
  162. .textarea {
  163. resize: vertical;
  164. }
  165. .formActions {
  166. grid-column: 1 / -1;
  167. display: flex;
  168. gap: 12px;
  169. flex-wrap: wrap;
  170. justify-content: center;
  171. }
  172. @media (max-width: 960px) {
  173. .contactGrid {
  174. grid-template-columns: 1fr;
  175. }
  176. .form {
  177. grid-template-columns: 1fr;
  178. }
  179. }
  180. </style>