Commit 0dcab989 by 程默

fix android分享不显示图片

parent 46903c9f
...@@ -181,7 +181,7 @@ export default { ...@@ -181,7 +181,7 @@ export default {
this.shareShopName = res.target.data[len].shareShopName || ""; this.shareShopName = res.target.data[len].shareShopName || "";
this.shareLogoUrl = res.target.data[len].shareLogoUrl; 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()
console.log(this.shareLogoUrl,'logourl'); console.log(this.shareLogoUrl,'logourl');
} }
...@@ -190,7 +190,7 @@ export default { ...@@ -190,7 +190,7 @@ export default {
console.log("卸载----------------", this.options); console.log("卸载----------------", this.options);
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
console.log(this.shareShopName, "share", res.webViewUrl); console.log(this.shareShopName, "share", res.webViewUrl,'0000',this.shareLogoUrl);
let url = res.webViewUrl; let url = res.webViewUrl;
//分享页面去掉登录态 //分享页面去掉登录态
if (url.indexOf("sessionid") > -1) { if (url.indexOf("sessionid") > -1) {
...@@ -202,11 +202,12 @@ export default { ...@@ -202,11 +202,12 @@ export default {
url = this.baseUrl + "?mixid=" + this.shopId; url = this.baseUrl + "?mixid=" + this.shopId;
} }
this.shareUrl = url + this.newHref; this.shareUrl = url + this.newHref;
console.log(this.shareUrl, "index12"); console.log(this.shareUrl, "index12");
return { return {
title: this.shareShopName, // 默认是小程序的名称 title: this.shareShopName, // 默认是小程序的名称
path: `/pages/index/main?share=${encodeURIComponent(this.shareUrl)}`, // 默认是当前页面 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) { success: function(res) {
// 转发成功之后的回调 // 转发成功之后的回调
if (res.errMsg == "shareAppMessage:ok") { if (res.errMsg == "shareAppMessage:ok") {
......
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