Commit a01e6722 by Sweet Zhang

产品海报图不添加二维码,实现点击图片放大

parent 7d8344c3
This source diff could not be displayed because it is too large. You can view the blob instead.
<div class="productDataContainer"> <div class="productDataContainer">
<!-- 图片放大展示 -->
<div *ngIf="thumbnailScale" class="thumbnailScaleContainer" (click)="restoreThumbnail()">
<div class="thumbnailScaleBox">
<img [src]="posterUrl" class="img-responsive" alt="海报">
</div>
</div>
<div class="productPoster"> <div class="productPoster">
<h3>产品海报</h3> <h3>产品海报</h3>
<div> <div>
......
.productDataContainer{ .productDataContainer{
padding:15px; padding:15px;
position: relative;
.thumbnailScaleContainer{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.3);
.thumbnailScaleBox{
width: 95%;
height: auto;
transform: translateY(50%);
margin: 0 auto;
}
}
h3{ h3{
color: #444; color: #444;
font-size: 18px; font-size: 18px;
......
...@@ -16,6 +16,7 @@ export class ProductDataComponent implements OnInit { ...@@ -16,6 +16,7 @@ export class ProductDataComponent implements OnInit {
posterInfo:any; posterInfo:any;
sellingPointDescList:Array<any>; sellingPointDescList:Array<any>;
isActive:any; isActive:any;
thumbnailScale:boolean;
constructor(private router: Router,private myService:MyService,private activatedRoute: ActivatedRoute,private _toast: ToastService) { constructor(private router: Router,private myService:MyService,private activatedRoute: ActivatedRoute,private _toast: ToastService) {
} }
...@@ -23,8 +24,11 @@ export class ProductDataComponent implements OnInit { ...@@ -23,8 +24,11 @@ export class ProductDataComponent implements OnInit {
this.productId = this.activatedRoute.snapshot.paramMap.get('id'); this.productId = this.activatedRoute.snapshot.paramMap.get('id');
this.planId = this.activatedRoute.snapshot.queryParams.planId?this.activatedRoute.snapshot.queryParams.planId:null; this.planId = this.activatedRoute.snapshot.queryParams.planId?this.activatedRoute.snapshot.queryParams.planId:null;
this.queryProductFile(); this.queryProductFile();
this.thumbnailScale=false;
}
restoreThumbnail(){
this.thumbnailScale=false;
} }
queryProductFile(){ queryProductFile(){
this.myService.queryProductFile({productId:this.productId,planId:this.planId}).subscribe((res)=>{ this.myService.queryProductFile({productId:this.productId,planId:this.planId}).subscribe((res)=>{
if(res['success']){ if(res['success']){
...@@ -67,11 +71,14 @@ export class ProductDataComponent implements OnInit { ...@@ -67,11 +71,14 @@ export class ProductDataComponent implements OnInit {
} }
jumpToMaterial(){ jumpToMaterial(){
this.router.navigate([`/material/${this.posterInfo[0]['fileInfos']['0']['itemId']}`], // 实现点击放大,再点击恢复的效果
{ queryParams: this.thumbnailScale = true;
{ itemType: this.posterInfo[0]['fileInfos']['0']['itemType'], // 2025.5.28目前都是第三方产品,无直接对接产品,没有配置试算因子,故不再跳转到产品海报页
posterType: this.posterInfo[0]['fileInfos']['0']['id'] // this.router.navigate([`/material/${this.posterInfo[0]['fileInfos']['0']['itemId']}`],
} // { queryParams:
}); // { itemType: this.posterInfo[0]['fileInfos']['0']['itemType'],
// posterType: this.posterInfo[0]['fileInfos']['0']['id']
// }
// });
} }
} }
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