login.vue
2.48 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
<template>
<view class="login-page">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<view class="u-flex" style="justify-content: center;">
<image style="width: 250rpx;height: 250rpx;" src="../../static/logo.png" mode="aspectFill"></image>
</view>
<view class="f__login">
<view class="loginPhone">
<view class="form-row">
<u--input class="input" prefixIcon="account-fill" type="text" placeholder="登录账号" border="surround"
v-model="account">
</u--input>
</view>
<view class="form-row">
<u--input class="input" prefixIcon="lock-fill" :suffixIcon="showPasswordIcon"
suffixIconStyle="color: #909399" type="password" placeholder="登录密码" border="surround"
v-model="password" @change="passwordChange">
</u--input>
</view>
<view class="u-flex" style="flex-direction: row;margin-top: 20rpx;justify-content: space-between;">
<view style="color: #0079fe;font-size: 14px;" @click="openCodeFunc">手机验证码登录</view>
<view style="color: #0079fe;font-size: 14px;" @click="findPassrordFunc">忘记密码</view>
</view>
<button class="submit" size="default" @click="onSubmitFunc"
:style="{background:PrimaryColor}">登录</button>
<view class="u-flex" style="justify-content: center;flex-direction: column;margin-top: 60rpx;">
<view style="color:#cccccc">第三方账号登录</view>
<view>
<image style="width: 150rpx;height: 150rpx;" src="../../static/logo.png" mode="aspectFill">
</image>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
PrimaryColor: '#0079fe', //主题色
showPasswordIcon: 'eye-off'
}
},
methods: {
passwordChange() {},
onSubmitFunc() {},
openCodeFunc() {
uni.navigateTo({
url: './code'
})
},
findPassrordFunc() {
uni.navigateTo({
url: './findPassword'
})
}
}
}
</script>
<style lang="scss" scoped>
.login-page {
min-height: 100vh;
background-color: #fff;
}
.f__login {
padding: 48rpx 32rpx;
border-radius: 18rpx 18rpx 0 0;
z-index: 99;
position: relative;
}
.loginPhone {
.form-row {
position: relative;
.input {
font-size: 34rpx;
line-height: 102rpx;
height: 114rpx;
width: 100%;
box-sizing: border-box;
font-size: 30rpx;
padding: 0;
font-weight: bold;
}
}
.submit {
margin-top: 60rpx;
color: #fff;
width: 100%;
border: none;
}
}
</style>