|
@@ -11,11 +11,11 @@ Page({
|
|
|
// 主体高度
|
|
|
infoHeight: '',
|
|
|
// 信息列表
|
|
|
- list: [{ id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com' }],
|
|
|
+ list: [],
|
|
|
// 弹框
|
|
|
dialog: { title: '详细信息', show: false, type: '1' },
|
|
|
// 详细信息
|
|
|
- info: { id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com', address: '1', dept: '1', zw: '1', company: '1', type: '超级管理员' },
|
|
|
+ info: {},
|
|
|
},
|
|
|
back: function () {
|
|
|
wx.navigateBack({ url: '/pages/home/index' })
|
|
@@ -26,6 +26,8 @@ Page({
|
|
|
},
|
|
|
// 详细信息
|
|
|
toView: function (e) {
|
|
|
+ let data = {id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com', address: '1', dept: '1', zw: '1', company: '1', type: '超级管理员' }
|
|
|
+ this.setData({ info: data })
|
|
|
this.setData({ dialog: { title: '详细信息', show: true, type: '1' } })
|
|
|
},
|
|
|
// 信息变更
|
|
@@ -62,9 +64,30 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
+ // 监听用户是否登录
|
|
|
+ this.watchLogin();
|
|
|
// 计算高度
|
|
|
this.searchHeight()
|
|
|
},
|
|
|
+ // 监听用户是否登录
|
|
|
+ watchLogin: function () {
|
|
|
+ let data = [{ id: '1234567', name: '测试人员', phone: '12345678901', email: '123456@qq.com' }]
|
|
|
+ this.setData({ list: data })
|
|
|
+ // wx.getStorage({
|
|
|
+ // key: 'user',
|
|
|
+ // success: res => {
|
|
|
+ // if (res.data) {
|
|
|
+ // // 查询菜单
|
|
|
+ // if (res.data) this.searchRouter(res.data);
|
|
|
+ // res.data.type = type.find((i) => i.value == res.data.type).label;
|
|
|
+ // if (res.data) this.setData({ userInfo: res.data });
|
|
|
+ // if (res.data && res.data.avatarUrl) this.setData({ avatarUrl: res.data.avatarUrl });
|
|
|
+ // } else {
|
|
|
+ // wx.redirectTo({ url: '/pages/login/index', })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ },
|
|
|
// 计算高度
|
|
|
searchHeight: function () {
|
|
|
let frameStyle = this.data.frameStyle;
|