hmp 4 tahun lalu
induk
melakukan
1e01c345b2
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      common/utils/share.js

+ 2 - 1
common/utils/share.js

@@ -1,5 +1,6 @@
 import wx from'weixin-js-sdk'
 const url = (window.location.href.split('#')[0])
+// const url = window.location.href
 // const url ="http://vote.guosen-fumao.cn/vote-h5/index.html"
 // shareData{
 // 	title: , // 分享标题
@@ -8,7 +9,7 @@ const url = (window.location.href.split('#')[0])
 // 	imgUrl: '', // 分享图标
 // }
 export const shareConfig =(shareData,vm) => {
-	vm.$u.api.wxInfo.getWxShareData().then(res=>{
+	vm.$u.api.wxInfo.getWxShareData({url}).then(res=>{
 		wx.config({
 		  debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
 		  appId: res.appId, // 必填,公众号的唯一标识