login.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <view class="container">
  3. <view class="navigation-bar">燃脂功能训练帮手</view>
  4. <view class="gender">
  5. <view class="boy" @click="onClick(0, $event)">
  6. <image class="logo" src="/static/logIn/Beard.png" mode="widthFix"></image>
  7. </view>
  8. <view class="girl" @click="onClick(1, $event)">
  9. <image class="logo" src="/static/logIn/Lips.png" mode="widthFix"></image>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. }
  19. },
  20. onLoad() {
  21. // uni.redirectTo({
  22. // url: "/pages/home/home",
  23. // });
  24. },
  25. methods: {
  26. onClick: function(id,e) {
  27. // uni.setStorageSync('gender', id);
  28. uni.navigateTo({
  29. url: '/pages/home/home',
  30. animationType: 'slide-in-left',
  31. /*
  32. slide-in-right 右侧
  33. slide-in-left 左侧
  34. slide-in-top 顶部
  35. slide-in-bottom 底部
  36. pop-in 新窗体从左侧进入,且老窗体被挤压而出
  37. fade-in 新窗体从透明到不透明逐渐显示
  38. zoom-out 新窗体从小到大缩放显示
  39. zoom-fade-out 新窗体从小到大逐渐放大并且从透明到不透明逐渐显示
  40. none 无动画
  41. */
  42. animationDuration: 2000,
  43. success: res => {},
  44. fail: () => {},
  45. complete: () => {}
  46. });
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss">
  52. .container {
  53. display: flex;
  54. flex-direction: column;
  55. align-items: center;
  56. justify-content: center;
  57. height: 100%;
  58. width:100%;
  59. // testing
  60. // border: 1px solid rgb(0,0,0);
  61. }
  62. .navigation-bar
  63. {
  64. display: flex;
  65. align-items: center;
  66. justify-content: center;
  67. width:100%;
  68. height: 5%;
  69. font-weight: 700;
  70. color: white;
  71. background-color: black;
  72. // testing
  73. // border: 1px solid rgb(255,0,0);
  74. }
  75. .gender{
  76. display: flex;
  77. flex-direction: row;
  78. align-items: center;
  79. justify-content: center;
  80. width:100%;
  81. height:100%;
  82. font-weight: 700;
  83. color: black;
  84. // border-radius: 25px;
  85. // background-color: rgb(253,222,157);
  86. }
  87. .boy{
  88. display: flex;
  89. flex-direction: column;
  90. align-items: center;
  91. justify-content: center;
  92. width:50%;
  93. height:100%;
  94. background-color: rgb(40,90,144);
  95. // 测试
  96. // margin: 10rpx;
  97. // border: 3px solid rgb(144,238,144);
  98. }
  99. .girl{
  100. display: flex;
  101. flex-direction: column;
  102. align-items: center;
  103. justify-content: center;
  104. width:50%;
  105. height:100%;
  106. background-color: rgb(207,65,70);
  107. }
  108. </style>