shareforjiyun
1.0.3 • Public • Published
- 添加shareforjiyun npm 依赖:cnpm install shareforjiyun --save
- 项目中引入:import shareHandle from 'shareforjiyun' (shareHandle自定义)
- shareHandle对象下有两个方法
- shareHandle.wxShare(obj)方法用于微信分享
- shareHandle.leadeonShare(obj)方法用于一级手厅分享
//obj参数示例
const obj = {
title: '分享标题',
desc: '分享描述',
link: '分享链接',
imgUrl: '分享图标',
content: '分享内容'
}
//必传键值对请参考代码案例
- shareHandle.wxShare(obj)方法依赖axios请求
- shareHandle.leadeonShare(obj)方法依赖leadeon(一级手厅jdk)
import axios from "axios";
if (getIsWeixin()) { //微信对应环境
//微信二次分享
shareHandle.wxShare({
title: shareTitle,
desc: shareDescription,
imgUrl: sharePictureUrl,
link: shareRedirectUrl_para,
});
}
if (getIsApp()) { //手厅对应环境
//一级手厅分享
shareHandle.leadeonShare({
title: shareTitle,
link: shareRedirectUrl_para,
imgUrl: sharePictureUrl,
content: shareDescription,
});
}
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.3 | 1 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.3 | 1 | |
1.0.2 | 0 | |
1.0.1 | 0 | |
1.0.0 | 0 | |
Package Sidebar
Install
Weekly Downloads