sh-serve.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="sh-server-box">
  3. <view class="u-flex u-row-between serve-box" @tap="showModal = true">
  4. <view class="u-flex">
  5. <text class="title">服务</text>
  6. <view class="tip u-flex">
  7. <view class="tip-list u-flex" v-for="(serve, index) in serveList" :key="serve.title">
  8. <view class="u-flex" v-if="index < 3">
  9. <image class="tip-img" :src="serve.image" mode=""></image>
  10. <text>{{ serve.name }}</text>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="u-iconfont uicon-arrow-right" style="color: #bfbfbf;font-size: 28rpx;"></view>
  16. </view>
  17. <u-popup v-model="showModal" mode="bottom" :closeable="true" close-icon-pos="top-right">
  18. <view class=" server-modal">
  19. <view class="server-modal-box page_box">
  20. <view class="modal-head u-flex u-row-center u-col-center"><text class="head-title">服务保障</text></view>
  21. <view class="modal-content content_box">
  22. <view class="serve-list" v-for="serve in serveList" :key="serve.title">
  23. <view class="title-box u-flex">
  24. <image class="title-tag" :src="serve.image" mode=""></image>
  25. <text class="serve-title">{{ serve.name }}</text>
  26. </view>
  27. <view class="serve-detail">{{ serve.description }}</view>
  28. </view>
  29. </view>
  30. <view class="modal-foot u-flex u-row-center u-col-center"><button class=" u-reset-button serve-btn" @tap="showModal = false">确定</button></view>
  31. </view>
  32. </view>
  33. </u-popup>
  34. </view>
  35. </template>
  36. <script>
  37. /**
  38. * 商品服务卡片
  39. * @property {Array} serveList - 商品服务列表
  40. * @property {Boolean} showModal- 显隐
  41. */
  42. export default {
  43. components: {},
  44. data() {
  45. return {
  46. showModal: false
  47. };
  48. },
  49. props: {
  50. serveList: {
  51. type: Array,
  52. default: () => []
  53. }
  54. },
  55. computed: {},
  56. methods: {}
  57. };
  58. </script>
  59. <style lang="scss">
  60. .serve-box {
  61. line-height: 82rpx;
  62. background: #fff;
  63. padding: 0 20rpx;
  64. margin: 10rpx 0;
  65. .title {
  66. font-size: 28rpx;
  67. color: #999;
  68. margin-right: 20rpx;
  69. }
  70. .tip {
  71. .tip-list {
  72. font-size: 28rpx;
  73. margin-right: 20rpx;
  74. .tip-img {
  75. width: 30rpx;
  76. height: 30rpx;
  77. margin-right: 10rpx;
  78. }
  79. }
  80. }
  81. }
  82. .server-modal-box {
  83. width: 750rpx;
  84. height: 100%;
  85. border-radius: 30rpx 30rpx 0 0;
  86. background: #fff;
  87. padding: 30rpx;
  88. .serve-btn {
  89. width: 690rpx;
  90. line-height: 80rpx;
  91. background: linear-gradient(90deg, rgba(240, 199, 133, 1), rgba(246, 214, 157, 1));
  92. border-radius: 40rpx;
  93. font-size: 30rpx;
  94. color: rgba(#fff, 0.9);
  95. margin-top: 40rpx;
  96. }
  97. .modal-head {
  98. margin-bottom: 30rpx;
  99. position: relative;
  100. .head-title {
  101. font-size: 32rpx;
  102. font-weight: bold;
  103. }
  104. }
  105. .modal-content {
  106. overflow-y: auto;
  107. .serve-list {
  108. padding-bottom: 40rpx;
  109. .title-tag {
  110. width: 38rpx;
  111. height: 38rpx;
  112. margin-right: 20rpx;
  113. }
  114. .serve-title {
  115. font-size: 28rpx;
  116. font-weight: bold;
  117. }
  118. .serve-detail {
  119. text-align: left;
  120. font-size: 26rpx;
  121. color: #999;
  122. line-height: 42rpx;
  123. padding-left: 58rpx;
  124. margin-top: 20rpx;
  125. }
  126. }
  127. }
  128. }
  129. </style>