ServiceInfo.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="service-info">
  3. <view class="service-icons">
  4. <view class="icon-item" v-for="(item, index) in serviceItems" :key="index" @tap="showServiceGuarantee">
  5. <image
  6. :src="`/static/img/${index + 1}.png`"
  7. mode="widthFix"
  8. style="width: 30rpx; height: 30rpx"
  9. ></image>
  10. <text style="margin-left: 6rpx">{{ item.text }}</text>
  11. <text style="margin-left: 4rpx"> > </text>
  12. </view>
  13. </view>
  14. <!-- 服务保障弹窗 -->
  15. <ServiceGuarantee ref="serviceGuarantee" />
  16. </view>
  17. </template>
  18. <script>
  19. import ServiceGuarantee from "./ServiceGuarantee.vue";
  20. export default {
  21. components: {
  22. ServiceGuarantee,
  23. },
  24. props: {
  25. serviceList: {
  26. type: Array,
  27. default: () => [],
  28. },
  29. },
  30. data() {
  31. return {
  32. serviceItems: [
  33. {
  34. icon: "/static/img/1.png",
  35. text: "免费退回",
  36. },
  37. {
  38. icon: "/static/img/2.png",
  39. text: "24小时验",
  40. },
  41. {
  42. icon: "/static/img/3.png",
  43. text: "极速打款",
  44. },
  45. {
  46. icon: "/static/img/4.png",
  47. text: "卖亏必赔",
  48. },
  49. ],
  50. };
  51. },
  52. methods: {
  53. showServiceGuarantee() {
  54. this.$refs.serviceGuarantee.openPopup();
  55. },
  56. },
  57. };
  58. </script>
  59. <style lang="scss" scoped>
  60. .service-icons {
  61. display: flex;
  62. justify-content: center;
  63. padding: 14rpx;
  64. background: #1f1303;
  65. box-sizing: border-box;
  66. gap: 14px;
  67. .icon-item {
  68. display: flex;
  69. align-items: center;
  70. font-family: Source Han Sans CN;
  71. font-weight: 400;
  72. font-size: 24rpx;
  73. color: #fff6ed;
  74. }
  75. }
  76. </style>