operatDoctorDetail.js 643 B

123456789101112131415161718192021222324252627282930
  1. export default {
  2. data() {
  3. return {
  4. doctorId: '',
  5. doctorInfo: {
  6. tagList: [],
  7. paramList: [],
  8. },
  9. }
  10. },
  11. mounted() {
  12. this.fetchDetail()
  13. },
  14. methods: {
  15. async fetchDetail() {
  16. try {
  17. this.doctorId = this.$route.query.id
  18. const res = await this.$http.api.fetchDoctorDetail({
  19. doctorId: this.doctorId,
  20. })
  21. this.doctorInfo = { ...this.clubInfo, ...res.data }
  22. } catch (error) {
  23. console.log(error)
  24. }
  25. if (this.doctorInfo.bannerList.length <= 0) {
  26. this.doctorInfo.bannerList.push('/placeholder.png')
  27. }
  28. },
  29. },
  30. }