|
|
@@ -0,0 +1,43 @@
|
|
|
+'use strict';
|
|
|
+
|
|
|
+angular.module('appMessage').controller('UserController', ['$scope', '$state', function($scope, $state) {
|
|
|
+
|
|
|
+ lxtalkClient.Invoke('{FB60F992-A0FD-47B3-AAA7-E80DF209C5A4}', '_Register', '', $scope);
|
|
|
+
|
|
|
+ // $scope.user = {
|
|
|
+ // name: '陆趣趣',
|
|
|
+ // l: '0578+0-lslqq',
|
|
|
+ // shotL: 'lslqq',
|
|
|
+ // comp: '浙江万赛软件科技有限公司',
|
|
|
+ // branch: '运维部',
|
|
|
+ // sex: '0',
|
|
|
+ // mob: '15215756180',
|
|
|
+ // sMob: '666666',
|
|
|
+ // tel: '2189026',
|
|
|
+ // duty: '运维部经理',
|
|
|
+ // officeID: '运维室001',
|
|
|
+ // email: 'lqq@wswin.cn',
|
|
|
+ // shortL: 'lszhangzhangzhang'
|
|
|
+ // };
|
|
|
+
|
|
|
+ $scope.getSex = function(sex) {
|
|
|
+ if ($scope.user === undefined)
|
|
|
+ return '保密';
|
|
|
+ if ($scope.user.sex == 0)
|
|
|
+ return '男';
|
|
|
+ else if ($scope.user.sex == 1)
|
|
|
+ return '女';
|
|
|
+ else
|
|
|
+ return '保密';
|
|
|
+ }
|
|
|
+
|
|
|
+ $scope.update = function(userJson) {
|
|
|
+ userJson = userJson.replace(/ /g, " ");
|
|
|
+ userJson = userJson.replace(/\t/g, "\\t");
|
|
|
+ var user = JSON.parse(userJson);
|
|
|
+ $scope.user = user;
|
|
|
+ var reg = /-([\W\w]*)/;
|
|
|
+ var group = reg.exec($scope.user.l);
|
|
|
+ $scope.user.shortL = group == null ? $scope.user.l : group[1];
|
|
|
+ }
|
|
|
+}]);
|