Commit 22e86bbc by Chao Sun

心灵鸡汤&团队面板

parent 0b73e3aa
...@@ -182,8 +182,46 @@ export class LifeCommonService { ...@@ -182,8 +182,46 @@ export class LifeCommonService {
if (point == 0) { if (point == 0) {
return 0; return 0;
} }
var str = Number(point * 100).toFixed(); let result = String(point * 100);
str += "%"; let idx = result.indexOf(".");
return str; if (idx == -1 || result.substr(idx + 1).length <= 2) {
return result + "%";
}
return result.substr(0, idx + 2) + "%";
}
transform(value: any, args?: any): any {
if ((value + "").trim() == "") {
return "";
}
if (typeof value == 'string') {
value = value.replace(/,/gi, '');
}
if ((value + "").trim() == "") {
return "";
}
if (isNaN(value)) {
return "";
}
value = value + "";
if (/^.*\..*$/.test(value)) {
let pointIndex = value.lastIndexOf(".");
let intPart = value.substring(0, pointIndex);
let pointPart = value.substring(pointIndex + 1, value.length);
intPart = intPart + "";
const re = /(-?\d+)(\d{3})/
while (re.test(intPart)) {
intPart = intPart.replace(re, "$1,$2")
}
value = intPart + "." + pointPart;
} else {
value = value + "";
var re = /(-?\d+)(\d{3})/
while (re.test(value)) {
value = value.replace(re, "$1,$2")
}
}
return value;
} }
} }
...@@ -280,4 +280,11 @@ export class MyService { ...@@ -280,4 +280,11 @@ export class MyService {
return this.http return this.http
.post(url, JSON.stringify(param)); .post(url, JSON.stringify(param));
} }
//战队成员销售业绩预测
salesPerformanceForecastListQuery(param) {
const url = this.ydapi + '/practitioner/salesPerformanceForecastListQuery';
return this.http
.post(url, JSON.stringify(param));
}
} }
...@@ -82,8 +82,12 @@ ...@@ -82,8 +82,12 @@
</div> </div>
<div class="contentItem" *ngIf="this.id!=0"> <div class="contentItem" *ngIf="this.id!=0">
<span>预计报聘时间</span> <span>预计报聘时间</span>
<input class="form-control" type="date" placeholder="{{readonlyFlag ?'暂无预计报聘时间':'请选择预计报聘时间'}}" <input *ngIf="readonlyFlag" class="form-control" type="text"
[(ngModel)]="editRecruiting.timeToOnboarding" [disabled]="readonlyFlag" (blur)="inputBlur()" /> placeholder="{{readonlyFlag ?'暂无预计报聘时间':'请选择预计报聘时间'}}" [(ngModel)]="editRecruiting.timeToOnboarding"
[disabled]="readonlyFlag" (blur)="inputBlur()" />
<input *ngIf="!readonlyFlag" class="form-control" type="date"
placeholder="{{readonlyFlag ?'暂无预计报聘时间':'请选择预计报聘时间'}}" [(ngModel)]="editRecruiting.timeToOnboarding"
[disabled]="readonlyFlag" (blur)="inputBlur()" />
</div> </div>
<div class="contentItem" *ngIf="this.id!=0"> <div class="contentItem" *ngIf="this.id!=0">
<span>增员状态</span> <span>增员状态</span>
......
...@@ -67,6 +67,11 @@ ...@@ -67,6 +67,11 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
input[type="date"]{
position: absolute;
right: -6%;
direction: rtl;
}
.sexWrapper { .sexWrapper {
display: flex; display: flex;
width: 60%; width: 60%;
......
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
</div> </div>
<div class="taem_panel_item_content"> <div class="taem_panel_item_content">
<ul> <ul>
<li>¥{{statisticInfo?.fyp}}</li> <li>¥{{statisticInfo?.fyp | number: "1.0-2"}}</li>
<li>¥{{statisticInfo?.fyc}}</li> <li>¥{{statisticInfo?.fyc | number: "1.0-2"}}</li>
<li>{{statisticInfo?.count}}</li> <li>{{statisticInfo?.count | number}}</li>
<li>{{statisticInfo?.completionRate | percent }}</li> <li>{{lifeCommonService.toPercent(statisticInfo?.completionRate) }}</li>
</ul> </ul>
<ul> <ul>
<li>首年保费</li> <li>首年保费</li>
...@@ -41,10 +41,11 @@ ...@@ -41,10 +41,11 @@
</div> </div>
<div class="taem_panel_item_content"> <div class="taem_panel_item_content">
<ul> <ul>
<li>{{ this.teamActionsData?.scoreDayAverage | number: "1.0-0"}}</li> <li>{{this.teamActionsData?.scoreDayAverage?this.teamActionsData?.scoreDayAverage:'0'}}</li>
<li>{{this.teamActionsData?.scoreWeekAverage | number: "1.0-0"}}</li> <li>{{this.teamActionsData?.scoreWeekAverage?this.teamActionsData?.scoreWeekAverage:'0'}}</li>
<li>{{this.teamActionsData?.scoreMonthAverage | number: "1.0-0"}}</li> <li>{{this.teamActionsData?.scoreMonthAverage?this.teamActionsData?.scoreMonthAverage:'0'}}
<li>{{this.teamActionsData?.opportunitiesNum}}</li> </li>
<li>{{this.teamActionsData?.opportunitiesNum?this.teamActionsData?.opportunitiesNum:'0'}}</li>
</ul> </ul>
<ul> <ul>
<li>今天平均</li> <li>今天平均</li>
...@@ -68,12 +69,12 @@ ...@@ -68,12 +69,12 @@
<li [ngClass]="{selected:selectedSalseItem==='year'}" (click)="selectSales('year')">本年</li> <li [ngClass]="{selected:selectedSalseItem==='year'}" (click)="selectSales('year')">本年</li>
</ul> </ul>
</div> </div>
<div class="taem_panel_item_content"> <div class="taem_panel_item_content forecast">
<ul> <ul>
<li>¥{{premiums | number:'1.0-0'}}</li> <li>¥{{premiums?lifeCommonService.transform(premiums):'0'}}</li>
<li>¥{{commission | number:'1.0-0'}}</li> <li>¥{{commission?lifeCommonService.transform(commission):'0'}}</li>
<li>{{count | number:'1.0-0'}}</li> <li>{{count?count:'0'}}</li>
<li>{{completionRates | percent}}</li> <li>{{completionRates?lifeCommonService.toPercent(completionRates):'0'}}</li>
</ul> </ul>
<ul> <ul>
<li>{{selectedSalseItemName}}保费</li> <li>{{selectedSalseItemName}}保费</li>
......
...@@ -55,6 +55,14 @@ ...@@ -55,6 +55,14 @@
} }
} }
} }
.taem_panel_item_content.forecast{
ul li{
width: 22%;
}
ul li:nth-child(1){
width: 30%;
}
}
.next{ .next{
text-align: right; text-align: right;
} }
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { MyService } from '../my.service'; import { MyService } from '../my.service';
import { LifeCommonService } from '../../common/life-common.service';
@Component({ @Component({
selector: 'ydlife-team-panel', selector: 'ydlife-team-panel',
templateUrl: './team-panel.component.html', templateUrl: './team-panel.component.html',
...@@ -24,7 +24,7 @@ export class TeamPanelComponent implements OnInit { ...@@ -24,7 +24,7 @@ export class TeamPanelComponent implements OnInit {
recruitingStatistics: any; recruitingStatistics: any;
selectedRecruitingItem: any; selectedRecruitingItem: any;
statisticInfo: any; statisticInfo: any;
constructor(private myService: MyService) { } constructor(private myService: MyService, public lifeCommonService: LifeCommonService) { }
ngOnInit() { ngOnInit() {
this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']; this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'];
this.subordinateSystemName = sessionStorage.getItem('subordinateSystemName'); this.subordinateSystemName = sessionStorage.getItem('subordinateSystemName');
......
...@@ -10,28 +10,63 @@ ...@@ -10,28 +10,63 @@
<div class="rankInfoWrapper"> <div class="rankInfoWrapper">
<div class="rankContent"> <div class="rankContent">
<div style="font-size: 18px;margin-bottom: 10px;">战队成员销售活动量得分</div> <div style="font-size: 18px;margin-bottom: 10px;">战队成员销售活动量得分</div>
<ul> <div class="content_wrapper">
<li>姓名</li> <ul>
<li>今天得分</li> <li>姓名</li>
<li>本周得分</li> <li>今天得分</li>
<li>本月得分</li> <li>本周得分</li>
<li>本周新增商机</li> <li>本月得分</li>
</ul> <li>本周新增商机</li>
<div style="width: 100%;text-align: center;float: left;height: 35px;" </ul>
*ngIf="playerSalesActivityInfo?.length <=0"> <div style="width: 100%;text-align: center;float: left;height: 35px;"
暂无战队成员,努力去增员吧 *ngIf="playerSalesActivityInfo?.length <=0">
暂无战队成员,努力去增员吧
</div>
<ul *ngFor="let playerSalesActivityItem of playerSalesActivityInfo;index as i;">
<li>{{playerSalesActivityItem.name}}</li>
<li>{{playerSalesActivityItem.scoreDay!=null?playerSalesActivityItem.scoreDay:'-'}}</li>
<li>{{playerSalesActivityItem.scoreWeek!=null?playerSalesActivityItem.scoreWeek:'-'}}</li>
<li>{{playerSalesActivityItem.scoreMonth!=null?playerSalesActivityItem.scoreMonth:'-'}}</li>
<li>{{playerSalesActivityItem.addOpportunityNum!=null?playerSalesActivityItem.addOpportunityNum:'-'}}</li>
</ul>
</div> </div>
<ul *ngFor="let playerSalesActivityItem of playerSalesActivityInfo;index as i;">
<li>{{playerSalesActivityItem.name}}</li>
<li>{{playerSalesActivityItem.scoreDay!=null?playerSalesActivityItem.scoreDay:'-'}}</li>
<li>{{playerSalesActivityItem.scoreWeek!=null?playerSalesActivityItem.scoreWeek:'-'}}</li>
<li>{{playerSalesActivityItem.scoreMonth!=null?playerSalesActivityItem.scoreMonth:'-'}}</li>
<li>{{playerSalesActivityItem.addOpportunityNum!=null?playerSalesActivityItem.addOpportunityNum:'-'}}</li>
</ul>
</div> </div>
</div> </div>
</div> </div>
<div *ngIf="this.showType==='forecast'"> <div *ngIf="this.showType==='forecast'">
预测 <div class="rankInfoWrapper">
<div class="rankContent">
<div class="tab">
<div style="font-size: 18px;">战队销售业绩预测</div>
<ul>
<li [ngClass]="{selected:selectedSalseItem==='m'}" (click)="salesPerformanceForecastListQuery('m')">本月</li>
<li [ngClass]="{selected:selectedSalseItem==='q'}" (click)="salesPerformanceForecastListQuery('q')">本季</li>
<li [ngClass]="{selected:selectedSalseItem==='y'}" (click)="salesPerformanceForecastListQuery('y')">本年</li>
</ul>
</div>
<div class="content_wrapper forecast">
<ul>
<li class="name">姓名</li>
<li>保费</li>
<li>佣金</li>
<li class="count">件数</li>
<li>完成率</li>
</ul>
<div style="width: 100%;text-align: center;float: left;height: 35px;"
*ngIf="salesPerformanceForecastInfos?.length <=0">
暂无战队成员,努力去增员吧
</div>
<ul *ngFor="let forecastItem of salesPerformanceForecastInfos;index as i;">
<li class="name">{{forecastItem.name}}</li>
<li>{{forecastItem.premium!=null?'¥'+lifeCommonService.transform(forecastItem.premium):'-'}}</li>
<li>{{forecastItem.commission!=null?'¥'+lifeCommonService.transform(forecastItem.commission):'-'}}</li>
<li class="count">{{forecastItem.pieces!=null?forecastItem.pieces:'-'}}</li>
<li>{{forecastItem.achievementRate!=null?lifeCommonService.toPercent(forecastItem.achievementRate):'-' }}
</li>
</ul>
</div>
</div>
</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
background: #eff0f1; background: #eff0f1;
overflow: hidden; overflow: hidden;
height: 100%; height: 100%;
ul li,ol li{
list-style: none;
}
.teamInfo{ .teamInfo{
font-size: 24px; font-size: 24px;
position: relative; position: relative;
...@@ -27,30 +30,67 @@ ...@@ -27,30 +30,67 @@
box-shadow: 0 0px 2.5px #eceaea; box-shadow: 0 0px 2.5px #eceaea;
border-radius: 6px; border-radius: 6px;
padding: 5px; padding: 5px;
ul{ .tab{
width: 100%; display: flex;
height: 30px; margin-bottom: 10px;
line-height: 30px; display: flex;
li{ justify-content: space-between;
float: left; align-items: center;
width: 18%; ul{
text-align: center; width: 30%;
margin:0 1%; display: flex;
position: relative; justify-content: space-between;
margin-bottom: 5px; li.selected{
overflow: hidden; font-weight: bold;
border-bottom: 2px red solid;
}
}
}
.content_wrapper{
ul{
width: 100%;
height: 30px; height: 30px;
li.icon .iconfont{ line-height: 30px;
position: absolute; li{
float: left;
width: 18%;
text-align: center;
margin:0 1%;
position: relative;
margin-bottom: 5px;
overflow: hidden;
height: 30px;
li.icon .iconfont{
position: absolute;
}
} }
li.name{
width: 20%;
}
li:last-child{
margin-right: 0;
}
}
}
.content_wrapper.forecast{
ul li{
width: 30%;
margin: 0;
} }
li.name{ ul li:nth-child(2),ul li:nth-child(3){
width: 20%; text-align: right;
} }
li:last-child{ ul li:nth-child(3){
margin-right: 0; width: 22%;
}
ul li:nth-child(4),ul li:nth-child(5){
width: 15%;
}
ul li.name{
width: 18%;
} }
} }
} }
} }
} }
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from "@angular/router"; import { ActivatedRoute, Router } from "@angular/router";
import { MyService } from '../my.service'; import { MyService } from '../my.service';
import { LifeCommonService } from '../../common/life-common.service';
@Component({ @Component({
selector: 'ydlife-team-sales-score', selector: 'ydlife-team-sales-score',
...@@ -12,8 +13,10 @@ export class TeamSalesScoreComponent implements OnInit { ...@@ -12,8 +13,10 @@ export class TeamSalesScoreComponent implements OnInit {
practitionerId: any; practitionerId: any;
subordinateSystemName: any; subordinateSystemName: any;
playerSalesActivityInfo: Array<any>; playerSalesActivityInfo: Array<any>;
selectedSalseItem: any;
salesPerformanceForecastInfos: Array<any>;
constructor(private activateRoute: ActivatedRoute, private router: Router, constructor(private activateRoute: ActivatedRoute, private router: Router,
private myService: MyService) { } private myService: MyService, public lifeCommonService: LifeCommonService) { }
ngOnInit() { ngOnInit() {
this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']; this.practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'];
...@@ -24,18 +27,30 @@ export class TeamSalesScoreComponent implements OnInit { ...@@ -24,18 +27,30 @@ export class TeamSalesScoreComponent implements OnInit {
if (this.showType === 'teamSalesScore') { if (this.showType === 'teamSalesScore') {
this.playerSalesActivityQuery() this.playerSalesActivityQuery()
} }
if (this.showType === '') { if (this.showType === 'forecast') {
this.salesPerformanceForecastListQuery('m')
} }
} }
//获取成员销售活动量得分 //获取成员销售活动量得分
playerSalesActivityQuery() { playerSalesActivityQuery() {
this.myService.playerSalesActivityQuery({ practitionerId: this.practitionerId }).subscribe((res) => { this.myService.playerSalesActivityQuery({ practitionerId: this.practitionerId }).subscribe((res) => {
console.log(res)
if (res['success']) { if (res['success']) {
this.playerSalesActivityInfo = res['data']['playerSalesActivityInfo'] this.playerSalesActivityInfo = res['data']['playerSalesActivityInfo']
} }
}) })
} }
salesPerformanceForecastListQuery(type) {
this.selectedSalseItem = type;
const param = {
practitionerId: this.practitionerId,
time: type
}
this.myService.salesPerformanceForecastListQuery(param).subscribe((res) => {
if (res['success']) {
this.salesPerformanceForecastInfos = res['data']['salesPerformanceForecastInfos']
}
})
}
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>IconFont Demo</title> <title>IconFont Demo</title>
<link rel="shortcut icon" href="https://gtms04.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/> <link rel="shortcut icon" href="https://img.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/>
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css"> <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
<link rel="stylesheet" href="demo.css"> <link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="iconfont.css"> <link rel="stylesheet" href="iconfont.css">
...@@ -31,6 +31,12 @@ ...@@ -31,6 +31,12 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe678;</span>
<div class="name">上引号</div>
<div class="code-name">&amp;#xe678;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe674;</span> <span class="icon iconfont">&#xe674;</span>
<div class="name">开关 switch-基本状态-关闭状态</div> <div class="name">开关 switch-基本状态-关闭状态</div>
<div class="code-name">&amp;#xe674;</div> <div class="code-name">&amp;#xe674;</div>
...@@ -1047,6 +1053,15 @@ ...@@ -1047,6 +1053,15 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont icon-shangyinhao"></span>
<div class="name">
上引号
</div>
<div class="code-name">.icon-shangyinhao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-kaiguanswitch-jibenzhuangtai-dianliangzhuangtai"></span> <span class="icon iconfont icon-kaiguanswitch-jibenzhuangtai-dianliangzhuangtai"></span>
<div class="name"> <div class="name">
开关 switch-基本状态-关闭状态 开关 switch-基本状态-关闭状态
...@@ -2526,6 +2541,14 @@ ...@@ -2526,6 +2541,14 @@
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shangyinhao"></use>
</svg>
<div class="name">上引号</div>
<div class="code-name">#icon-shangyinhao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-kaiguanswitch-jibenzhuangtai-dianliangzhuangtai"></use> <use xlink:href="#icon-kaiguanswitch-jibenzhuangtai-dianliangzhuangtai"></use>
</svg> </svg>
<div class="name">开关 switch-基本状态-关闭状态</div> <div class="name">开关 switch-基本状态-关闭状态</div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
"description": "", "description": "",
"glyphs": [ "glyphs": [
{ {
"icon_id": "816614",
"name": "上引号",
"font_class": "shangyinhao",
"unicode": "e678",
"unicode_decimal": 59000
},
{
"icon_id": "8897231", "icon_id": "8897231",
"name": "开关 switch-基本状态-关闭状态", "name": "开关 switch-基本状态-关闭状态",
"font_class": "kaiguanswitch-jibenzhuangtai-dianliangzhuangtai", "font_class": "kaiguanswitch-jibenzhuangtai-dianliangzhuangtai",
......
...@@ -20,6 +20,9 @@ Created by iconfont ...@@ -20,6 +20,9 @@ Created by iconfont
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="shangyinhao" unicode="&#59000;" d="M505.6 691.2c0-12.8-12.8-25.6-44.8-44.8C307.2 531.2 236.8 441.6 236.8 371.2c0-38.4 25.6-70.4 70.4-83.2 70.4-25.6 96-70.4 96-115.2 0-38.4-19.2-134.4-134.4-134.4-89.6 0-204.8 64-204.8 217.6C64 409.6 211.2 576 416 723.2 428.8 736 441.6 736 448 736c12.8 0 25.6-6.4 38.4-19.2C499.2 704 505.6 697.6 505.6 691.2zM960 691.2c0-12.8-12.8-25.6-44.8-44.8-153.6-108.8-224-204.8-224-275.2 0-38.4 25.6-70.4 70.4-83.2 70.4-25.6 96-70.4 96-115.2 0-38.4-19.2-134.4-134.4-134.4-89.6 0-204.8 64-204.8 217.6 0 160 147.2 326.4 352 473.6 12.8 12.8 25.6 12.8 38.4 12.8C928 736 960 704 960 691.2z" horiz-adv-x="1024" />
<glyph glyph-name="kaiguanswitch-jibenzhuangtai-dianliangzhuangtai" unicode="&#58996;" d="M0 384C0 666.763636 229.003636 896 512.186182 896h1023.627636C1818.670545 896 2048 666.810182 2048 384c0-282.763636-229.003636-512-512.186182-512H512.186182C229.329455-128 0 101.003636 0 384zM512-34.909091a418.909091 418.909091 0 1 1 0 837.818182 418.909091 418.909091 0 0 1 0-837.818182z" horiz-adv-x="2048" /> <glyph glyph-name="kaiguanswitch-jibenzhuangtai-dianliangzhuangtai" unicode="&#58996;" d="M0 384C0 666.763636 229.003636 896 512.186182 896h1023.627636C1818.670545 896 2048 666.810182 2048 384c0-282.763636-229.003636-512-512.186182-512H512.186182C229.329455-128 0 101.003636 0 384zM512-34.909091a418.909091 418.909091 0 1 1 0 837.818182 418.909091 418.909091 0 0 1 0-837.818182z" horiz-adv-x="2048" />
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<link rel="stylesheet" href="./assets/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="./assets/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="./assets/LCalendar/LCalendar.css"> <link rel="stylesheet" href="./assets/LCalendar/LCalendar.css">
<link rel="stylesheet" href="./assets/laydate/theme/default/laydate.css"> <link rel="stylesheet" href="./assets/laydate/theme/default/laydate.css">
</head> </head>
<body> <body>
...@@ -29,16 +28,16 @@ ...@@ -29,16 +28,16 @@
<div id="adv" <div id="adv"
style="width: 100%;min-width: 320px; style="width: 100%;min-width: 320px;
max-width: 640px;overflow: hidden;position: fixed;top: 0;right: 0; bottom: 0;left: 0;background: #fff;margin: auto;"> max-width: 640px;overflow: hidden;position: fixed;top: 0;right: 0; bottom: 0;left: 0;background: #fff;margin: auto;">
<div class="content" style="text-align: center;width: 60%;margin: 50% auto 0 auto;"> <div class="content" style="text-align: center;width: 60%;margin: 45% auto 0 auto;">
<img style="width:100%;margin-bottom: 15px;" src="assets/images/login_logo.png"> <img style="width:100%;margin-bottom: 15px;" src="assets/images/login_logo.png">
<div class="loadingContent"> <div class="loadingContent">
<span style="letter-spacing: 12px;">海纳百川</span> <span style="letter-spacing: 12px;">海纳百川</span>
<span style="letter-spacing: 12px;">·</span> <span style="letter-spacing: 12px;">·</span>
<span style="letter-spacing: 12px;">赢家后</span> <span style="letter-spacing: 12px;">赢家后</span>
</div> </div>
<div style="margin-top: 45%;">欢迎回家,先喝碗鸡汤</div>
</div> </div>
<div id="content" style="margin-top: 30%;text-align: center;padding: 0 15px;"> <div id="content" style="font-size:18px;margin-top: 10%;text-align: center;padding: 0 15px;">
</div> </div>
</div> </div>
...@@ -96,8 +95,22 @@ ...@@ -96,8 +95,22 @@
async: false, async: false,
success: function (res) { success: function (res) {
if (res['success']) { if (res['success']) {
let content = res['data']['knowledge']['content']; let content = String(res['data']['knowledge']['content']);
$('#content').html(content) if (content.indexOf(',') != -1) {
const idx = content.indexOf(',')
content = content.split(',')
// const newStr = ('<span class="iconfont icon-shangyinhao"></span>' + content[0] + ',<br/>' + content[1]).toString()
const newStr = ('' + content[0] + ',<br/>' + content[1]).toString()
$('#content').html(newStr)
} else if (content.indexOf('') != -1) {
const idx = content.indexOf('')
content = content.split('')
// const newStr = ('<span class="iconfont icon-shangyinhao"></span>' + content[0] + ',<br/>' + content[1]).toString()
const newStr = ('' + content[0] + '<br/>' + content[1]).toString()
$('#content').html(newStr)
} else {
$('#content').html('' + content)
}
} }
} }
}) })
......
...@@ -102,6 +102,10 @@ input::placeholder { ...@@ -102,6 +102,10 @@ input::placeholder {
transform: scaleY(0.5); transform: scaleY(0.5);
} }
.icon-shangyinhao{
position: relative;
top: -8px;
}
@keyframes slowUp { @keyframes slowUp {
......
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