Merge branch 'master' of gitee.com:java110/PropertyApp

This commit is contained in:
unknown 2020-02-27 01:01:52 +08:00
commit 3bfb5c1517
8 changed files with 242 additions and 5 deletions

View File

@ -18,7 +18,7 @@ const listOwnerRepairs = baseUrl + 'app/ownerRepair.listOwnerRepairs'; //家庭
const queryStaffInfos = baseUrl + 'app/query.staff.infos'; //查询员工信息
const queryOwnerMembers = baseUrl + 'app/owner.queryOwnerMembers'; //投诉建议列表
const changeStaffPwd = baseUrl + 'app/user.changeStaffPwd'; //修改密码
const listComplaints = baseUrl + 'app/complaint.listComplaints'; //添加投诉建议
@ -68,7 +68,7 @@ module.exports = {
queryStaffInfos: queryStaffInfos,
appUserBindingOwner: appUserBindingOwner,
queryAppUserBindingOwner: queryAppUserBindingOwner,
queryOwnerMembers: queryOwnerMembers,
changeStaffPwd: changeStaffPwd,
listComplaints: listComplaints,
saveComplaint: saveComplaint,
appUserUnBindingOwner: appUserUnBindingOwner,

View File

@ -177,6 +177,8 @@ const getCommunity = function (callBack,reload,_condition) {
_condition = {};
}
console.log('_condition',_condition);
_condition.userId = _userInfo.userId;
_condition.storeId = _userInfo.storeId;

View File

@ -53,7 +53,7 @@ class LoginFactory {
console.log("用户信息",userInfo);
if(userInfo == null || userInfo == undefined || userInfo == ''){
uni.redirectTo({
uni.navigateTo({
url:"/pages/login/login"
})

View File

@ -55,6 +55,18 @@
"navigationBarTitleText": "切换小区"
}
}
,{
"path" : "pages/userInfo/userInfo",
"style" : {
"navigationBarTitleText": "个人信息"
}
}
,{
"path" : "pages/changePwd/changePwd",
"style" : {
"navigationBarTitleText": "修改密码"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",

View File

@ -0,0 +1,112 @@
<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;
}
let _userInfo = {
userId: this.java110Context.getUserInfo().userId,
oldPwd: this.oldPwd,
newPwd: this.newPwd
};
uni.request({
url: this.java110Constant.url.changeStaffPwd,
header: this.java110Context.getHeaders(),
method: "POST",
data: _userInfo,
success: function(res) {
if(res.statusCode != 200){
uni.showToast({
icon:"none",
title: res.data
});
return ;
}
uni.navigateBack({
delta:1
});
},
fail: function(error) {
//
uni.showToast({
title: '调用接口失败'
});
console.log(error);
}
});
}
}
}
</script>
<style>
</style>

View File

@ -101,9 +101,12 @@
expireTime: afterOneHourDate.getTime(),
createTime: new Date().getTime()
});
uni.switchTab({
uni.reLaunch({
url: "/pages/index/index"
});
},
fail: function(error) {
//

View File

@ -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"
});
}
}

View 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>