新增用户协议、故障上报页面
This commit is contained in:
@@ -8,10 +8,11 @@
|
|||||||
<view class="input-item">
|
<view class="input-item">
|
||||||
<view class="input-icon">
|
<view class="input-icon">
|
||||||
<!-- <uni-icons type="phone" size="24" color="#999"></uni-icons> -->
|
<!-- <uni-icons type="phone" size="24" color="#999"></uni-icons> -->
|
||||||
<image src="http://47.104.199.163:9090/images/login/phone.png" mode="" style="height: 100%;width: 100%;"></image>
|
<image src="http://47.104.199.163:9090/images/login/phone.png" mode=""
|
||||||
|
style="height: 100%;width: 100%;"></image>
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput class="input-content" type="number" v-model="phoneNumber"
|
<uni-easyinput class="input-content" type="number" v-model="phoneNumber" placeholder="请输入手机号"
|
||||||
placeholder="请输入手机号" :inputBorder="false" maxlength="11" :placeholderStyle="placeholderStyle">
|
:inputBorder="false" maxlength="11" :placeholderStyle="placeholderStyle">
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
<!-- <input
|
<!-- <input
|
||||||
class="input-content"
|
class="input-content"
|
||||||
@@ -26,10 +27,11 @@
|
|||||||
<!-- 验证码输入框 + 获取验证码按钮 -->
|
<!-- 验证码输入框 + 获取验证码按钮 -->
|
||||||
<view class="input-item verify-item">
|
<view class="input-item verify-item">
|
||||||
<view class="input-icon">
|
<view class="input-icon">
|
||||||
<image src="http://47.104.199.163:9090/images/login/code.png" mode="" style="height: 100%;width: 100%;"></image>
|
<image src="http://47.104.199.163:9090/images/login/code.png" mode="" style="height: 100%;width: 100%;">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode"
|
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode" placeholder="请输入验证码"
|
||||||
placeholder="请输入验证码" :inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle">
|
:inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle">
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
<!-- <input
|
<!-- <input
|
||||||
class="input-content verify-input"
|
class="input-content verify-input"
|
||||||
@@ -39,38 +41,25 @@
|
|||||||
maxlength="6"
|
maxlength="6"
|
||||||
@input="checkForm"
|
@input="checkForm"
|
||||||
/> -->
|
/> -->
|
||||||
<button
|
<button class="get-verify-btn" :disabled="!canGetVerify || countDown > 0" @click="getVerifyCode">
|
||||||
class="get-verify-btn"
|
|
||||||
:disabled="!canGetVerify || countDown > 0"
|
|
||||||
@click="getVerifyCode"
|
|
||||||
>
|
|
||||||
{{ countDown > 0 ? `${countDown}s后重新获取` : '获取验证码' }}
|
{{ countDown > 0 ? `${countDown}s后重新获取` : '获取验证码' }}
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 协议勾选 -->
|
<!-- 协议勾选 -->
|
||||||
<view class="agreement-item" @click="toggleAgreement">
|
<view class="agreement-item" >
|
||||||
<uni-icons
|
<view @click="toggleAgreement">
|
||||||
type="checkbox-filled"
|
<uni-icons type="checkbox-filled" size="24" color="#4D5DFA" v-if="agreeAgreement"></uni-icons>
|
||||||
size="24"
|
<uni-icons type="checkbox" size="24" color="#999" v-else></uni-icons>
|
||||||
color="#4D5DFA"
|
</view>
|
||||||
v-if="agreeAgreement"
|
|
||||||
></uni-icons>
|
<text class="agreement-text" @click.stop="goToPrivacy">我已阅读并同意
|
||||||
<uni-icons
|
<text class="agreePrivacy" :class="{active:isClicked}">《用户隐私政策》</text>
|
||||||
type="checkbox"
|
</text>
|
||||||
size="24"
|
|
||||||
color="#999"
|
|
||||||
v-else
|
|
||||||
></uni-icons>
|
|
||||||
<text class="agreement-text">我已阅读并同意《用户隐私政策》</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 登录按钮 -->
|
<!-- 登录按钮 -->
|
||||||
<button
|
<button class="login-btn" :disabled="!canLogin" @click="handleLogin">
|
||||||
class="login-btn"
|
|
||||||
:disabled="!canLogin"
|
|
||||||
@click="handleLogin"
|
|
||||||
>
|
|
||||||
登录
|
登录
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -83,58 +72,78 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onUnmounted } from 'vue';
|
import {
|
||||||
import {getLoginBySms,getSendCode} from '../api/api.js'
|
ref,
|
||||||
|
computed,
|
||||||
|
onUnmounted
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
getLoginBySms,
|
||||||
|
getSendCode
|
||||||
|
} from '../api/api.js'
|
||||||
|
|
||||||
// ========== 响应式数据 ==========
|
// ========== 响应式数据 ==========
|
||||||
// 手机号
|
// 手机号
|
||||||
const phoneNumber = ref('');
|
const phoneNumber = ref('');
|
||||||
// 验证码
|
// 验证码
|
||||||
const verifyCode = ref('');
|
const verifyCode = ref('');
|
||||||
const placeholderStyle = ref('font-size:24rpx')
|
const placeholderStyle = ref('font-size:24rpx')
|
||||||
// 是否同意协议
|
// 是否同意协议
|
||||||
const agreeAgreement = ref(true); // 默认勾选
|
const agreeAgreement = ref(false); // 默认勾选
|
||||||
// 倒计时(秒)
|
// 倒计时(秒)
|
||||||
const countDown = ref(0);
|
const countDown = ref(0);
|
||||||
// 定时器
|
// 定时器
|
||||||
let timer = null;
|
let timer = null;
|
||||||
|
// 控制点击变色
|
||||||
|
const isClicked = ref(false)
|
||||||
|
|
||||||
// ========== 计算属性 ==========
|
// ========== 计算属性 ==========
|
||||||
// 是否可以获取验证码(手机号格式正确)
|
// 是否可以获取验证码(手机号格式正确)
|
||||||
const canGetVerify = computed(() => {
|
const canGetVerify = computed(() => {
|
||||||
// 手机号正则:11位数字,以1开头
|
// 手机号正则:11位数字,以1开头
|
||||||
const phoneReg = /^1[3-9]\d{9}$/;
|
const phoneReg = /^1[3-9]\d{9}$/;
|
||||||
return phoneReg.test(phoneNumber.value);
|
return phoneReg.test(phoneNumber.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 是否可以登录(手机号+验证码+协议都满足)
|
// 是否可以登录(手机号+验证码+协议都满足)
|
||||||
const canLogin = computed(() => {
|
const canLogin = computed(() => {
|
||||||
const phoneReg = /^1[3-9]\d{9}$/;
|
const phoneReg = /^1[3-9]\d{9}$/;
|
||||||
const verifyReg = /^\d{6}$/;
|
const verifyReg = /^\d{6}$/;
|
||||||
return phoneReg.test(phoneNumber.value) && verifyReg.test(verifyCode.value) && agreeAgreement.value;
|
return phoneReg.test(phoneNumber.value) && verifyReg.test(verifyCode.value) && agreeAgreement.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
// ========== 方法 ==========
|
// ========== 方法 ==========
|
||||||
// 检查表单状态
|
// 检查表单状态
|
||||||
const checkForm = () => {
|
const checkForm = () => {
|
||||||
// 无需额外逻辑,计算属性已实时监听
|
// 无需额外逻辑,计算属性已实时监听
|
||||||
};
|
};
|
||||||
|
|
||||||
// 切换协议勾选状态
|
// 切换协议勾选状态
|
||||||
const toggleAgreement = () => {
|
const toggleAgreement = () => {
|
||||||
agreeAgreement.value = !agreeAgreement.value;
|
agreeAgreement.value = !agreeAgreement.value;
|
||||||
};
|
};
|
||||||
|
// 跳转隐私协议
|
||||||
|
const goToPrivacy = () => {
|
||||||
|
// 点击变色
|
||||||
|
isClicked.value = true
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pageSubPack/loginSub/privacy',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
const getVerifyCode = () => {
|
const getVerifyCode = () => {
|
||||||
if (!canGetVerify.value) return;
|
if (!canGetVerify.value) return;
|
||||||
let params = {
|
let params = {
|
||||||
phone:phoneNumber.value,
|
phone: phoneNumber.value,
|
||||||
scene:'login'
|
scene: 'login'
|
||||||
}
|
}
|
||||||
uni.showLoading({ title: '发送中...', mask: true });
|
uni.showLoading({
|
||||||
getSendCode(params).then(res =>{
|
title: '发送中...',
|
||||||
if(res.code === 200){
|
mask: true
|
||||||
|
});
|
||||||
|
getSendCode(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码已发送',
|
title: '验证码已发送',
|
||||||
@@ -149,7 +158,7 @@ const getVerifyCode = () => {
|
|||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码发送失败',
|
title: '验证码发送失败',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
@@ -162,39 +171,53 @@ const getVerifyCode = () => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 登录处理
|
// 登录处理
|
||||||
const handleLogin = () => {
|
const handleLogin = () => {
|
||||||
if (!canLogin.value) return;
|
if (!canLogin.value) return;
|
||||||
uni.showLoading({ title: '登录中...', mask: true });
|
uni.showLoading({
|
||||||
|
title: '登录中...',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
let params = {
|
let params = {
|
||||||
phone:phoneNumber.value,
|
phone: phoneNumber.value,
|
||||||
smsCode:'123456',
|
smsCode: '123456',
|
||||||
scene:'login',
|
scene: 'login',
|
||||||
}
|
}
|
||||||
getLoginBySms(params).then(res =>{
|
getLoginBySms(params).then(res => {
|
||||||
if(res.code === 200){
|
if (res.code === 200) {
|
||||||
if(res.data){
|
if (res.data) {
|
||||||
uni.setStorageSync('token', res.data.token);
|
uni.setStorageSync('token', res.data.token);
|
||||||
// 存用户ID
|
// 存用户ID
|
||||||
if(res.data.userId) {
|
if (res.data.userId) {
|
||||||
uni.setStorageSync('userId', res.data.userId);
|
uni.setStorageSync('userId', res.data.userId);
|
||||||
}
|
}
|
||||||
// 存当前绑定的小区ID,0 表示未绑定
|
// 存当前绑定的小区ID,0 表示未绑定
|
||||||
const currentVillageId = res.data.currentVillageId || 0;
|
const currentVillageId = res.data.currentVillageId || 0;
|
||||||
uni.setStorageSync('currentVillageId', currentVillageId);
|
uni.setStorageSync('currentVillageId', currentVillageId);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({ title: '登录成功', icon: 'success' });
|
uni.showToast({
|
||||||
setTimeout(() =>{
|
title: '登录成功',
|
||||||
uni.switchTab({ url: '/pages/index/index' });
|
icon: 'success'
|
||||||
},1500)
|
});
|
||||||
}else{
|
setTimeout(() => {
|
||||||
uni.showToast({ title: '登录失败', icon: 'error' });
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
});
|
||||||
|
}, 1500)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '登录失败',
|
||||||
|
icon: 'error'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({ title:'登录失败', icon: 'error' });
|
uni.showToast({
|
||||||
|
title: '登录失败',
|
||||||
|
icon: 'error'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -209,41 +232,42 @@ const handleLogin = () => {
|
|||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
// title: '登录中...'
|
// title: '登录中...'
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
// ========== 生命周期 ==========
|
// ========== 生命周期 ==========
|
||||||
// 页面卸载时清除定时器
|
// 页面卸载时清除定时器
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* 页面容器 */
|
/* 页面容器 */
|
||||||
.login-page {
|
.login-page {
|
||||||
padding: 80rpx 40rpx 40rpx;
|
padding: 80rpx 40rpx 40rpx;
|
||||||
/* background-color: #f8f9fa; */
|
/* background-color: #f8f9fa; */
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: repeating-linear-gradient(to bottom, #E2F0FF, #F6FAFF );
|
background: repeating-linear-gradient(to bottom, #E2F0FF, #F6FAFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
.status_bar {
|
.status_bar {
|
||||||
height: 160px;
|
height: 160px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 登录标题 */
|
/* 登录标题 */
|
||||||
.login-title {
|
.login-title {
|
||||||
font-size: 48rpx;
|
font-size: 48rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 80rpx;
|
margin-bottom: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 输入框项 */
|
/* 输入框项 */
|
||||||
.input-item {
|
.input-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -252,37 +276,37 @@ onUnmounted(() => {
|
|||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 验证码输入项(特殊布局) */
|
/* 验证码输入项(特殊布局) */
|
||||||
.verify-item {
|
.verify-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-right: 220rpx;
|
padding-right: 220rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 输入框图标 */
|
/* 输入框图标 */
|
||||||
.input-icon {
|
.input-icon {
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 输入框内容 */
|
/* 输入框内容 */
|
||||||
.input-content {
|
.input-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 验证码输入框 */
|
/* 验证码输入框 */
|
||||||
.verify-input {
|
.verify-input {
|
||||||
padding-right: 20rpx;
|
padding-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 获取验证码按钮 */
|
/* 获取验证码按钮 */
|
||||||
.get-verify-btn {
|
.get-verify-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10rpx;
|
right: 10rpx;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
@@ -296,32 +320,38 @@ onUnmounted(() => {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 获取验证码按钮禁用状态 */
|
/* 获取验证码按钮禁用状态 */
|
||||||
.get-verify-btn:disabled {
|
.get-verify-btn:disabled {
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 协议勾选项 */
|
/* 协议勾选项 */
|
||||||
.agreement-item {
|
.agreement-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 40rpx 0;
|
margin: 40rpx 0;
|
||||||
padding-left: 10rpx;
|
padding-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 协议文本 */
|
/* 协议文本 */
|
||||||
.agreement-text {
|
.agreement-text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
.agreePrivacy{
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.agreePrivacy.active{
|
||||||
|
color: #4D5DFA;
|
||||||
|
}
|
||||||
|
|
||||||
/* 登录按钮 */
|
/* 登录按钮 */
|
||||||
.login-btn {
|
.login-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
@@ -330,30 +360,31 @@ onUnmounted(() => {
|
|||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 登录按钮禁用状态 */
|
/* 登录按钮禁用状态 */
|
||||||
.login-btn:disabled {
|
.login-btn:disabled {
|
||||||
background-color: #99c8ff;
|
background-color: #99c8ff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
/* border-radius: 50px; */
|
/* border-radius: 50px; */
|
||||||
}
|
}
|
||||||
/* 禁用按钮边框 */
|
|
||||||
button:after{
|
|
||||||
border-radius: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 底部链接 */
|
/* 禁用按钮边框 */
|
||||||
.bottom-link {
|
button:after {
|
||||||
|
border-radius: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 底部链接 */
|
||||||
|
.bottom-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 链接项 */
|
/* 链接项 */
|
||||||
.link-item {
|
.link-item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #4D5DFA;
|
color: #4D5DFA;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
169
wuye-manager-uniapp/pageSubPack/loginSub/privacy.vue
Normal file
169
wuye-manager-uniapp/pageSubPack/loginSub/privacy.vue
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<template>
|
||||||
|
<view class="privacy-page">
|
||||||
|
|
||||||
|
<!-- 协议内容 -->
|
||||||
|
<scroll-view class="privacy-content" scroll-y>
|
||||||
|
<view class="content-wrap">
|
||||||
|
<view class="title">隐私政策</view>
|
||||||
|
|
||||||
|
<view class="section">
|
||||||
|
<!-- <view class="section-title">一、适用范围</view> -->
|
||||||
|
<view class="section-text">
|
||||||
|
欢迎使用我们的产品/服务(以下统称“服务”)。我们高度重视用户隐私保护,
|
||||||
|
致力于为您提供安全、可靠的服务体验。本隐私政策旨在向您说明我们如何收集、使用、存储、保护您的个人信息,
|
||||||
|
以及您享有的相关权利。请您在使用我们的服务前,仔细阅读并理解本政策全部内容,
|
||||||
|
一旦您使用我们的服务,即视为您同意本政策的所有条款。
|
||||||
|
一、我们收集的个人信息 为了向您提供更优质、个性化的服务,我们会根据服务功能的需要,收集您主动提供或在使用服务过程中产生的个人信息,
|
||||||
|
具体如下: (一)您主动提供的信息 账户注册信息:当您注册我们的账户时,您可能需要提供姓名、手机号码、电子邮箱、密码等信息,用于身份验证、账户登录及找回。
|
||||||
|
服务相关信息:根据您使用的具体服务,您可能需要提供相关补充信息(如使用客服咨询服务时,提供问题描述及相关凭证;使用交易类服务时,提供收货地址、支付相关信息等)。
|
||||||
|
自愿提交的信息:您主动向我们反馈的意见、建议,或参与我们的问卷调查、活动时提交的相关信息。
|
||||||
|
若您通过第三方平台(如微信、支付宝、QQ等)登录我们的服务,我们会根据您的授权,
|
||||||
|
从第三方获取您的相关账户信息(如昵称、头像),用于完成登录及账户绑定,
|
||||||
|
我们不会获取第三方平台的其他未授权信息。
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<!-- 底部同意按钮(新增) -->
|
||||||
|
<!-- <view class="agree-btn-wrap" v-if="needAgree">
|
||||||
|
<button class="agree-btn" @click="agreePrivacy">同意隐私政策</button>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
// 返回上一页
|
||||||
|
// const navigateBack = () => {
|
||||||
|
// uni.navigateBack({
|
||||||
|
// delta: 1
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
// 页面加载
|
||||||
|
// onLoad((options) => {
|
||||||
|
// // 判断是否需要同意
|
||||||
|
// if (options.needAgree === '1') {
|
||||||
|
// needAgree.value = true;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
// 返回上一页
|
||||||
|
// const goToBack = () => {
|
||||||
|
// uni.navigateBack({
|
||||||
|
// delta: 1
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
// 同意隐私政策(新增)
|
||||||
|
// const agreePrivacy = () => {
|
||||||
|
// // #ifdef MP-WEIXIN
|
||||||
|
// wx.requirePrivacyAuthorize({
|
||||||
|
// success: () => {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '已同意隐私政策',
|
||||||
|
// icon: 'success'
|
||||||
|
// });
|
||||||
|
// // 记录授权状态(可选,存入本地缓存)
|
||||||
|
// uni.setStorageSync('privacyAgreed', true);
|
||||||
|
// navigateBack();
|
||||||
|
// },
|
||||||
|
// fail: () => {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '授权失败',
|
||||||
|
// icon: 'none'
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// // #endif
|
||||||
|
|
||||||
|
// // 非微信小程序直接标记同意
|
||||||
|
// // #ifndef MP-WEIXIN
|
||||||
|
// uni.setStorageSync('privacyAgreed', true);
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '已同意隐私政策',
|
||||||
|
// icon: 'success'
|
||||||
|
// });
|
||||||
|
// navigateBack();
|
||||||
|
// // #endif
|
||||||
|
// };
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.privacy-page {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 导航栏 */
|
||||||
|
.nav-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1rpx solid #eee;
|
||||||
|
}
|
||||||
|
.nav-back {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.back-text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
.nav-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-left: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 协议内容 */
|
||||||
|
.privacy-content {
|
||||||
|
height: calc(100vh - 88rpx);
|
||||||
|
}
|
||||||
|
.content-wrap {
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.section {
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
|
.section-title {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.section-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
/* 同意按钮样式(新增) */
|
||||||
|
.agree-btn-wrap {
|
||||||
|
padding: 20rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
border-top: 1rpx solid #eee;
|
||||||
|
}
|
||||||
|
.agree-btn {
|
||||||
|
background-color: #007aff;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -8,10 +8,11 @@
|
|||||||
<view class="input-item">
|
<view class="input-item">
|
||||||
<view class="input-icon">
|
<view class="input-icon">
|
||||||
<!-- <uni-icons type="phone" size="24" color="#999"></uni-icons> -->
|
<!-- <uni-icons type="phone" size="24" color="#999"></uni-icons> -->
|
||||||
<image src="http://47.104.199.163:9090/images/login/phone.png" mode="" style="height: 100%;width: 100%;"></image>
|
<image src="http://47.104.199.163:9090/images/login/phone.png" mode=""
|
||||||
|
style="height: 100%;width: 100%;"></image>
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput class="input-content" type="text" v-model="phoneNumber"
|
<uni-easyinput class="input-content" type="text" v-model="phoneNumber" placeholder="请输入帐号"
|
||||||
placeholder="请输入帐号" :inputBorder="false" :placeholderStyle="placeholderStyle">
|
:inputBorder="false" :placeholderStyle="placeholderStyle">
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -19,40 +20,31 @@
|
|||||||
<view class="input-item">
|
<view class="input-item">
|
||||||
<view class="input-icon">
|
<view class="input-icon">
|
||||||
<!-- <uni-icons type="locked" size="24" color="#999"></uni-icons> -->
|
<!-- <uni-icons type="locked" size="24" color="#999"></uni-icons> -->
|
||||||
<image src="http://47.104.199.163:9090/images/login/password.png" mode="" style="height: 100%;width: 100%;"></image>
|
<image src="http://47.104.199.163:9090/images/login/password.png" mode=""
|
||||||
|
style="height: 100%;width: 100%;"></image>
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput class="input-content" type="password" v-model="password"
|
<uni-easyinput class="input-content" type="password" v-model="password" placeholder="请输入密码"
|
||||||
placeholder="请输入密码" :inputBorder="false" :placeholderStyle="placeholderStyle">
|
:inputBorder="false" :placeholderStyle="placeholderStyle">
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 协议勾选 + 忘记密码 -->
|
<!-- 协议勾选 + 忘记密码 -->
|
||||||
<view class="agreement-wrap">
|
<view class="agreement-wrap">
|
||||||
<view class="agreement-item" @click="toggleAgreement">
|
<view class="agreement-item">
|
||||||
<uni-icons
|
<view @click="toggleAgreement">
|
||||||
type="checkbox-filled"
|
<uni-icons type="checkbox-filled" size="24" color="#4D5DFA" v-if="agreeAgreement"></uni-icons>
|
||||||
size="24"
|
<uni-icons type="checkbox" size="24" color="#999" v-else></uni-icons>
|
||||||
color="#4D5DFA"
|
</view>
|
||||||
v-if="agreeAgreement"
|
<text class="agreement-text" @click.stop="goToPrivacy">我已阅读并同意
|
||||||
></uni-icons>
|
<text class="agreePrivacy" :class="{active:isClicked}">《用户隐私政策》</text>
|
||||||
<uni-icons
|
</text>
|
||||||
type="checkbox"
|
|
||||||
size="24"
|
|
||||||
color="#999"
|
|
||||||
v-else
|
|
||||||
></uni-icons>
|
|
||||||
<text class="agreement-text">我已阅读并同意《用户隐私政策》</text>
|
|
||||||
</view>
|
</view>
|
||||||
<navigator class="forget-pwd" url="/pageSubPack/loginSub/forget-pwd">忘记密码?</navigator>
|
<navigator class="forget-pwd" url="/pageSubPack/loginSub/forget-pwd">忘记密码?</navigator>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 登录按钮 -->
|
<!-- 登录按钮 -->
|
||||||
<button
|
<button class="login-btn" :disabled="!canLogin" @click="handleLogin">
|
||||||
class="login-btn"
|
|
||||||
:disabled="!canLogin"
|
|
||||||
@click="handleLogin"
|
|
||||||
>
|
|
||||||
登录
|
登录
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -65,37 +57,53 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import {
|
||||||
import {onLoad} from "@dcloudio/uni-app"
|
ref,
|
||||||
import {getLoginPassword} from '../api/api.js'
|
computed
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
onLoad
|
||||||
|
} from "@dcloudio/uni-app"
|
||||||
|
import {
|
||||||
|
getLoginPassword
|
||||||
|
} from '../api/api.js'
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const phoneNumber = ref('');
|
const phoneNumber = ref('');
|
||||||
const password = ref('');
|
const password = ref('');
|
||||||
const agreeAgreement = ref(true); // 默认勾选
|
const agreeAgreement = ref(false); // 默认勾选
|
||||||
const placeholderStyle = ref('font-size:24rpx')
|
const placeholderStyle = ref('font-size:24rpx')
|
||||||
|
// 控制点击变色
|
||||||
|
const isClicked = ref(false)
|
||||||
|
|
||||||
// 计算属性:是否可登录(帐号+密码+协议都满足)
|
// 计算属性:是否可登录(帐号+密码+协议都满足)
|
||||||
const canLogin = computed(() => {
|
const canLogin = computed(() => {
|
||||||
const phoneReg = /^[a-zA-Z0-9_-]{4,16}$/; // 4-16位
|
const phoneReg = /^[a-zA-Z0-9_-]{4,16}$/; // 4-16位
|
||||||
const pwdReg = /^.{6,16}$/; // 密码6-16位
|
const pwdReg = /^.{6,16}$/; // 密码6-16位
|
||||||
return phoneReg.test(phoneNumber.value) && pwdReg.test(password.value) && agreeAgreement.value;
|
return phoneReg.test(phoneNumber.value) && pwdReg.test(password.value) && agreeAgreement.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 切换协议勾选
|
// 切换协议勾选
|
||||||
const toggleAgreement = () => {
|
const toggleAgreement = () => {
|
||||||
agreeAgreement.value = !agreeAgreement.value;
|
agreeAgreement.value = !agreeAgreement.value;
|
||||||
};
|
};
|
||||||
|
// 跳转隐私协议
|
||||||
|
const goToPrivacy = () => {
|
||||||
|
// 点击变色
|
||||||
|
isClicked.value = true
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pageSubPack/loginSub/privacy',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 检查表单
|
// 检查表单
|
||||||
const checkForm = () => {};
|
const checkForm = () => {};
|
||||||
|
|
||||||
|
|
||||||
onLoad(() =>{
|
onLoad(() => {});
|
||||||
});
|
|
||||||
|
|
||||||
// 登录逻辑
|
// 登录逻辑
|
||||||
const handleLogin = () => {
|
const handleLogin = () => {
|
||||||
// if (!canLogin.value) {
|
// if (!canLogin.value) {
|
||||||
// uni.showToast({ title: '请输入账号和密码', icon: 'none' });
|
// uni.showToast({ title: '请输入账号和密码', icon: 'none' });
|
||||||
// return
|
// return
|
||||||
@@ -149,36 +157,40 @@ const handleLogin = () => {
|
|||||||
// 测试
|
// 测试
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '登录中...',
|
title: '登录中...',
|
||||||
mask:true
|
mask: true
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.switchTab({ url: '/pages/index/index' });
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
});
|
||||||
}, 1500);
|
}, 1500);
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.login-page {
|
.login-page {
|
||||||
padding: 80rpx 40rpx 40rpx;
|
padding: 80rpx 40rpx 40rpx;
|
||||||
/* background-color: #f8f9fa; */
|
/* background-color: #f8f9fa; */
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF );
|
background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
.status_bar {
|
.status_bar {
|
||||||
height: 160px;
|
height: 160px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.login-title {
|
|
||||||
|
.login-title {
|
||||||
font-size: 48rpx;
|
font-size: 48rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 80rpx;
|
margin-bottom: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-item {
|
.input-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -187,47 +199,53 @@ const handleLogin = () => {
|
|||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-icon {
|
.input-icon {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-content {
|
.input-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agreement-wrap {
|
.agreement-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 40rpx 0;
|
margin: 40rpx 0;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agreement-item {
|
.agreement-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agreement-text {
|
.agreement-text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
.agreePrivacy{
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.agreePrivacy.active{
|
||||||
|
color: #4D5DFA;
|
||||||
|
}
|
||||||
|
|
||||||
.forget-pwd {
|
.forget-pwd {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #4D5DFA;
|
color: #4D5DFA;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-btn {
|
.login-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
@@ -236,28 +254,29 @@ const handleLogin = () => {
|
|||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-btn:disabled {
|
.login-btn:disabled {
|
||||||
background-color: #99c8ff;
|
background-color: #99c8ff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
/* border-radius: 50px; */
|
/* border-radius: 50px; */
|
||||||
|
|
||||||
}
|
}
|
||||||
/* 禁用按钮边框 */
|
|
||||||
button:after{
|
|
||||||
border-radius: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-link {
|
/* 禁用按钮边框 */
|
||||||
|
button:after {
|
||||||
|
border-radius: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-item {
|
.link-item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #4D5DFA;
|
color: #4D5DFA;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
141
wuye-manager-uniapp/pageSubPack/report-record/repairSelect.vue
Normal file
141
wuye-manager-uniapp/pageSubPack/report-record/repairSelect.vue
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<template>
|
||||||
|
<view class="select-container">
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<view class="search-bar">
|
||||||
|
<input type="text" placeholder="请输入关键字搜索" v-model="searchKey" />
|
||||||
|
<uni-icons type="search" size="18"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 分类选择 -->
|
||||||
|
<view class="category-wrap">
|
||||||
|
<!-- 左侧分类 -->
|
||||||
|
<scroll-view scroll-y class="category-left">
|
||||||
|
<view
|
||||||
|
class="category-item"
|
||||||
|
:class="{ active: activeCategory === item.id }"
|
||||||
|
@click="selectCategory(item)"
|
||||||
|
v-for="item in categoryList"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<!-- 右侧项目 -->
|
||||||
|
<scroll-view scroll-y class="category-right">
|
||||||
|
<view
|
||||||
|
class="project-item"
|
||||||
|
@click="selectProject(item)"
|
||||||
|
v-for="item in currentProjectList"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
|
// import { uniNavigateTo } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
|
// 分类列表
|
||||||
|
const categoryList = ref([
|
||||||
|
{ id: 1, name: '基础设施' },
|
||||||
|
{ id: 2, name: '电子设施' }
|
||||||
|
])
|
||||||
|
|
||||||
|
// 所有项目数据
|
||||||
|
const projectList = ref([
|
||||||
|
{ id: 101, categoryId: 1, name: '路灯' },
|
||||||
|
{ id: 102, categoryId: 1, name: '楼层指示灯' },
|
||||||
|
{ id: 103, categoryId: 2, name: '应急出口灯' },
|
||||||
|
{ id: 104, categoryId: 1, name: '草坪灯' }
|
||||||
|
])
|
||||||
|
|
||||||
|
// 选中的分类
|
||||||
|
const activeCategory = ref(1)
|
||||||
|
// 搜索关键词
|
||||||
|
const searchKey = ref('')
|
||||||
|
|
||||||
|
// 筛选当前分类的项目(含搜索)
|
||||||
|
const currentProjectList = computed(() => {
|
||||||
|
let list = projectList.value.filter(item => item.categoryId === activeCategory.value)
|
||||||
|
if (searchKey.value) {
|
||||||
|
list = list.filter(item => item.name.includes(searchKey.value))
|
||||||
|
}
|
||||||
|
return list
|
||||||
|
})
|
||||||
|
|
||||||
|
// 选择分类
|
||||||
|
const selectCategory = (item) => {
|
||||||
|
activeCategory.value = item.id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择项目并跳转到维修项目填写页
|
||||||
|
const selectProject = (item) => {
|
||||||
|
// 获取分类名称
|
||||||
|
const categoryName = categoryList.value.find(c => c.id === item.categoryId)?.name
|
||||||
|
// 跳转并传参
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pageSubPack/report-record/report-record?category=${categoryName}&project=${item.name}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.select-container {
|
||||||
|
padding: 10px;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.search-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 8px 10px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.search-bar input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.category-wrap {
|
||||||
|
display: flex;
|
||||||
|
height: calc(100% - 50px);
|
||||||
|
}
|
||||||
|
.category-left {
|
||||||
|
width: 120px;
|
||||||
|
height: 100%;
|
||||||
|
background: #f8f8f8;
|
||||||
|
border-radius: 6px 0 0 6px;
|
||||||
|
}
|
||||||
|
.category-item {
|
||||||
|
padding: 15px 10px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.category-item.active {
|
||||||
|
background: #fff;
|
||||||
|
color: #007aff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.category-right {
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 6px 6px 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.project-item {
|
||||||
|
padding: 12px 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.project-item:active {
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,373 +1,245 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="report-record-page">
|
<view class="form-container">
|
||||||
<view class="status-bar"></view>
|
<!-- 维修项目展示 -->
|
||||||
<!-- 顶部导航栏 -->
|
<view class="form-item">
|
||||||
<uni-nav-bar
|
<text class="label">维修项目</text>
|
||||||
left-icon="back"
|
<view class="value" @click="goBackSelect">
|
||||||
title="上报记录"
|
<view>
|
||||||
backgroundColor="transparent"
|
<text v-if="!repairProject">请选择项目</text>
|
||||||
:border= "false"
|
{{ repairProject }}
|
||||||
@clickLeft="navBack"/>
|
</view>
|
||||||
|
<uni-icons type="arrowright" size="16"></uni-icons>
|
||||||
<!-- 状态筛选标签 -->
|
|
||||||
<view class="status-tabs">
|
|
||||||
<view
|
|
||||||
v-for="item in statusTabs"
|
|
||||||
:key="item.value"
|
|
||||||
class="status-tab-item"
|
|
||||||
:class="{ active: activeStatus === item.value }"
|
|
||||||
@tap="switchStatus(item.value)"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 类型筛选标签 -->
|
<!-- 标题输入 -->
|
||||||
<view class="type-tabs">
|
<view class="form-item">
|
||||||
<view
|
<text class="label">标题</text>
|
||||||
v-for="item in typeTabs"
|
<!-- <input type="text" placeholder="请输入问题标题" v-model="form.title" /> -->
|
||||||
:key="item.value"
|
<uni-easyinput v-model="form.title" placeholder="请输入内容" :inputBorder="false"></uni-easyinput>
|
||||||
class="type-tab-item"
|
</view>
|
||||||
:class="{ active: activeType === item.value }"
|
|
||||||
@tap="switchType(item.value)"
|
<!-- 问题描述 -->
|
||||||
>
|
<view class="form-item-wenti">
|
||||||
{{ item.label }}
|
<text class="label">问题描述</text>
|
||||||
|
<!-- <textarea placeholder="请输入问题内容" v-model="form.desc" rows="5" ></textarea> -->
|
||||||
|
<uni-easyinput v-model="form.desc" placeholder="请描述你的问题" type="textarea"></uni-easyinput>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 手机号 -->
|
||||||
|
<view class="form-item">
|
||||||
|
<text class="label">手机号</text>
|
||||||
|
<uni-easyinput type="number" v-model="form.phone" placeholder="请输入手机号" :inputBorder="false"></uni-easyinput>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 图片上传 -->
|
||||||
|
<view class="form-item-wenti">
|
||||||
|
<text class="label">问题照片</text>
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
<!-- 上传按钮 -->
|
||||||
|
<view class="upload-btn" @click="chooseImage">
|
||||||
|
<uni-icons type="plus" size="24"></uni-icons>
|
||||||
|
<text>上传照片</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 上报记录列表 -->
|
<!-- 提交按钮 -->
|
||||||
<scroll-view
|
<button class="submit-btn" @click="submitForm">提交</button>
|
||||||
class="record-list"
|
|
||||||
scroll-y
|
|
||||||
:style="{ height: `calc(100vh - ${navHeight + statusTabHeight + typeTabHeight}px)` }"
|
|
||||||
>
|
|
||||||
<!-- 空状态 -->
|
|
||||||
<view v-if="filteredRecords.length === 0" class="empty-state">
|
|
||||||
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
|
|
||||||
<text class="empty-text">暂无上报记录</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 记录卡片 -->
|
|
||||||
<view
|
|
||||||
v-for="record in filteredRecords"
|
|
||||||
:key="record.id"
|
|
||||||
class="record-card"
|
|
||||||
>
|
|
||||||
<!-- 标题 + 状态标签 -->
|
|
||||||
<view class="card-header">
|
|
||||||
<text class="card-title">{{ record.title }}</text>
|
|
||||||
<view class="status-tag" :class="record.status">
|
|
||||||
{{ getStatusText(record.status) }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 类型标签 -->
|
|
||||||
<view class="tag-group">
|
|
||||||
<view class="tag-item">{{ record.reportType }}</view>
|
|
||||||
<view class="tag-item">{{ record.category }}</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 内容 -->
|
|
||||||
<view class="card-content">
|
|
||||||
{{ record.content }}
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 底部信息 -->
|
|
||||||
<view class="card-footer">
|
|
||||||
<text class="create-time">{{ record.createTime }}</text>
|
|
||||||
<text v-if="record.repairman" class="repairman">维修师傅:{{ record.repairman }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue'
|
import { ref } from 'vue'
|
||||||
import {onReady} from "@dcloudio/uni-app"
|
import{onLoad} from "@dcloudio/uni-app"
|
||||||
|
// import { onLoad, uniShowToast, uniNavigateBack, uniChooseImage, uniUploadFile } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
// 导航栏/标签高度(适配不同设备)
|
// 接收上个页面传的维修项目
|
||||||
const navHeight = ref(44)
|
const repairProject = ref('')
|
||||||
const statusTabHeight = ref(88)
|
|
||||||
const typeTabHeight = ref(88)
|
|
||||||
|
|
||||||
// 筛选状态
|
// 表单数据
|
||||||
const activeStatus = ref('all') // 全部/待分配/待解决/已完成
|
const form = ref({
|
||||||
const activeType = ref('all') // 全部/公共报修/个人报修
|
title: '',
|
||||||
|
desc: '',
|
||||||
// 状态筛选选项
|
phone: '',
|
||||||
const statusTabs = ref([
|
images: [] // 图片列表
|
||||||
{ label: '全部', value: 'all' },
|
|
||||||
{ label: '待分配', value: 'pending' },
|
|
||||||
{ label: '待解决', value: 'processing' },
|
|
||||||
{ label: '已完成', value: 'completed' }
|
|
||||||
])
|
|
||||||
|
|
||||||
// 类型筛选选项
|
|
||||||
const typeTabs = ref([
|
|
||||||
{ label: '全部', value: 'all' },
|
|
||||||
{ label: '公共报修', value: 'public' },
|
|
||||||
{ label: '个人报修', value: 'private' }
|
|
||||||
])
|
|
||||||
|
|
||||||
// 模拟上报记录数据(实际项目替换为接口请求)
|
|
||||||
const reportRecords = ref([
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
title: '标题巴拉巴拉巴拉',
|
|
||||||
status: 'pending', // pending/processing/completed
|
|
||||||
reportType: '公共报修',
|
|
||||||
category: '路灯',
|
|
||||||
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
|
|
||||||
createTime: '2026-08-01 10:05:46',
|
|
||||||
repairman: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
title: '标题巴拉巴拉巴拉',
|
|
||||||
status: 'processing',
|
|
||||||
reportType: '公共报修',
|
|
||||||
category: '路灯',
|
|
||||||
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
|
|
||||||
createTime: '2026-08-01 10:05:46',
|
|
||||||
repairman: '张三'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
title: '标题巴拉巴拉巴拉',
|
|
||||||
status: 'completed',
|
|
||||||
reportType: '公共报修',
|
|
||||||
category: '路灯',
|
|
||||||
content: '1栋楼下道路路灯不亮,并且有的亮度不够,请物业公司及时更换,防止发生意外事故。',
|
|
||||||
createTime: '2026-08-01 10:05:46',
|
|
||||||
repairman: '张三'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
// 筛选后的记录
|
|
||||||
const filteredRecords = computed(() => {
|
|
||||||
return reportRecords.value.filter(record => {
|
|
||||||
// 状态筛选
|
|
||||||
const statusMatch = activeStatus.value === 'all' || record.status === activeStatus.value
|
|
||||||
// 类型筛选
|
|
||||||
const typeMatch = activeType.value === 'all' || record.reportType === typeTabs.value.find(item => item.value === activeType.value)?.label
|
|
||||||
return statusMatch && typeMatch
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 切换状态(全部/待分配/待解决/已完成)筛选
|
// 页面加载时获取传参
|
||||||
const switchStatus = (value) => {
|
onLoad((options) => {
|
||||||
activeStatus.value = value
|
if (options.category && options.project) {
|
||||||
}
|
repairProject.value = `${options.category}-${options.project}`
|
||||||
|
|
||||||
// 切换类型(公共/个人)筛选
|
|
||||||
const switchType = (value) => {
|
|
||||||
activeType.value = value
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回上一页
|
|
||||||
const navBack = () => {
|
|
||||||
uni.switchTab({
|
|
||||||
url:"/pages/my/my"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取状态文本
|
|
||||||
const getStatusText = (status) => {
|
|
||||||
const statusMap = {
|
|
||||||
pending: '待分配',
|
|
||||||
processing: '待解决',
|
|
||||||
completed: '已完成'
|
|
||||||
}
|
}
|
||||||
return statusMap[status] || ''
|
})
|
||||||
|
|
||||||
|
// 返回选择项目页
|
||||||
|
const goBackSelect = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pageSubPack/report-record/repairSelect"
|
||||||
|
})
|
||||||
|
// uni.navigateBack({
|
||||||
|
// delta: 1
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 页面渲染完成后适配高度
|
// 选择图片
|
||||||
onReady(() => {
|
const chooseImage = () => {
|
||||||
// 可根据实际设备调整高度
|
uni.chooseImage({
|
||||||
uni.getSystemInfo({
|
count: 3, // 最多选3张
|
||||||
|
sizeType: ['original', 'compressed'],
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.platform === 'ios') {
|
// 临时文件路径
|
||||||
navHeight.value = 44
|
const tempFilePaths = res.tempFilePaths
|
||||||
} else {
|
form.value.images = [...form.value.images, ...tempFilePaths]
|
||||||
navHeight.value = 48
|
|
||||||
}
|
// 【可选】如果需要上传到服务器,取消下面注释
|
||||||
|
// tempFilePaths.forEach(path => {
|
||||||
|
// uni.uploadFile({
|
||||||
|
// url: '你的上传接口地址',
|
||||||
|
// filePath: path,
|
||||||
|
// name: 'file',
|
||||||
|
// success: (uploadRes) => {
|
||||||
|
// console.log('上传成功', uploadRes)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
|
|
||||||
|
// 删除图片
|
||||||
|
const deleteImage = (index) => {
|
||||||
|
form.value.images.splice(index, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 表单提交
|
||||||
|
const submitForm = () => {
|
||||||
|
// 表单校验
|
||||||
|
if (!repairProject.value) {
|
||||||
|
uni.showToast({ title: '请选择维修项目', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!form.value.title) {
|
||||||
|
uni.showToast({ title: '请输入问题标题', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!form.value.desc) {
|
||||||
|
uni.showToast({ title: '请输入问题描述', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!/^1[3-9]\d{9}$/.test(form.value.phone)) {
|
||||||
|
uni.showToast({ title: '请输入正确的手机号', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交数据(替换成你的接口)
|
||||||
|
uni.showLoading({ title: '提交中...' })
|
||||||
|
|
||||||
|
// 模拟接口请求
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({ title: '提交成功', icon: 'success' })
|
||||||
|
|
||||||
|
// 提交成功后重置表单/返回上一页
|
||||||
|
form.value = { title: '', desc: '', phone: '', images: [] }
|
||||||
|
// 或返回上一页
|
||||||
|
uni.navigateBack({ delta: 3 })
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.report-record-page {
|
.form-container {
|
||||||
width: 100%;
|
padding: 30rpx 40rpx;
|
||||||
height: 100vh;
|
background: #fff;
|
||||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%)
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
.status-bar{
|
.form-item-wenti {
|
||||||
width: 100%;
|
margin-bottom: 20px;
|
||||||
height: 46px;
|
border-bottom: 1px solid #eee;
|
||||||
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
/* 状态筛选标签 */
|
.form-item {
|
||||||
.status-tabs {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
/* background-color: #fff; */
|
margin-bottom: 30rpx;
|
||||||
padding: 0 20rpx;
|
align-items: flex-start;
|
||||||
height: 88rpx;
|
border-bottom: 1px solid #eee;
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
.label {
|
||||||
.status-tab-item {
|
width: 140rpx;
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #666;
|
|
||||||
height: 100%;
|
|
||||||
line-height: 88rpx;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-tab-item.active {
|
|
||||||
color: #4D5DFA;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-tab-item.active::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
width: 80rpx;
|
|
||||||
height: 8rpx;
|
|
||||||
background: linear-gradient(to bottom, #4D5DFA, #BAC0FA);
|
|
||||||
border-radius: 6rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 类型筛选标签 */
|
|
||||||
.type-tabs {
|
|
||||||
display: flex;
|
|
||||||
/* background-color: #fff; */
|
|
||||||
padding: 20rpx 30rpx;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
justify-content: flex-start;
|
|
||||||
gap: 20rpx;
|
|
||||||
margin: 0rpx 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-tab-item {
|
|
||||||
padding: 12rpx 30rpx;
|
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #999;
|
|
||||||
border: 2rpx solid #999;
|
|
||||||
border-radius: 25rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-tab-item.active {
|
|
||||||
color: #4D5DFA;
|
|
||||||
border: 2rpx solid #4D5DFA;
|
|
||||||
border-radius: 25rpx;
|
|
||||||
/* background-color: #007AFF; */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 记录列表 */
|
|
||||||
.record-list {
|
|
||||||
padding: 20rpx 40rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 空状态 */
|
|
||||||
.empty-state {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 100rpx 0;
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty-text {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #999;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 记录卡片 */
|
|
||||||
.record-card {
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
padding: 30rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-right: 20rpx;
|
line-height: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 状态标签 */
|
.value {
|
||||||
.status-tag {
|
flex: 1;
|
||||||
padding: 6rpx 16rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 198rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-tag.pending {
|
|
||||||
background-color: #E34D59; /* 待分配-红色 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-tag.processing {
|
|
||||||
background-color: #09C2BD; /* 待解决-绿色 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-tag.completed {
|
|
||||||
background-color: #4D5DFA; /* 已完成-蓝色 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 类型标签组 */
|
|
||||||
.tag-group {
|
|
||||||
display: flex;
|
|
||||||
gap: 15rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag-item {
|
|
||||||
padding: 6rpx 20rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #666;
|
|
||||||
border: 1rpx solid #999;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 内容 */
|
|
||||||
.card-content {
|
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
line-height: 1.6;
|
line-height: 80rpx;
|
||||||
margin-bottom: 20rpx;
|
text-align: right;
|
||||||
}
|
|
||||||
|
|
||||||
/* 底部信息 */
|
|
||||||
.card-footer {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #999;
|
|
||||||
}
|
}
|
||||||
|
.input, .textarea {
|
||||||
.repairman {
|
font-size: 14px;
|
||||||
|
width: 100%;
|
||||||
|
padding: 8px 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.textarea {
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
.upload-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
.upload-item {
|
||||||
|
position: relative;
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
.upload-item image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.upload-item uni-icons {
|
||||||
|
position: absolute;
|
||||||
|
top: -5px;
|
||||||
|
right: -5px;
|
||||||
|
background: #ff3b30;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
.upload-btn {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
border: 1px dashed #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.submit-btn {
|
||||||
|
width: 100%;
|
||||||
|
background: #4D5DFA;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 6px;
|
||||||
|
height: 44px;
|
||||||
|
line-height: 44px;
|
||||||
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -39,6 +39,12 @@
|
|||||||
"navigationBarTitleText": "手机号登录",
|
"navigationBarTitleText": "手机号登录",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "privacy",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "用户隐私政策"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "register-new-user",
|
"path": "register-new-user",
|
||||||
@@ -107,8 +113,13 @@
|
|||||||
{
|
{
|
||||||
"path": "report-record",
|
"path": "report-record",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "上报记录",
|
"navigationBarTitleText": "填写维修信息"
|
||||||
"navigationStyle": "custom"
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "repairSelect",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "维修项目"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -136,7 +147,7 @@
|
|||||||
"navigationBarTitleText": "修改密码"
|
"navigationBarTitleText": "修改密码"
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<view class="function-container">
|
<view class="function-container">
|
||||||
<!-- 第一行功能:故障上报、一键开门、工单大厅、我的工单 -->
|
<!-- 第一行功能:故障上报、一键开门、工单大厅、我的工单 -->
|
||||||
<view class="function-row">
|
<view class="function-row">
|
||||||
<view class="function-item">
|
<view class="function-item" @click="goToReport">
|
||||||
<image class="item-icon" src="/static/imgs/fault-report.png" mode="aspectFit"></image>
|
<image class="item-icon" src="/static/imgs/fault-report.png" mode="aspectFit"></image>
|
||||||
<text class="item-text">故障上报</text>
|
<text class="item-text">故障上报</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -157,6 +157,12 @@
|
|||||||
url: "/pageSubPack/oneClickOpen/oneClickOpen"
|
url: "/pageSubPack/oneClickOpen/oneClickOpen"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 故障上报
|
||||||
|
const goToReport = ()=>{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pageSubPack/report-record/report-record"
|
||||||
|
})
|
||||||
|
}
|
||||||
// 接收选择小区返回的参数
|
// 接收选择小区返回的参数
|
||||||
const slelctHomeData = (data) => {
|
const slelctHomeData = (data) => {
|
||||||
// console.log('收到B页面返回的数据:', data)
|
// console.log('收到B页面返回的数据:', data)
|
||||||
|
|||||||
Reference in New Issue
Block a user