refactor: ♻️ 登录页、首页和个人中心页面样式优化
This commit is contained in:
@@ -27,15 +27,19 @@
|
|||||||
|
|
||||||
<!-- 通知公告 -->
|
<!-- 通知公告 -->
|
||||||
<wd-notice-bar
|
<wd-notice-bar
|
||||||
custom-style="margin-top:10rpx"
|
text="vue-uniapp-template 是一个基于 Vue3 + UniApp 的前端模板项目,提供了一套完整的前端解决方案,包括登录、权限、字典、接口请求、状态管理、页面布局、组件封装等功能。"
|
||||||
text="这是一条消息提示信息,这是一条消息提示信息,这是一条消息提示信息"
|
|
||||||
prefix="check-outline"
|
|
||||||
color="#34D19D"
|
color="#34D19D"
|
||||||
background-color="#f0f9eb"
|
type="info"
|
||||||
/>
|
>
|
||||||
|
<template #prefix>
|
||||||
|
<wd-tag color="#FAA21E" bg-color="#FAA21E" plain custom-style="margin-right:10rpx">
|
||||||
|
通知公告
|
||||||
|
</wd-tag>
|
||||||
|
</template>
|
||||||
|
</wd-notice-bar>
|
||||||
|
|
||||||
<!-- 数据统计 -->
|
<!-- 数据统计 -->
|
||||||
<wd-grid :column="2" custom-style="margin-top:10rpx" :gutter="2">
|
<wd-grid :column="2" :gutter="2">
|
||||||
<wd-grid-item
|
<wd-grid-item
|
||||||
v-for="(item, index) in visitStatsData"
|
v-for="(item, index) in visitStatsData"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="login">
|
<view class="login-container">
|
||||||
<image class="logo" src="@/static/logo.png" style="width: 100px; height: 100px" />
|
<view class="login-header">
|
||||||
<view class="mt-10 flex-center">
|
<image src="/static/images/youlaiorg.png" class="w160rpx h160rpx" />
|
||||||
|
<view class="text-small-light">有来开源,致力于快速构建和高效开发的应用解决方案。</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="login-form">
|
||||||
<wd-form ref="loginFormRef" :model="loginFormData">
|
<wd-form ref="loginFormRef" :model="loginFormData">
|
||||||
<wd-cell-group border>
|
<wd-cell-group border>
|
||||||
<wd-input
|
<wd-input
|
||||||
@@ -24,23 +28,23 @@
|
|||||||
:rules="[{ required: true, message: '请填写密码' }]"
|
:rules="[{ required: true, message: '请填写密码' }]"
|
||||||
/>
|
/>
|
||||||
</wd-cell-group>
|
</wd-cell-group>
|
||||||
<view class="footer">
|
<view class="mt-80rpx">
|
||||||
<wd-button size="large" type="primary" block @click="handleLogin">提交</wd-button>
|
<wd-button size="large" type="primary" block @click="handleLogin">登录</wd-button>
|
||||||
</view>
|
</view>
|
||||||
</wd-form>
|
</wd-form>
|
||||||
<div class="flex justify-center mt-[100rpx]">
|
|
||||||
<div class="flex flex-col items-center" @click="handleWechatLogin">
|
|
||||||
<img src="/static/icons/icon_wx.png" class="w-[100rpx] h-[100rpx]" />
|
|
||||||
<span class="mt-2">微信登录</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="agreement-text">
|
|
||||||
<view class="agreement-links">
|
<view class="login-footer">
|
||||||
<text class="normal-text">登录即同意</text>
|
<view class="text-center">
|
||||||
<text class="link" @click="navigateToUserAgreement">《用户协议》</text>
|
<wd-divider>
|
||||||
<text class="normal-text">和</text>
|
<img src="/static/icons/icon_wx.png" class="w-[100rpx] h-[100rpx]" />
|
||||||
<text class="link" @click="navigateToPrivacy">《隐私政策》</text>
|
</wd-divider>
|
||||||
|
</view>
|
||||||
|
<view class="text-center mt-20rpx">
|
||||||
|
<text class="text-medium-light">登录即同意</text>
|
||||||
|
<text @click="navigateToUserAgreement">《用户协议》</text>
|
||||||
|
<text class="text-medium-light">和</text>
|
||||||
|
<text @click="navigateToPrivacy">《隐私政策》</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -130,52 +134,25 @@ const handleWechatLogin = async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.login {
|
.login-container {
|
||||||
display: flex;
|
height: calc(100vh - 165rpx);
|
||||||
flex-direction: column;
|
background: #fff;
|
||||||
align-items: center;
|
.login-header {
|
||||||
justify-content: center;
|
|
||||||
height: calc(100vh - 50px);
|
|
||||||
.agreement-text {
|
|
||||||
position: fixed;
|
|
||||||
right: 0;
|
|
||||||
bottom: 30px;
|
|
||||||
left: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 20px;
|
justify-content: center;
|
||||||
|
padding: 80rpx 0;
|
||||||
|
}
|
||||||
|
.login-form {
|
||||||
|
width: 80%;
|
||||||
|
margin: 80rpx auto;
|
||||||
|
}
|
||||||
|
|
||||||
.agreement-links {
|
.login-footer {
|
||||||
margin-bottom: 8px;
|
position: absolute;
|
||||||
font-size: 14px;
|
bottom: 40rpx;
|
||||||
line-height: 1.5;
|
width: 100%;
|
||||||
|
|
||||||
.normal-text {
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link {
|
|
||||||
padding: 0 2px;
|
|
||||||
color: #2979ff;
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyright {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.copyright-text {
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<!-- 未登录 -->
|
<!-- 未登录 -->
|
||||||
<view v-else @click="navigateToLoginPage">
|
<view v-else @click="navigateToLoginPage">
|
||||||
<view class="login-tip">您还未登录,请先登录</view>
|
<view class="login-tip">您还未登录,请先登录</view>
|
||||||
<view class="w180rpx mt-2">
|
<view class="w120rpx mt-2">
|
||||||
<button class="login-btn" @click="navigateToLoginPage">登录</button>
|
<button class="login-btn" @click="navigateToLoginPage">登录</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -112,9 +112,9 @@ const handleItemclick = (item: any) => {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.login-btn {
|
.login-btn {
|
||||||
line-height: 60rpx;
|
font-size: 28rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
color: #4d80f0;
|
color: #4d80f0;
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ export default {
|
|||||||
"flex-end": "flex justify-end items-center",
|
"flex-end": "flex justify-end items-center",
|
||||||
"flex-col-center": "flex flex-col justify-center items-center",
|
"flex-col-center": "flex flex-col justify-center items-center",
|
||||||
"flex-between": "flex justify-between items-center",
|
"flex-between": "flex justify-between items-center",
|
||||||
|
"fixed-bottom": "fixed bottom-0 left-0 right-0",
|
||||||
|
"absolute-center": "absolute inset-0 flex justify-center items-center",
|
||||||
|
"text-small-light": "text-xs font-light text-gray-500",
|
||||||
|
"text-medium-light": "text-sm font-light text-gray-500",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user