index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <div class="login">
  3. <img src="../../common/assets/image/logobig.png" alt="" class="logobig" />
  4. <div class="title">请选择您的身份</div>
  5. <div class="title1">方便我们为您提供更准确的服务</div>
  6. <div class="choose">
  7. <div @click="chooseIdentity(1)" :class="isSelect === 1 ? 'select isselect' : 'select'">
  8. <div><img class="headerImg" src="./sj.png" alt="" /></div>
  9. <div class="name">我是司机</div>
  10. <div class="huan"><van-icon name="success" /></div>
  11. </div>
  12. <div @click="chooseIdentity(2)" :class="isSelect === 2 ? 'select isselect' : 'select'" class="select"
  13. style="margin-top: 20rpx">
  14. <div><img class="headerImg" src="./qy.png" alt="" /></div>
  15. <div class="name">我是企业</div>
  16. <div class="huan"><van-icon name="success" /></div>
  17. </div>
  18. <div @click="chooseIdentity(3)" :class="isSelect === 3 ? 'select isselect' : 'select'" class="select"
  19. style="margin-top: 20rpx">
  20. <div><img class="headerImg" src="./qy.png" alt="" /></div>
  21. <div class="name">我要核验</div>
  22. <div class="huan"><van-icon name="success" /></div>
  23. </div>
  24. </div>
  25. <div class="btnbox">
  26. <van-button class="btn" @click="goLogin">去登陆</van-button>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. loginForm: {},
  35. isSelect: 1,
  36. };
  37. },
  38. mounted() { },
  39. methods: {
  40. chooseIdentity(e) {
  41. this.isSelect = e;
  42. },
  43. goLogin() {
  44. console.log(this.isSelect)
  45. if (this.isSelect == 1) {
  46. // pages/subPackages/phoneRegister/index
  47. uni.navigateTo({
  48. url: "/pages/subPackages/phoneRegister/index",
  49. });
  50. return
  51. }
  52. let type =
  53. this.isSelect === 1 ? "USER" : this.isSelect === 2 ? "BIZ" : "FRAME";
  54. console.log(type);
  55. uni.navigateTo({
  56. url: "/pages/login/login?type=" + type,
  57. });
  58. },
  59. },
  60. };
  61. </script>
  62. <style lang="scss">
  63. .login {
  64. background: white;
  65. height: 100%;
  66. overflow: hidden;
  67. .logTit {
  68. width: 80vw;
  69. left: 10vw;
  70. top: 45vw;
  71. display: flex;
  72. flex-direction: column;
  73. justify-content: center;
  74. align-items: center;
  75. position: absolute;
  76. z-index: 1;
  77. color: rgba(51, 51, 51, 1);
  78. font-size: 4vw;
  79. p {
  80. color: rgba(102, 102, 102, 1);
  81. font-size: 4vw;
  82. margin-top: 0.5vw;
  83. }
  84. .titletxt {
  85. font-size: 48rpx;
  86. font-family: Taipei Sans TC Beta-Bold, Taipei Sans TC Beta;
  87. font-weight: bold;
  88. color: #333333;
  89. }
  90. .titletxt2 {
  91. font-size: 32rpx;
  92. font-family: PingFang SC-Regular, PingFang SC;
  93. font-weight: 400;
  94. color: #666666;
  95. }
  96. }
  97. .logobig {
  98. width: 100vw;
  99. height: 100vh;
  100. position: absolute;
  101. left: 0;
  102. z-index: 0;
  103. }
  104. .title {
  105. font-weight: bold;
  106. font-size: 52rpx;
  107. color: #222222;
  108. position: absolute;
  109. top: 342rpx;
  110. left: 52rpx;
  111. }
  112. .title1 {
  113. position: absolute;
  114. top: 400rpx;
  115. left: 52rpx;
  116. font-weight: 400;
  117. font-size: 28rpx;
  118. color: #666666;
  119. }
  120. .huan {
  121. width: 40rpx;
  122. height: 40rpx;
  123. border: 4rpx solid #c0c2c3;
  124. background: #ffffff;
  125. color: #c0c2c3;
  126. border-radius: 50%;
  127. text-align: center;
  128. line-height: 40rpx;
  129. }
  130. .choose {
  131. position: absolute;
  132. top: 40vh;
  133. width: 100%;
  134. .headerImg {
  135. height: 88rpx;
  136. width: 88rpx;
  137. }
  138. .select {
  139. margin: auto;
  140. display: flex;
  141. align-items: center;
  142. justify-content: space-between;
  143. width: 654rpx;
  144. height: 128rpx;
  145. background: #ffffff;
  146. border-radius: 16rpx 16rpx 16rpx 16rpx;
  147. padding: 20rpx 32rpx;
  148. box-sizing: border-box;
  149. }
  150. .name {
  151. // margin-right: 160rpx;
  152. width: 400rpx;
  153. }
  154. }
  155. .isselect {
  156. border: 2rpx solid #8a0554;
  157. .huan {
  158. background: rgba(138, 5, 84, 1);
  159. color: white;
  160. }
  161. }
  162. .btnbox {
  163. position: absolute;
  164. bottom: 170rpx;
  165. width: 100%;
  166. display: flex;
  167. justify-content: center;
  168. .btn {
  169. button {
  170. width: 594rpx;
  171. height: 96rpx;
  172. background: #8a0554;
  173. border-radius: 48rpx 48rpx 48rpx 48rpx;
  174. text-align: center;
  175. line-height: 96rpx;
  176. color: white;
  177. }
  178. text-align: center;
  179. }
  180. }
  181. }
  182. </style>