Skip to content

安卓 与 ios下 uc的分享调用是不一样的 #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions nativeShare.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,21 @@ var nativeShare = function (elementNode, config) {
this.img_title = config.img_title || document.title || '';
this.from = config.from || window.location.host || '';
this.ucAppList = {
sinaWeibo: ['kSinaWeibo', 11, '新浪微博'],
weixin: ['kWeixin', 1, '微信好友'],
weixinFriend: ['kWeixinFriend', '8', '微信朋友圈'],
QQ: ['kQQ', '4', 'QQ好友'],
QZone: ['kQZone', '3', 'QQ空间']
sinaWeibo: ['kSinaWeibo', 11, '新浪微博','SinaWeibo'],
weixin: ['kWeixin', 1, '微信好友','WechatFriends'],
weixinFriend: ['kWeixinFriend', '8', '微信朋友圈','WechatTimeline'],
QQ: ['kQQ', '4', 'QQ好友','QQ'],
QZone: ['kQZone', '3', 'QQ空间','QZone']
};

this.share = function (to_app) {
var title = this.title, url = this.url, desc = this.desc, img = this.img, img_title = this.img_title, from = this.from;
if (isucBrowser) {
to_app = to_app == '' ? '' : this.ucAppList[to_app][0];
if (typeof(ucweb) != "undefined") {
if (typeof(ucweb) != "undefined") {
to_app = to_app == '' ? '' : this.ucAppList[to_app][3];
ucweb.startRequest("shell.page_share", [title, title, url, to_app, "", "@" + from, ""])
} else {
to_app = to_app == '' ? '' : this.ucAppList[to_app][0];
if (typeof(ucbrowser) != "undefined") {
ucbrowser.web_share(title, title, url, to_app, "", "@" + from, '')
} else {
Expand Down