Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
a01e6722
Commit
a01e6722
authored
May 28, 2025
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品海报图不添加二维码,实现点击图片放大
parent
7d8344c3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
7 deletions
+35
-7
package-lock.json
+0
-0
src/app/my/product-data/product-data.component.html
+6
-0
src/app/my/product-data/product-data.component.scss
+15
-0
src/app/my/product-data/product-data.component.ts
+14
-7
No files found.
package-lock.json
View file @
a01e6722
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/app/my/product-data/product-data.component.html
View file @
a01e6722
<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"
>
<h3>
产品海报
</h3>
<div>
...
...
src/app/my/product-data/product-data.component.scss
View file @
a01e6722
.productDataContainer
{
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
{
color
:
#444
;
font-size
:
18px
;
...
...
src/app/my/product-data/product-data.component.ts
View file @
a01e6722
...
...
@@ -16,6 +16,7 @@ export class ProductDataComponent implements OnInit {
posterInfo
:
any
;
sellingPointDescList
:
Array
<
any
>
;
isActive
:
any
;
thumbnailScale
:
boolean
;
constructor
(
private
router
:
Router
,
private
myService
:
MyService
,
private
activatedRoute
:
ActivatedRoute
,
private
_toast
:
ToastService
)
{
}
...
...
@@ -23,8 +24,11 @@ export class ProductDataComponent implements OnInit {
this
.
productId
=
this
.
activatedRoute
.
snapshot
.
paramMap
.
get
(
'id'
);
this
.
planId
=
this
.
activatedRoute
.
snapshot
.
queryParams
.
planId
?
this
.
activatedRoute
.
snapshot
.
queryParams
.
planId
:
null
;
this
.
queryProductFile
();
this
.
thumbnailScale
=
false
;
}
restoreThumbnail
(){
this
.
thumbnailScale
=
false
;
}
queryProductFile
(){
this
.
myService
.
queryProductFile
({
productId
:
this
.
productId
,
planId
:
this
.
planId
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
...
...
@@ -67,11 +71,14 @@ export class ProductDataComponent implements OnInit {
}
jumpToMaterial
(){
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'
]
}
});
// 实现点击放大,再点击恢复的效果
this
.
thumbnailScale
=
true
;
// 2025.5.28目前都是第三方产品,无直接对接产品,没有配置试算因子,故不再跳转到产品海报页
// 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']
// }
// });
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment