mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
加入修改密码
This commit is contained in:
parent
4a0942f8ea
commit
a46548a0b7
12
pages.json
12
pages.json
@ -55,6 +55,18 @@
|
||||
"navigationBarTitleText": "切换小区"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/userInfo/userInfo",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "个人信息"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/changePwd/changePwd",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "修改密码"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "white",
|
||||
|
||||
79
pages/changePwd/changePwd.vue
Normal file
79
pages/changePwd/changePwd.vue
Normal file
@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<view>
|
||||
<form>
|
||||
|
||||
<view class="cu-form-group margin-top">
|
||||
<view class="title">密码</view>
|
||||
<input placeholder="请输入密码" type="password" name="input" v-model="oldPwd"></input>
|
||||
</view>
|
||||
<view class="cu-form-group ">
|
||||
<view class="title">新密码</view>
|
||||
<input placeholder="请输入新密码" type="password" name="input" v-model="pwd"></input>
|
||||
</view>
|
||||
<view class="cu-form-group ">
|
||||
<view class="title">确认密码</view>
|
||||
<input placeholder="请输入确认密码" type="password" name="input" v-model="newPwd"></input>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
<view class="padding flex flex-direction">
|
||||
<button class="cu-btn bg-green lg" @tap="_doChangePwd()">提交</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
oldPwd:'',
|
||||
pwd:'',
|
||||
newPwd:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
_doChangePwd:function(){
|
||||
let _string = this.java110Util.string;
|
||||
if(_string.isNull(this.oldPwd)){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:'密码不能为空'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(_string.isNull(this.pwd)){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:'新密码不能为空'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(_string.isNull(this.newPwd)){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:'确认密码不能为空'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.newPwd != this.pwd){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:'确认密码和新密码不一致'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@ -24,6 +24,12 @@
|
||||
<text class="text-grey">个人信息</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item arrow" @tap="_changePwd()">
|
||||
<view class="content">
|
||||
<text class="lg text-gray cuIcon-lock"></text>
|
||||
<text class="text-grey">修改密码</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item ">
|
||||
<view class="content">
|
||||
<text class="lg text-gray cuIcon-warnfill"></text>
|
||||
@ -74,7 +80,15 @@
|
||||
},
|
||||
//用户信息
|
||||
_userInfo:function(){
|
||||
|
||||
uni.navigateTo({
|
||||
url:"/pages/userInfo/userInfo"
|
||||
});
|
||||
},
|
||||
//修改密码
|
||||
_changePwd:function(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/changePwd/changePwd"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
94
pages/userInfo/userInfo.vue
Normal file
94
pages/userInfo/userInfo.vue
Normal file
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<view>
|
||||
<view>
|
||||
|
||||
<view class="padding">商户信息</view>
|
||||
<view class="cu-list menu ">
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="lg cuIcon-service text-blue margin-right-xs"></text>
|
||||
<text class="text-grey">商户名称</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{storeName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="lg cuIcon-new text-blue margin-right-xs"></text>
|
||||
<text class="text-grey">商户类型</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">物业</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="lg cuIcon-cascades text-blue margin-right-xs"></text>
|
||||
<text class="text-grey">商户编码</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{storeId}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="padding">员工信息</view>
|
||||
<view class="cu-list menu ">
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="lg cuIcon-profile text-blue margin-right-xs"></text>
|
||||
<text class="text-grey">员工名称</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{userName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item">
|
||||
<view class="content">
|
||||
<text class="lg cuIcon-cascades text-blue margin-right-xs"></text>
|
||||
<text class="text-grey">员工编号</text>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="text-grey text-sm">{{userId}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
storeName: '',
|
||||
storeId:'',
|
||||
userName:'',
|
||||
userId:'',
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let _userInfo = this.java110Context.getUserInfo();
|
||||
|
||||
console.log('_userInfo', _userInfo);
|
||||
|
||||
this.storeName = _userInfo.storeName;
|
||||
this.storeId = _userInfo.storeId;
|
||||
this.userName = _userInfo.userName;
|
||||
this.userId = _userInfo.userId;
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user