1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- (function () {
- var page = {
- isScroll: true,
- init: function ($page) {
- // 获取登录者信息
- var userinfo = renlian.storage.get('userinfo');
- var baseinfo = userinfo.baseinfo;
- //$page.find('img').attr('src', config.webapi + 'renlian/adms/user/img?data=' + baseinfo.userId);
- if(userinfo.baseinfo.photoUrl){
- $page.find('img').attr('src', userinfo.baseinfo.photoUrl);
- }
- $page.find('.account').text(baseinfo.account);
- $page.find('.my-plate').text(baseinfo.plate);
- $page.find('.my-gpsNumber').text(baseinfo.gpsNumber);
- $page.find('.enCode').text(baseinfo.enCode);
- $page.find('.realName').text(baseinfo.realName);
- $page.find('.gender').text(baseinfo.gender == 1 ? '男' : '女');
- if (baseinfo.companyId) {
- renlian.clientdata.get('company', {
- key: baseinfo.companyId,
- callback: function (data) {
- $page.find('.company').text(data.name);
- }
- });
- }
- if (baseinfo.departmentId) {
- renlian.clientdata.get('department', {
- key: baseinfo.departmentId,
- callback: function (data) {
- $page.find('.department').text(data.name);
- }
- });
- }
- var post = [];
- var role = [];
- $.each(userinfo.post, function (id, item) {
- post.push(item.F_Name);
- });
- $.each(userinfo.role, function (id, item) {
- role.push(item.F_FullName);
- });
- $page.find('.post').text(String(post));
- $page.find('.role').text(String(role));
- }
- };
- return page;
- })();
|