完成我的信息接口调试
This commit is contained in:
@@ -100,7 +100,7 @@ const install = (Vue, vm) => {
|
||||
// 个人信息修改
|
||||
user: {
|
||||
saveUserInfo: (params = {}) => vm.$u.post(config.adminPath+'/mobile/user/saveUserInfo', params),
|
||||
infoSavePwd: (params = {}) => vm.$u.put(config.adminPath+'/system/user/profile/updatePwd', params),
|
||||
infoSavePwd: (params = {}) => vm.$u.put(config.adminPath+'/property/xcx/person/editPW', params),
|
||||
infoSavePqa: (params = {}) => vm.$u.post(config.adminPath+'/sys/user/infoSavePqa', params),
|
||||
},
|
||||
|
||||
@@ -119,6 +119,7 @@ const install = (Vue, vm) => {
|
||||
queryEmployeeById:(params = {}) => vm.$u.get(config.adminPath+'/property/xcx/person/'+ params.id),
|
||||
queryEmployee:(params = {}) => vm.$u.get(config.adminPath+'/property/xcx/person/list', params),
|
||||
updateEmployee:(params = {}) => vm.$u.put(config.adminPath+'/property/xcx/person', params),
|
||||
queryUnitById:(params = {}) => vm.$u.get(config.adminPath+'/property/xcx/unit/'+ params.unitId),
|
||||
},
|
||||
// 单位管理
|
||||
repair:{
|
||||
@@ -127,6 +128,7 @@ const install = (Vue, vm) => {
|
||||
getMyOrderList:(params = {})=>vm.$u.get(config.adminPath+'/property/xcx/workOrders/list',params),
|
||||
updateOrder:(params = {})=>vm.$u.put(config.adminPath+'/property/xcx/workOrders',params),
|
||||
},
|
||||
//访客管理
|
||||
visitor:{
|
||||
//我的访客列表
|
||||
getMyVisitor:(params = {})=>vm.$u.get(config.adminPath+'/property/xcx/visitorManagement/list/'+params.type),
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "数字南川",
|
||||
"appid" : "__UNI__7AF1078",
|
||||
"appid" : "__UNI__AAACEF3",
|
||||
"description" : "",
|
||||
"versionName" : "1.8.4",
|
||||
"versionCode" : "100",
|
||||
|
@@ -8,7 +8,6 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"navigationStyle": "custom"
|
||||
// 隐藏系统导航栏
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -32,7 +31,7 @@
|
||||
{
|
||||
"path": "pages/sys/user/changeInfo/changeInfo",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "个人信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -41,6 +40,12 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/sys/user/pwd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/sys/user/serviceCenter/serviceCenter",
|
||||
"style": {
|
||||
|
@@ -37,13 +37,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 滚动资讯条 -->
|
||||
<view class="news-bar">
|
||||
<text class="news-label">头条</text>
|
||||
<scroll-view scroll-x class="news-scroll">
|
||||
<text v-for="(item, idx) in newsList" :key="idx" class="news-item">{{ item }}</text>
|
||||
</scroll-view>
|
||||
<text class="news-arrow">›</text>
|
||||
</view>
|
||||
<view class="news-bar">
|
||||
<text class="news-label">公告</text>
|
||||
<swiper class="news-swiper" vertical autoplay circular interval="3000">
|
||||
<swiper-item v-for="(item, idx) in newsList" :key="idx">
|
||||
<text class="news-item">{{ item }}<text class="news-arrow">›</text></text>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- 热门活动区 -->
|
||||
<view class="hot-section">
|
||||
<view class="hot-title-row">
|
||||
@@ -83,22 +84,22 @@
|
||||
],
|
||||
current: 0,
|
||||
gridList: [
|
||||
{
|
||||
icon: '/static/aaaa_gd.png',
|
||||
text: '工单',
|
||||
url:'/pages/sys/workbench/order/order'
|
||||
},
|
||||
{
|
||||
icon: '/static/aaaa_yjcl.png',
|
||||
text: '预警处理',
|
||||
url:'/pages/sys/workbench/earlyWarning/earlyWarning'
|
||||
|
||||
},
|
||||
{
|
||||
icon: '/static/aaaa_jk.png',
|
||||
text: '监控',
|
||||
url:'/pages/sys/workbench/monitor/monitors'
|
||||
},
|
||||
// {
|
||||
// icon: '/static/aaaa_gd.png',
|
||||
// text: '工单',
|
||||
// url:'/pages/sys/workbench/order/order'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaaa_yjcl.png',
|
||||
// text: '预警处理',
|
||||
// url:'/pages/sys/workbench/earlyWarning/earlyWarning'
|
||||
//
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaaa_jk.png',
|
||||
// text: '监控',
|
||||
// url:'/pages/sys/workbench/monitor/monitors'
|
||||
// },
|
||||
{
|
||||
icon: '/static/aaaa_bsbx.png',
|
||||
text: '报事报修',
|
||||
@@ -486,4 +487,41 @@
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
}
|
||||
.news-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
border-top: 1rpx solid #f5f5f5;
|
||||
margin-top: 10rpx;
|
||||
height: 60rpx; /* 固定高度 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.news-label {
|
||||
color: #FF6A00;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
margin-right: 16rpx;
|
||||
border: 1rpx solid #FF6A00;
|
||||
border-radius: 4rpx;
|
||||
padding: 2rpx 6rpx;
|
||||
}
|
||||
|
||||
.news-swiper {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.news-item {
|
||||
display: block;
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx; /* 与容器高度一致 */
|
||||
}
|
||||
|
||||
.news-arrow {
|
||||
color: #999;
|
||||
font-size: 32rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
</style>
|
@@ -1,237 +1,284 @@
|
||||
<template>
|
||||
<view class="change-info-container">
|
||||
<image src="/static/ic_back.png" class="back-arrow" @click="goBack" />
|
||||
<view class="title-main">完善你的资料</view>
|
||||
<view class="title-sub">让大家更好地了解你</view>
|
||||
<view class="avatar-section">
|
||||
<image class="avatar-img" src="/static/avatar.png" />
|
||||
<view class="avatar-camera">
|
||||
<image src="/static/ic_camera.png" class="camera-icon" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-section">
|
||||
<view class="form-label">取个昵称</view>
|
||||
<view class="input-row">
|
||||
<input class="form-input" v-model="userInfo.nickName" placeholder="请输入昵称" />
|
||||
<view class="input-suffix">
|
||||
<image src="/static/ic_i_c_01.png" class="random-icon" />
|
||||
<text class="random-text">随机</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-label">你的手机号</view>
|
||||
<view class="input-row">
|
||||
<input class="form-input" v-model="userInfo.phonenumber" placeholder="请输入您的手机号" />
|
||||
<image src="/static/ic_arrow_right.png" class="arrow-icon" />
|
||||
</view>
|
||||
<view class="form-label">你的性别(不可修改)</view>
|
||||
<view class="gender-row">
|
||||
<view v-if="userInfo.sex == 1" class="gender-item selected">
|
||||
<image src="/static/ic_i_c_02.png" class="gender-icon" />
|
||||
</view>
|
||||
<view v-else class="gender-item">
|
||||
<image src="/static/ic_i_c_03.png" class="gender-icon" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-row"><text class="info-label">部门</text>{{userInfo.deptName}}</view>
|
||||
<view class="info-row"><text class="info-label">岗位</text>客服</view>
|
||||
<view class="info-row"><text class="info-label">工号</text>A10235</view>
|
||||
</view>
|
||||
<button class="submit-btn">确认修改</button>
|
||||
</view>
|
||||
<view class="change-info-container">
|
||||
<view class="title-main">完善你的资料</view>
|
||||
<view class="title-sub"></view>
|
||||
|
||||
<view class="avatar-section">
|
||||
<view class="avatar-container">
|
||||
<image class="avatar-img" :src="userInfo.img" mode="aspectFill" @click="chooseImage"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 表单部分保持不变 -->
|
||||
<view class="form-section">
|
||||
<view class="form-row">
|
||||
<view class="form-label">取个昵称</view>
|
||||
<view class="input-wrapper">
|
||||
<input class="form-input" v-model="userInfo.userName" placeholder="请输入昵称" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-row">
|
||||
<view class="form-label">你的手机号</view>
|
||||
<view class="input-wrapper">
|
||||
<input class="form-input" v-model="userInfo.phone" placeholder="请输入您的手机号" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-row">
|
||||
<view class="form-label">你的性别</view>
|
||||
<view class="input-wrapper">
|
||||
<picker class="form-input gender-select" mode="selector" :range="genderOptions" range-key="label" @change="selectGender" v-model="userInfo.gender">
|
||||
<view class="gender-text">{{userInfo.sexLabel}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-row">
|
||||
<view class="form-label">证件号</view>
|
||||
<view class="input-wrapper">
|
||||
<input class="form-input" v-model="userInfo.idCard" placeholder="请输入您的证件号" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-row">
|
||||
<view class="form-label">所属单位</view>
|
||||
<view class="input-wrapper">
|
||||
<input class="form-input" :value="userInfo.unitName" disabled />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<view class="group-title">联系信息</view>
|
||||
<view class="form-row">
|
||||
<view class="form-label">邮箱</view>
|
||||
<view class="input-wrapper">
|
||||
<input class="form-input" v-model="userInfo.email" placeholder="请输入邮箱" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-row">
|
||||
<view class="form-label">车牌号</view>
|
||||
<view class="input-wrapper">
|
||||
<input class="form-input" v-model="userInfo.carNumber" placeholder="请输入车牌号" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="submit-btn" @click="onsubmit()">确认修改</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userInfo = this.vuex_user
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
import {uploadFiles} from "../../../../common/upload";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {
|
||||
idCard: '',
|
||||
unitName:'',
|
||||
email: '',
|
||||
carNumber: '',
|
||||
img: '',
|
||||
userName:'',
|
||||
phone:'',
|
||||
gender:'',
|
||||
sexLabel:''
|
||||
},
|
||||
genderOptions: [
|
||||
{value: 1, label: '男'},
|
||||
{value: 2, label: '女'}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getUserInfo()
|
||||
console.log(this.userInfo);
|
||||
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
let params = {
|
||||
id: this.vuex_user.id,
|
||||
unitId: this.vuex_user.unitId,
|
||||
}
|
||||
this.$u.api.unit.queryEmployeeById(params).then(res => {
|
||||
if (res.code == "200") {
|
||||
this.userInfo =res.data;
|
||||
this.userInfo.sexLabel = this.genderOptions[this.userInfo.gender-1].label;
|
||||
}
|
||||
});
|
||||
this.$u.api.unit.queryUnitById(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.userInfo.unitName =res.data.name;
|
||||
}
|
||||
});
|
||||
},
|
||||
selectGender(e) {
|
||||
const index = e.detail.value;
|
||||
this.userInfo.gender = this.genderOptions[index].value;
|
||||
this.userInfo.sexLabel = this.genderOptions[index].label;
|
||||
},
|
||||
onsubmit(){
|
||||
this.$u.api.unit.updateEmployee(this.userInfo).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/sys/user/mine'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
chooseImage() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: async (res) => {
|
||||
const tempFilePaths = res.tempFilePaths;
|
||||
this.userInfo.img = tempFilePaths[0];
|
||||
const result = await uploadFiles({
|
||||
files: tempFilePaths,
|
||||
url: this.vuex_config.baseUrl + '/resource/oss/upload',
|
||||
name: 'file',
|
||||
vm: this
|
||||
});
|
||||
this.userInfo.img = result[0].data.url;
|
||||
console.log(this.userInfo.img);
|
||||
const allSuccess = result.every(item => item.code == 200);
|
||||
if (!allSuccess) {
|
||||
uni.showToast({
|
||||
title: '上传失败',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.change-info-container {
|
||||
position: relative;
|
||||
padding-bottom: 60rpx;
|
||||
padding-top: 118rpx;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(180deg, #d2edff 0%, #ffffff 100%);
|
||||
}
|
||||
.change-info-container {
|
||||
position: relative;
|
||||
padding-bottom: 60rpx;
|
||||
padding-top: 24rpx;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(180deg, #d2edff 0%, #ffffff 100%);
|
||||
}
|
||||
|
||||
.back-arrow {
|
||||
width: 24rpx;
|
||||
height: 42rpx;
|
||||
left: 45rpx;
|
||||
}
|
||||
.back-arrow {
|
||||
width: 24rpx;
|
||||
height: 42rpx;
|
||||
left: 45rpx;
|
||||
}
|
||||
|
||||
.title-main {
|
||||
font-size: 50rpx;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
margin-top: 45rpx;
|
||||
margin-left: 65rpx;
|
||||
}
|
||||
.title-main {
|
||||
font-size: 50rpx;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
margin-top: 45rpx;
|
||||
margin-left: 65rpx;
|
||||
}
|
||||
|
||||
.title-sub {
|
||||
font-size: 50rpx;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-left: 65rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.title-sub {
|
||||
font-size: 50rpx;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-left: 65rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.avatar-section {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-left: 68rpx;
|
||||
margin-bottom: 62rpx;
|
||||
position: relative;
|
||||
}
|
||||
.avatar-section {
|
||||
margin: 0 68rpx 62rpx 68rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.avatar-img {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
}
|
||||
.avatar-container {
|
||||
position: relative;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #e0e0e0;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-camera {
|
||||
position: absolute;
|
||||
left: 100rpx;
|
||||
top: 90rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
background: #bbb;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.avatar-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.camera-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
margin: 0 68rpx;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
color: #737373;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 17rpx;
|
||||
margin-top: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.form-section {
|
||||
margin: 0 68rpx;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.input-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-radius: 14rpx;
|
||||
border: 2rpx solid #e0e0e0;
|
||||
margin-bottom: 18rpx;
|
||||
padding: 0 20rpx;
|
||||
height: 98rpx;
|
||||
}
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
font-size: 33rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.form-label {
|
||||
color: #555;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.input-suffix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.input-wrapper {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.random-icon {
|
||||
width: 31rpx;
|
||||
height: 27rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
.form-input {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 14rpx;
|
||||
border: 2rpx solid #e0e0e0;
|
||||
padding: 0 20rpx;
|
||||
height: 98rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.random-text {
|
||||
color: #636363;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
.gender-select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.gender-text {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.gender-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 50rpx;
|
||||
padding-top: 15rpx;
|
||||
}
|
||||
.form-group {
|
||||
margin-top: 40rpx;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.gender-item {
|
||||
width: 188rpx;
|
||||
height: 97rpx;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 24rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.group-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.gender-item.selected {
|
||||
background: #e0e0e0;
|
||||
border-color: #bbb;
|
||||
}
|
||||
.submit-btn {
|
||||
width: 90vw;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, #2e6cf6 0%, #4fc3f7 100%);
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
border: none;
|
||||
border-radius: 40rpx;
|
||||
margin: 80rpx auto 40rpx auto;
|
||||
display: block;
|
||||
box-shadow: 0 8rpx 24rpx rgba(46, 108, 246, 0.12);
|
||||
}
|
||||
|
||||
.gender-icon {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #737373;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
color: #737373;
|
||||
width: 134rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
width: 90vw;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, #2e6cf6 0%, #4fc3f7 100%);
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
border: none;
|
||||
border-radius: 40rpx;
|
||||
margin: 80rpx auto 40rpx auto;
|
||||
display: block;
|
||||
box-shadow: 0 8rpx 24rpx rgba(46, 108, 246, 0.12);
|
||||
}
|
||||
</style>
|
||||
.form-input:disabled {
|
||||
background-color: #f5f5f5;
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
||||
|
@@ -44,10 +44,6 @@
|
||||
icon: '/static/ic_mine_info.png',
|
||||
text: '我的信息'
|
||||
},
|
||||
{
|
||||
icon: '/static/ic_mine_pay.png',
|
||||
text: '我的缴费'
|
||||
},
|
||||
{
|
||||
icon: '/static/ic_mine_repair.png',
|
||||
text: '我的报修'
|
||||
@@ -56,10 +52,6 @@
|
||||
icon: '/static/ic_mine_visitor.png',
|
||||
text: '我的访客'
|
||||
},
|
||||
{
|
||||
icon: '/static/ic_mine_check.png',
|
||||
text: '我的考勤'
|
||||
},
|
||||
{
|
||||
icon: '/static/ic_mine_pwd.png',
|
||||
text: '修改密码'
|
||||
@@ -96,21 +88,17 @@
|
||||
});
|
||||
} else if (idx === 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myPayment/myPayment'
|
||||
url: '/pages/sys/user/myRepair/myRepair'
|
||||
});
|
||||
} else if (idx === 2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myRepair/myRepair'
|
||||
});
|
||||
} else if (idx === 3) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myVisitor/myVisitor'
|
||||
});
|
||||
} else if (idx === 4) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myRecord/myRecord'
|
||||
});
|
||||
}
|
||||
}else if (idx === 3) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/pwd'
|
||||
});
|
||||
}
|
||||
},
|
||||
logout() {
|
||||
// 清除用户信息并返回登录页
|
||||
|
@@ -1,126 +1,123 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="remind-text">请设置登录密码<br>
|
||||
定期更新密码提高安全性</view>
|
||||
<u-form class="form" :model="model" :rules="rules" ref="uForm">
|
||||
<u-form-item label="旧密码" prop="oldPassword" label-width="180">
|
||||
<u-input type="password" v-model="model.oldPassword" placeholder="请输入旧密码"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="新密码" prop="newPassword" label-width="180">
|
||||
<u-input type="password" v-model="model.newPassword" placeholder="请输入新密码"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="确认密码" prop="confirmPassword" label-width="180">
|
||||
<u-input type="password" v-model="model.confirmPassword" placeholder="请确认新密码"></u-input>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="remind-text">
|
||||
<u-icon name="question-circle" color="#2767dc" size="28"></u-icon>
|
||||
密码必须是8-16位的数字,字符组合(不能是纯数字)</view>
|
||||
<view class="form-footer">
|
||||
<u-button class="btn" type="primary" @click="submit">提交</u-button>
|
||||
<!-- <u-button class="btn" type="default" @click="cancel">关闭</u-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrap">
|
||||
<view class="remind-text">请设置登录密码<br>
|
||||
定期更新密码提高安全性
|
||||
</view>
|
||||
<u-form class="form" :model="model" :rules="rules" ref="uForm">
|
||||
<u-form-item label="旧密码" prop="oldPassword" label-width="180">
|
||||
<u-input type="password" v-model="model.oldPassword" placeholder="请输入旧密码"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="新密码" prop="newPassword" label-width="180">
|
||||
<u-input type="password" v-model="model.newPassword" placeholder="请输入新密码"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="确认密码" prop="confirmPassword" label-width="180">
|
||||
<u-input type="password" v-model="model.confirmPassword" placeholder="请确认新密码"></u-input>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="remind-text">
|
||||
<u-icon name="question-circle" color="#2767dc" size="28"></u-icon>
|
||||
密码至少包含8~20位大写字母、小写字母、数字和特殊字符其中的任意一种
|
||||
</view>
|
||||
<view class="form-footer">
|
||||
<u-button class="btn" type="primary" @click="submit">提交</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||
*/
|
||||
import base64 from '@/common/base64.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
model: {
|
||||
oldPassword: '',
|
||||
newPassword: '',
|
||||
confirmNewPassword: ''
|
||||
},
|
||||
rules: {
|
||||
oldPassword: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入旧密码',
|
||||
trigger: ['change','blur'],
|
||||
}
|
||||
],
|
||||
newPassword: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入新密码',
|
||||
trigger: ['change','blur'],
|
||||
},
|
||||
{
|
||||
pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/,
|
||||
message: '需同时含有字母和数字,长度在6-12之间',
|
||||
trigger: ['change','blur'],
|
||||
}
|
||||
],
|
||||
confirmPassword: [
|
||||
{
|
||||
required: true,
|
||||
message: '请重新输入密码',
|
||||
trigger: ['change','blur'],
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
return value === this.model.newPassword;
|
||||
},
|
||||
message: '两次输入的密码不相等',
|
||||
trigger: ['change','blur'],
|
||||
}
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules);
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.$refs.uForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.$u.api.user.infoSavePwd({
|
||||
oldPassword: this.model.oldPassword,
|
||||
newPassword: this.model.newPassword
|
||||
}).then(res => {
|
||||
if(res.code == '200'){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function () {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$u.toast('您填写的信息有误,请根据提示修正。');
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
model: {
|
||||
oldPassword: '',
|
||||
newPassword: '',
|
||||
confirmPassword: ''
|
||||
},
|
||||
rules: {
|
||||
oldPassword: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入旧密码',
|
||||
trigger: ['change', 'blur'],
|
||||
}
|
||||
],
|
||||
newPassword: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入新密码',
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
{
|
||||
pattern: /^(?=.*[a-zA-Z\d!@$%^&*$%&+&*=\[\]?])[a-zA-Z\d!@$%^&*$%&+&*=\[\]?]{8,20}$/,
|
||||
message: '需同时含有字母和数字,长度在6-12之间',
|
||||
trigger: ['change', 'blur'],
|
||||
}
|
||||
],
|
||||
confirmPassword: [
|
||||
{
|
||||
required: true,
|
||||
message: '请重新输入密码',
|
||||
trigger: ['change', 'blur'],
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
return value === this.model.newPassword;
|
||||
},
|
||||
message: '两次输入的密码不相等',
|
||||
trigger: ['change', 'blur'],
|
||||
}
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules);
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.$refs.uForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.$u.api.user.infoSavePwd({
|
||||
oldPassword: this.model.oldPassword,
|
||||
newPassword: this.model.newPassword
|
||||
}).then(res => {
|
||||
if (res.code == '200') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function () {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$u.toast('您填写的信息有误,请根据提示修正。');
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page{
|
||||
background: #f5f5f5;
|
||||
page {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.u-form{
|
||||
background: #fff;
|
||||
padding: 0px 15px;
|
||||
|
||||
.u-form {
|
||||
background: #fff;
|
||||
padding: 0px 15px;
|
||||
}
|
||||
.remind-text{
|
||||
padding: 20rpx 30rpx;
|
||||
color: #666666;
|
||||
|
||||
.remind-text {
|
||||
padding: 20rpx 30rpx;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
|
@@ -162,7 +162,8 @@ export default {
|
||||
// 删除图片
|
||||
deleteImage() {
|
||||
this.employeeInfo.img = '';
|
||||
}, // 提交表单
|
||||
},
|
||||
// 提交表单
|
||||
submitForm() {
|
||||
//密码对比
|
||||
if (!this.validatePassword()) {
|
||||
|
@@ -136,7 +136,7 @@ export default {
|
||||
.unit-management {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 95vh;
|
||||
height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
@@ -64,31 +64,36 @@
|
||||
text: '工单',
|
||||
url:'/pages/sys/workbench/order/order'
|
||||
},
|
||||
{
|
||||
icon: '/static/aaaa_yjcl.png',
|
||||
text: '预警处理',
|
||||
url:'/pages/sys/workbench/earlyWarning/earlyWarning'
|
||||
|
||||
},
|
||||
// {
|
||||
// icon: '/static/aaaa_yjcl.png',
|
||||
// text: '预警处理',
|
||||
// url:'/pages/sys/workbench/earlyWarning/earlyWarning'
|
||||
//
|
||||
// },
|
||||
// {
|
||||
// icon: 'https://picsum.photos/80/80?random=3',
|
||||
// text: '保洁'
|
||||
// },
|
||||
{
|
||||
icon: '/static/aaaa_jk.png',
|
||||
text: '监控',
|
||||
url:'/pages/sys/workbench/monitor/monitors'
|
||||
},
|
||||
{
|
||||
icon: '/static/aaaa_bsbx.png',
|
||||
text: '报事报修',
|
||||
url:'/pages/sys/user/myRepair/myRepair'
|
||||
},
|
||||
// {
|
||||
// icon: '/static/aaaa_jk.png',
|
||||
// text: '监控',
|
||||
// url:'/pages/sys/workbench/monitor/monitors'
|
||||
// },
|
||||
// {
|
||||
// icon: '/static/aaaa_bsbx.png',
|
||||
// text: '报事报修',
|
||||
// url:'/pages/sys/user/myRepair/myRepair'
|
||||
// },
|
||||
{
|
||||
icon: '/static/ic_unit.png',
|
||||
text: '单位管理',
|
||||
url:'/pages/sys/workbench/unitManagement/unitManagement'
|
||||
},
|
||||
{
|
||||
icon: '/static/aaa_yq.png',
|
||||
text: '访客管理',
|
||||
url:'/pages/sys/user/myVisitor/myVisitor'
|
||||
},
|
||||
// {
|
||||
// icon: 'https://picsum.photos/80/80?random=3',
|
||||
// text: '添加常用'
|
||||
|
BIN
static/aaa_yq.png
Normal file
BIN
static/aaa_yq.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user