Giter Site home page Giter Site logo

js-share's Introduction

JS-share

一款支持微信和QQ、UC手机浏览器的分享工具,可以自定义标题、链接、icon等

使用方法

var config = {
    url:'http://www.baidu.com',
    title:'分享标题',
    desc:'欢迎加入XX大家庭',
    img:'http://www.wangjunfeng.com/img/face.jpg',
    img_title:'IMG_TITLE',
    from:'from shenyuan.yue'
};
var success = function(){
    alert('分享成功');
}
var fail = function(e){
    alert('分享失败');
}
var share_obj = new nativeShare(config, success, fail);

注意

1: 获取微信签名需要更改 getWXConfig() 方法中逻辑
2: UC浏览器无法自定义图片,分享之后展示的是页面截图

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.