Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AngusFu/uc-qq-share-to-wechat
触发手机UC、QQ浏览器的原生的微信分享功能
https://github.com/AngusFu/uc-qq-share-to-wechat
qq share uc wechat
Last synced: 22 days ago
JSON representation
触发手机UC、QQ浏览器的原生的微信分享功能
- Host: GitHub
- URL: https://github.com/AngusFu/uc-qq-share-to-wechat
- Owner: AngusFu
- License: mit
- Archived: true
- Created: 2015-08-27T06:24:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-30T09:23:24.000Z (almost 3 years ago)
- Last Synced: 2024-08-09T07:49:22.108Z (4 months ago)
- Topics: qq, share, uc, wechat
- Language: JavaScript
- Homepage: http://angusfu.github.io/uc-qq-share-to-wechat/demo.html
- Size: 10.7 KB
- Stars: 70
- Watchers: 3
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-star-libs - AngusFu / uc-qq-share-to-wechat
README
# uc-qq-share-to-wechat
> 触发手机 UC/QQ 浏览器的原生的微信分享功能
## 安装
```bash
npm install --save ucshare
```## DEMO
![https://p3.ssl.qhimg.com/t010544df8028b631f6.png](https://p3.ssl.qhimg.com/t010544df8028b631f6.png)
```javascript
var mShare = require('ucshare');/**
* @param {Object} config 配置对象 参数见示例
* config = {
* title : 'Lorem ipsum dolor sit.',
* url : 'http://m.ly.com',
* desc : 'Lorem ipsum dolor sit.',
* img : 'http://img1.40017.cn/cn/s/c/2015/loading.gif',
* type : type // 1 ==> 朋友圈 2 ==> 朋友 0 ==> 直接弹出原生
* };
*/
var mshare = new mShare({
title : 'Lorem ipsum dolor sit.',
url : 'http://m.ly.com',
desc : 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat inventore minima voluptates.',
img : 'http://placehold.it/150x150'
});$('button').click(function () {
// 1 ==> 朋友圈 2 ==> 朋友 0 ==> 直接弹出原生
mshare.init(+$(this).data('mshare'));
});
```## 说明
* 此插件主要作用是在UC和QQ两个手机浏览器上面触发微信分享到朋友圈或发送给朋友的功能
* 代码主要参考:http://mjs.sinaimg.cn/wap/module/share/201501261608/js/addShare.js
* 此外,JefferyWang的项目对我也有一定启示:https://github.com/JefferyWang/nativeShare.js