step2.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view class="step2">
  3. <view class="step2-from">
  4. <view class="title">请选择角色</view>
  5. <view class="role-list">
  6. <view class="role-item" @tap="user_type=1" :class="{'selected':user_type===1}">
  7. <image src="../../static/images/woman.png" mode="scaleToFill" style="width: 144upx;height: 144upx;"></image>
  8. <view class="text"><text>网店店主</text></view>
  9. </view>
  10. <view class="role-item" @tap="user_type=2" :class="{'selected':user_type===2}">
  11. <image src="../../static/images/man.png" mode="scaleToFill" style="width: 144upx;height: 144upx;"></image>
  12. <view class="text"><text>供货厂家</text></view>
  13. </view>
  14. </view>
  15. <view class="button-item" style="margin-top: 80upx;">
  16. <navigator url="/pages/register/step3" open-type="navigate">
  17. <button class="next">下一步</button>
  18. </navigator>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. user_type: 1
  28. }
  29. },
  30. methods: {
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .step2 {
  36. background: $primary-color;
  37. height: 100vh;
  38. width: 750rpx;
  39. overflow: hidden;
  40. }
  41. .step2-from {
  42. margin: auto;
  43. width: 600upx;
  44. height: 700upx;
  45. background-color: white;
  46. border-radius: 20rpx;
  47. padding: 72upx;
  48. padding-top: 40upx;
  49. box-sizing: border-box;
  50. position: relative;
  51. z-index: 2;
  52. margin-top: 200upx;
  53. &::after {
  54. content: "";
  55. background: url(../../static/images/login/box-bottom.png) no-repeat;
  56. background-size: contain;
  57. width: 564upx;
  58. height: 30upx;
  59. display: block;
  60. position: absolute;
  61. bottom: -30upx;
  62. left: 18upx;
  63. z-index: -1;
  64. }
  65. .title {
  66. font-size: 30upx;
  67. color: #999999;
  68. font-weight: bold;
  69. text-align: center;
  70. margin-bottom: 70upx;
  71. }
  72. }
  73. .role-list {
  74. display: flex;
  75. justify-content: center;
  76. .role-item {
  77. margin: 50upx;
  78. text-align: center;
  79. position: relative;
  80. .text{
  81. font-size: 30upx;
  82. color: #666666;
  83. }
  84. &.selected::after {
  85. background-image: url(../../static/images/icon71.png);
  86. content: "";
  87. width: 40upx;
  88. height: 40upx;
  89. display: block;
  90. position: absolute;
  91. top: 5upx;
  92. right: 5upx;
  93. }
  94. }
  95. }
  96. .next {
  97. height: 80upx;
  98. border: 2upx solid $primary-color;
  99. line-height: 80upx;
  100. margin: 30upx 0;
  101. font-size: 32upx;
  102. background: $primary-color;
  103. color: white;
  104. &::after {
  105. border: none;
  106. }
  107. }
  108. </style>