Commit 70eb3d53 authored by 胥静's avatar 胥静

离线部署代码修改

parent fae43c43
......@@ -68,6 +68,34 @@
}
]
},
"oflProduction": {
"index": {
"input": "src/index_offline.html",
"output": "src/index.html"
},
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.offline.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "5mb",
"maximumError": "10mb"
}
]
},
"test": {
"fileReplacements": [
{
......
......@@ -5,6 +5,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod -c=production",
"oflbuild": "ng build --prod -c=oflProduction",
"test": "ng build --prod -c=test",
"lint": "ng lint",
"e2e": "ng e2e"
......
<div class="mainCon">
<div class="title">
<div class="title" *ngIf="!oflflg">
辉度工业云平台<br>
</div>
<div class="title" *ngIf="oflflg">
物联网云平台<br>
</div>
<div class="loginPartOut">
<div class="loginPart">
<div class="online">
......@@ -20,7 +23,7 @@
<button nz-button nzType="primary" nzBlock (click)="login()">登录</button>
</div>
<!-- 版权备案号 -->
<div style="text-align:right;position:absolute;right:0;bottom:80px;color: #ffffff">
<div style="text-align:right;position:absolute;right:0;bottom:80px;color: #ffffff" *ngIf="!oflflg">
<span>版权所有:上海辉泰信息科技有限公司</span>
<span><br><a style="color:#ffffff;text-decoration:none;" href="https://beian.miit.gov.cn">网站备案:沪ICP备19015228号-2</a></span>
</div>
......
import { Component, OnInit } from '@angular/core';
import {
AbstractControl,
FormBuilder,
FormGroup,
Validators
} from '@angular/forms';
import {environment} from '../../../environments/environment';
import {en_US, NzMessageService, zh_CN, NzI18nService} from 'ng-zorro-antd';
import { ApiService } from '../../service/api';
import {PermissionService} from '../../service/permission';
......@@ -19,6 +14,7 @@ import { TranslateService } from '@ngx-translate/core';
export class LoginComponent implements OnInit {
isLoading = false;
req: any = {};
oflflg = false;
constructor(private api: ApiService, private message: NzMessageService,
private permission: PermissionService, private router: Router,
......@@ -26,6 +22,7 @@ export class LoginComponent implements OnInit {
}
ngOnInit(): void {
this.oflflg = environment.offlineFlg == 'OFL' ? true : false;
}
login() {
......
<div style="text-align: center;height: 50px;line-height: 50px;">
<div style="text-align: center;height: 50px;line-height: 50px;" *ngIf="!oflflg">
<span style="margin-right: 30px">版权所有:上海辉泰信息科技有限公司</span>
<span>网站备案:沪ICP备19015228号-2</span>
</div>
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../environments/environment';
@Component({
selector: 'app-footer',
......@@ -6,10 +7,11 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./footer.component.scss']
})
export class FooterComponent implements OnInit {
oflflg = false;
constructor() { }
ngOnInit() {
this.oflflg = environment.offlineFlg == 'OFL' ? true : false;
}
}
......@@ -76,7 +76,7 @@
</div>
</div>
<div nz-row style="margin-top: 30px;">
<div nz-row style="margin-top: 30px;" *ngIf="!oflflg">
<nz-card nzTitle="应用列表" class="cardHover">
<div class="cont-block" *ngFor="let one of useList" (click)="toDetail(one)">
<nz-card [nzCover]="coverTemplate">
......
......@@ -4,6 +4,7 @@ import {ApiService} from '../../service/api';
import {NzMessageService} from 'ng-zorro-antd';
import {TranslateService} from '@ngx-translate/core';
import {Router} from '@angular/router';
import {environment} from "../../../environments/environment";
@Component({
selector: 'app-home',
......@@ -22,6 +23,7 @@ export class HomeComponent implements OnInit {
dailyUseRateOption;
dailyUseTimesRateOption;
deviceTypeOption;
oflflg = false;
device = {
total: 108923,
......@@ -123,6 +125,7 @@ export class HomeComponent implements OnInit {
ngOnInit() {
this.init();
this.oflflg = environment.offlineFlg == 'OFL' ? true : false;
}
init() {
......
export const environment = {
production: true,
// baseUrl: 'http://cloud.witium.com/api', // 对外访问测试网地址
// baseUrl: 'http://jiecloud.witium.com/witcloud/api/',
// baseUrl: 'http://127.0.0.1:8094',
// baseUrl: 'http://47.96.79.210:8094',
offlineFlg: 'OFL', // 离线部署flg
baseUrl: 'https://cloud.witium.com/api',
};
......@@ -4,5 +4,6 @@ export const environment = {
// baseUrl: 'http://jiecloud.witium.com/witcloud/api/',
// baseUrl: 'http://127.0.0.1:8094',
// baseUrl: 'http://47.96.79.210:8094',
offlineFlg: '', // 离线部署flg
baseUrl: 'https://cloud.witium.com/api',
};
export const environment = {
production: false,
test: true,
offlineFlg: '', // 离线部署flg
baseUrl: 'http://cloud.witium.com.cn/api/v2', // 测试
};
......@@ -5,9 +5,11 @@
export const environment = {
production: false,
test: false,
baseUrl: 'https://cloud.witium.com/api',
offlineFlg: 'OFL', // 离线部署flg
// baseUrl: 'http://cloud-test.witium.com/api', // 对外访问测试网地址
// baseUrl: 'http://172.16.1.53:8092', // cy
baseUrl: 'http://172.16.1.52:8094', // zz
// baseUrl: 'http://172.16.1.52:8094', // zz
// baseUrl: 'http://cloud.witium.com.cn/api/v2', // 测试
// baseUrl: 'http://jiecloud.witium.com/witcloud/api/',
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment