|
@@ -3,8 +3,7 @@ import { Toast } from 'vant';
|
|
|
// import utils from '@/utils/utils';
|
|
|
export default function wxShare(shareurl,title,desc,imgurl,hide){
|
|
|
getWxSign({
|
|
|
- // Url: decodeURIComponent(utils.isIos() ? window.entryUrl : window.location.href)
|
|
|
- Url:window.location.href
|
|
|
+ Url:window.location.href.split('#')[0]
|
|
|
}).then((res)=>{
|
|
|
if( res.Ret===200 ){
|
|
|
wx.config({
|
|
@@ -15,11 +14,11 @@ export default function wxShare(shareurl,title,desc,imgurl,hide){
|
|
|
signature:res.Data.Signature,// 必填,签名,见附录1
|
|
|
jsApiList:['updateTimelineShareData',//1.4.0的分享接口,注意:使用新版本的分享功能,一定要在该列表加上对应的老版本功能接口,否则新接口不起作用
|
|
|
'updateAppMessageShareData',//1.4.0的分享接口,注意:使用新版本的分享功能,一定要在该列表加上对应的老版本功能接口,否则新接口不起作用
|
|
|
- 'onMenuShareAppMessage',//老版本分享接口。
|
|
|
- 'onMenuShareTimeline',
|
|
|
'hideOptionMenu',
|
|
|
'showOptionMenu',
|
|
|
'hideMenuItems']
|
|
|
+ // 'onMenuShareAppMessage',//老版本分享接口。
|
|
|
+ // 'onMenuShareTimeline',
|
|
|
});
|
|
|
}else {
|
|
|
console.log(res)
|