detail-cell-service.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view>
  3. <detail-cell
  4. v-if="modelValue.length > 0"
  5. label="保障"
  6. :value="state.paramsTitle"
  7. @click="state.show = true"
  8. >
  9. </detail-cell>
  10. <su-popup :show="state.show" round="10" :showClose="true" @close="state.show = false">
  11. <view class="ss-modal-box">
  12. <view class="modal-header">服务保障</view>
  13. <scroll-view
  14. class="modal-content"
  15. scroll-y="true"
  16. :scroll-with-animation="true"
  17. :show-scrollbar="false"
  18. @touchmove.stop
  19. >
  20. <view class="sale-item ss-flex ss-col-top" v-for="item in modelValue" :key="item.id">
  21. <image
  22. class="title-icon ss-m-r-14"
  23. :src="sheep.$url.cdn(item.image)"
  24. mode="aspectFill"
  25. ></image>
  26. <view class="title-box">
  27. <view class="item-title ss-m-b-20">{{ item.name }}</view>
  28. <view class="item-value">{{ item.description }}</view>
  29. </view>
  30. </view>
  31. </scroll-view>
  32. <view class="modal-footer ss-flex ss-row-center ss-m-b-20">
  33. <button class="ss-reset-button save-btn ui-Shadow-Main" @tap="state.show = false"
  34. >确定</button
  35. >
  36. </view>
  37. </view>
  38. </su-popup>
  39. </view>
  40. </template>
  41. <script setup>
  42. import { reactive, computed } from 'vue';
  43. import sheep from '@/sheep';
  44. import detailCell from './detail-cell.vue';
  45. const props = defineProps({
  46. modelValue: {
  47. type: Object,
  48. default() {},
  49. },
  50. });
  51. const state = reactive({
  52. show: false,
  53. paramsTitle: computed(() => {
  54. let nameArray = [];
  55. props.modelValue.map((item) => {
  56. nameArray.push(item.name);
  57. });
  58. return nameArray.join(' · ');
  59. }),
  60. });
  61. </script>
  62. <style lang="scss" scoped>
  63. .ss-modal-box {
  64. border-radius: 30rpx 30rpx 0 0;
  65. max-height: 730rpx;
  66. .modal-header {
  67. position: relative;
  68. padding: 30rpx 20rpx 40rpx;
  69. font-size: 36rpx;
  70. font-weight: bold;
  71. }
  72. .modal-content {
  73. padding: 0 30rpx;
  74. max-height: 500rpx;
  75. box-sizing: border-box;
  76. .sale-item {
  77. margin-bottom: 44rpx;
  78. .title-icon {
  79. width: 36rpx;
  80. height: 36rpx;
  81. }
  82. .title-box{
  83. flex: 1;
  84. }
  85. .item-title {
  86. font-size: 28rpx;
  87. font-weight: 500;
  88. line-height: normal;
  89. }
  90. .item-value {
  91. font-size: 26rpx;
  92. font-weight: 400;
  93. color: $dark-9;
  94. line-height: 42rpx;
  95. }
  96. }
  97. }
  98. .modal-footer {
  99. height: 120rpx;
  100. background-color: #fff;
  101. .save-btn {
  102. width: 710rpx;
  103. height: 80rpx;
  104. border-radius: 40rpx;
  105. background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
  106. color: $white;
  107. }
  108. }
  109. }
  110. </style>