webpackJsonp([0],{

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

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionModule", function() { return VersionModule; });
/* 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__version_version__ = __webpack_require__(348);
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 VersionModule = (function () {
    function VersionModule() {
    }
    VersionModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["I" /* NgModule */])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__version_version__["a" /* VersionPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["h" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__version_version__["a" /* VersionPage */]),
            ],
        })
    ], VersionModule);
    return VersionModule;
}());

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

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VersionPage; });
/* 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__service_appHttpService__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_app_version__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__service_appUpdateService__ = __webpack_require__(56);
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 VersionPage = (function () {
    function VersionPage(navCtrl, navParams, appService, appUpdateService, appVersion) {
        this.navCtrl = navCtrl;
        this.navParams = navParams;
        this.appService = appService;
        this.appUpdateService = appUpdateService;
        this.appVersion = appVersion;
        this.version = '';
        this.latestVersion = '';
        this.isLatest = true;
    }
    VersionPage.prototype.ionViewWillEnter = function () {
        this.getversion();
    };
    //获取最新版本信息
    VersionPage.prototype.getversion = function () {
        var _this = this;
        //检测是否需要更新
        this.appVersion.getVersionNumber().then(function (version) {
            _this.version = version;
            _this.appUpdateService.compariVersion().subscribe(function (res) {
                var data = res.json();
                if (data.code == 200) {
                    _this.latestVersion = data.latestVersion;
                    if (data.latestVersion != null && data.latestVersion != version) {
                        _this.isLatest = false;
                    }
                }
            });
        }).catch(function (err) {
            console.log('getVersionNumber:' + err);
        });
    };
    //更新
    VersionPage.prototype.update = function () {
        this.appUpdateService.downloadApp("/wisdomgroup/app/download");
    };
    VersionPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
            selector: 'page-version',template:/*ion-inline-start:"/Users/ben/gitLab-project/wisdom-ces/src/pages/version/version.html"*/'<ion-header>\n	<ion-toolbar>\n		<div class="searchToolBar">\n			<button ion-button clear small navPop style="padding: 0;">\n				<img class="back-btn" src="./assets/imgs/back.png" />\n			</button>\n			<ion-title text-center>版本信息</ion-title>\n		</div>\n	</ion-toolbar>\n</ion-header>\n<ion-content>\n <div class="version-box">\n   <img src="./assets/imgs/logo-5.png" class="logo">\n   <span class="version">当前版本 {{version}}</span>\n   <span class="version">最新版本 {{latestVersion}}</span>\n   <button *ngIf="!isLatest" class="update-btn" (click)="update()">更新</button>\n </div>\n</ion-content>'/*ion-inline-end:"/Users/ben/gitLab-project/wisdom-ces/src/pages/version/version.html"*/
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* NavController */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["k" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_2__service_appHttpService__["b" /* AppService */],
            __WEBPACK_IMPORTED_MODULE_4__service_appUpdateService__["a" /* AppUpdateService */],
            __WEBPACK_IMPORTED_MODULE_3__ionic_native_app_version__["a" /* AppVersion */]])
    ], VersionPage);
    return VersionPage;
}());

//# sourceMappingURL=version.js.map

/***/ })

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