zoukankan      html  css  js  c++  java
  • HTML5网页如何调用浏览器APP的微信分享功能?


    if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))) { if (window.location.href.indexOf("?mobile") < 0) { try { //判断是手机端访问 if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { //判断是UC浏览器 if (typeof (ucweb) != "undefined") { //微信好友 $("#btnShareFirend").unbind(); $("#btnShareFirend").bind("click", function () { var Browser = new Object(); Browser.ios = /iphone/.test(Browser.userAgent); //判断ios系统 var title = document.title; var img = ""; var url = location.href; if (Browser.ios) { ucbrowser.web_share(title, img, url, 'kWeixin', '', '', ''); } else { ucweb.startRequest("shell.page_share", [title, img, url, 'WechatFriends', '', '', '']); }; }); //微信朋友圈 $("#btnWeixinShare").unbind(); $("#btnWeixinShare").bind("click", function () { var Browser = new Object(); Browser.ios = /iphone/.test(Browser.userAgent); //判断ios系统 var title = document.title; var img = ""; var url = location.href; if (Browser.ios) { ucbrowser.web_share(title, img, url, 'kWeixinFriend', '', '', ''); } else { ucweb.startRequest("shell.page_share", [title, img, url, 'WechatTimeline', '', '', '']); }; }); } } } catch (e) { } } }

     

  • 相关阅读:
    ELK环境搭建
    django orm 操作表
    django1.11入门
    CentOS7 yum安装python3.6
    完美的【去重留一】SQL
    CentOS7安装docker
    【Jenskins】安装与配置
    【Linux】网卡配置与绑定
    【SaltStack】一些常用模块举例
    【SaltStack】通过Master给Minion安装MySQL
  • 原文地址:https://www.cnblogs.com/qq735675958/p/7140214.html
Copyright © 2011-2022 走看看