小程序完成(账号密码登录、风格修改、签字功能)
This commit is contained in:
+57
-13
@@ -1,24 +1,26 @@
|
||||
<template>
|
||||
<view>
|
||||
<scroll-view scroll-y class="page">
|
||||
<cu-custom bgColor="bg-cyan"><block slot="content">登录</block></cu-custom>
|
||||
<cu-custom bgColor="bg-blue"><block slot="content">医疗废物追溯系统</block></cu-custom>
|
||||
<view class="photoView">
|
||||
<view class="photoImage">
|
||||
<open-data type="userAvatarUrl"></open-data>
|
||||
</view>
|
||||
<text class="welcomeText">欢迎使用</text>
|
||||
</view>
|
||||
<form action="">
|
||||
<view class="cu-form-group margin-top">
|
||||
<view class="cu-form-group login-input">
|
||||
<view class="title">账号</view>
|
||||
<input placeholder="请输入账号" name="account" value="" @input="getAccount"></input>
|
||||
<input placeholder="请输入账号" name="account" value="" @input="getAccount" class="input-field"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="cu-form-group login-input">
|
||||
<view class="title">密码</view>
|
||||
<input placeholder="请输入账号" name="password" type="password" value="" @input="getPassword"></input>
|
||||
<input placeholder="请输入密码" name="password" :password="showPassword" value="" @input="getPassword" class="input-field password-input"></input>
|
||||
<text class="eye-icon" @click="togglePassword">{{showPassword ? '👁️' : '🙈'}}</text>
|
||||
</view>
|
||||
</form>
|
||||
<view class="padding flex flex-direction" style="padding-top: 200rpx;">
|
||||
<button class="cu-btn round bg-cyan margin-tb-sm lg" @click="buttonClick">登录</button>
|
||||
<view class="padding flex flex-direction" style="padding-top: 10%;">
|
||||
<button class="cu-btn round login-btn margin-tb-sm lg" @click="buttonClick">登录</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -29,7 +31,8 @@
|
||||
data() {
|
||||
return {
|
||||
account: '',
|
||||
password: ''
|
||||
password: '',
|
||||
showPassword: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -41,6 +44,9 @@
|
||||
getPassword: function(e){
|
||||
this.password = e.target.value
|
||||
},
|
||||
togglePassword: function(){
|
||||
this.showPassword = !this.showPassword
|
||||
},
|
||||
buttonClick(e) {
|
||||
let that = this;
|
||||
uni.request({
|
||||
@@ -85,9 +91,11 @@
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 120Vh;
|
||||
background: linear-gradient(180deg, #4a90e2 0%, #357abd 100%);
|
||||
}
|
||||
.photoView {
|
||||
padding-top: 50rpx;
|
||||
padding-top: 80rpx;
|
||||
padding-bottom: 60rpx;
|
||||
position: relative;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
@@ -97,16 +105,52 @@
|
||||
.photoImage {
|
||||
overflow:hidden;
|
||||
display: block;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
|
||||
border: 3px solid rgba(255, 255, 255, 0.9);
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.welcomeText {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
margin-top: 20rpx;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.login-input {
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
border-radius: 16rpx;
|
||||
margin: 15rpx 40rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.cu-form-group .title{
|
||||
min-width: calc(4em + 15px);
|
||||
font-weight: 600;
|
||||
color: #357abd;
|
||||
}
|
||||
.input-field {
|
||||
color: #333;
|
||||
}
|
||||
.password-input {
|
||||
flex: 1;
|
||||
}
|
||||
.eye-icon {
|
||||
font-size: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
.login-btn {
|
||||
background: linear-gradient(90deg, #4a90e2 0%, #357abd 100%);
|
||||
color: #fff;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
box-shadow: 0 6px 20px rgba(53, 122, 189, 0.4);
|
||||
border: none;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.picker {
|
||||
text-align: left;
|
||||
|
||||
Reference in New Issue
Block a user