zoukankan      html  css  js  c++  java
  • 微信分享

    window.SaafJsSdk = {}
    // msg {nativeType,data}
    SaafJsSdk.postMessage =  function (msg) {
        window.postMessage(JSON.stringify(msg?msg:{}))
    }
    SaafJsSdk.WeChat = function (api,data) {
        SaafJsSdk.postMessage({
            nativeType: 'WeChat',
            data:data,
            api: api
        })
    }

     // 分享朋友圈

      function shareToTimelineImage() {
      SaafJsSdk.WeChat('shareToTimeline',{
      type: 'imageUrl',
      title: '分享',
      description: '分享描述',
      imageUrl: 'http://www.XXXX.com/web/template/themes/default/skins/images/logo.png'
      })
      }
      function shareToTimelineNew() {
      SaafJsSdk.WeChat('shareToTimeline',{
      title:'微信测试链接',
      description:'分享',
      thumbImage:'http://www.XXXX.com/web/template/themes/default/skins/images/logo.png',
      type:'news',
      webpageUrl:'http://www.XXXX.com'
      })
      }
       
      function shareToSessionImage() {
      SaafJsSdk.WeChat('shareToSession',{
      type: 'imageUrl',
      title: '分享',
      description: '分享描述',
      imageUrl: 'http://www.XXXX.com/web/template/themes/default/skins/images/logo.png'
      })
      }
       
      function shareToSessionNew() {
      SaafJsSdk.WeChat('shareToSession',{
      title:'微信测试链接',
      description:'分享描述',
      thumbImage:'http://www.XXXX.com/web/template/themes/default/skins/images/logo.png',
      type:'news',
      webpageUrl:'http://www.XXXX.com'
      })
      }
  • 相关阅读:
    Bridage
    国内项目测试培训笔录和小结
    Proxy
    数据库设计
    PDF转Word
    机务维修成本技术点
    MyEclipse10
    MyEclips:Struts 2 + Hibernate 4 + SQL Server2008
    观察者模式
    javascript事件设计模式
  • 原文地址:https://www.cnblogs.com/chenzxl/p/11770759.html
Copyright © 2011-2022 走看看