Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
程默
mayi-mp-shop
Commits
0dcab989
Commit
0dcab989
authored
Dec 28, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix android分享不显示图片
parent
46903c9f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/pages/index/index.vue
+4
-3
No files found.
src/pages/index/index.vue
View file @
0dcab989
...
...
@@ -181,7 +181,7 @@ export default {
this
.
shareShopName
=
res
.
target
.
data
[
len
].
shareShopName
||
""
;
this
.
shareLogoUrl
=
res
.
target
.
data
[
len
].
shareLogoUrl
;
// this.shareLogoUrl = DFSImg(res.target.data[len]
.shareLogoUrl, 500, 400);
this
.
shareLogoUrl
=
DFSImg
(
this
.
shareLogoUrl
,
500
,
400
);
// console.log()
console
.
log
(
this
.
shareLogoUrl
,
'logourl'
);
}
...
...
@@ -190,7 +190,7 @@ export default {
console
.
log
(
"卸载----------------"
,
this
.
options
);
},
onShareAppMessage
(
res
)
{
console
.
log
(
this
.
shareShopName
,
"share"
,
res
.
webViewUrl
);
console
.
log
(
this
.
shareShopName
,
"share"
,
res
.
webViewUrl
,
'0000'
,
this
.
shareLogoUrl
);
let
url
=
res
.
webViewUrl
;
//分享页面去掉登录态
if
(
url
.
indexOf
(
"sessionid"
)
>
-
1
)
{
...
...
@@ -202,11 +202,12 @@ export default {
url
=
this
.
baseUrl
+
"?mixid="
+
this
.
shopId
;
}
this
.
shareUrl
=
url
+
this
.
newHref
;
console
.
log
(
this
.
shareUrl
,
"index12"
);
return
{
title
:
this
.
shareShopName
,
// 默认是小程序的名称
path
:
`/pages/index/main?share=
${
encodeURIComponent
(
this
.
shareUrl
)}
`
,
// 默认是当前页面
imageUrl
:
'http://yanxuan.nosdn.127.net/bdd778a60b6672dea21598236b4e4a1d.jpg?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400'
,
imageUrl
:
this
.
shareLogoUrl
,
success
:
function
(
res
)
{
// 转发成功之后的回调
if
(
res
.
errMsg
==
"shareAppMessage:ok"
)
{
...
...
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