hmp 4 年之前
父节点
当前提交
2a0b52d112
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      common/utils/share.js

+ 3 - 1
common/utils/share.js

@@ -1,5 +1,7 @@
 import wx from 'weixin-js-sdk'
-const url = (window.location.href.split('index.html')[0])+'index.html'
+// const url = (window.location.href.split('index.html')[0])+'index.html'
+let url = window.location.href.split('#')[0]
+url = url.indexOf('?') > -1 ? encodeURIComponent(url) : url
 export const shareConfig = (shareData, vm) => {
 	vm.$u.api.wxInfo.getWxShareData({
 		url