fix: 前端页面功能优化。

This commit is contained in:
tianyongbao
2025-11-14 20:06:41 +08:00
parent 459ab82cf2
commit 93420ca772
10 changed files with 680 additions and 478 deletions

View File

@@ -7,7 +7,6 @@
>
</u-navbar>
<view class="section">
<view class="section-title">{{ title}}</view>
<view class="form-view">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">

View File

@@ -9,7 +9,7 @@
<view class="detail-card">
<view class="card-header">
<view class="card-title">
<uni-icons type="heart" size="24" color="#fff"></uni-icons>
<uni-icons type="heart" size="20" color="#fff"></uni-icons>
<text class="card-name">{{ detailInfo.name }}</text>
</view>
</view>
@@ -89,7 +89,7 @@ onLoad((option) => {
.card-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 32rpx;
padding: 12rpx 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
@@ -97,12 +97,13 @@ onLoad((option) => {
.card-title {
display: flex;
align-items: center;
gap: 12rpx;
gap: 8rpx;
.card-name {
color: #fff;
font-size: 36rpx;
font-size: 28rpx;
font-weight: bold;
line-height: 1;
}
}
}

View File

@@ -22,10 +22,14 @@
</view>
</view>
<view class="btn-box">
<u-button text="重置" @click="resetQuery()"
customStyle="flex: 1; background: #f5f7fa; color: #666666; border: none; border-radius: 12rpx; font-size: 30rpx; height: 88rpx;"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"
customStyle="flex: 2; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; border-radius: 12rpx; font-size: 30rpx; font-weight: 600; height: 88rpx; box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);"></u-button>
<view class="btn-reset" @click="resetQuery()">
<uni-icons type="reload" size="16" color="#909399"></uni-icons>
<text>重置</text>
</view>
<view class="btn-confirm" @click="searchSubmit()">
<uni-icons type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
<text>确定</text>
</view>
</view>
</view>
</u-transition>
@@ -207,17 +211,26 @@ function selectStatus(item) {
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '确定要删除',
success: function (res) {
if (res.confirm) {
delHeartJourney(item.id)
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
} else if (res.cancel) {
console.log('取消');
}
}
});
title: '确认删除',
content: '确定要删除这条记录吗?',
confirmText: '删除',
cancelText: '取消',
confirmColor: '#f5576c',
cancelColor: '#909399',
success: function (res) {
if (res.confirm) {
delHeartJourney(item.id).then(() => {
uni.showToast({
title: '删除成功',
icon: 'success'
})
pageNum.value = 1
listData.value = []
getList()
})
}
}
});
}
</script>
@@ -326,6 +339,49 @@ function selectStatus(item) {
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
.btn-reset,
.btn-confirm {
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
height: 88rpx;
border-radius: 12rpx;
font-size: 30rpx;
font-weight: 600;
transition: all 0.3s ease;
&:active {
transform: scale(0.98);
opacity: 0.9;
}
text {
line-height: 1;
}
}
.btn-reset {
flex: 1;
background: #f5f7fa;
border: 2rpx solid #dcdfe6;
text {
color: #606266;
}
}
.btn-confirm {
flex: 1;
background: #667eea;
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.2);
border: none;
text {
color: #ffffff;
}
}
}
}
}
@@ -341,7 +397,7 @@ function selectStatus(item) {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx;
padding: 12rpx 20rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.card-name-section {
@@ -352,14 +408,14 @@ function selectStatus(item) {
}
.card-icon {
width: 56rpx;
height: 56rpx;
width: 40rpx;
height: 40rpx;
background: rgba(255, 255, 255, 0.2);
border-radius: 16rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
margin-right: 10rpx;
flex-shrink: 0;
backdrop-filter: blur(10rpx);
}
@@ -373,9 +429,9 @@ function selectStatus(item) {
.card-name {
color: #ffffff;
font-size: 32rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 1.2;
line-height: 1.3;
}
}
}