left-menu.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. (function() {
  2. Vue.component('left-menu', {
  3. template: `<div class="w3-col c-border bgc-fff ptb20 plr40" style="width:237px;">
  4. <div class="w3-row">
  5. <div class="w3-col" style="width:30px;">
  6. <img class="media-object" src="../../../images/icon_wodezhanghu.png">
  7. </div>
  8. <div class="w3-rest plr12">
  9. <div class="c-f20">我的账户</div>
  10. <div class="mine-menu">
  11. <div id="info" class="pt20" @click="goinfo()">个人设置</div>
  12. <div id="securitySetting" class="pt20" @click="gosecuritySetting()">安全设置</div>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="w3-row pt30 pb10">
  17. <div class="w3-col" style="width:30px;">
  18. <img class="media-object" src="../../../images/icon_yuyueguahao.png">
  19. </div>
  20. <div class="w3-rest plr12">
  21. <div class="c-f20">预约挂号</div>
  22. <div class="mine-menu">
  23. <div id="record" class="pt20" @click="gorecord()">预约记录</div>
  24. <div id="doctor" class="pt20" @click="godoctor()">常用就诊人</div>
  25. </div>
  26. </div>
  27. </div>
  28. </div>`,
  29. props: ["code"],
  30. data: function() {
  31. return {
  32. }
  33. },
  34. mounted: function() {
  35. $("#" + this.code).addClass("active")
  36. },
  37. methods: {
  38. goinfo: function() {
  39. location.href = "../../mine/html/personal-info.html"
  40. },
  41. gosecuritySetting: function() {
  42. location.href = "../../mine/html/security-setting.html"
  43. },
  44. gorecord: function() {
  45. location.href = "../../mine/html/record.html"
  46. },
  47. godoctor: function() {
  48. location.href = "../../mine/html/doctor.html"
  49. },
  50. },
  51. })
  52. })()