step2.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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===3}">
  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?user_type='+user_type+'&invite_code='+invite_code" 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: 3,
  28. invite_code: "",
  29. }
  30. },
  31. methods: {
  32. },
  33. onLoad: function(option) {
  34. this.invite_code = option.invite_code;
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .step2 {
  40. background: $primary-color;
  41. height: 100vh;
  42. width: 750rpx;
  43. overflow: hidden;
  44. }
  45. .step2-from {
  46. margin: auto;
  47. width: 600upx;
  48. height: 700upx;
  49. background-color: white;
  50. border-radius: 20rpx;
  51. padding: 72upx;
  52. padding-top: 40upx;
  53. box-sizing: border-box;
  54. position: relative;
  55. z-index: 2;
  56. margin-top: 200upx;
  57. &::after {
  58. content: "";
  59. background: url(../../static/images/login/box-bottom.png) no-repeat;
  60. background-size: contain;
  61. width: 564upx;
  62. height: 30upx;
  63. display: block;
  64. position: absolute;
  65. bottom: -30upx;
  66. left: 18upx;
  67. z-index: -1;
  68. }
  69. .title {
  70. font-size: 30upx;
  71. color: #999999;
  72. font-weight: bold;
  73. text-align: center;
  74. margin-bottom: 70upx;
  75. }
  76. }
  77. .role-list {
  78. display: flex;
  79. justify-content: center;
  80. .role-item {
  81. margin: 50upx;
  82. text-align: center;
  83. position: relative;
  84. .text {
  85. font-size: 30upx;
  86. color: #666666;
  87. }
  88. &.selected::after {
  89. background-image: url(../../static/images/icon71.png);
  90. content: "";
  91. width: 40upx;
  92. height: 40upx;
  93. display: block;
  94. position: absolute;
  95. top: 5upx;
  96. right: 5upx;
  97. }
  98. }
  99. }
  100. .next {
  101. height: 80upx;
  102. border: 2upx solid $primary-color;
  103. line-height: 80upx;
  104. margin: 30upx 0;
  105. font-size: 32upx;
  106. background: $primary-color;
  107. color: white;
  108. &::after {
  109. border: none;
  110. }
  111. }
  112. </style>