1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- /*
- * 描 述:个人中心
- */
- var baseinfo;
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- page.initleft();
- page.bind();
- page.initData();
- },
- bind: function () {
-
- },
- initleft: function () {
- $('#lr_left_list li').on('click', function () {
- var $this = $(this);
- if (!$this.hasClass('active')) {
- var $parent = $this.parent();
- $parent.find('.active').removeClass('active');
- $this.addClass('active');
- var _type = $this.attr('data-value');
- $('.lr-layout-wrap-item').removeClass('active');
- $('#lr_layout_item' + _type).addClass('active');
- }
- });
- },
- initData: function () {
- learun.httpAsyncGet(top.$.rootUrl + '/UserCenter/GetUserInfo', function (res) {
- if (res.code>0) {
- baseinfo = res.data;
- /*基础信息*/
- $('#F_Account').val(baseinfo.USERITEM.Code);
- $('#F_RealName').val(baseinfo.USERITEM.Name);
- $('#F_Gender').val(baseinfo.USERITEM.SexNum == 0 ? '女' : '男');
- //learun.clientdata.getAsync('department', {
- // key: baseinfo.departmentId,
- // callback: function (_data) {
- // $('#F_Department').val(_data.name);
- // }
- //});
- //var post = [], role = [];
- //$.each(res.data.post, function (id, item) {
- // post.push(item.F_Name);
- //});
- //$.each(res.data.role, function (id, item) {
- // role.push(item.F_FullName);
- //});
- //$('#Post').val(String(post));
- //$('#Role').val(String(role));
- $('#F_Description').val(baseinfo.USERITEM.Memo);
- }
- else {
- learun.alert.error('数据加载失败');
- }
- });
- }
- };
- page.init();
- }
|