| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <template>
- <view class="container">
- <view class="navigation-bar">燃脂功能训练帮手</view>
- <view class="gender">
- <view class="boy" @click="onClick(0, $event)">
- <image class="logo" src="/static/logIn/Beard.png" mode="widthFix"></image>
- </view>
- <view class="girl" @click="onClick(1, $event)">
- <image class="logo" src="/static/logIn/Lips.png" mode="widthFix"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- }
- },
- onLoad() {
- // uni.redirectTo({
- // url: "/pages/home/home",
- // });
- },
- methods: {
- onClick: function(id,e) {
-
- // uni.setStorageSync('gender', id);
-
- uni.navigateTo({
- url: '/pages/home/home',
- animationType: 'slide-in-left',
- /*
-
- slide-in-right 右侧
- slide-in-left 左侧
- slide-in-top 顶部
- slide-in-bottom 底部
- pop-in 新窗体从左侧进入,且老窗体被挤压而出
- fade-in 新窗体从透明到不透明逐渐显示
- zoom-out 新窗体从小到大缩放显示
- zoom-fade-out 新窗体从小到大逐渐放大并且从透明到不透明逐渐显示
- none 无动画
- */
- animationDuration: 2000,
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- }
- }
- }
- </script>
- <style lang="scss">
- .container {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
-
- height: 100%;
- width:100%;
-
- // testing
- // border: 1px solid rgb(0,0,0);
- }
-
- .navigation-bar
- {
- display: flex;
- align-items: center;
- justify-content: center;
-
- width:100%;
- height: 5%;
-
- font-weight: 700;
- color: white;
-
- background-color: black;
- // testing
- // border: 1px solid rgb(255,0,0);
- }
- .gender{
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
-
- width:100%;
- height:100%;
-
- font-weight: 700;
- color: black;
-
- // border-radius: 25px;
- // background-color: rgb(253,222,157);
- }
- .boy{
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
-
- width:50%;
- height:100%;
- background-color: rgb(40,90,144);
-
- // 测试
- // margin: 10rpx;
- // border: 3px solid rgb(144,238,144);
- }
- .girl{
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
-
- width:50%;
- height:100%;
- background-color: rgb(207,65,70);
- }
- </style>
|