Merge remote-tracking branch 'origin/main'

This commit is contained in:
duxp 2023-09-19 09:37:37 +08:00
commit 2cacf47305
7 changed files with 57 additions and 21 deletions

View File

@ -49,7 +49,8 @@
"van-stepper": "@vant/weapp/stepper/index", "van-stepper": "@vant/weapp/stepper/index",
"van-empty": "@vant/weapp/empty/index", "van-empty": "@vant/weapp/empty/index",
"van-tree-select": "@vant/weapp/tree-select/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": { "tabBar": {
"selectedColor": "#5199FF", "selectedColor": "#5199FF",

View File

@ -140,6 +140,11 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
if (wx.getStorageSync('userInfo').loginName !== 'admin'){
this.setData({
"searchForm.reviewed":wx.getStorageSync('perInfo').id
})
}
this.loadListData(); this.loadListData();
this.loadPersonData(); this.loadPersonData();
}, },

View File

@ -62,11 +62,13 @@ Page({
"password": _this.data.password, "password": _this.data.password,
}).then(obj => { }).then(obj => {
if (obj.code === 0){ 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({ wx.reLaunch({
url: '/pages/evaluation/evaluation' url: '/pages/evaluation/evaluation'
}); });
wx.setStorageSync("loginName", _this.data.username);
wx.setStorageSync("password", _this.data.password);
}else { }else {
Dialog.alert({ Dialog.alert({
message:'用户名或密码错误' message:'用户名或密码错误'
@ -98,11 +100,13 @@ Page({
"password": _this.data.password, "password": _this.data.password,
}).then(obj => { }).then(obj => {
if (obj.code === 0){ 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({ wx.reLaunch({
url: '/pages/evaluation/evaluation' url: '/pages/evaluation/evaluation'
}); });
wx.setStorageSync("loginName", _this.data.username);
wx.setStorageSync("password", _this.data.password);
}else { }else {
Dialog.alert({ Dialog.alert({
message:'用户名或密码错误' message:'用户名或密码错误'

View File

@ -5,14 +5,29 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
userInfo:null,
perInfo:null,
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.setData({
userInfo:wx.getStorageSync('userInfo'),
perInfo:wx.getStorageSync('perInfo')
})
},
exitLogin(){
wx.clearStorageSync()
// 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/loading/loading'
});
}, },
/** /**

View File

@ -4,22 +4,22 @@
<view class="mine_item_title">基础信息</view> <view class="mine_item_title">基础信息</view>
<view class="mine_item_list"> <view class="mine_item_list">
<view class="list_item"> <view class="list_item">
<span>姓名:暂无</span> <span>姓名:{{perInfo.name}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>性别:暂无</span> <span>性别:{{perInfo.sex === '1'?'男':'女'}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>民族:暂无</span> <span>民族:{{perInfo.nation}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>籍贯:暂无</span> <span>籍贯:{{perInfo.nativePlace}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>手机号:暂无</span> <span>手机:{{perInfo.mphone}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>邮箱:暂无</span> <span>邮箱:{{perInfo.email}}</span>
</view> </view>
</view> </view>
</view> </view>
@ -27,13 +27,13 @@
<view class="mine_item_title">工作信息</view> <view class="mine_item_title">工作信息</view>
<view class="mine_item_list"> <view class="mine_item_list">
<view class="list_item"> <view class="list_item">
<span>部门:暂无</span> <span>部门:{{perInfo.deptName}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>岗位:暂无</span> <span>岗位:{{perInfo.post}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>职务:暂无</span> <span>职务:{{perInfo.duties}}</span>
</view> </view>
</view> </view>
</view> </view>
@ -41,14 +41,18 @@
<view class="mine_item_title">党员信息</view> <view class="mine_item_title">党员信息</view>
<view class="mine_item_list"> <view class="mine_item_list">
<view class="list_item"> <view class="list_item">
<span>支部:暂无</span> <span>支部:{{perInfo.branchName}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>党员职务:暂无</span> <span>党员职务:{{perInfo.partyDuties}}</span>
</view> </view>
<view class="list_item"> <view class="list_item">
<span>入党时间:暂无</span> <span>入党时间:{{perInfo.partyDate}}</span>
</view> </view>
</view> </view>
</view> </view>
<view class="mine_item" style="margin-top:20px;">
<van-button type="danger" bindtap="exitLogin" block>退出当前账号</van-button>
</view>
</view> </view>

View File

@ -34,7 +34,7 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
.list_item{ .list_item{
width: 30%; width: 45%;
margin: 10px 5px; margin: 10px 5px;
font-size: 30rpx; font-size: 30rpx;
} }

View File

@ -10,6 +10,7 @@ Page({
pageSize: 10, pageSize: 10,
//所有数据 //所有数据
list: [], list: [],
head:null,
isRefreshing:false,//下拉刷新 isRefreshing:false,//下拉刷新
isFinish:false,//下拉加载, isFinish:false,//下拉加载,
}, },
@ -18,7 +19,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.loadListData();
}, },
//上拉加载 //上拉加载
@ -58,6 +59,7 @@ Page({
let _param = { let _param = {
pageSize:that.data.pageSize, pageSize:that.data.pageSize,
pageNum:that.data.pageNum, pageNum:that.data.pageNum,
head:that.data.head
} }
$api.warnList(_param).then(res => { $api.warnList(_param).then(res => {
if(res.code === 0){ if(res.code === 0){
@ -102,7 +104,12 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
if (wx.getStorageSync('userInfo').loginName !== 'admin'){
this.setData({
head:wx.getStorageSync('perInfo').id
})
}
this.loadListData();
}, },
/** /**