lujing-fe-js-wxshare
v1.0.3
Published
lujing fe plugin for weixin share
Downloads
5
Readme
lujing-fe-js-wxshare
组件功能
实现微信sdk分享
组件部署
微信sdk
<script src="https://res.wx.qq.com/open/js/jweixin-1.1.0.js" charset="utf-8"></script>
测试地址
<script src='https://statictest.tf56.com/lujing/components/js-wxshare/1.0.0/index.js'></script>
生产地址
<script src='https://www.lujing56.com/components/js-wxshare/1.0.0/index.js'></script>
注:微信js必须在顶部;
组件用法(demo)
设置方法
<script>
var appid = 'wx450248afa4895936';
var url = '/lujingWechatApi/signaturecs/getSignature?datasource=weChatOwner'; // url如果为函数 会执行url(callback);
/* url = function (fn) {
request().then(d => fn(d));
}*/
setTimeout(function () {
tencentShareConfig({
title: '卡车之声电台-陆鲸', // 分享标题
desc: '卡车之声,咱卡车人自己的电台!快来陆鲸货运圈收听吧~', // 分享描述
link: location.href, // 分享链接,该链接域名必须与当前企业的可信域名一致
imgUrl: 'https://www.lujing56.com/wechatdriver/images/[email protected]', // 分享图标协议保持一致
type: 'link', // 分享类型,music、video或link,不填默认为link
success: function () {
// console.log('分享成功')
},
cancel: function () {
// console.log('取消')
}
}, true, appid, url)
}, 5000);
</script>