修改样式问题

This commit is contained in:
zhouyanli
2026-05-09 16:14:36 +08:00
parent c3edf615fc
commit ac8b4c3801
7 changed files with 34 additions and 50 deletions

View File

@@ -17,3 +17,4 @@ export const getLoginBySms = (data) =>{
export const getResetPassword = (data) =>{
return post('/api/butler/auth/forgetPassword',data)
}
// 获取小区列表

View File

@@ -38,11 +38,12 @@
<view class="upload-wrap">
<!-- 已上传图片 -->
<view class="upload-item" v-for="(img, index) in form.images" :key="index">
<image :src="img" mode="aspectFill"></image>
<uni-icons type="close" size="16" @click="deleteImage(index)"></uni-icons>
<image :src="img" mode="aspectFill" class="upload-img"></image>
<image src="/static/imgs/delete.png" class="upload-delete" @click="deleteImage(index)"></image>
<!-- <uni-icons type="close" size="16" @click="deleteImage(index)"></uni-icons> -->
</view>
<!-- 上传按钮 -->
<view class="upload-btn" @click="chooseImage">
<view class="upload-btn" @click="chooseImage" v-if="form.images.length < 3">
<uni-icons type="plus" size="24"></uni-icons>
<text>上传照片</text>
</view>
@@ -86,26 +87,23 @@ const goBackSelect = () => {
// 选择图片
const chooseImage = () => {
// 计算还能选几张
const remainCount = 3 - form.value.images.length;
if (remainCount <= 0) {
uni.showToast({
title: '最多只能上传3张图片',
icon: 'none'
})
return;
}
uni.chooseImage({
count: 3, // 最多选3张
count: remainCount, // 动态限制可选数量
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
// 临时文件路径
const tempFilePaths = res.tempFilePaths
form.value.images = [...form.value.images, ...tempFilePaths]
// 【可选】如果需要上传到服务器,取消下面注释
// tempFilePaths.forEach(path => {
// uni.uploadFile({
// url: '你的上传接口地址',
// filePath: path,
// name: 'file',
// success: (uploadRes) => {
// console.log('上传成功', uploadRes)
// }
// })
// })
}
})
}
@@ -204,18 +202,20 @@ const submitForm = () => {
width: 80px;
height: 80px;
}
.upload-item image {
.upload-item .upload-img{
width: 100%;
height: 100%;
border-radius: 4px;
}
.upload-item uni-icons {
.upload-item .upload-delete{
position: absolute;
top: -5px;
right: -5px;
background: #ff3b30;
color: #fff;
border-radius: 50%;
width: 32rpx;
height: 32rpx;
/* background: #ff3b30; */
/* color: #fff; */
border-radius: 3rpx;
padding: 2px;
}
.upload-btn {

View File

@@ -51,7 +51,7 @@ const smsCode = ref('');
// ========== 计算属性 ==========
// 是否可点击确定按钮(密码格式正确 + 两次输入一致)
const canConfirm = computed(() => {
// 密码格式规则:6-16位任意字符(可根据需求调整)
// 密码格式规则:6-16位任意字符
const pwdReg = /^(?=.*[a-zA-Z])(?=.*\d).{6,16}$/;
// 校验条件:新密码符合格式 + 确认密码和新密码一致 + 均不为空
return pwdReg.test(newPassword.value)
@@ -105,23 +105,6 @@ const handleConfirm = () => {
});
})
// 模拟修改密码请求
// uni.showLoading({
// title: '修改中...'
// });
// setTimeout(() => {
// uni.hideLoading();
// uni.showToast({
// title: '密码修改成功',
// icon: 'success'
// });
// // 密码修改成功后返回上一页(或跳转到登录页)
// uni.navigateTo({
// url:"/pages/login/pwd-login"
// });
// }, 1500);
};
</script>

View File

@@ -57,7 +57,7 @@
<view v-if="displayedCommunities.length === 0 && isSearching" class="empty-state">
<uni-icons type="search" size="60" color="#ccc"></uni-icons>
<text class="empty-text">未找到相关小区</text>
<text class="empty-tip">请尝试其他关键词</text>
<!-- <text class="empty-tip">请尝试其他关键词</text> -->
</view>
</scroll-view>
@@ -253,7 +253,7 @@
uni.showModal({
title: '确认选择',
content: `您已选择: ${selectedItem.value.name}\n地址: ${selectedItem.value.address}`,
content: `您已选择: ${selectedItem.value.name}`,
success: (res) => {
if (res.confirm) {
uni.showToast({
@@ -310,7 +310,7 @@
background-color: #ffffff;
display: flex;
align-items: center;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
/* box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); */
z-index: 10;
position: sticky;
top: 0;
@@ -320,11 +320,11 @@
flex: 1;
background-color: #f3f3f3;
border-radius: 10rpx;
padding: 0 20rpx;
padding: 8rpx 20rpx;
display: flex;
align-items: center;
height: 80rpx;
margin-right: 20rpx;
/* margin-right: 20rpx; */
}
.search-icon {
@@ -409,7 +409,7 @@
.community-name {
font-size: 32rpx;
color: #333;
color: #222;
font-weight: 500;
margin-bottom: 8rpx;
}

View File

@@ -60,15 +60,15 @@
<view class="statistics-wrap">
<view class="statistics-item" @click="goToInspectionRecord">
<text class="num">25</text>
<text class="label">全部巡检点</text>
<text class="label">巡检点</text>
</view>
<view class="statistics-item" @click="goToDaysInspection">
<text class="num">5</text>
<text class="label">待巡检点</text>
<text class="label">巡检点</text>
</view>
<view class="statistics-item">
<text class="num">25</text>
<text class="label">已巡检点</text>
<text class="label">巡检点</text>
</view>
</view>
</view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B