Commit 5529c758 by kaisa

feat:新增分享私信副标题及左上角图标功能

parent d8d77097
Showing with 8 additions and 3 deletions
......@@ -14,7 +14,7 @@ else {
let imgUrl1, imgUrl2, imgUrl3, imgUrl4;
let fileName = $firefly.urlData.appname;
const isFirefly = fileName == 'com.happy.live' || fileName =='com.yzfirefire.live.ios'
const isFirefly = fileName == 'com.happy.live' || fileName == 'com.yzfirefire.live.ios'
if ($firefly.urlData.appname == 'com.ftsfoss.android' || $firefly.urlData.appname == 'com.fusi.meet.live.chat.video.among.friends') {
fileName = 'fusi'
......@@ -68,6 +68,8 @@ if ($firefly.urlData.appversion >= 7400) {
function goShare() {
let shareContent = {
"title": $('title').html(),
"subTitle": $('h2').html() ? $('h2').html() : "",
"icoPic": getWebIcon() ? getWebIcon() : '',
"pic": 'https://app.ixiulive.com/static/app/img/logo.png',
"text": '',
"whichShare": 0,
......@@ -75,7 +77,6 @@ if ($firefly.urlData.appversion >= 7400) {
}
$firefly.goShare(shareContent)
}
function openExtra() {
let infos;
if (isFirefly) {
......@@ -152,5 +153,8 @@ if ($firefly.urlData.appversion >= 7400) {
$firefly.openExtra(infos);
}
function getWebIcon() {
const link = document.querySelector("link[rel*='icon']") || document.querySelector("link[rel='shortcut icon']");
return link ? link.href : '';
}
}
\ No newline at end of file
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 sign in to comment