chooseIdentity.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view class="container">
  3. <view class="title">身份选择</view>
  4. <view class="choose-identuty flex justify-between">
  5. <view class="item"
  6. :class="isDoctor ? 'border-color-custom' : 'border-unSelected' " @click="() => isDoctor = true">
  7. <view class="item-icon" :class="isDoctor ? 'bg-custom' : 'bg-unSelected' ">
  8. <u-icon name="checkmark" color="white" size="20"></u-icon>
  9. </view>
  10. <image class="item-content-icon1" src="@/static/images/phone/icon_doctor.png"></image>
  11. <view class="item-name">我是医生</view>
  12. <view class="item-desc">参与项目上传课件</view>
  13. </view>
  14. <view class="item"
  15. :class="!isDoctor ? 'border-color-custom' : 'border-unSelected' " @click="() => isDoctor = false">
  16. <view class="item-icon" :class="!isDoctor ? 'bg-custom' : 'bg-unSelected' ">
  17. <u-icon name="checkmark" color="white" size="20"></u-icon>
  18. </view>
  19. <image class="item-content-icon2" src="@/static/images/phone/icon_volunteer.png"></image>
  20. <view class="item-name">我是志愿者</view>
  21. <view class="item-desc">辅助医生上传课件</view>
  22. </view>
  23. </view>
  24. <u-button type="primay" class="btn" color="var(--phone-theme-color)" @click="next">下一步</u-button>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. isDoctor: true
  32. }
  33. },
  34. onLoad() {
  35. this.isDoctor = this.$store.state.user.loginIdentity == 0
  36. },
  37. methods: {
  38. next() {
  39. let type = this.isDoctor ? '0' : '1'
  40. uni.navigateTo({
  41. url: '/pages/phone/improve?loginIdentity=' + type
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .container {
  49. width: 100vw;
  50. height: 100vh;
  51. padding-top: 88rpx;
  52. .title {
  53. font-size: 40rpx;
  54. font-style: normal;
  55. font-weight: 600;
  56. color: black;
  57. text-align: center;
  58. }
  59. .choose-identuty {
  60. margin-top: 56rpx;
  61. padding: 16rpx 32rpx;
  62. .item {
  63. display: flex;
  64. flex-direction: column;
  65. align-items: center;
  66. width: 330rpx;
  67. height: 400rpx;
  68. border-radius: 32rpx;
  69. border: 2px solid #F2F3F5;
  70. &-icon {
  71. align-self: flex-end;
  72. width: 60rpx;
  73. height: 60rpx;
  74. border-top-right-radius: 24rpx;
  75. border-bottom-left-radius: 24rpx;
  76. display: flex;
  77. justify-content: center;
  78. align-items: center;
  79. }
  80. &-content-icon1 {
  81. width: 150rpx;
  82. height: 150rpx;
  83. margin-top: 36rpx;
  84. }
  85. &-content-icon2 {
  86. width: 200rpx;
  87. height: 200rpx;
  88. margin-left: 40rpx;
  89. }
  90. &-name {
  91. margin-top: 40rpx;
  92. color: #1D2129;
  93. font-size: 32rpx;
  94. font-weight: 600;
  95. height: 48rpx;
  96. line-height: 48rpx;
  97. }
  98. &-desc {
  99. color: #86909C;
  100. font-size: 26rpx;
  101. height: 44rpx;
  102. line-height: 44rpx;
  103. }
  104. }
  105. }
  106. .btn {
  107. position: absolute;
  108. bottom: 0px;
  109. left: 40rpx;
  110. right: 40rpx;
  111. height: 88rpx;
  112. line-height: 88rpx;
  113. text-align: center;
  114. border-radius: 8rpx;
  115. color: #FFF;
  116. font-size: 28rpx;
  117. font-weight: 400;
  118. width: calc(100% - 80rpx);
  119. }
  120. }
  121. .border-unSelected {
  122. border-color: #F2F3F5 !important;
  123. }
  124. .bg-unSelected {
  125. background: #F2F3F5 !important;
  126. }
  127. </style>