小程序完成(账号密码登录、风格修改、签字功能)

This commit is contained in:
2026-03-06 18:47:52 +08:00
parent 6f7604897f
commit 96be55b0be
13 changed files with 1173 additions and 186 deletions
+161 -43
View File
@@ -14,24 +14,28 @@
</view>
<!--<image src="https://raw.githubusercontent.com/weilanwl/ColorUI/master/demo/images/wave.gif" mode="scaleToFill" class="gif-wave"></image>-->
</view>
<view class="padding flex text-center text-grey bg-white shadow-warp">
<view class="flex flex-sub flex-direction solid-right">
<view class="text-xxl text-green">{{myBasisInfo.today_sum}}</view>
<view class="margin-top-sm">今日重量</view>
<!-- 今日数据统计 -->
<view class="stats-container">
<view class="stat-card stat-count">
<view class="stat-icon">📊</view>
<view class="stat-value">{{myBasisInfo.today_count}}</view>
<view class="stat-label">今日数量</view>
</view>
<view class="flex flex-sub flex-direction solid-right">
<view class="text-xxl text-blue">{{myBasisInfo.today_count}}</view>
<view class="margin-top-sm">今日数量</view>
<view class="stat-card stat-weight">
<view class="stat-icon"></view>
<view class="stat-value">{{myBasisInfo.today_sum}}</view>
<view class="stat-label">今日重量</view>
</view>
<view class="flex flex-sub flex-direction">
<view class="text-xxl text-red">{{myBasisInfo.today_abnormal}}</view>
<view class="margin-top-sm">今日异常</view>
<view class="stat-card stat-abnormal">
<view class="stat-icon"></view>
<view class="stat-value">{{myBasisInfo.today_abnormal}}</view>
<view class="stat-label">今日异常</view>
</view>
</view>
<view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius">
<view class="cu-item arrow">
<navigator class="content" url="/pages/main/inventory" hover-class="none">
<text class="cuIcon-deletefill text-cyan"></text>
<text class="cuIcon-deletefill text-blue"></text>
<text class="text-grey">科室汇总</text>
</navigator>
</view>
@@ -43,26 +47,20 @@
</view> -->
<view class="cu-item arrow">
<navigator class="content" url="/pages/plugin/handList" hover-class="none">
<text class="cuIcon-selectionfill text-cyan"></text>
<text class="cuIcon-selectionfill text-blue"></text>
<text class="text-grey">交接列表</text>
</navigator>
</view>
<view class="cu-item arrow">
<navigator class="content" url="/pages/plugin/personalInformation" hover-class="none">
<text class="cuIcon-myfill text-cyan"></text>
<text class="cuIcon-myfill text-blue"></text>
<text class="text-grey">个人信息</text>
</navigator>
</view>
<view class="cu-item arrow">
<navigator class="content" url="/pages/plugin/about" hover-class="none">
<text class="cuIcon-medalfill text-cyan"></text>
<text class="text-grey">关于我们</text>
</navigator>
</view>
<view class="cu-item arrow">
<navigator class="content" hover-class="none" @click="buttonClick">
<text class="cuIcon-myfill text-cyan"></text>
<text class="text-grey">注销账户</text>
<text class="cuIcon-myfill text-blue"></text>
<text class="text-grey">退出登录</text>
</navigator>
</view>
</view>
@@ -117,28 +115,30 @@
},
buttonClick(){
console.info(getApp().globalData)
// 将数据库中的数据清空
let that = this;
uni.request({
url: 'https://lekapi.opmonitor.com/?c=app_api&a=clearData',
data: {openid: getApp().globalData.openid},
header: {
'Content-type': 'application/json'
},
success: function(res){
// 将globalData清空并刷新
getApp().globalData.openid = ''
console.info(getApp().globalData)
// 跳转到首页
uni.reLaunch({
url: '/pages/plugin/home'
})
},
fail: () => {
console.info('小程序域名不正确,请检查域名的正确性')
}
uni.reLaunch({
url: '/pages/register/login'
})
// 将数据库中的数据清空
// let that = this;
// uni.request({
// url: 'https://lekapi.opmonitor.com/?c=app_api&a=clearData',
// data: {openid: getApp().globalData.openid},
// header: {
// 'Content-type': 'application/json'
// },
// success: function(res){
// // 将globalData清空并刷新
// getApp().globalData.openid = ''
// console.info(getApp().globalData)
// // 跳转到首页
// uni.reLaunch({
// url: '/pages/plugin/home'
// })
// },
// fail: () => {
// console.info('小程序域名不正确,请检查域名的正确性')
// }
// })
}
}
@@ -152,7 +152,7 @@
}
.UCenter-bg {
background:-webkit-linear-gradient(right,#15D2BB,#2CC9E9);
background:-webkit-linear-gradient(right,#4a90e2,#357abd);
background-size: cover;
height: 550rpx;
display: flex;
@@ -224,4 +224,122 @@
border: 2px solid #fff;
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
}
/* 统计数据容器 */
.stats-container {
display: flex;
justify-content: space-around;
padding: 40rpx 20rpx;
margin: -80rpx 30rpx 30rpx 30rpx;
background: rgba(255, 255, 255, 0.95);
border-radius: 24rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);
position: relative;
z-index: 10;
backdrop-filter: blur(10rpx);
border: 1px solid rgba(255, 255, 255, 0.6);
}
/* 统计卡片 */
.stat-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 24rpx 20rpx;
border-radius: 20rpx;
width: 200rpx;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
}
.stat-card::before {
content: '';
position: absolute;
top: -50%;
right: -50%;
width: 100%;
height: 100%;
background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
border-radius: 50%;
}
/* 今日数量卡片 */
.stat-count {
background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
box-shadow: 0 6rpx 24rpx rgba(74, 144, 226, 0.35);
}
.stat-count .stat-icon {
font-size: 44rpx;
margin-bottom: 8rpx;
filter: drop-shadow(0 2rpx 8rpx rgba(0, 0, 0, 0.15));
}
.stat-count .stat-value {
font-size: 48rpx;
font-weight: 800;
color: #fff;
margin-bottom: 6rpx;
text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
}
.stat-count .stat-label {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
}
/* 今日重量卡片 */
.stat-weight {
background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
box-shadow: 0 6rpx 24rpx rgba(39, 174, 96, 0.35);
}
.stat-weight .stat-icon {
font-size: 44rpx;
margin-bottom: 8rpx;
filter: drop-shadow(0 2rpx 8rpx rgba(0, 0, 0, 0.15));
}
.stat-weight .stat-value {
font-size: 48rpx;
font-weight: 800;
color: #fff;
margin-bottom: 6rpx;
text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
}
.stat-weight .stat-label {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
}
/* 今日异常卡片 */
.stat-abnormal {
background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
box-shadow: 0 6rpx 24rpx rgba(231, 76, 60, 0.35);
}
.stat-abnormal .stat-icon {
font-size: 44rpx;
margin-bottom: 8rpx;
filter: drop-shadow(0 2rpx 8rpx rgba(0, 0, 0, 0.15));
}
.stat-abnormal .stat-value {
font-size: 48rpx;
font-weight: 800;
color: #fff;
margin-bottom: 6rpx;
text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
}
.stat-abnormal .stat-label {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
}
</style>