Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9dffd164
authored
Oct 28, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
1e56a612
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
components/sharePopup/sharePopup.js
components/sharePopup/sharePopup.wxml
components/sharePopup/sharePopup.js
View file @
9dffd16
...
...
@@ -12,21 +12,28 @@ Component({
data
:
{
type
:
Object
,
observer
(
val
)
{
let
_this
=
this
let
thisPage
=
wx
.
$router
.
getPageInstance
()
this
.
setData
({
_
this
.
setData
({
navHeight
:
thisPage
.
data
.
navHeight
})
if
(
val
.
showSharePopup
)
{
val
.
boxImageHeight
=
66
// 计算弹窗图片区域最大高度
wx
.
$util
.
getViewInfo
(
'.layout'
,
res
=>
{
this
.
setData
({
_
this
.
setData
({
postersBoxHeight
:
res
.
height
*
0.7
,
postersImageHeight
:
(
res
.
height
/
res
.
width
)
*
247
})
val
.
postersBoxHeight
=
res
.
height
*
0.7
,
val
.
postersImageHeight
=
(
res
.
height
/
res
.
width
)
*
247
this
.
init
(
val
)
wx
.
getImageInfo
({
src
:
val
.
posterImg
,
success
(
e
)
{
_this
.
setData
({
postersImageHeight
:
(
e
.
height
/
e
.
width
)
*
247
})
val
.
postersImageHeight
=
(
e
.
height
/
e
.
width
)
*
247
_this
.
init
(
val
)
}
})
})
}
...
...
@@ -49,8 +56,8 @@ Component({
async
init
(
n
)
{
wx
.
$api
.
showLoading
()
const
drawfun
=
new
Draw
({
width
:
2
80
,
height
:
n
.
postersImageHeight
+
80
,
width
:
2
79
,
height
:
n
.
postersImageHeight
+
76
,
borderRadius
:
8
},
this
),
{
...
...
components/sharePopup/sharePopup.wxml
View file @
9dffd16
...
...
@@ -8,7 +8,7 @@
</view>
</view>
<view class="share-popup-content" style="max-height: {{postersBoxHeight}}px;">
<image style="height: {{postersImageHeight +
80}}px;" mode="widthFix
" src="{{poster}}"></image>
<image style="height: {{postersImageHeight +
76}}px;
" src="{{poster}}"></image>
</view>
<view class="btn-box">
<view class="btn" bind:tap="saveImage">保存至相册</view>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment