Commit f61d340f authored by wangqinghua's avatar wangqinghua

背景图片的bug修复

parent 72847151
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<ion-content> <ion-content>
<div class="main-container"> <div class="main-container">
<img class="bgc" src="../assets/imgs/learn/learning_background.png">
<ion-slides (ionSlideDidChange)="slideChanged()"> <ion-slides (ionSlideDidChange)="slideChanged()">
<ion-slide *ngFor="let item of list;let i = index;"> <ion-slide *ngFor="let item of list;let i = index;">
<div class="learn-item"> <div class="learn-item">
......
page-learning-do { page-learning-do {
.main-container { .main-container {
height: calc(100% - 8rem); height: calc(100% - 8rem);
background: #e6e8ed url(../assets/imgs/learn/learning_background.png) no-repeat; background-color: #e6e8ed ;
padding: 1.5rem; padding: 1.8rem;
}
.bgc{
position: absolute;
top: 0;
left: 0;
z-index: 0;
}
.learn-item {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
} }
.swiper-slide, .slide-zoom { .swiper-slide, .slide-zoom {
text-align: left; text-align: left;
...@@ -11,9 +25,6 @@ page-learning-do { ...@@ -11,9 +25,6 @@ page-learning-do {
justify-content: normal; justify-content: normal;
align-items: normal; align-items: normal;
} }
.learn-item {
height: 100%;
}
.learn-title { .learn-title {
background-color: rgba(18, 28, 52, 0.34); background-color: rgba(18, 28, 52, 0.34);
font-size: 1.8rem; font-size: 1.8rem;
...@@ -25,7 +36,7 @@ page-learning-do { ...@@ -25,7 +36,7 @@ page-learning-do {
} }
.item-container { .item-container {
background-color: #fff; background-color: #fff;
height: calc(100% - 8rem); height: calc(100% - 4rem);
border-bottom-left-radius: .8rem; border-bottom-left-radius: .8rem;
border-bottom-right-radius: .8rem; border-bottom-right-radius: .8rem;
overflow-y: scroll; overflow-y: scroll;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<ion-list> <ion-list>
<ng-container *ngFor="let item of list"> <ng-container *ngFor="let item of list">
<ion-item class="item-list margin-bottom-10"> <ion-item class="item-list margin-bottom-10">
<div class="item" (click)="goToResult(item)"> <div class="item" >
<div class="item-header padding-15-0"> <div class="item-header padding-15-0">
<div class="item-header-style"> <div class="item-header-style">
<span class="item-title">{{item.title}}</span> <span class="item-title">{{item.title}}</span>
...@@ -35,8 +35,15 @@ ...@@ -35,8 +35,15 @@
<div class="content-button padding-15-0"> <div class="content-button padding-15-0">
<span>参与人员:</span> <span>参与人员:</span>
<span *ngIf="item.testObject">{{item.testObject}}</span> <span *ngIf="item.testObject">{{item.testObject}}</span>
<span *ngIf="item.testResult != 0" float-right class="look">查看</span> <span *ngIf="item.testResult != 0" (click)="goToRank(item)" float-right class="look">TOP5排行榜</span>
<span *ngIf="item.testResult == 0" float-right class="join">测试</span> <span *ngIf="item.testResult != 0" (click)="goToResult(item)" float-right class="look">查看结果</span>
<span *ngIf="item.testResult == 0" (click)="goToResult(item)" float-right class="join">测试</span>
</div>
<div class="content-button padding-15-0">
<span>重复测试:</span>
<span>允许</span>
<span float-right>最高分:100</span>
<span float-right>排名:1</span>
</div> </div>
</div> </div>
</ion-item> </ion-item>
......
...@@ -6,6 +6,7 @@ import {DatePipe} from "@angular/common"; ...@@ -6,6 +6,7 @@ import {DatePipe} from "@angular/common";
import {LearningResultPage} from "../learning-result/learning-result"; import {LearningResultPage} from "../learning-result/learning-result";
import {TabsService} from "../../../tabs/tabs.service"; import {TabsService} from "../../../tabs/tabs.service";
import {CommonService} from "../../../../service/common.service"; import {CommonService} from "../../../../service/common.service";
import {RankPage} from "../rank/rank";
@IonicPage() @IonicPage()
...@@ -123,6 +124,7 @@ export class LearningListPage { ...@@ -123,6 +124,7 @@ export class LearningListPage {
this.index = index; this.index = index;
} }
//去测试or结果
goToResult(item) { goToResult(item) {
if(item.testResult == 0){ if(item.testResult == 0){
this.navCtrl.push("LearningExplainPage", { this.navCtrl.push("LearningExplainPage", {
...@@ -134,9 +136,9 @@ export class LearningListPage { ...@@ -134,9 +136,9 @@ export class LearningListPage {
title:item.title title:item.title
}) })
} }
} }
goToRank(item){
this.navCtrl.push('RankPage')
}
} }
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<ion-content> <ion-content>
<div class="main-container"> <div class="main-container">
<img class="bgc" src="../assets/imgs/learn/learning_background.png">
<div class="learn-item"> <div class="learn-item">
<div class="learn-title">{{title}}</div> <div class="learn-title">{{title}}</div>
<ng-container *ngIf="result?.markStatus == 0"> <ng-container *ngIf="result?.markStatus == 0">
......
...@@ -4,8 +4,22 @@ page-learning-result { ...@@ -4,8 +4,22 @@ page-learning-result {
} }
.main-container { .main-container {
height: 100%; height: 100%;
background: #e6e8ed url(../assets/imgs/learn/learning_background.png) no-repeat; background-color: #e6e8ed ;
padding: 1.5rem; }
.bgc{
position: absolute;
top: 0;
left: 0;
z-index: 0;
}
.learn-item {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
padding: 2rem;
} }
.swiper-slide, .slide-zoom { .swiper-slide, .slide-zoom {
text-align: left; text-align: left;
...@@ -14,9 +28,6 @@ page-learning-result { ...@@ -14,9 +28,6 @@ page-learning-result {
justify-content: normal; justify-content: normal;
align-items: normal; align-items: normal;
} }
.learn-item {
height: 100%;
}
.learn-title { .learn-title {
background-color: rgba(18, 28, 52, 0.34); background-color: rgba(18, 28, 52, 0.34);
font-size: 1.8rem; font-size: 1.8rem;
......
<!--测试题目结果-->
<!--测试页面-->
<ion-header> <ion-header>
<ion-navbar> <ion-navbar>
<ion-title>学习测试</ion-title> <ion-title>学习测试</ion-title>
...@@ -8,6 +7,7 @@ ...@@ -8,6 +7,7 @@
<ion-content> <ion-content>
<div class="main-container"> <div class="main-container">
<img class="bgc" src="../assets/imgs/learn/learning_background.png">
<ion-slides (ionSlideDidChange)="slideChanged()"> <ion-slides (ionSlideDidChange)="slideChanged()">
<ion-slide *ngFor="let item of list;let i = index"> <ion-slide *ngFor="let item of list;let i = index">
<div class="learn-item"> <div class="learn-item">
......
page-review-learn { page-review-learn {
.main-container { .main-container {
height: calc(100% - 8rem); height: calc(100% - 8rem);
background: #e6e8ed url(../assets/imgs/learn/learning_background.png) no-repeat; background-color: #e6e8ed ;
padding: 1.5rem; padding: 1.8rem;
}
.bgc{
position: absolute;
top: 0;
left: 0;
z-index: 0;
} }
.swiper-slide, .slide-zoom { .swiper-slide, .slide-zoom {
text-align: left; text-align: left;
...@@ -13,6 +19,11 @@ page-review-learn { ...@@ -13,6 +19,11 @@ page-review-learn {
} }
.learn-item { .learn-item {
height: 100%; height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
} }
.learn-title { .learn-title {
background-color: rgba(18, 28, 52, 0.34); background-color: rgba(18, 28, 52, 0.34);
...@@ -25,7 +36,7 @@ page-review-learn { ...@@ -25,7 +36,7 @@ page-review-learn {
} }
.item-container { .item-container {
background-color: #fff; background-color: #fff;
height: calc(100% - 8rem); height: calc(100% - 4rem);
border-bottom-left-radius: .8rem; border-bottom-left-radius: .8rem;
border-bottom-right-radius: .8rem; border-bottom-right-radius: .8rem;
overflow-y: scroll; overflow-y: scroll;
......
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