index.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view class="content">
  3. <doctor-index v-show="userType===1" ref="doctor"/>
  4. <patient-index v-show="userType===2" ref="patient" />
  5. </view>
  6. </template>
  7. <script>
  8. import patientIndex from '@/views/patientItems/index/index.vue';
  9. import doctorIndex from '@/views/doctorItems/index/index';
  10. export default {
  11. components:{
  12. patientIndex,
  13. doctorIndex
  14. },
  15. data() {
  16. return {
  17. userType:null,
  18. tabBars:[]
  19. }
  20. },
  21. created() {
  22. this.$nextTick(()=>{
  23. this.init();
  24. })
  25. },
  26. methods: {
  27. init(){
  28. let accountInfo=uni.getStorageSync('accountInfo');
  29. this.userType=accountInfo.userType;
  30. if(accountInfo.userType===1){
  31. uni.setNavigationBarTitle({
  32. title:"诊断"
  33. })
  34. }
  35. },
  36. reload(type){
  37. if(type==='doctor'){
  38. this.$refs.doctor.init();
  39. }
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .content{
  46. &{
  47. padding: 0 24upx;
  48. }
  49. .title {
  50. font-size: 38upx;
  51. padding: 58upx 0 49upx 0;
  52. font-weight: 600;
  53. .tl-1{
  54. color: #3384ff;
  55. padding-right: 8upx;
  56. }
  57. }
  58. .list{
  59. .item{
  60. height: 160upx;
  61. margin-top: 24upx;
  62. display: flex;
  63. justify-content: flex-start;
  64. align-items: center;
  65. position: relative;
  66. .icon{
  67. .zhcx-iconfont{
  68. font-size: 55upx;
  69. }
  70. padding-right: 79upx;
  71. }
  72. .text{
  73. font-size: 32upx;
  74. color: #333;
  75. }
  76. .link{
  77. position: absolute;
  78. right: 34upx;
  79. }
  80. }
  81. }
  82. }
  83. </style>