Commit 312ecb2e by Sweet Zhang

产品资料页面

parent ecea6eb3
......@@ -119,7 +119,7 @@ const myRoutes: Routes = [
{ path: 'salary_detail',component:SalaryDetailComponent,canActivate:[AuthGuard]},
{ path: 'salary_detail/:id',component:SalaryFirstYearComponent,canActivate:[AuthGuard]},
{ path: 'product',component:ProductComponent,canActivate:[AuthGuard]},
{ path: 'productData',component:ProductDataComponent,canActivate:[AuthGuard]},
{ path: 'productData/:id',component:ProductDataComponent,canActivate:[AuthGuard]},
];
@NgModule({
......
......@@ -3,10 +3,17 @@
<h3>产品海报</h3>
<div>
<ul>
<li></li>
<li>
<img src="./assets/images/loading_bg.png" alt="" class="img-responsive">
</li> <li>
<img src="./assets/images/loading_bg.png" alt="" class="img-responsive">
</li> <li>
<img src="./assets/images/loading_bg.png" alt="" class="img-responsive">
</li>
</ul>
</div>
</div>
<div style="width: calc(100% + 30px); height: 8px;background: #f6f6f6;margin-left: -15px;"></div>
<div class="productDataContent">
<h3>产品资料</h3>
<div>
......
.productDataContainer{
padding:15px;
.productDataContent {
h3{
color: #444;
font-size: 18px;
font-weight: 400;
margin: 15px 0;
}
.productPoster{
padding-bottom: 18px;
h3{
color: #444;
font-size: 18px;
font-weight: 400;
margin-top:0;
}
ul{
display: flex;
flex-wrap: wrap;
li{
min-width: 30%;
max-width: 30%;
margin-right:17px;
}
li:last-child{
margin-right:0;
}
}
}
.productDataContent {
ul {
display: flex;
flex-wrap: wrap;
......
......@@ -42,7 +42,7 @@
</div>
</div>
<div class="dataContent">
<div>资料</div>
<div (click)="goData(1)">资料</div>
<div>可售</div>
</div>
</li>
......
import { Component, OnInit } from '@angular/core';
import { LifeCommonService } from '../../common/life-common.service';
import { MyService } from '../../my/my.service';
import {Component, OnInit} from '@angular/core';
import {LifeCommonService} from '../../common/life-common.service';
import {MyService} from '../../my/my.service';
import {Router} from "@angular/router";
@Component({
selector: 'ydlife-product',
......@@ -8,12 +9,14 @@ import { MyService } from '../../my/my.service';
styleUrls: ['./product.component.scss']
})
export class ProductComponent implements OnInit {
leftList:Array<any>;
topList:Array<any>;
rightList:Array<any>;
leftSelectedId:number = null;
filterSelectedFlag:boolean = false;
constructor(private myService:MyService,public lifeCommonService:LifeCommonService) { }
leftList: Array<any>;
topList: Array<any>;
rightList: Array<any>;
leftSelectedId: number = null;
filterSelectedFlag: boolean = false;
constructor(private myService: MyService, public lifeCommonService: LifeCommonService, private router: Router) {
}
ngOnInit() {
this.lifeCommonService.setTitle('产品库');
......@@ -41,26 +44,32 @@ export class ProductComponent implements OnInit {
}
//type:305左侧,309上侧,306筛选
tagViewQuery(type){
tagViewQuery(type) {
const param = {
isActive:1,
tagViewType:type
isActive: 1,
tagViewType: type
}
this.myService.tagViewQuery(param).subscribe((res)=>{
if(res['success']){
if(type == 305){
this.myService.tagViewQuery(param).subscribe((res) => {
if (res['success']) {
if (type == 305) {
this.leftList = res['data']['tagViewQueryInfos'];
}else if(type == 309){
} else if (type == 309) {
this.topList = res['data']['tagViewQueryInfos'];
}else{
} else {
this.rightList = res['data']['tagViewQueryInfos'];
}
}
})
}
// 筛选
allFilter(){
allFilter() {
this.tagViewQuery(306);
this.filterSelectedFlag = true;
}
// 进入产品资料页面
goData(e) {
this.router.navigate(['/productData', e]);
}
}
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