uni-app 微信小程序之好看的ui登录页面(四)

news/2024/10/17 17:17:45/

文章目录

  • 1. 页面效果
  • 2. 页面样式代码

更多登录ui页面

uni-app 微信小程序之好看的ui登录页面(一)
uni-app 微信小程序之好看的ui登录页面(二)
uni-app 微信小程序之好看的ui登录页面(三)
uni-app 微信小程序之好看的ui登录页面(四)
uni-app 微信小程序之好看的ui登录页面(五)

1. 页面效果

在这里插入图片描述

2. 页面样式代码

<!-- 简洁登录页面 -->
<template><view class="login-bg"><br /><br /><br /><br /><br /><br /><br /><view class="t-login"><form class="cl"><view class="t-a"><image src="https://zhoukaiwen.com/img/loginImg/user.png"></image><input type="number" name="phone" placeholder="请输入手机号码" maxlength="11" v-model="phone" /></view><view class="t-a"><image src="https://zhoukaiwen.com/img/loginImg/pwd.png"></image><input type="password" name="code" maxlength="6" placeholder="请输入密码" v-model="pwd" /></view><button @tap="login()">登 录</button><view class="t-c"><text class="t-c-txt" @tap="reg()">注册账号</text><text>返回首页</text></view></form><view class="t-f"><text>—————— 其他登录方式 ——————</text></view><view class="t-e cl"><view class="t-g" @tap="wxLogin()"><image src="https://zhoukaiwen.com/img/loginImg/wx2.png"></image></view><view class="t-g" @tap="zfbLogin()"><image src="https://zhoukaiwen.com/img/loginImg/qq2.png"></image></view><view class="t-g" @tap="zfbLogin()"><image src="https://zhoukaiwen.com/img/loginImg/wb.png"></image></view></view></view><image class="img-a" src="https://zhoukaiwen.com/img/loginImg/bg1.png"></image></view>
</template>
<script>
export default {data() {return {phone: '', //手机号码pwd: '' //密码};},onLoad() {},methods: {//当前登录按钮操作login() {var that = this;if (!that.phone) {uni.showToast({ title: '请输入手机号', icon: 'none' });return;}if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(that.phone)) {uni.showToast({ title: '请输入正确手机号', icon: 'none' });return;}if (!that.pwd) {uni.showToast({ title: '请输入密码', icon: 'none' });return;}uni.showToast({ title: '登录成功!', icon: 'none' });},//立刻注册reg() {uni.showToast({ title: '注册账号', icon: 'none' });}}
};
</script>
<style>
.img-a {width: 100%;position: absolute;bottom: 0;
}
.login-bg {height: 100vh;padding-top: 300rpx;background-image: url(https://zhoukaiwen.com/img/loginImg/bg3.png);
}.t-login {width: 700rpx;padding: 55rpx;margin: 0 auto;font-size: 28rpx;background-color: #ffffff;border-radius: 20rpx;box-shadow: 0 5px 7px 0 rgba(0, 0, 0, 0.15);z-index: 9;
}
.t-login button {font-size: 28rpx;background: linear-gradient(to right, #ff8f77, #fe519f);color: #fff;height: 90rpx;line-height: 90rpx;border-radius: 50rpx;
}.t-login input {padding: 0 20rpx 0 120rpx;height: 90rpx;line-height: 90rpx;margin-bottom: 50rpx;background: #f6f6f6;border: 1px solid #f6f6f6;font-size: 28rpx;border-radius: 50rpx;
}.t-login .t-a {position: relative;
}.t-login .t-a image {width: 40rpx;height: 40rpx;position: absolute;left: 40rpx;top: 28rpx;
}.t-login .t-b {text-align: left;font-size: 46rpx;color: #000;padding: 300rpx 0 120rpx 0;font-weight: bold;
}.t-login .t-d {text-align: center;color: #999;margin: 80rpx 0;
}.t-login .t-c {text-align: right;color: #666666;margin: 30rpx 30rpx 40rpx 0;
}.t-login .t-c .t-c-txt {margin-right: 300rpx;
}.t-login .t-e {text-align: center;width: 600rpx;margin: 40rpx auto 0;
}.t-login .t-g {float: left;width: 33.33%;
}.t-login .t-e image {width: 70rpx;height: 70rpx;
}.t-login .t-f {text-align: center;margin: 80rpx 0 0 0;color: #999;
}.t-login .t-f text {margin-left: 20rpx;color: #b9b9b9;font-size: 27rpx;
}.t-login .uni-input-placeholder {color: #aeaeae;
}.cl {zoom: 1;
}.cl:after {clear: both;display: block;visibility: hidden;height: 0;content: '\20';
}
</style>

http://www.ppmy.cn/news/1266283.html

相关文章

优势怪代码

#include <stdio.h> int main() { int t; scanf("%d", &t); // 读取测试用例的数量 while (t--) { // 对每个测试用例进行处理 int n, max1 0, max2 0, k 0; scanf("%d", &n); // 读取数组的大小 in…

leetcode206. 反转链表

题目描述 给你单链表的头节点 head &#xff0c;请你反转链表&#xff0c;并返回反转后的链表。 示例 1&#xff1a; 输入&#xff1a;head [1,2,3,4,5] 输出&#xff1a;[5,4,3,2,1]示例 2&#xff1a; 输入&#xff1a;head [1,2] 输出&#xff1a;[2,1]示例 3&#xf…

AVP对纵向控制ESP(Ibooster)的需求规范

目录 1. 版本记录... 3 2. 文档范围和控制... 4 2.1 目的/范围... 4 2.2 文档冲突... 4 2.3 文档授权... 4 2.4 文档更改控制... 4 3. 功能概述... 5 4. 系统架构... 6 5. 主要安全目标... 7 5.1 …

Spring Boot 常用注解分类

目录 1.核心注解&#xff1a;2.配置相关注解&#xff1a;3.控制器相关注解&#xff1a;4.数据访问相关注解&#xff1a;5.测试相关注解&#xff1a;6.条件注解&#xff1a;7.AOP相关注解&#xff1a;8.定时任务相关注解&#xff1a;9.消息队列相关注解&#xff1a;10.Spring Se…

青少年CTF-Misc(持续更新中)

FLAG&#xff1a;当觉得自己很菜的时候&#xff0c;就静下心来学习 专研方向:Web安全&#xff0c;CTF 每日emo&#xff1a;听一千遍反方向的钟&#xff0c;我们能回到过去吗&#xff1f; 1.StegoTXT&#xff1a; 解压缩文件。发现字母中存在覆盖。使用0宽隐写在线解密得到flag…

从零构建属于自己的GPT系列5:模型部署1(文本生成函数解读、模型本地化部署、文本生成文本网页展示、代码逐行解读)

&#x1f6a9;&#x1f6a9;&#x1f6a9;Hugging Face 实战系列 总目录 有任何问题欢迎在下面留言 本篇文章的代码运行界面均在PyCharm中进行 本篇文章配套的代码资源已经上传 从零构建属于自己的GPT系列1&#xff1a;数据预处理 从零构建属于自己的GPT系列2&#xff1a;模型训…

〖大前端 - 基础入门三大核心之JS篇(51)〗- 面向对象之认识上下文与上下文规则

说明&#xff1a;该文属于 大前端全栈架构白宝书专栏&#xff0c;目前阶段免费&#xff0c;如需要项目实战或者是体系化资源&#xff0c;文末名片加V&#xff01;作者&#xff1a;哈哥撩编程&#xff0c;十余年工作经验, 从事过全栈研发、产品经理等工作&#xff0c;目前在公司…

docker-compose的介绍与使用

一、docker-compose 常用命令和指令 1. 概要 默认的模板文件是 docker-compose.yml&#xff0c;其中定义的每个服务可以通过 image 指令指定镜像或 build 指令&#xff08;需要 Dockerfile&#xff09;来自动构建。 注意如果使用 build 指令&#xff0c;在 Dockerfile 中设置…