identity.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="container">
  3. <view class="name">请选择注册您的身份</view>
  4. <view class="image" @click="ToRegister(1)">
  5. <image src="../../static/img/img001.png"></image>
  6. <view class="identity">用户</view>
  7. <view class="info">完成注册后可联系医师</view>
  8. </view>
  9. <view class="image" @click="ToRegister(2)">
  10. <image src="../../static/img/img002.png"></image>
  11. <view class="identity">我是医师</view>
  12. <view class="info">完成注册 成为入驻医生</view>
  13. </view>
  14. <view class="image" @click="ToRegister(3)">
  15. <image src="../../static/img/img003.png"></image>
  16. <view class="identity">医疗机构</view>
  17. <view class="info">完成注册后可联系医师</view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import { choseType } from '@/api/index.js';
  23. export default {
  24. data() {
  25. return {};
  26. },
  27. methods: {
  28. ToRegister(item) {
  29. let obj = this;
  30. let type = +item;
  31. choseType({
  32. type: type
  33. })
  34. .then(function(e) {
  35. if (e.msg == '修改成功') {
  36. if (type == 1) {
  37. uni.navigateTo({
  38. url: `/pages/public/PatRegister`
  39. });
  40. }
  41. if (type == 2) {
  42. uni.navigateTo({
  43. url: `/pages/public/DocRegister`
  44. });
  45. }
  46. if (type == 3) {
  47. uni.navigateTo({
  48. url: `/pages/public/MecRegister`
  49. });
  50. }
  51. }
  52. })
  53. .catch(e => {
  54. console.log(e);
  55. });
  56. },
  57. }
  58. };
  59. </script>
  60. <style lang="scss">
  61. page {
  62. background: #ffffff;
  63. height: 100%;
  64. }
  65. .container {
  66. width: 100%;
  67. padding: 90rpx 60rpx;
  68. }
  69. .name {
  70. padding: 60rpx 0rpx;
  71. color: #323232;
  72. font-size: 50rpx;
  73. font-weight: bold;
  74. }
  75. .image {
  76. width: 100%;
  77. height: 230rpx;
  78. position: relative;
  79. margin-bottom: 45rpx;
  80. image {
  81. width: 100%;
  82. height: 100%;
  83. }
  84. .identity {
  85. position: absolute;
  86. top: 60rpx;
  87. left: 50rpx;
  88. color: #ffffff;
  89. font-size: 40rpx;
  90. }
  91. .info {
  92. position: absolute;
  93. left: 50rpx;
  94. top: 125rpx;
  95. color: #ffffff;
  96. font-size: 28rpx;
  97. opacity: 0.5;
  98. }
  99. }
  100. </style>