zhengyiming
昨天 25708e3f81956c1517f495e3303a6c8d08bb730c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
  <div class="standard-service-card-wrapper">
    <SquareView>
      <img :src="setOSSLink(file)" class="standard-service-card-cover" />
    </SquareView>
    <div class="standard-service-card-content">
      <div class="standard-service-card-content-title">{{ name }}</div>
      <div class="standard-service-card-content-price-wrapper">
        <div class="standard-service-card-content-price">{{ minSpecPrice ?? 0 }}</div>
        <div class="standard-service-card-content-suffix">起</div>
      </div>
    </div>
  </div>
</template>
 
<script setup lang="ts">
import { setOSSLink } from '@12333/utils';
import { SquareView } from '@12333/components';
 
defineOptions({
  name: 'StandardServiceCard',
});
 
type Props = {
  id?: string;
  file?: string;
  name?: string;
  /** 最低规格价格 */
  minSpecPrice?: number;
};
 
const props = withDefaults(defineProps<Props>(), {});
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.standard-service-card-wrapper {
  background-color: #fff;
  border-radius: 12px;
 
  .standard-service-card-cover {
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    width: 100%;
  }
 
  .standard-service-card-content {
    padding: 16px;
    padding-bottom: 24px;
 
    .standard-service-card-content-title {
      font-weight: 600;
      font-size: 28px;
      color: boleGetCssVar('text-color', 'primary');
      margin-bottom: 24px;
    }
 
    .standard-service-card-content-price-wrapper {
      display: flex;
      align-items: flex-end;
 
      .standard-service-card-content-price {
        font-weight: 600;
        font-size: 32px;
        color: #ff3949;
        margin-right: 8px;
      }
 
      .standard-service-card-content-suffix {
        font-weight: 400;
        font-size: 24px;
        color: #ff3949;
      }
    }
  }
}
</style>