Coder Social home page Coder Social logo

getwechatconfparams's Introduction

Build Status

微信分享获取公共参数

功能

  1. 在微信分享之前要先获取配置信息
  2. 拿到配置信息后才能正常使用微信分享
  3. 分享功能有白名单域名限制,只有白名单内的域名才可以使用分享功能,否则会抛出异常提示。

使用指南

  1. 引入此lib,会返回匿名函数,此函数会返回为Promise对象
  2. 通过把类库引用赋值给window.getWechatConfig方法,window.getWechatConfig().then(function (rst) { //这里可以获取到的rst就是分享公共参数,之后便可以正常定制分享标题,图片等 }).catch(function (e) { // ** })
  3. window.getWechatConfig(params), params可配置,也可为空,如果为空,默认分享链接为当前分享链接

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.