productCenter.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div class="w-screen pad:w-full">
  3. <big-title>{{lang===langType.cn?"核心产品":getAbbrText("核心产品")}}</big-title>
  4. <div class="container mx-auto productCenter">
  5. <a class="product"
  6. v-for="(product,i) in products"
  7. :key="'pro-'+product.type_key"
  8. :href="`/product/info/${product.type_key}?id=${product.id}`"
  9. >
  10. <span class="imgBox">
  11. <img :src="imagePathBabel(product.image)" :alt="product.name" class="img">
  12. </span>
  13. <span class="more">
  14. {{lang===langType.cn?"了解更多":getAbbrText("了解更多")}}
  15. </span>
  16. <p class="product-info">
  17. <span class="title">
  18. {{lang===langType.cn?product.name:product.name_en||product.name}}
  19. </span>
  20. <span class="description" v-if="product.sellPointer">
  21. <span v-for="sell in product.sellPointer">
  22. {{sell}}
  23. </span>
  24. </span>
  25. </p>
  26. </a>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. import langMap from "~/map/langMap";
  32. import BigTitle from "~/components/public/bigTitle.vue";
  33. import {imagePathBabel} from "@/tools/imagePath";
  34. export default {
  35. name: "productCenter",
  36. components: {BigTitle},
  37. props: {
  38. lang:{
  39. default: langMap.lang.cn
  40. },
  41. },
  42. data(){
  43. return {
  44. langType: langMap.lang,
  45. products: this.$store.getters.platform.products
  46. }
  47. },
  48. methods:{
  49. imagePathBabel,
  50. getLangText(str) {
  51. return langMap.getText(this.lang, str);
  52. },
  53. getAbbrText(str) {
  54. return langMap.getAbbrText(this.lang, str);
  55. },
  56. }
  57. }
  58. </script>
  59. <style scoped>
  60. @import "@/assets/productList.css";
  61. </style>