• 微信分享js代码(转载)


    <script> 
    window.shareData = { 
     
    //微信分享时显示的图标
     "imgUrl":'...",    
    //分享链接对应的页面
     "timeLineLink": "...", 

    //分享时的标题及描述
    "tTitle": "", 
    "tContent": "" 
    }; 

    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() { 

    WeixinJSBridge.on('menu:share:appmessage', 
    function(argv) { 
    WeixinJSBridge.invoke('sendAppMessage', { 
    "img_url": window.shareData.imgUrl, 
    "link": window.shareData.timeLineLink, 
    "desc": window.shareData.tContent, 
    "title": window.shareData.tTitle 
    }, function () { 
    _czc.push(["_trackEvent", "User", "ShareToSomebody", "Score", myData.score]); 
    }); 
    }); 

    WeixinJSBridge.on('menu:share:timeline', function(argv) { 
    WeixinJSBridge.invoke('shareTimeline', { 
    "img_url": window.shareData.imgUrl, 
    "img_width": "640", 
    "img_height": "640", 
    "link": window.shareData.timeLineLink, 
    "desc": window.shareData.tContent, 
    "title": window.shareData.tTitle 
    }, function () { 
    _czc.push(["_trackEvent", "User", "ShareToCircle", "Score", myData.score]); 
    }); 
    }); 
    }, false);
    梦想还是要有的,万一实现了呢
  • 相关阅读:
    javascript 基础知识汇总(一)
    一个高效单表分页查询语句
    Linux的基本操作(一)
    Tomcat服务器配置
    C# — Winform的TextBox控件实现记忆功能
    C# — LINQ To XML示例
    C# — COM组件注册
    C# — LINQ查询的简单使用
    C# — 题库答案汇总
    C# — 题库汇总
  • 原文地址:https://www.cnblogs.com/amandaff/p/4128673.html
Copyright © 2020-2023  润新知