testShare.html
1.03 KB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
<title>Title</title>
</head>
<body>
<div id="share"> 分享</div>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script src="../build/sdk.js"></script>
<script>
var shareData = {
title: '国潮崛起年,中西碰撞博出位!',
imgUrl: 'https://img01.yohoboys.com/o_1cnilugbs15ajak1gfo1d2h1p348.png?imageView2/1/w/200/h/200',
desc: '这里有一份中西潮流榜单,请收好!',
link: location.href,
success: function () {
alert('1123')
}
};
// let sign = window.yo_sdk.wxSignature;
// sign().then(function(r){
// console.log(r)
// window.yo_sdk.wxShare(shareData)
// })
window.yo_sdk.wxSignature(window.yo_sdk.wxShare(shareData));
</script>
</body>
</html>