loginUser.vue
2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<template>
<view class="loginWrap">
<view class="loginTitle">
员工登录
</view>
<view class="loginInp">
<view class="loginItem">
<text>账号</text>
<input type="text" placeholder="请输入手机号" placeholder-class="itemPh"/>
</view>
<view class="loginItem" v-if="loginType == 'password'">
<text>密码</text>
<input type="password" placeholder="请输入密码" placeholder-class="itemPh"/>
</view>
<view class="loginItem" v-if="loginType == 'code'">
<text>验证码</text>
<input type="text" placeholder="请输入验证码" placeholder-class="itemPh"/>
<view class="codeBtn">
获取验证码
</view>
</view>
</view>
<view class="loginBtnWrap">
<view class="loginBtn" @click="login">
登录
</view>
</view>
<view class="loginOther">
<navigator url="forgetPassword?loginType=user" hover-class="none" v-if="loginType == 'password'">忘记密码?</navigator>
<text v-if="loginType == 'password'" @click="loginType = 'code'">短信登录</text>
<text v-if="loginType == 'code'" @click="loginType = 'password'">密码登录</text>
</view>
</view>
</template>
<script>
export default{
data(){
return{
loginType:'password'
}
},
methods:{
// 登录
login(){
this.$href('index',2)
}
}
}
</script>
<style lang="scss" scoped>
.loginWrap{
background: url(../../static/image/index/ic_2@2x.png) no-repeat;
background-size: 100%;
height: 598rpx;
padding: 0 100rpx;
.loginTitle{
padding-top: 352rpx;
font-size: 72rpx;
color: #fff;
}
.loginInp{
padding-top: 200rpx;
.loginItem{
height: 119rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid $uni-bg-main-color;
text{width: 164rpx;font-size: $uni-font-size-32;color: $uni-bg-main-color;}
input{font-size: $uni-font-size-32;color: $uni-text-color-bai;flex: 1;}
.itemPh{
font-size: $uni-font-size-26;
}
.codeBtn{
width: 148rpx;
height: 50rpx;
border: 1rpx solid $uni-bg-main-color;
border-radius: 21rpx;
font-size: $uni-font-size-26;
color: $uni-bg-main-color;
line-height: 50rpx;
text-align: center;
}
}
}
.loginBtnWrap{
padding-top: 100rpx;
.loginBtn{
width: 548rpx;
height: 88rpx;
background: $uni-bg-main-color;
border-radius: 96rpx;
text-align: center;
color: $uni-bg-bai-color;
line-height: 88rpx;
font-size: $uni-font-size-32;
}
}
.loginOther{
padding-top: 12rpx;
display: flex;
justify-content: space-between;
color: $uni-bg-main-color;
font-size: $uni-font-size-26;
}
}
</style>