index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="content">
  3. <view class="head">
  4. <text class="head-highlight">AI</text>
  5. <text>辅助诊断</text>
  6. </view>
  7. <view class="title">
  8. <view class="stair-title">欢迎使用AI辅助诊断</view>
  9. <view class="second-title">请选择您的身份</view>
  10. </view>
  11. <view class="login-wrap">
  12. <view class="item" @click="check(item.id)" v-for="item in items" :key="item.id">
  13. <view class="icon" :class="type===item.id?'active':''">
  14. <image :src="item.icon" mode="widthFix"></image>
  15. </view>
  16. <div class="name">{{item.name}}</div>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import patient from 'static/images/login/patient.png';
  23. import doctor from 'static/images/login/doctor.png';
  24. export default{
  25. data:()=>{
  26. return{
  27. type:1,
  28. items:[
  29. {
  30. id:2,
  31. name:'患者',
  32. icon:patient
  33. },
  34. {
  35. id:1,
  36. name:'医生',
  37. icon:doctor
  38. }
  39. ]
  40. }
  41. },
  42. methods:{
  43. check(type){
  44. this.type=type;
  45. uni.navigateTo({
  46. url:`/pages/register/index?type=${type}`
  47. })
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .content{
  54. .head{
  55. font-size: 46upx;
  56. color: #666;
  57. font-weight: 600;
  58. padding: 128upx 0 158upx 0;
  59. text-align: center;
  60. .head-highlight{
  61. color: #3384ff;
  62. padding-right: 10upx;
  63. }
  64. }
  65. .title{
  66. .stair-title{
  67. color: #1890ff;
  68. font-size: 40upx;
  69. text-align: center;
  70. }
  71. .second-title{
  72. color: #666;
  73. font-size: 28upx;
  74. padding-top: 15upx;
  75. text-align: center;
  76. }
  77. }
  78. .login-wrap{
  79. display: flex;
  80. justify-content: center;
  81. align-items: center;
  82. padding-top: 92upx;
  83. .item{
  84. &:nth-child(1){
  85. margin-right: 64upx;
  86. }
  87. &:nth-child(2){
  88. margin-left: 64upx;
  89. }
  90. .icon{
  91. width: 200upx;
  92. height: 200upx;
  93. border: 4upx solid transparent;
  94. border-radius: 12px;
  95. box-sizing: border-box;
  96. display: flex;
  97. justify-content: center;
  98. align-items: center;
  99. image{
  100. display: block;
  101. width: 50upx;
  102. }
  103. &.active{
  104. border-color: #1890FF;
  105. }
  106. }
  107. .name{
  108. padding-top: 13upx;
  109. text-align: center;
  110. }
  111. }
  112. }
  113. }
  114. </style>