123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- <template>
- <div class="page">
- <div class="page-title">专业美容培训师</div>
- <div class="page-top">
- <div class="swiper">
- <SimpleSwiper :imageList="doctorInfo.bannerList"></SimpleSwiper>
- </div>
- </div>
- <div class="page-content">
- <div class="doctor-info">
- <div class="name">{{ doctorInfo.doctorName }}<i /></div>
- <div class="tag">{{ doctorInfo.tagList.join(' | ') }}</div>
- </div>
- <div class="param-list">
- <div
- class="param"
- v-for="(param, index) in doctorInfo.paramList"
- :key="index"
- >
- <div class="name" v-text="param.name"></div>
- <div class="content" v-text="param.content"></div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- layout: 'app-ldm',
- data() {
- return {
- doctorInfo: {
- tagList: [],
- paramList: [],
- },
- }
- },
- mounted() {
- this.initData()
- },
- methods: {
- initData() {
- const doctorInfo = localStorage.getItem('doctorInfo')
- if (doctorInfo) {
- this.doctorInfo = JSON.parse(doctorInfo)
- this.fetchDetail()
- }
- },
- async fetchDetail() {
- try {
- const res = await this.$http.api.fetchDoctorDetail({
- doctorId: this.doctorInfo.doctorId,
- })
- this.doctorInfo = { ...this.clubInfo, ...res.data }
- } catch (error) {
- console.log(error)
- }
- if (this.doctorInfo.bannerList.length <= 0) {
- this.doctorInfo.bannerList.push('/placeholder.png')
- }
- },
- },
- }
- </script>
- <style scoped lang="scss">
- @media screen and (min-width: 768px) {
- .page {
- position: relative;
- display: flex;
- justify-content: space-between;
- width: 1016px;
- margin: 0 auto;
- padding-top: 117px;
- }
- .page-title {
- position: absolute;
- left: 0;
- top: 60px;
- font-size: 26px;
- color: #221815;
- }
- .page-top {
- .swiper {
- width: 452px;
- height: 452px;
- background-color: pink;
- }
- }
- .page-content {
- width: 503px;
- .doctor-info {
- padding-bottom: 35px;
- .name {
- font-size: 35px;
- font-weight: bold;
- color: #000;
- margin-bottom: 22px;
- i {
- font-size: 0;
- display: inline-block;
- background: url(https://static.caimei365.com/www/authentic/pc/ldm-icon-star.png)
- no-repeat left center;
- padding-left: 13px;
- vertical-align: 2px;
- margin-left: 7px;
- &::after,
- &::before {
- display: inline-block;
- content: '';
- width: 13px;
- height: 13px;
- background: url(https://static.caimei365.com/www/authentic/pc/ldm-icon-star.png)
- no-repeat center;
- vertical-align: middle;
- margin-left: 4px;
- }
- }
- }
- .tag {
- font-size: 16px;
- color: #221815;
- }
- }
- .param-list {
- .param {
- padding: 32px 0;
- border-bottom: 1px solid rgba(0, 0, 0, 0.3);
- &:first-child {
- border-top: 1px solid rgba(0, 0, 0, 0.3);
- }
- .name {
- font-size: 18px;
- font-weight: bold;
- color: #000;
- }
- .content {
- font-size: 16px;
- color: #9c9c9c;
- margin-top: 12px;
- text-align: justify;
- line-height: 1.7;
- }
- }
- }
- }
- }
- @media screen and (max-width: 768px) {
- .page-top {
- .swiper {
- width: 100vw;
- height: 100vw;
- background-color: pink;
- }
- }
- .page-title {
- display: none;
- }
- .page-content {
- padding: 4.7vw 6.2vw;
- .doctor-info {
- padding-bottom: 6vw;
- .name {
- font-size: 6.2vw;
- font-weight: bold;
- color: #000;
- margin-bottom: 3.2vw;
- i {
- font-size: 0;
- display: inline-block;
- background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-star.png)
- no-repeat left center;
- padding-left: 3.2vw;
- vertical-align: 1vw;
- margin-left: 1.8vw;
- &::after,
- &::before {
- display: inline-block;
- content: '';
- width: 3.2vw;
- height: 3.2vw;
- background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-star.png)
- no-repeat center;
- vertical-align: middle;
- margin-left: 0.9vw;
- }
- }
- }
- .tag {
- font-size: 3vw;
- color: #221815;
- }
- }
- .param-list {
- .param {
- padding: 6vw 0;
- border-bottom: 0.1vw solid rgba(0, 0, 0, 0.3);
- &:first-child {
- border-top: 0.1vw solid rgba(0, 0, 0, 0.3);
- }
- .name {
- font-size: 3.2vw;
- font-weight: bold;
- color: #000;
- }
- .content {
- font-size: 3vw;
- color: #9c9c9c;
- margin-top: 1.6vw;
- text-align: justify;
- line-height: 1.7;
- }
- }
- }
- }
- }
- </style>
|