ContactInformation.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <script setup>
  2. import Layout from '../components/common/Layout.vue';
  3. import { ref, computed } from 'vue';
  4. import { useI18n } from 'vue-i18n';
  5. import { complaintsEmail, accessibilityEmail } from '@/config/contact.js';
  6. const { t } = useI18n();
  7. // 使用 computed 包裹 t() 调用,确保当语言(locale)变化时文本会自动更新
  8. const contactAddress = computed(() => [
  9. { number: '+852-26206011', address: t('message.ywzx2'), email: 'marketing@cti-group.com.hk' },
  10. { number: '+852-26206308', address: t('message.ywzx1'), email: 'supplychain@cti-group.com.hk' },
  11. { number: '+852-26206055', address: t('message.ywzx3'), email: 'production@cti-group.com.hk' },
  12. { number: '+852-26207376', address: t('message.tousu'), email: complaintsEmail }
  13. ]);
  14. const moreVisible = ref(false);
  15. </script>
  16. <template>
  17. <div>
  18. <Layout>
  19. <div style="width: 100%;">
  20. <div class="index-page">
  21. <div class="page-header-sub">
  22. <!-- <img src="../assets/images/contact.png" alt=""> -->
  23. <img src="../assets/images/banner.png" alt="" srcset="">
  24. </div>
  25. </div>
  26. <div class="contact-content">
  27. <div>{{ $t('message.lianxi') }}</div>
  28. <div>
  29. <img src="../assets/images/address.png" alt="" srcset="">
  30. </div>
  31. <div>{{ $t('message.contactAddress') }}</div>
  32. <div>{{ $t('message.contactAddress1') }}</div>
  33. <div class="contactAddress">
  34. <template v-for="(item, key) in contactAddress" :key="key">
  35. <div :style="key === 3 ? 'position:relative;' : ''">
  36. <img src="../assets/images/call.png" alt="" srcset="">
  37. <div>{{ item.number }}</div>
  38. <div>{{ item.email }}</div>
  39. <div>{{ item.address }}</div>
  40. <div v-if="key === 3" class="more" @click="moreVisible = !moreVisible">{{ $t("message.chakan") }}>></div>
  41. <!-- 只在第四个盒子上方覆盖显示更多内容 -->
  42. <div v-if="key === 3 && moreVisible" class="more-box">
  43. <span class="close-btn" @click="moreVisible = false">×</span>
  44. <div class="detail">
  45. <div>
  46. {{ $t("message.laixinlaifangdizhi") }}:{{ $t("message.contactAddress2") }}{{
  47. $t("message.lianxidianhua") }}:{{
  48. $t("message.complaintsPhone") }}</div>
  49. <div>{{ $t("message.tousudianhua") }}:852-26207376</div>
  50. <div>{{ $t("message.tousuyouxiang") }}:{{ complaintsEmail }}</div>
  51. <div>{{ $t("message.laifangjitousudianhuashoulishijian") }}{{
  52. $t("message.complaintsTime") }}</div>
  53. </div>
  54. </div>
  55. </div>
  56. </template>
  57. </div>
  58. </div>
  59. </div>
  60. </Layout>
  61. </div>
  62. </template>
  63. <style scoped>
  64. .contactBox {
  65. >img {
  66. width: 100%;
  67. height: 100%;
  68. }
  69. }
  70. .contact-content {
  71. width: 100%;
  72. >div {
  73. width: 80%;
  74. margin: 0 auto;
  75. text-align: center;
  76. >img {
  77. width: 4rem;
  78. height: 4rem;
  79. margin-top: 5rem
  80. }
  81. }
  82. >div:nth-child(1) {
  83. font-size: 2rem;
  84. padding: 1.5rem;
  85. color: #F7B334;
  86. font-weight: bold;
  87. border-bottom: 1px solid #F7B334;
  88. }
  89. >div:nth-child(3) {
  90. font-size: 1.4rem;
  91. color: #333;
  92. font-weight: 700;
  93. margin-top: 2rem;
  94. margin-bottom: 0.5rem;
  95. }
  96. }
  97. .contactAddress {
  98. display: flex;
  99. justify-content: space-between;
  100. font-size: 1.6rem;
  101. color: #333;
  102. margin-top: 4rem !important;
  103. >div {
  104. width: 20%;
  105. background-color: #eeeeee;
  106. padding: 1.2rem 1rem;
  107. >img {
  108. width: 2.5rem;
  109. height: 2.5rem;
  110. margin-bottom: 0.5rem;
  111. }
  112. >div:nth-child(2) {
  113. font-weight: bold;
  114. color: #F7B334;
  115. font-size: 1.6rem;
  116. margin-left: 1%;
  117. }
  118. >div:nth-child(3) {
  119. font-weight: bold;
  120. color: #F7B334;
  121. font-size: 1.1rem;
  122. margin-left: 1%;
  123. }
  124. >div:nth-child(4) {
  125. font-size: 1rem;
  126. color: #333;
  127. margin-top: 0.5rem;
  128. }
  129. }
  130. @media screen and (max-width: 767px) {
  131. flex-direction: column;
  132. align-items: center;
  133. >div {
  134. width: 80%;
  135. margin-bottom: 2rem;
  136. padding: 2rem 2rem;
  137. }
  138. }
  139. }
  140. .more-box {
  141. width: 100%;
  142. background: #eeeeee;
  143. padding: 1.5rem 1.5rem;
  144. border-radius: 12px;
  145. box-shadow: 0 6px 24px rgba(247, 179, 52, 0.18);
  146. color: #333;
  147. font-size: 1.3rem;
  148. display: flex;
  149. flex-direction: column;
  150. align-items: center;
  151. position: absolute;
  152. left: 0;
  153. top: 0;
  154. z-index: 10;
  155. animation: moreFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  156. }
  157. @keyframes moreFadeIn {
  158. from {
  159. opacity: 0;
  160. transform: scale(0.9);
  161. }
  162. to {
  163. opacity: 1;
  164. transform: scale(1);
  165. }
  166. }
  167. .close-btn {
  168. position: absolute;
  169. top: 0.5rem;
  170. right: 0.5rem;
  171. font-size: 1.4rem;
  172. color: #888;
  173. cursor: pointer;
  174. z-index: 20;
  175. transition: color 0.2s;
  176. }
  177. @media screen and (max-width: 767px) {
  178. .more-box {
  179. width: 90%;
  180. margin-bottom: 2rem;
  181. padding: 0.5rem 2rem;
  182. }
  183. .close-btn {
  184. top: 1rem;
  185. right: 1rem;
  186. font-size: 1.2rem;
  187. }
  188. }
  189. .more {
  190. color: #F7B334;
  191. cursor: pointer;
  192. font-size: 0.8rem;
  193. margin-top: 1rem;
  194. text-align: right;
  195. &:hover {
  196. color: #333;
  197. }
  198. }
  199. .close-btn:hover {
  200. color: #F7B334;
  201. }
  202. .detail {
  203. text-align: left;
  204. font-size: 1rem;
  205. div {
  206. margin-top: 0.7rem;
  207. }
  208. }
  209. </style>