解决冲突
This commit is contained in:
@@ -17,3 +17,4 @@ export const getLoginBySms = (data) =>{
|
|||||||
export const getResetPassword = (data) =>{
|
export const getResetPassword = (data) =>{
|
||||||
return post('/api/butler/auth/forgetPassword',data)
|
return post('/api/butler/auth/forgetPassword',data)
|
||||||
}
|
}
|
||||||
|
// 获取小区列表
|
||||||
|
|||||||
@@ -51,11 +51,16 @@
|
|||||||
<view class="upload-wrap">
|
<view class="upload-wrap">
|
||||||
<!-- 已上传图片 -->
|
<!-- 已上传图片 -->
|
||||||
<view class="upload-item" v-for="(img, index) in form.images" :key="index">
|
<view class="upload-item" v-for="(img, index) in form.images" :key="index">
|
||||||
<image :src="img" mode="aspectFill"></image>
|
<image :src="img" mode="aspectFill" class="upload-img"></image>
|
||||||
<uni-icons type="close" size="16" @click="deleteImage(index)"></uni-icons>
|
<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>
|
||||||
<!-- 上传按钮 -->
|
<!-- 上传按钮 -->
|
||||||
<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>
|
<uni-icons type="plus" size="24"></uni-icons>
|
||||||
<text>上传照片</text>
|
<text>上传照片</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -99,26 +104,23 @@ const goBackSelect = () => {
|
|||||||
|
|
||||||
// 选择图片
|
// 选择图片
|
||||||
const chooseImage = () => {
|
const chooseImage = () => {
|
||||||
|
// 计算还能选几张
|
||||||
|
const remainCount = 3 - form.value.images.length
|
||||||
|
if (remainCount <= 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '最多只能上传3张图片',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 3, // 最多选3张
|
count: remainCount, // 动态限制可选数量
|
||||||
sizeType: ['original', 'compressed'],
|
sizeType: ['original', 'compressed'],
|
||||||
sourceType: ['album', 'camera'],
|
sourceType: ['album', 'camera'],
|
||||||
success: res => {
|
success: res => {
|
||||||
// 临时文件路径
|
|
||||||
const tempFilePaths = res.tempFilePaths
|
const tempFilePaths = res.tempFilePaths
|
||||||
form.value.images = [...form.value.images, ...tempFilePaths]
|
form.value.images = [...form.value.images, ...tempFilePaths]
|
||||||
|
|
||||||
// 【可选】如果需要上传到服务器,取消下面注释
|
|
||||||
// tempFilePaths.forEach(path => {
|
|
||||||
// uni.uploadFile({
|
|
||||||
// url: '你的上传接口地址',
|
|
||||||
// filePath: path,
|
|
||||||
// name: 'file',
|
|
||||||
// success: (uploadRes) => {
|
|
||||||
// console.log('上传成功', uploadRes)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -218,18 +220,20 @@ const submitForm = () => {
|
|||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
}
|
}
|
||||||
.upload-item image {
|
.upload-item .upload-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.upload-item uni-icons {
|
.upload-item .upload-delete {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -5px;
|
top: -5px;
|
||||||
right: -5px;
|
right: -5px;
|
||||||
background: #ff3b30;
|
width: 32rpx;
|
||||||
color: #fff;
|
height: 32rpx;
|
||||||
border-radius: 50%;
|
/* background: #ff3b30; */
|
||||||
|
/* color: #fff; */
|
||||||
|
border-radius: 3rpx;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
.upload-btn {
|
.upload-btn {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ const smsCode = ref('');
|
|||||||
// ========== 计算属性 ==========
|
// ========== 计算属性 ==========
|
||||||
// 是否可点击确定按钮(密码格式正确 + 两次输入一致)
|
// 是否可点击确定按钮(密码格式正确 + 两次输入一致)
|
||||||
const canConfirm = computed(() => {
|
const canConfirm = computed(() => {
|
||||||
// 密码格式规则:6-16位任意字符(可根据需求调整)
|
// 密码格式规则:6-16位任意字符
|
||||||
const pwdReg = /^(?=.*[a-zA-Z])(?=.*\d).{6,16}$/;
|
const pwdReg = /^(?=.*[a-zA-Z])(?=.*\d).{6,16}$/;
|
||||||
// 校验条件:新密码符合格式 + 确认密码和新密码一致 + 均不为空
|
// 校验条件:新密码符合格式 + 确认密码和新密码一致 + 均不为空
|
||||||
return pwdReg.test(newPassword.value)
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<view v-if="displayedCommunities.length === 0 && isSearching" class="empty-state">
|
<view v-if="displayedCommunities.length === 0 && isSearching" class="empty-state">
|
||||||
<uni-icons type="search" size="60" color="#ccc"></uni-icons>
|
<uni-icons type="search" size="60" color="#ccc"></uni-icons>
|
||||||
<text class="empty-text">未找到相关小区</text>
|
<text class="empty-text">未找到相关小区</text>
|
||||||
<text class="empty-tip">请尝试其他关键词</text>
|
<!-- <text class="empty-tip">请尝试其他关键词</text> -->
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@
|
|||||||
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '确认选择',
|
title: '确认选择',
|
||||||
content: `您已选择: ${selectedItem.value.name}\n地址: ${selectedItem.value.address}`,
|
content: `您已选择: ${selectedItem.value.name}`,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -310,7 +310,7 @@
|
|||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
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;
|
z-index: 10;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -320,11 +320,11 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
background-color: #f3f3f3;
|
background-color: #f3f3f3;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 0 20rpx;
|
padding: 8rpx 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
margin-right: 20rpx;
|
/* margin-right: 20rpx; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-icon {
|
.search-icon {
|
||||||
@@ -409,7 +409,7 @@
|
|||||||
|
|
||||||
.community-name {
|
.community-name {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333;
|
color: #222;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
<view class="statistics-wrap">
|
<view class="statistics-wrap">
|
||||||
<view class="statistics-item" @click="goToInspectionRecord">
|
<view class="statistics-item" @click="goToInspectionRecord">
|
||||||
<text class="num">25</text>
|
<text class="num">25</text>
|
||||||
|
<<<<<<< HEAD
|
||||||
<text class="label">全部巡检</text>
|
<text class="label">全部巡检</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="statistics-item" @click="goToDaysInspection">
|
<view class="statistics-item" @click="goToDaysInspection">
|
||||||
@@ -84,6 +85,17 @@
|
|||||||
<view class="statistics-item">
|
<view class="statistics-item">
|
||||||
<text class="num">25</text>
|
<text class="num">25</text>
|
||||||
<text class="label">已巡检</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>
|
||||||
|
</view>
|
||||||
|
<view class="statistics-item">
|
||||||
|
<text class="num">25</text>
|
||||||
|
<text class="label">巡检点</text>
|
||||||
|
>>>>>>> ac8b4c380134ed183aa6f67c4ed3497e07b82b51
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
BIN
wuye-manager-uniapp/static/imgs/delete.png
Normal file
BIN
wuye-manager-uniapp/static/imgs/delete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 608 B |
Reference in New Issue
Block a user