完成了个人资料和初始化导航功能

This commit is contained in:
周添峰 2024-08-26 16:12:49 +08:00
parent 56eb647655
commit c6241d8190
16 changed files with 348 additions and 86 deletions

View File

@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="cn.fjdmy.uniapp.UniappProjectDataService">
<option name="basePath" value="$PROJECT_DIR$" />
<option name="generalBasePath" value="$PROJECT_DIR$" />
<option name="manifestPath" value="$PROJECT_DIR$/manifest.json" />
<option name="pagesPath" value="$PROJECT_DIR$/pages.json" />
<option name="scanNum" value="1" />
<option name="type" value="store" />
<option name="uniapp" value="true" />
<option name="vueVersion" value="3" />
</component>
</project>

View File

@ -6,10 +6,23 @@
{
"navigationStyle":"custom"
}
},{
"path": "pages/index/index",
},
{
"path": "pages/Workbench/Workbench",
"style": {
"navigationBarTitleText": "uni-app"
"navigationBarTitleText": "工作台"
}
},
{
"path": "pages/Me/Me",
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/Message/Message",
"style": {
"navigationBarTitleText": "消息"
}
}
@ -20,5 +33,31 @@
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#ccc",
"selectedColor": "#03A8F6",
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"list": [
{
"pagePath": "pages/Workbench/Workbench",
"iconPath": "static/tabbar/workbench.png",
"selectedIconPath": "static/tabbar/workbench._select.png",
"text": "工作台"
},
{
"pagePath": "pages/Message/Message",
"iconPath": "static/tabbar/message.png",
"selectedIconPath": "static/tabbar/message_select.png",
"text": "消息"
},
{
"pagePath": "pages/Me/Me",
"iconPath": "static/tabbar/me.png",
"selectedIconPath": "static/tabbar/me_select.png",
"text": "我的"
}
]
},
"uniIdRouter": {}
}

125
pages/Me/Me.vue Normal file
View File

@ -0,0 +1,125 @@
<template>
<view class="container">
<view class="container-user">
<view class="user-avater">
<image src="@/static/avatar.png"></image>
</view>
<view class="user-right">
<view class="user-nc">这里是昵称</view>
<view class="user-account">账号123456789</view>
</view>
</view>
<view class="container-operate">
<view class="info-list">
<view class="info-item" @click="info">个人资料<image class="arrow-icon" src="../../static/right.png" mode=""></image></view>
<view class="info-item" @click="deposit">我的押金<image class="arrow-icon" src="../../static/right.png" mode=""></image></view>
<view class="info-item" @click="deposit">我的维修<image class="arrow-icon" src="../../static/right.png" mode=""></image></view>
</view>
</view>
<view class="logout">
<button @click="logout">退出登录</button>
</view>
</view>
</template>
<script setup>
</script>
<style lang="scss">
$globalWidth: 600rpx;
$buttonColor: #0e7ff5;
.container {
display: flex;
background: -webkit-linear-gradient(270deg,
rgba(227, 239, 249, 1) 0%,
rgba(245, 245, 247, 1) 100%);
flex-direction: column;
/* align-items: center; */
width: 100%;
height: 100vh;
align-items: center;
.container-user{
margin-top: 80rpx;
display: flex;
height: 130rpx;
width: $globalWidth;
.user-avater{
width: 120rpx;
height: 100rpx;
& image{
width: 120rpx;
height: 120rpx;
}
}
.user-right{
margin-left: 30rpx;
}
.user-nc{
font-size: 40rpx;
}
.user-account{
margin-top: 13rpx;
}
}
.container-operate{
display: flex;
flex-direction: column;
align-items: flex-start;
background: white;
padding: 20rpx;
margin-top: 80rpx;
border-radius: 30rpx;
.info-list {
display: flex;
flex-direction: column;
font-size: 40rpx;
width: 600rpx;
}
.info-item {
display: flex;
height: 120rpx;
align-items: center;
justify-content: space-between;
}
.info-item-border{
border-bottom: 1px solid #ccc;
}
.arrow-icon {
width: 45rpx;
height: 45rpx;
}
}
.logout button{
margin-top: 30px;
width: 630rpx;
height: 120rpx;
line-height: 120rpx;
border-radius: 40rpx;
color: white;
background-color: $buttonColor;
}
}
</style>

View File

@ -0,0 +1,9 @@
<template>
</template>
<script>
</script>
<style>
</style>

37
pages/Message/Message.vue Normal file
View File

@ -0,0 +1,37 @@
<template>
<view class="container">
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
$globalWidth: 600rpx;
$buttonColor: #0e7ff5;
.container {
display: flex;
background: -webkit-linear-gradient(270deg,
rgba(227, 239, 249, 1) 0%,
rgba(245, 245, 247, 1) 100%);
flex-direction: column;
/* align-items: center; */
width: 100%;
height: 100vh;
align-items: center;
}
</style>

View File

@ -0,0 +1,37 @@
<template>
<view class="container">
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
$globalWidth: 600rpx;
$buttonColor: #0e7ff5;
.container {
display: flex;
background: -webkit-linear-gradient(270deg,
rgba(227, 239, 249, 1) 0%,
rgba(245, 245, 247, 1) 100%);
flex-direction: column;
/* align-items: center; */
width: 100%;
height: 100vh;
align-items: center;
}
</style>

View File

@ -36,8 +36,8 @@
const handleClick = () => {
if (status.value) {
console.log('登录成功')
uni.navigateTo({
url:'/pages/index/index'
uni.switchTab({
url:'/pages/Workbench/Workbench'
})
} else {
console.log('注册成功')
@ -61,86 +61,86 @@
align-items: center;
.container-top {
margin-top: 200rpx;
width: $globalWidth;
font-size: 50rpx;
font-weight: 400;
}
.container-title {
width: $globalWidth;
margin-top: 80rpx;
display: flex;
font-size: 35rpx solid $buttonColor;
.container-title-view {
border-bottom: 6rpx solid $buttonColor;
width: 70rpx;
text-align: center;
border-radius: 15rpx;
}
}
.container-bottom {
width: $globalWidth;
margin-top: 120rpx;
/*
文字样式
*/
.container-text {
font-size: 40rpx;
font-weight: bold;
}
/*
输入框样式
*/
.container-input {
width: $globalWidth;
height: 100rpx;
background-color: #fafafa;
border-radius: 20rpx;
margin-top: 25rpx;
margin-bottom: 25rpx;
padding-left: 20rpx;
margin-right: 20rpx;
margin-left: -10rpx;
}
}
/*
登录按钮
*/
.container-button {
margin-top: 30rpx;
width: $globalWidth;
color: white;
margin-top: 120rpx;
text-align: center;
height: 100rpx;
line-height: 100rpx;
background-color: $buttonColor;
border: none;
border-radius: 60rpx;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.container-change {
text-align: right;
margin-right: 20rpx;
margin-top: 50rpx;
width: $globalWidth;
color: $buttonColor;
font-size: 35rpx;
}
}
.container-top {
margin-top: 200rpx;
width: $globalWidth;
font-size: 50rpx;
font-weight: 400;
}
.container-title {
width: $globalWidth;
margin-top: 80rpx;
display: flex;
font-size: 35rpx solid $buttonColor;
.container-title-view {
border-bottom: 6rpx solid $buttonColor;
width: 70rpx;
text-align: center;
border-radius: 15rpx;
}
}
.container-bottom {
width: $globalWidth;
margin-top: 120rpx;
/*
文字样式
*/
.container-text {
font-size: 40rpx;
font-weight: bold;
}
/*
输入框样式
*/
.container-input {
width: $globalWidth;
height: 100rpx;
background-color: #fafafa;
border-radius: 20rpx;
margin-top: 25rpx;
margin-bottom: 25rpx;
padding-left: 20rpx;
margin-right: 20rpx;
margin-left: -10rpx;
}
}
/*
登录按钮
*/
.container-button {
margin-top: 30rpx;
width: $globalWidth;
color: white;
margin-top: 120rpx;
text-align: center;
height: 100rpx;
line-height: 100rpx;
background-color: $buttonColor;
border: none;
border-radius: 60rpx;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.container-change {
text-align: right;
margin-right: 20rpx;
margin-top: 50rpx;
width: $globalWidth;
color: $buttonColor;
font-size: 35rpx;
}
</style>

BIN
static/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
static/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

12
static/right.svg Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="6px" height="11px" xmlns="http://www.w3.org/2000/svg">
<defs>
<mask fill="white" id="clip252">
<path d="M 5.68999999999994 4.99649999999998 C 5.75907285558753 5.06285868170325 5.79853707490889 5.15422105246098 5.79949999999997 5.24999999999999 C 5.79853707490889 5.34577894753897 5.75907285558753 5.93714131829674 5.69 6.00349999999999 C 5.69 6.00349999999999 0.817999999999984 10.35 0.817999999999984 10.35 C 0.751340213908918 10.4194313627861 0.659250928411325 10.45867914713 0.562999999999988 10.45867914713 C 0.466749071588652 10.45867914713 0.374659786091115 10.4194313627861 0.307999999999993 10.35 C 0.238604024398342 10.2839369506773 0.199324988345552 10.1923129840654 0.199324988345552 10.0965 C 0.199324988345552 10.0006870159346 0.238604024398342 9.90906304932264 0.307999999999993 9.84299999999999 C 0.307999999999993 9.84299999999999 4.92499999999995 5.24999999999999 4.92499999999995 5.24999999999999 C 4.92499999999995 5.24999999999999 0.307999999999993 1.15699999999998 0.307999999999993 1.15699999999998 C 0.238604024398342 1.09093695067732 0.199324988345552 0.999312984065341 0.199324988345552 0.90349999999998 C 0.199324988345552 0.807687015934619 0.238604024398342 0.716063049322628 0.307999999999993 0.649999999999991 C 0.374659786091115 0.580568637213872 0.466749071588652 0.541320852870001 0.562999999999988 0.541320852870001 C 0.659250928411325 0.541320852870001 0.751340213908918 0.580568637213872 0.817999999999984 0.649999999999977 C 0.817999999999984 0.649999999999977 5.69 4.99649999999998 5.68999999999994 4.99649999999998 Z " fill-rule="evenodd" />
</mask>
</defs>
<g transform="matrix(1 0 0 1 -352 -98 )">
<path d="M 5.68999999999994 4.99649999999998 C 5.75907285558753 5.06285868170325 5.79853707490889 5.15422105246098 5.79949999999997 5.24999999999999 C 5.79853707490889 5.34577894753897 5.75907285558753 5.93714131829674 5.69 6.00349999999999 C 5.69 6.00349999999999 0.817999999999984 10.35 0.817999999999984 10.35 C 0.751340213908918 10.4194313627861 0.659250928411325 10.45867914713 0.562999999999988 10.45867914713 C 0.466749071588652 10.45867914713 0.374659786091115 10.4194313627861 0.307999999999993 10.35 C 0.238604024398342 10.2839369506773 0.199324988345552 10.1923129840654 0.199324988345552 10.0965 C 0.199324988345552 10.0006870159346 0.238604024398342 9.90906304932264 0.307999999999993 9.84299999999999 C 0.307999999999993 9.84299999999999 4.92499999999995 5.24999999999999 4.92499999999995 5.24999999999999 C 4.92499999999995 5.24999999999999 0.307999999999993 1.15699999999998 0.307999999999993 1.15699999999998 C 0.238604024398342 1.09093695067732 0.199324988345552 0.999312984065341 0.199324988345552 0.90349999999998 C 0.199324988345552 0.807687015934619 0.238604024398342 0.716063049322628 0.307999999999993 0.649999999999991 C 0.374659786091115 0.580568637213872 0.466749071588652 0.541320852870001 0.562999999999988 0.541320852870001 C 0.659250928411325 0.541320852870001 0.751340213908918 0.580568637213872 0.817999999999984 0.649999999999977 C 0.817999999999984 0.649999999999977 5.69 4.99649999999998 5.68999999999994 4.99649999999998 Z " fill-rule="nonzero" fill="#7e848f" stroke="none" transform="matrix(1 0 0 1 352 98 )" />
<path d="M 5.68999999999994 4.99649999999998 C 5.75907285558753 5.06285868170325 5.79853707490889 5.15422105246098 5.79949999999997 5.24999999999999 C 5.79853707490889 5.34577894753897 5.75907285558753 5.93714131829674 5.69 6.00349999999999 C 5.69 6.00349999999999 0.817999999999984 10.35 0.817999999999984 10.35 C 0.751340213908918 10.4194313627861 0.659250928411325 10.45867914713 0.562999999999988 10.45867914713 C 0.466749071588652 10.45867914713 0.374659786091115 10.4194313627861 0.307999999999993 10.35 C 0.238604024398342 10.2839369506773 0.199324988345552 10.1923129840654 0.199324988345552 10.0965 C 0.199324988345552 10.0006870159346 0.238604024398342 9.90906304932264 0.307999999999993 9.84299999999999 C 0.307999999999993 9.84299999999999 4.92499999999995 5.24999999999999 4.92499999999995 5.24999999999999 C 4.92499999999995 5.24999999999999 0.307999999999993 1.15699999999998 0.307999999999993 1.15699999999998 C 0.238604024398342 1.09093695067732 0.199324988345552 0.999312984065341 0.199324988345552 0.90349999999998 C 0.199324988345552 0.807687015934619 0.238604024398342 0.716063049322628 0.307999999999993 0.649999999999991 C 0.374659786091115 0.580568637213872 0.466749071588652 0.541320852870001 0.562999999999988 0.541320852870001 C 0.659250928411325 0.541320852870001 0.751340213908918 0.580568637213872 0.817999999999984 0.649999999999977 C 0.817999999999984 0.649999999999977 5.69 4.99649999999998 5.68999999999994 4.99649999999998 Z " stroke-width="1" stroke="#7e848f" fill="none" transform="matrix(1 0 0 1 352 98 )" mask="url(#clip252)" />
</g>
</svg>

BIN
static/tabbar/me.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
static/tabbar/me_select.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
static/tabbar/message.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/tabbar/workbench.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB