Commit 8f4bfef9 by zhujian

fix

parent e4a12294
...@@ -19,7 +19,7 @@ export default class WechatApi { ...@@ -19,7 +19,7 @@ export default class WechatApi {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
Service.Hades('anon/hades/getWxCorpJSAPISignature', { Service.Hades('anon/hades/getWxCorpJSAPISignature', {
storeId: User.getStoreId(), storeId: User.getStoreId(),
url: params.url, url:location.href.split('#')[0],
}).then((result) => { }).then((result) => {
const res = result.result; const res = result.result;
wx.config({ wx.config({
...@@ -31,12 +31,15 @@ export default class WechatApi { ...@@ -31,12 +31,15 @@ export default class WechatApi {
signature: res.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法 signature: res.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
jsApiList: ['chooseImage'], jsApiList: ['chooseImage'],
}) })
wx.error((err) => {
console.log('getWxCorpJSAPISignatureErr', err)
});
wx.ready(() => { wx.ready(() => {
console.log('微信注册成功') console.log('微信注册成功')
Service.Hades('anon/hades/getWxWorkJSAPISignature', { Service.Hades('anon/hades/getWxWorkJSAPISignature', {
storeId: User.getStoreId(), storeId: User.getStoreId(),
url: params.url, url: location.href.split('#')[0],
}).then((result2) => { }).then((result2) => {
const res2 = result2.result; const res2 = result2.result;
console.log('开始注册agent') console.log('开始注册agent')
......
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
<script type="text/javascript" src="https://image.xiaomaiketang.com/xm/PhotoClip.js"></script> <script type="text/javascript" src="https://image.xiaomaiketang.com/xm/PhotoClip.js"></script>
<script type="text/javascript" charset="utf-8" src="//g.alicdn.com/sd/ncpc/nc.js?t=2015052012"></script> <script type="text/javascript" charset="utf-8" src="//g.alicdn.com/sd/ncpc/nc.js?t=2015052012"></script>
<script type="text/javascript" src="https://xiaomai-js.oss-cn-hangzhou.aliyuncs.com/loghub-xm-0.0.1-beta.js"></script> <script type="text/javascript" src="https://xiaomai-js.oss-cn-hangzhou.aliyuncs.com/loghub-xm-0.0.1-beta.js"></script>
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript" src="//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script> <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment