Browse Source

refactor(share): 将回调函数改为Promise形式并添加日志

修改微信分享功能中的签名获取方式,从回调函数改为Promise形式以保持代码风格一致
添加console.log用于调试appId
hfll
主管理员 2 weeks ago
parent
commit
f885fa8eb7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      utils/share.js

+ 2
- 1
utils/share.js View File

@ -11,7 +11,7 @@ function share() { //微信分享
// url: Vue.prototype.$config.redirect + '/#/'
url: location.href.split('#')[0]
}
login.getSignPackage(data, res => {
login.getSignPackage(data).then(res => {
if (res.code == 200) {
let {
appId,
@ -19,6 +19,7 @@ function share() { //微信分享
signature,
timestamp
} = res.result
console.log(appId);
jWeixin.config({
debug: true,
appId: appId,


Loading…
Cancel
Save