info.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. new Vue({
  2. el: '#service-info',
  3. mixins: [wxJssdkMixin],
  4. data: {
  5. itemObj: {},
  6. textLevel: {
  7. 1: {
  8. color: '#FF5B00',
  9. backgroundColor: '#FFEBDF',
  10. iconUrl: 'https://static.caimei365.com/app/img/serviceProvider/PC/class1.png'
  11. },
  12. 2: {
  13. color: '#FFB300',
  14. backgroundColor: '#FFF4DF',
  15. iconUrl: 'https://static.caimei365.com/app/img/serviceProvider/PC/class2.png'
  16. },
  17. 3: {
  18. color: '#7EACD5',
  19. backgroundColor: '#DFF0FF',
  20. iconUrl: 'https://static.caimei365.com/app/img/serviceProvider/PC/class3.png'
  21. },
  22. 4: {
  23. color: '#7EACD5',
  24. backgroundColor: '#DFF0FF',
  25. iconUrl: 'https://static.caimei365.com/app/img/serviceProvider/PC/class3.png'
  26. },
  27. 5: {
  28. color: '#7EACD5',
  29. backgroundColor: '#DFF0FF',
  30. iconUrl: 'https://static.caimei365.com/app/img/serviceProvider/PC/class3.png'
  31. }
  32. },
  33. form: {
  34. providersId: 0
  35. },
  36. show: false,
  37. isLoading: false
  38. },
  39. mounted() {
  40. this.setWxConfig((wx) => this.setWxReady(wx))
  41. this.getParams()
  42. this.toSearchProvider()
  43. },
  44. methods: {
  45. getParams() {
  46. this.form.serviceProviderId = window.location.search.split('?')[1].split('=')[1]
  47. },
  48. toSearchProvider() {
  49. if (this.form.serviceProviderId) {
  50. SettlementService.getProvidersAndInfo(this.form, (res) => {
  51. if (res.data.list) {
  52. this.itemObj = res.data.list[0]
  53. setTimeout(() => {
  54. this.isLoading = true
  55. }, 1000)
  56. }
  57. })
  58. }
  59. }
  60. }
  61. })