operatDoctorDetail.js 660 B

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