|
|
@@ -10,33 +10,34 @@ function jsapiSign() {
|
|
|
http.http
|
|
|
.get('/wx/jsapiSign', { url: location.origin + location.pathname })
|
|
|
.then(res => {
|
|
|
- res.debug = true;
|
|
|
- res.jsApiList = [
|
|
|
- 'chooseWXPay',
|
|
|
- 'updateAppMessageShareData',
|
|
|
- 'updateTimelineShareData',
|
|
|
- 'hideAllNonBaseMenuItem',
|
|
|
- 'scanQRCode'
|
|
|
- ];
|
|
|
- wx.config(res);
|
|
|
+ wx.config({
|
|
|
+ debug: false,
|
|
|
+ appId: res.appId,
|
|
|
+ timestamp: res.timestamp,
|
|
|
+ nonceStr: res.nonceStr,
|
|
|
+ signature: res.signature,
|
|
|
+ jsApiList: [
|
|
|
+ 'chooseWXPay',
|
|
|
+ 'updateAppMessageShareData',
|
|
|
+ 'updateTimelineShareData',
|
|
|
+ 'hideAllNonBaseMenuItem',
|
|
|
+ 'scanQRCode'
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ wx.error(function (res) {
|
|
|
+ console.log(res);
|
|
|
+ });
|
|
|
wx.ready(function () {
|
|
|
wx.updateAppMessageShareData({
|
|
|
title: '第九空间',
|
|
|
desc: '全球首个基于区块链的游戏资产集换中心',
|
|
|
link: location.origin + '/9th',
|
|
|
- imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg',
|
|
|
- success: function () {
|
|
|
- console.log('success');
|
|
|
- },
|
|
|
- fail: function (e) {
|
|
|
- console.log(e);
|
|
|
- }
|
|
|
+ imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg'
|
|
|
});
|
|
|
wx.updateTimelineShareData({
|
|
|
title: '第九空间-全球首个基于区块链的游戏资产集换中心',
|
|
|
link: location.origin + '/9th',
|
|
|
- imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg',
|
|
|
- success: function () {}
|
|
|
+ imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg'
|
|
|
});
|
|
|
});
|
|
|
})
|