首页
找靠谱产品
找解决方案
找靠谱公司
找案例
找对的人
专家智库
悬赏任务
SAAS
ToB门户
了解全球最新的ToB事件
论坛
潜水/灌水快乐,沉淀知识,认识更多同行。
ToB圈子
加入IT圈,遇到更多同好之人。
微博
Follow
记录
Doing
博客
Blog
文库
业界最专业的IT文库,上传资料也可以赚钱
下载
分享
Share
排行榜
Ranklist
相册
Album
应用中心
qidao123.com ToB IT社区-企服评测·应用市场
»
论坛
›
物联网/工业互联网
›
物联网
›
uni-app简便的移动端登录注册界面
返回列表
发新帖
uni-app简便的移动端登录注册界面
[复制链接]
发表于 2025-12-12 12:29:29
|
显示全部楼层
|
阅读模式
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要
登录
才可以下载或查看,没有账号?
立即注册
×
非常简便的登录、注册界面模板,利用uni-app编写,直接复制粘贴即可,无任何引用,全部公开。
废话不多说,
代码
如下:
login.vue文件
<template>
<view class="content">
<view class="logo">
LOGO
</view>
<view class="form-box">
<view class="tab-menu">
<view class="tab-name" @click="tabChange(0)">
<text :class="tabIndex==0?'tab-txt':''">登录</text>
<text v-show="tabIndex==0" class="tab-active"></text>
</view>
<view class="tab-name" @click="tabChange(1)">
<text :class="tabIndex==1?'tab-txt':''">注册</text>
<text v-show="tabIndex==1" class="tab-active"></text>
</view>
</view>
<view v-show="tabIndex==0">
<view class="row-input">
<image mode="aspectFit" src="../../static/phone.png"></image>
<input placeholder="输入账号/手机号" maxlength="11" />
</view>
<view class="row-input">
<image mode="aspectFit" src="../../static/password.png"></image>
<input placeholder="输入密码" maxlength="18" />
</view>
<view class="menu-link">
<text>忘记密码?</text>
</view>
<view class="login-btn">
登录
</view>
</view>
<view v-show="tabIndex==1">
<view class="row-input-code">
<view class="input-box">
<image class="img" mode="aspectFit" src="../../static/phone.png"></image>
<input placeholder="输入手机号" maxlength="11" type="number" />
</view>
<view class="code-box" @click="getCode">
获取验证码
</view>
</view>
<view class="row-input">
<image mode="aspectFit" src="../../static/code.png"></image>
<input placeholder="输入验证码" maxlength="6" type="number" />
</view>
<view class="row-input">
<image mode="aspectFit" src="../../static/password.png"></image>
<input placeholder="输入6位密码" maxlength="6" />
</view>
<view class="login-btn register">
注册
</view>
<view class="agree-txt">查看<text>《演示效果》</text></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabIndex: 0, //登录注册下标
}
},
methods: {
// tab切换
tabChange(id) {
this.tabIndex = id
},
// 获取验证码
getCode() {
uni.showToast({
title: "获取验证码"
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #5de97f;
}
.logo {
height: 25vh;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 120rpx;
letter-spacing: 5rpx;
font-weight: bold;
}
.form-box {
padding: 0 50rpx;
margin: 0 70rpx;
height: 750rpx;
background-color: #FFFFFF;
border-radius: 20rpx;
.tab-menu {
padding-top: 50rpx;
display: flex;
justify-content: flex-start;
align-items: center;
height: 100rpx;
.tab-name {
height: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: column;
width: 150rpx;
font-size: 40rpx;
font-weight: bold;
color: #afafaf;
}
.tab-txt {
color: #5b5b5b;
}
.tab-active {
margin-top: 10rpx;
width: 100rpx;
height: 13rpx;
background-color: #6bb3fe;
border-radius: 15rpx;
}
}
.row-input {
margin: 60rpx 0 0 0;
padding: 0 20rpx;
display: flex;
justify-content: flex-start;
align-items: center;
height: 80rpx;
border: 5rpx solid #bbf7c8;
border-radius: 8rpx;
image {
width: 30rpx;
height: 30rpx;
}
input {
padding-left: 20rpx;
font-size: 28rpx;
width: 400rpx;
}
}
.row-input-code {
margin-top: 20rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
height: 80rpx;
font-size: 28rpx;
.input-box {
padding: 0 20rpx;
width: 60%;
display: flex;
justify-content: flex-start;
align-items: center;
height: 100%;
border: 5rpx solid #bbf7c8;
border-top-left-radius: 8rpx;
border-bottom-left-radius: 8rpx;
box-sizing: border-box;
.img {
width: 40rpx;
height: 30rpx;
}
input {
padding-left: 20rpx;
font-size: 28rpx;
width: 300rpx;
}
}
.code-box {
display: flex;
justify-content: center;
align-items: center;
width: 40%;
height: 100%;
color: #FFFFFF;
border-top-right-radius: 8rpx;
border-bottom-right-radius: 8rpx;
background: linear-gradient(#44aae8, #4889e2);
}
}
.menu-link {
display: flex;
justify-content: flex-end;
align-items: center;
height: 70rpx;
color: #007AFF;
font-size: 24rpx;
}
.login-btn {
margin-top: 30rpx;
display: flex;
justify-content: center;
align-items: center;
height: 80rpx;
background: linear-gradient(#44aae8, #4889e2);
border-radius: 50rpx;
color: #FFFFFF;
font-size: 35rpx;
font-weight: bold;
letter-spacing: 4rpx;
}
.register {
margin-top: 50rpx;
}
.agree-txt {
display: flex;
justify-content: center;
align-items: center;
height: 70rpx;
font-size: 24rpx;
text {
color: #007AFF;
}
}
}
</style>
复制
代码
素材!
更多移动端登录注册界面模板,请点击以下链接访问检察 ↓
更多模板地点:https://ext.dcloud.net.cn/plugin?id=8937
几十款移动端登录/注册界面模板,源码全部公开,拿来即用,点击即可检察
回复
使用道具
举报
返回列表
浏览过的版块
SQL-Server
Java
铁佛
+ 我要发帖
登录后关闭弹窗
登录参与点评抽奖 加入IT实名职场社区
去登录
微信订阅号
微信服务号
微信客服(加群)
H5
小程序
快速回复
返回顶部
返回列表