修改登录接口,修改页面
This commit is contained in:
parent
5f12bcfb7d
commit
ffc3d516f7
|
@ -49,7 +49,8 @@
|
|||
"van-stepper": "@vant/weapp/stepper/index",
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-tree-select": "@vant/weapp/tree-select/index",
|
||||
"van-uploader": "@vant/weapp/uploader/index"
|
||||
"van-uploader": "@vant/weapp/uploader/index",
|
||||
"van-card": "@vant/weapp/card/index"
|
||||
},
|
||||
"tabBar": {
|
||||
"selectedColor": "#5199FF",
|
||||
|
|
|
@ -140,6 +140,11 @@ Page({
|
|||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
if (wx.getStorageSync('userInfo').loginName !== 'admin'){
|
||||
this.setData({
|
||||
"searchForm.reviewed":wx.getStorageSync('perInfo').id
|
||||
})
|
||||
}
|
||||
this.loadListData();
|
||||
this.loadPersonData();
|
||||
},
|
||||
|
|
|
@ -62,11 +62,13 @@ Page({
|
|||
"password": _this.data.password,
|
||||
}).then(obj => {
|
||||
if (obj.code === 0){
|
||||
wx.setStorageSync("loginName", _this.data.username);
|
||||
wx.setStorageSync("password", _this.data.password);
|
||||
wx.setStorageSync("userInfo", obj.data.userInfo);
|
||||
wx.setStorageSync("perInfo", obj.data.perInfo);
|
||||
wx.reLaunch({
|
||||
url: '/pages/evaluation/evaluation'
|
||||
});
|
||||
wx.setStorageSync("loginName", _this.data.username);
|
||||
wx.setStorageSync("password", _this.data.password);
|
||||
}else {
|
||||
Dialog.alert({
|
||||
message:'用户名或密码错误'
|
||||
|
@ -98,11 +100,13 @@ Page({
|
|||
"password": _this.data.password,
|
||||
}).then(obj => {
|
||||
if (obj.code === 0){
|
||||
wx.setStorageSync("loginName", _this.data.username);
|
||||
wx.setStorageSync("password", _this.data.password);
|
||||
wx.setStorageSync("userInfo", obj.data.userInfo);
|
||||
wx.setStorageSync("perInfo", obj.data.perInfo);
|
||||
wx.reLaunch({
|
||||
url: '/pages/evaluation/evaluation'
|
||||
});
|
||||
wx.setStorageSync("loginName", _this.data.username);
|
||||
wx.setStorageSync("password", _this.data.password);
|
||||
}else {
|
||||
Dialog.alert({
|
||||
message:'用户名或密码错误'
|
||||
|
|
|
@ -5,14 +5,18 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
userInfo:null,
|
||||
perInfo:null,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.setData({
|
||||
userInfo:wx.getStorageSync('userInfo'),
|
||||
perInfo:wx.getStorageSync('perInfo')
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,22 +4,22 @@
|
|||
<view class="mine_item_title">基础信息</view>
|
||||
<view class="mine_item_list">
|
||||
<view class="list_item">
|
||||
<span>姓名:暂无</span>
|
||||
<span>姓名:{{perInfo.name}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>性别:暂无</span>
|
||||
<span>性别:{{perInfo.sex === '1'?'男':'女'}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>民族:暂无</span>
|
||||
<span>民族:{{perInfo.nation}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>籍贯:暂无</span>
|
||||
<span>籍贯:{{perInfo.nativePlace}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>手机号:暂无</span>
|
||||
<span>手机:{{perInfo.mphone}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>邮箱:暂无</span>
|
||||
<span>邮箱:{{perInfo.email}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -27,13 +27,13 @@
|
|||
<view class="mine_item_title">工作信息</view>
|
||||
<view class="mine_item_list">
|
||||
<view class="list_item">
|
||||
<span>部门:暂无</span>
|
||||
<span>部门:{{perInfo.deptName}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>岗位:暂无</span>
|
||||
<span>岗位:{{perInfo.post}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>职务:暂无</span>
|
||||
<span>职务:{{perInfo.duties}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -41,13 +41,13 @@
|
|||
<view class="mine_item_title">党员信息</view>
|
||||
<view class="mine_item_list">
|
||||
<view class="list_item">
|
||||
<span>支部:暂无</span>
|
||||
<span>支部:{{perInfo.branchName}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>党员职务:暂无</span>
|
||||
<span>党员职务:{{perInfo.partyDuties}}</span>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<span>入党时间:暂无</span>
|
||||
<span>入党时间:{{perInfo.partyDate}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
flex-wrap: wrap;
|
||||
}
|
||||
.list_item{
|
||||
width: 30%;
|
||||
width: 45%;
|
||||
margin: 10px 5px;
|
||||
font-size: 30rpx;
|
||||
}
|
|
@ -10,6 +10,7 @@ Page({
|
|||
pageSize: 10,
|
||||
//所有数据
|
||||
list: [],
|
||||
head:null,
|
||||
isRefreshing:false,//下拉刷新
|
||||
isFinish:false,//下拉加载,
|
||||
},
|
||||
|
@ -19,6 +20,11 @@ Page({
|
|||
*/
|
||||
onLoad(options) {
|
||||
this.loadListData();
|
||||
if (wx.getStorageSync('userInfo').loginName !== 'admin'){
|
||||
this.setData({
|
||||
head:wx.getStorageSync('perInfo').id
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//上拉加载
|
||||
|
@ -58,6 +64,7 @@ Page({
|
|||
let _param = {
|
||||
pageSize:that.data.pageSize,
|
||||
pageNum:that.data.pageNum,
|
||||
head:that.data.head
|
||||
}
|
||||
$api.warnList(_param).then(res => {
|
||||
if(res.code === 0){
|
||||
|
|
Loading…
Reference in New Issue