webpackJsonp([4],{

/***/ 318:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PersonInfoModule", function() { return PersonInfoModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__personInfo_personInfo__ = __webpack_require__(344);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};



var PersonInfoModule = (function () {
    function PersonInfoModule() {
    }
    PersonInfoModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["I" /* NgModule */])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__personInfo_personInfo__["a" /* PersonInfoPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["h" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__personInfo_personInfo__["a" /* PersonInfoPage */]),
            ],
        })
    ], PersonInfoModule);
    return PersonInfoModule;
}());

//# sourceMappingURL=personInfo.module.js.map

/***/ }),

/***/ 344:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PersonInfoPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_storage__ = __webpack_require__(28);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__service_appHttpService__ = __webpack_require__(19);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};




var PersonInfoPage = (function () {
    function PersonInfoPage(navCtrl, storage, appService, toast) {
        this.navCtrl = navCtrl;
        this.storage = storage;
        this.appService = appService;
        this.toast = toast;
        this.orgName = '';
    }
    //ionViewDidLoad():void{ 
    PersonInfoPage.prototype.ionViewWillEnter = function () {
        var _this = this;
        this.user = this.storage.get("user").then(function (value) {
            _this.user = value;
            console.log(_this.user);
            console.log("id1:" + _this.user.id);
            _this.gender = _this.user.userDetail.user.gender;
            console.log("gender:" + _this.gender);
            _this.getOrgName(_this.user.id, function (result) {
                var data = result;
                _this.orgName = data["orgName"];
            });
        });
    };
    PersonInfoPage.prototype.modifyPwd = function () {
        this.navCtrl.push("ModifyPasswordPage");
    };
    PersonInfoPage.prototype.getOrgName = function (id, callback) {
        this.appService.ObserverHttpPost("/wisdomgroup/app/getOrgName", { "userid": id })
            .toPromise()
            .then(function (res) {
            var data = res.json();
            callback(data == null ? "[]" : data);
        })
            .catch(function (error) {
        });
    };
    //不同的code代表修改不同的数据，1房间，2座机，3邮箱
    PersonInfoPage.prototype.edit = function (code) {
        this.navCtrl.push("EditPersonInfoPage", { code: code });
    };
    PersonInfoPage.prototype.goBack = function () {
        this.navCtrl.popToRoot();
    };
    PersonInfoPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
            selector: 'page-personInfo',template:/*ion-inline-start:"/Users/ben/gitLab-project/wisdom-ces/src/pages/personInfo/personInfo.html"*/'<ion-header>\n\n  <ion-toolbar>\n\n      <div class="searchToolBar">\n\n          <button ion-button clear small navPop style="padding: 0;" (click)="goBack()">\n\n              <img class="back-btn" src="./assets/imgs/back.png" />\n\n            </button>\n\n            <ion-title text-center>个人信息</ion-title>\n\n      </div>\n\n    \n\n    </ion-toolbar>\n\n</ion-header>\n\n<ion-content class="content">\n\n\n\n  <div class="content-title">\n\n    基础信息（如需修改请联系人事处）\n\n  </div>\n\n  <ion-list>\n\n    <ion-item>\n\n      <div class="info-item">\n\n        <span class="info-span">头像</span>\n\n        <div class="photo-box">\n\n          <img src="./assets/imgs/woman.png" *ngIf="gender == 0" class="img">\n\n          <img src="./assets/imgs/man.png" *ngIf="gender == null || gender == \'1\'" class="img">\n\n          <!-- <ion-icon name="ios-arrow-forward" class="icon-more"></ion-icon> -->\n\n        </div>\n\n      </div>\n\n    </ion-item>\n\n    <ion-item>\n\n      <div class="info-item">\n\n        <span class="info-span">姓名/性别</span>\n\n        <div>\n\n          <span class="info">{{user?.userName}}</span>\n\n          <ion-icon name="male" class="contact-sex male" *ngIf="gender == null || gender == \'1\'"></ion-icon>\n\n          <ion-icon name="female" class="contact-sex female" *ngIf="gender == 0"></ion-icon>\n\n        </div>\n\n      </div>\n\n    </ion-item>\n\n    <ion-item>\n\n      <div class="info-item">\n\n        <span class="info-span">部门</span>\n\n        <div>\n\n          <span class="info">{{orgName}}</span>\n\n          <!-- <ion-icon name="ios-arrow-forward" class="icon-more"></ion-icon> -->\n\n        </div>\n\n      </div>\n\n    </ion-item>\n\n    <ion-item class="info-item">\n\n      <div class="info-item">\n\n        <span class="info-span">手机（已绑定）</span>\n\n        <div>\n\n          <span class="info">{{user?.userDetail?.user.mobile}}</span>\n\n        </div>\n\n      </div>\n\n    </ion-item>\n\n  </ion-list>\n\n  <div class="content-title">\n\n    补充信息（可编辑）\n\n  </div>\n\n  <ion-list>\n\n    <ion-item>\n\n      <div class="info-item">\n\n        <span class="info-span">房间号</span>\n\n        <div class="info-item-content">\n\n          <span class="info">{{user?.userDetail?.user.abbreviation}}</span>\n\n          <img src="./assets/imgs/edit.png" class="edit" (click)="edit(1)">\n\n        </div>\n\n      </div>\n\n    </ion-item>\n\n    <ion-item>\n\n      <div class="info-item">\n\n        <span class="info-span">座机</span>\n\n        <div class="info-item-content">\n\n          <span class="info">{{user?.userDetail?.user.telephone}}</span>\n\n          <img src="./assets/imgs/edit.png" class="edit" (click)="edit(2)">\n\n        </div>\n\n      </div>\n\n    </ion-item>\n\n\n\n    <ion-item>\n\n      <div class="info-item">\n\n        <span class="info-span">邮箱</span>\n\n        <div class="info-item-content">\n\n          <span class="info">{{user?.userDetail?.user.email}}</span>\n\n          <img src="./assets/imgs/edit.png" class="edit" (click)="edit(3)">\n\n        </div>\n\n      </div>\n\n    </ion-item>\n\n  </ion-list>\n\n\n\n  <!-- <button ion-button block class="save">保存信息</button> -->\n\n  <button ion-button block class="save" (click)="modifyPwd()">修改密码</button>\n\n</ion-content>'/*ion-inline-end:"/Users/ben/gitLab-project/wisdom-ces/src/pages/personInfo/personInfo.html"*/
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* NavController */],
            __WEBPACK_IMPORTED_MODULE_2__ionic_storage__["b" /* Storage */],
            __WEBPACK_IMPORTED_MODULE_3__service_appHttpService__["b" /* AppService */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["n" /* ToastController */]])
    ], PersonInfoPage);
    return PersonInfoPage;
}());

//# sourceMappingURL=personInfo.js.map

/***/ })

});
//# sourceMappingURL=4.js.map