别人QQ发怎样用微信扫QQ上的二维码二维码怎么加到怎样用微信扫QQ上的二维码好友里

如何利用HTML5实现分享到微信好友朋友圈QQ好友QQ空间微博二维码的功能
原创
 15:04:34
387
这篇文章主要介绍了HTML5实现分享到微信好友朋友圈QQ好友QQ空间微博二维码功能的实例代码,非常不错,具有参考借鉴价值,需要的朋友可以参考下这是分享按钮:&button onclick=&call()&&通用分享&/button&
&button onclick=&call('wechatFriend')&&微信好友&/button&
&button onclick=&call('wechatTimeline')&&朋友圈&/button&
&button onclick=&call('qqFriend')&&QQ&/button&
&button onclick=&call('qZone')&&QQ空间&/button&
&button onclick=&call('weibo')&&微博&/button& 这是js调用代码:&script type=&text/javascript& src=&NativeShare.js&&&/script&
&script type=&text/javascript&&
var nativeShare = new NativeShare()
var shareData = {
title: '分享标题',
desc: '',
// 如果是微信该link的域名必须要在微信后台配置的安全域名之内的。
link: 'https://www.baidu.com',
icon: 'https://www.baidu.com',
// 不要过于依赖以下两个回调,很多浏览器是不支持的
success: function() {
console.log(&success&)
fail: function() {
console.log(&fail&)
nativeShare.setShareData(shareData)
function call(command) {
nativeShare.call(command)
} catch (err) {
// 如果不支持,你可以在这里做降级处理
alert(err.message)
// console.log(&err.message&)
&/script&这个就是分享js文件NativeShare.js:!function(e,t){
&object&==typeof exports&&&object&==typeof module?module.exports=t():
&function&==typeof define&&define.amd?define([],t):
&object&==typeof exports?exports[&NativeShare.js&]=t():
e[&NativeShare.js&]=t()}(this,function(){return function(e){function t(r){
if(n[r])return n[r].
var o=n[r]={i:r,l:!1,exports:{}};
return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}
return t.m=e,t.c=n,t.d=function(e,n,r){
t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){
var n=e&&e.__esModule?function(){
return e.default}:
function(){return e};
return t.d(n,&a&,n),n},t.o=function(e,t){
return Object.prototype.hasOwnProperty.call(e,t)},
t.p=&&,t(t.s=0)}([function(e,t,n){&use strict&;
function r(){}function o(e){
var t=arguments.length&1&&void 0!==arguments[1]?arguments[1]:
r,n=document.getElementsByTagName(&script&)[0],o=document.createElement(&script&);
o.src=e,o.async=!0,n.parentNode.insertBefore(o,n),o.onload=t}function i(e,t){
if(null==e)throw new TypeError(&Cannot convert undefined or null to object&);
for(var n=Object(e),r=1;
r&arguments.r++){
var o=arguments[r];
if(null!=o)
for(var i in o)
Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])
function a(e){if(se)location.href=e;else{var t=document.createElement(&iframe&);
t.style.display=&none&,t.src=e,document.body.appendChild(t),
setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},2e3)}}
function c(e){var t=arguments.length&1&&void 0!==arguments[1]&&arguments[1],n=[];
for(var r in e)t?n.push(r+&=&+encodeURIComponent(e[r])):n.push(r+&=&+e[r]);
return n.join(&&&)}function u(e){var t=document.createElement(&a&);
return t.href=e,t.hostname}
function l(e){
Oe?Oe.content=e:document.head.insertAdjacentHTML(&beforeend&,'&meta name=&description& content=&'+e+'&&')}
function f(e){
je?je.href=e:document.head.insertAdjacentHTML(&beforeend&,'&link rel=&shortcut icon& href=&'+e+'&&')}
function s(e){
document.title=e
function p(e){
({share_id:,url:_e.encode(e.link),
title:_e.encode(e.title),
description:_e.encode(e.desc),
previewimageUrl:_e.encode(e.icon),
image_url:_e.encode(e.icon)})
function h(){
a((se?&mqqapi://share/to_fri?src_type=web&version=1&file_type=news&:&
mqqapi://share/to_fri?src_type=isqqBrowser&version=1&file_type=news&)+&&&+p(Se))}
function b(){a((se?&mqqapi://share/to_fri?file_type=news&src_type=web&version=1&generalpastboard=1&shareType=1&cflag=1&objectlocation=pasteboard&callback_type=scheme&callback_name=QQ41AF4B2A&:&
mqqapi://share/to_qzone?src_type=isqqBrowser&version=1&file_type=news&req_type=1&)+&&&+p(Se))}
function y(){
var e={url:Se.link,title:Se.title,pic:Se.icon,desc:Se.desc};
location.href=&
function d(){
var e={url:Se.link,title:Se.title,pic:Se.icon};
location.href=&
function w(e,t){
if(!(e instanceof t))
throw new TypeError(&Cannot call a class as a function&)}
function v(e,t,n){
return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
function g(e,t){
if(!(e instanceof t))
throw new TypeError(&Cannot call a class as a function&)}
function m(e,t){
throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function _(e,t){
if(&function&!=typeof t&&null!==t)
throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function O(e,t,n){
return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
function j(e,t){
if(!(e instanceof t))
throw new TypeError(&Cannot call a class as a function&)}
function S(e,t){
throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function k(e,t){
if(&function&!=typeof t&&null!==t)
throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function P(e,t,n){
return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
function C(e,t){
if(!(e instanceof t))
throw new TypeError(&Cannot call a class as a function&)}
function q(e,t){
throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function T(e,t){
if(&function&!=typeof t&&null!==t)
throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function E(e,t){
if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}
function D(e,t){if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function x(e,t){
if(&function&!=typeof t&&null!==t)
throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
function Q(e,t){if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}
function M(e,t){
if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}function N(e,t){
if(&function&!=typeof t&&null!==t)throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function A(e,t){
if(!(e instanceof t))
throw new TypeError(&Cannot call a class as a function&)}
function U(e,t){
if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}function B(e,t){if(&function&!=typeof t&&null!==t)
throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
function R(e,t){if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}function W(e,t){
if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function I(e,t){
if(&function&!=typeof t&&null!==t)throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
function z(e,t){if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}
function F(e,t){
if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function L(e,t){if(&function&!=typeof t&&null!==t)throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function Z(e,t){
if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}
function J(e,t){
if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}function H(e,t){
if(&function&!=typeof t&&null!==t)throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
function X(e,t){if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}
function G(e,t){if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function K(e,t){if(&function&!=typeof t&&null!==t)throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function V(e,t){
if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}function Y(e,t){
if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function $(e,t){if(&function&!=typeof t&&null!==t)throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
function ee(e,t){if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}
function te(e,t){if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}
function ne(e,t){
if(&function&!=typeof t&&null!==t)
throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
function re(e,t){if(!(e instanceof t))throw new TypeError(&Cannot call a class as a function&)}
function oe(e,t){if(!e)throw new ReferenceError(&this hasn't been initialised - super() hasn't been called&);
return!t||&object&!=typeof t&&&function&!=typeof t?e:t}function ie(e,t){
if(&function&!=typeof t&&null!==t)throw new TypeError(&Super expression must either be null or a function, not &+typeof t);
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),
t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,&__esModule&,{value:!0});
var ae,ce=navigator.userAgent,ue=/(iPad).*OS\s([\d_]+)/.test(ce),le=/(iPod)(.*OS\s([\d_]+))?/.test(ce),
fe=!ue&&/(iPhone\sOS)\s([\d_]+)/.test(ce),se=ue||le||fe,pe=/(Android);
?[\s\/]+([\d.]+)?/.test(ce),he=/micromessenger/i.test(ce),be=/QQ\/([\d\.]+)/.test(ce),
ye=/Qzone\//.test(ce),de=/MQQBrowser/i.test(ce)&&!he&&!be,we=/UCBrowser/i.test(ce),
ve=/mobile.*baidubrowser/i.test(ce),ge=/SogouMobileBrowser/i.test(ce),me=/baiduboxapp/i.test(ce),
_e={_keyStr:&ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/=&,
encode:function(e){var t,n,r,o,i,a,c,u=&&,l=0;
for(e=_e._utf8_encode(e);l&e.)t=e.charCodeAt(l++),n=e.charCodeAt(l++),
r=e.charCodeAt(l++),o=t&&2,i=(3&t)&&4|n&&4,a=(15&n)&&2|r&&6,c=63&r,isNaN(n)?a=c=64:isNaN(r)&&(c=64),
u=u+this._keyStr.charAt(o)+this._keyStr.charAt(i)+this._keyStr.charAt(a)+this._keyStr.charAt(c);
return u},_utf8_encode:function(e){e=e.replace(/\r\n/g,&\n&);for(var t=&&,n=0;n&e.n++){
var r=e.charCodeAt(n);
r&128?t+=String.fromCharCode(r):r&127&&r&2048?(t+=String.fromCharCode(r&&6|192),
t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r&&12|224),t+=String.fromCharCode(r&&6&63|128),
t+=String.fromCharCode(63&r|128))}
return t}},Oe=document.querySelector(&meta[name=description]&),je=document.querySelector(&link[rel*=icon]&),
Se={link:location.href,title:function(){
return document.title}(),desc:function(){return Object(Oe).content||&&}(),icon:function(){
return Object(je).href||location.protocol+&//&+location.hostname+&/favicon.ico&}(),from:&&,
success:r,fail:r,trigger:r},
ke=function(){
function e(e,t){for(var n=0;n&t.n++){var r=t[n];
r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),
Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Pe=function(){
function e(t){w(this,e),this._shareData=Se,this._config={syncDescToTag:!1,syncIconToTag:!1,syncTitleToTag:!1},this.setConfig(t)}
return ke(e,[{key:&getShareData&,value:function(){return i({},this._shareData)}},{key:&setShareData&,
value:function(){
var e=arguments.length&0&&void 0!==arguments[0]?arguments[0]:{};i(this._shareData,e),this._config.syncDescToTag&&l(this._shareData.desc),
this._config.syncIconToTag&&f(this._shareData.icon),this._config.syncTitleToTag&&s(this._shareData.title)}},{key:&setConfig&,value:function(){
var e=arguments.length&0&&void 0!==arguments[0]?arguments[0]:{};i(this._config,e)}},{key:&getConfig&,value:function(){return i({},this._config)}}]),e}(),
Ce=Pe,qe=function(){function e(e,t){for(var n=0;n&t.n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),
Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Te=function(e){
function t(e){g(this,t);var n=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o(&
return _(t,e),qe(t,[{key:&call&,value:function(){var e=arguments.length&0&&void 0!==arguments[0]?arguments[0]:&default&,t=arguments[1];
this.setShareData(t);var n=this.getShareData(),r=this.constructor.commamdMap[String(e).toLowerCase()];
browser.app.share({title:n.title,description:n.desc,url:n.link,img_url:n.icon,from:n.from,to_app:r})}}]),t}(Ce);
Te.commamdMap=(ae={},v(ae,&wechattimeline&,8),v(ae,&wechatfriend&,1),v(ae,&qqfriend&,4),v(ae,&qzone&,3),v(ae,&weibo&,11),v(ae,&copyurl&,10),v(ae,&more&,5),
v(ae,&generateqrcode&,7),v(ae,&default&,void 0),ae);var Ee,De=Te,xe=function(){
function e(e,t){
for(var n=0;n&t.n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Qe=function(e){function t(e){return j(this,t),S(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return k(t,e),
xe(t,[{key:&call&,value:function(){var e=arguments.length&0&&void 0!==arguments[0]?arguments[0]:&default&,t=arguments[1];this.setShareData(t);var n=this.getShareData(),
r=this.constructor.commamdMap[String(e).toLowerCase()];
ucbrowser.web_shareEX?ucbrowser.web_shareEX(JSON.stringify({title:n.title,content:n.desc,sourceUrl:n.link,imageUrl:n.icon,source:n.from,target:r})):
ucbrowser.web_share(title,desc,link,r,&&,from,&&)}}]),t}(Ce);Qe.commamdMap=(Ee={},O(Ee,&wechattimeline&,&kWeixinFriend&),O(Ee,&wechatfriend&,&kWeixin&),
O(Ee,&qqfriend&,&kQQ&),
O(Ee,&qzone&,&kQZone&),O(Ee,&weibo&,&kSinaWeibo&),O(Ee,&default&,void 0),Ee);var Me,Ne=Qe,Ae=function(){function e(e,t){for(var n=0;n&t.n++){var r=t[n];
r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
return function(t,n,r){
return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ue=function(e){function t(e){return C(this,t),q(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return T(t,e),
Ae(t,[{key:&call&,value:function(){var e=arguments.length&0&&void 0!==arguments[0]?arguments[0]:&default&,t=arguments[1];this.setShareData(t);var n=this.getShareData(),
r=this.constructor.commamdMap[String(e).toLowerCase()];
ucweb.startRequest(&shell.page_share&,[n.title,n.desc,n.link,r,&&,n.from,n.icon])}}]),t}(Ce);
Ue.commamdMap=(Me={},P(Me,&wechattimeline&,&WechatTimeline&),P(Me,&wechatfriend&,&WechatFriends&),P(Me,&qqfriend&,&QQ&),P(Me,&qzone&,&Qzone&),P(Me,&weibo&,&SinaWeibo&),P(Me,&default&,&&),Me);
var Be=Ue,Re=function(){
function e(e,t){for(var n=0;n&t.n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),We=function(e){function t(e){return E(this,t),D(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}
return x(t,e),Re(t,[{key:&call&,value:function(e,t){
this.setShareData(t);var n=this.getShareData();_flyflowNative.exec(&bd_utils&,&shareWebPage&,JSON.stringify({title:n.title,content:n.desc,landurl:n.link,imageurl:n.icon,shareSource:n.from}),&&)}}]),t}(Ce),Ie=We,
ze=function(){
function e(e,t){for(var n=0;n&t.n++){var r=t[n];
r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){
return n&&e(t.prototype,n),r&&e(t,r),t}}(),Fe=function(e){function t(e){return Q(this,t),M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return N(t,e),ze(t,[{key:&call&,
value:function(e,t){this.setShareData(t);var n=this.getShareData();
location.href=&baidubrowserapp://bd_utils?action=shareWebPage&params=&+encodeURIComponent(JSON.stringify({title:n.title,content:n.desc,imageurl:n.icon,landurl:n.link,mediaType:0,share_type:&webpage&}))}}]),t}(Ce),
Le=Fe,Ze=function(){
function e(e,t){
for(var n=0;n&t.n++){
var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),
Object.defineProperty(e,r.key,r)}}
return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Je=function(e){
function t(e){
return A(this,t),U(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}
return B(t,e),Ze(t,[{key:&call&,
value:function(e,t){
this.setShareData(t);
var n=this.getShareData();
SogouMse.Utility.shareWithInfo({shareTitle:n.title,shareContent:n.desc,shareImageUrl:n.icon,shareUrl:n.link})}}]),t}(Ce),He=Je,Xe=function(){
function e(e,t){for(var n=0;n&t.n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),
Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ge=function e(t,n,r){null===t&&(t=Function.prototype);
var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){
var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if(&value&in o)return o.var a=o.if(void 0!==a)return a.call(r)},Ke=function(e){function t(e){R(this,t);
var n=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setConfig(e),n}return I(t,e),Xe(t,[{key:&call&,
value:function(e,t){this.setShareData(t)}},{key:&setConfig&,value:function(e){Ge(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),&setConfig&,this).call(this,e),
this.init(this.getConfig().wechatConfig)}},{key:&init&,value:function(e){var t=e&&o(&
var n=t._shareData,r={};Object.defineProperty(r,&trigger&,{get:function(){
return function(){i(r,{title:n.title,desc:n.desc,link:n.link,imgUrl:n.icon,
type:n.type,dataUrl:n.dataUrl,success:n.success,fail:n.fail,cancel:n.fail}),n.trigger.apply(n,arguments)}},
set:function(e){n.trigger=e},enumerable:!0}),wx.ready(function(){
wx.onMenuShareAppMessage(r),wx.onMenuShareQQ(r),wx.onMenuShareQZone(r),wx.onMenuShareWeibo(r),wx.onMenuShareTimeline(r)})})}}]),t}(Ce),Ve=Ke,Ye=function(){
function e(e,t){
for(var n=0;n&t.n++){
var r=t[n];
r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
return function(t,n,r){
return n&&e(t.prototype,n),r&&e(t,r),t}}(),$e=function(e){
function t(e){return z(this,t),F(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}
return L(t,e),Ye(t,[{key:&call&,value:function(){
var e=arguments.length&0&&void 0!==arguments[0]?arguments[0]:&default&,t=arguments[1];
if(this.setShareData(t),&weibo&!==(e=String(e).toLowerCase()))throw&qqfriend&===e?h():&qzone&===e&&b(),new Error(&the browser may not support command &+e+&!&);
d()}}]),t}(Ce),et=$e,tt=function(){function e(e,t){for(var n=0;n&t.n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),
nt=function(e){function t(e){Z(this,t);var n=J(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.init(),n}return H(t,e),tt(t,[{key:&call&,value:function(){
var e=(arguments.length&0&&void 0!==arguments[0]&&arguments[0],arguments[1]);this.setShareData(e),mqq.ui.showShareMenu()}},{key:&init&,value:function(){var e=o(&
function(){var t=e._shareDmqq.ui.setOnShareHandler(function(e){mqq.ui.shareMessage({back:!0,share_type:e,title:t.title,desc:t.desc,share_url:t.link,image_url:t.icon,sourceName:t.from},
function(e){0===e.retCode?t.success(e):t.fail(e)})})})}}]),t}(Ce),
rt=nt,ot=function(){function e(e,t){for(var n=0;n&t.n++){var r=t[n];
r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),
it=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);
return null===i?void 0:e(i,n,r)}if(&value&in o)return o.var a=o.
if(void 0!==a)return a.call(r)},at=function(e){function t(e){X(this,t);var n=G(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.init(),n}
return K(t,e),ot(t,[{key:&setShareData&,value:function(e){it(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),&setShareData&,this).call(this,e);
var n=this.getShareData();u(n.link)!==location.hostname&&(n.link=location.href,console.warn(&安卓的QQ自带浏览器分享url必须跟页面url同一个域名,已自动为你设置为当前页面的url&));
try{mqq.data.setShareInfo({share_url:n.link,title:n.title,desc:n.desc,image_url:n.icon},
function(e){!0!==e&&console.warn(e)})}catch(e){}}},{key:&call&,
value:function(){var e=(arguments.length&0&&void 0!==arguments[0]&&arguments[0],arguments[1]);
this.setShareData(e),mqq.ui.showShareMenu()}},{key:&init&,value:function(){var e=o(&
function(){e.setShareData()})}}]),t}(Ce),ct=at,ut=function(){function e(e,t){
for(var n=0;n&t.n++){
var r=t[n];
r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
return function(t,n,r){
return n&&e(t.prototype,n),r&&e(t,r),t}}(),lt=function(e){function t(e){V(this,t);
var n=Y(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));
return n.init(),n}return $(t,e),ut(t,[{key:&call&,value:function(){var e=this,t=(arguments.length&0&&void 0!==arguments[0]&&arguments[0],arguments[1]);
this.setShareData(t);
for(var n=this.getShareData(),r=[],o=[],i=[],a=[],c=0;c&5;c++)r.push(n.icon),a.push(n.link),o.push(n.title),i.push(n.desc);
QZAppExternal.setShare(function(t){0!=t.code&&(e.hasSomethingWrong=!0)},{type:&share&,image:r,title:o,summary:i,shareURL:a})}},{key:&setShareData&,
value:function(e){
try{this.call(&default&,e)}catch(e){}}},{key:&init&,value:function(){var e=o(&
function(){e.call(&default&)})}}]),t}(Ce),ft=lt,st=function(){function e(e,t){
for(var n=0;n&t.n++){var r=t[n];
r.enumerable=r.enumerable||!1,r.configurable=!0,&value&in r&&(r.writable=!0),
Object.defineProperty(e,r.key,r)}}
return function(t,n,r){
return n&&e(t.prototype,n),r&&e(t,r),t}}(),
pt=function(e){
function t(e){
return ee(this,t),te(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}
return ne(t,e),st(t,[{key:&call&,value:function(e,t){this.setShareData(t);
var n=this.getShareData();
window.NativeShareFailCallback=n.fail,window.NativeShareSuccessCallback=n.success,location.href=&baiduboxapp://callShare?&+[&options=&+encodeURIComponent(JSON.stringify({title:n.title,imageUrl:&&,mediaType:&all&,
content:n.desc,linkUrl:n.link,iconUrl:n.icon})),&errorcallback=window.NativeShareFailCallback&,&successcallback=window.NativeShareSuccessCallback&].join(&&&)}}]),t}(Ce),ht=pt,bt=function(){function e(e,t){
for(var n=0;n&t.n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,
&value&in r&&(r.writable=!0),
Object.defineProperty(e,r.key,r)}}
return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),yt=function(e){
function t(e){return re(this,t),oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}
return ie(t,e),bt(t,[{key:&call&,value:function(e,t){
this.setShareData(t);
var n=this.getShareData();
window.NativeShareFailCallback=n.fail,window.NativeShareSuccessCallback=n.success,
prompt(&BdboxApp:&+JSON.stringify({obj:&Bdbox_android_utils&,func:&callShare&,args:['{\n
imageUrl: &&,\n
mediaType: &all&,\n
title: &'+n.title+'&,\n
content: &'+n.desc+'&,\n
linkUrl: &'+n.link+'&,\n
iconUrl: &'+n.icon+'&\n
}',&window.NativeShareSuccessCallback&,&window.NativeShareFailCallback&]}))}}]),t}(Ce),dt=
n.d(t,&Share&,function(){return Ce}),
n.d(t,&QQMobileBrowser&,function(){return De}),n.d(t,&UCIosBrowser&,function(){return Ne}),
n.d(t,&UCAndroidBrowser&,function(){return Be}),n.d(t,&BaiduAndroidBrowser&,
function(){return Ie}),n.d(t,&BaiduIosBrowser&,function(){return Le}),n.d(t,&SogouIosBrowser&,
function(){return He}),n.d(t,&BaiduIos&,
function(){return ht}),n.d(t,&BaiduAndroid&,function(){return dt}),
n.d(t,&Wechat&,function(){
return Ve}),
n.d(t,&Others&,function(){
return et}),
n.d(t,&QQIos&,function(){return rt}),
n.d(t,&QQAndroid&,function(){return ct}),
n.d(t,&QZone&,function(){return ft}),
n.d(t,&shareToQQ&,function(){return h}),
n.d(t,&shareToQZone&,function(){return b}),
n.d(t,&shareToWeibo4Web&,function(){return d}),
n.d(t,&shareToQZone4Web&,function(){return y});
var wt=void 0;
wt=he?Ve:be&&se?rt:be&&pe?ct:ye?ft:de?De:we&&se?Ne:we&&pe?Be:ve&&pe?Ie:ve&&se?Le:ge&&se?He:me&&se?ht:me&&pe?dt:et,window.NativeShare=wt,t.default=wt}])});以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!相关推荐:以上就是如何利用HTML5实现分享到微信好友朋友圈QQ好友QQ空间微博二维码的功能的详细内容,更多请关注php中文网其它相关文章!
江湖传言:PHP是世界上最好的编程语言。真的是这样吗?这个梗究竟是从哪来的?学会本课程,你就会明白了。
PHP中文网出品的PHP入门系统教学视频,完全从初学者的角度出发,绝不玩虚的,一切以实用、有用...
ThinkPHP是国内最流行的中文PHP开发框架,也是您Web项目的最佳选择。《php.cn独孤九贱(5)-ThinkPHP5视频教程》课程以ThinkPHP5最新版本为例,从最基本的框架常识开始,将...
本套教程,以一个真实的学校教学管理系统为案例,手把手教会您如何在一张白纸上,从零开始,一步一步的用ThinkPHP5框架快速开发出一个商业项目。
《php.cn原创html5视频教程》课程特色:php中文网原创幽默段子系列课程,以恶搞,段子为主题风格的php视频教程!轻松的教学风格,简短的教学模式,让同学们在不知不觉中,学会了HTML知识。
所有计算机语言的学习都要从基础开始,《PHP入门视频教程之一周学会PHP》不仅是PHP的基础部分更主要的是PHP语言的核心技术,是学习PHP必须掌握的内容,任何PHP项目的实现都离不开这部分的内容,通...
本课以最新版ThinkPHP5.0.10为基础进行开发,全程实录一个完整企业点,从后台到前台,从控制器到路由的全套完整教程,不论是你是新人,还是有一定开发经验的程序员,都可以从中学到实用的知识~~
ThinkPHP是一个快速、开源的轻量级国产PHP开发框架,是业内最流行的PHP框架之一。本课程以博客系统为例,讲述如何使用TP实战开发,从中学习Thinkphp的实践应用。模版下载地址:http:/...
本课程是php实战开发课程,以爱奇艺电影网站为蓝本从零开发一个自己的网站。目的是让大家了解真实项目的架构及开发过程
本课以一个极简的PHP开发框架为案例,向您展示了一个PHP框架应该具有的基本功能,以及具体的实现方法,让您快速对PHP开发框架的底层实现有一个清楚的认识,为以后学习其实的开发框架打下坚实的基础。
javascript是运行在浏览器上的脚本语言,连续多年,被评为全球最受欢迎的编程语言。是前端开发必备三大法器中,最具杀伤力。如果前端开发是降龙十八掌,好么javascript就是第18掌:亢龙有悔。...
本站9月直播课已经结束,本套教程是直播实录,没有报上名或者漏听学员福利来了,赶紧看看吧,说不定这里就有你的菜
轻松明快,简洁生动,让你快速走入HTML5的世界,体会语义化开发的魅力
JavaScript能够称得上是史上使用最广泛的编程语言,也是前端开发必须掌握的三技能之一:描述网页内容的HTML、描述网页样式的CSS以及描述网页行为的JavaScript。本章节将帮助大家迅速掌握...
Bootstrap 是最受欢迎的 HTML、CSS 和 JS 框架,用于开发响应式布局、移动设备优先的 WEB 项目。为所有开发者、所有应用场景而设计,它让前端开发更快速、简单,所有开发者都能快速上手...
《php用户注册登录系统》主要介绍网站的登录注册功能,我们会从最简单的实现登录注册功能开始,增加验证码,cookie验证等,丰富网站的登录注册功能
《php.cn独孤九贱(2)-css视频教程》课程特色:php中文网原创幽默段子系列课程,以恶搞,段子为主题风格的php视频教程!轻松的教学风格,简短的教学模式,让同学们在不知不觉中,学会了CSS知识...
《PHP学生管理系统视频教程》主要给大家讲解了HTML,PHP,MySQL之间的相互协作,实现动态的网页显示和获取数据.
jQuery是一个快速、简洁的JavaScript框架。设计的宗旨是“write Less,Do More”,即倡导写更少的代码,做更多的事情。它封装JavaScript常用的功能代码,提供一种简便的...
《弹指间学会HTML视频教程》从最基本的概念开始讲起,步步深入,带领大家学习HTML,了解各种常用标签的意义以及基本用法,学习HTML知识为以后的学习打下基础
《最新微信小程序开发视频教程》本节课程是由微趋道录制,讲述了如何申请一个微信小程序,以及开发中需要使用哪些工具,和需要注意哪些等。
全栈工程师
文章总浏览数

我要回帖

更多关于 QQ微信支付宝二维码 的文章

 

随机推荐