@yoooloo42/beat 1.0.24 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/libs/WeChat/MPC.js +6 -3
package/package.json
CHANGED
package/src/libs/WeChat/MPC.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
import Token from './Token.js'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @function getMiniProgramCode
|
|
@@ -15,7 +16,7 @@ async function getMiniProgramCode(para) {
|
|
|
15
16
|
|
|
16
17
|
// 1. 获取全局接口调用凭证 access_token (这里假设 getGlobalAccessToken 已定义)
|
|
17
18
|
// 注意:小程序和公众号共用这一个全局 access_token 接口
|
|
18
|
-
const tokenResult = await getGlobalAccessToken({ appid, secret });
|
|
19
|
+
const tokenResult = await Token.getGlobalAccessToken({ appid, secret });
|
|
19
20
|
|
|
20
21
|
if (tokenResult.code !== 0) {
|
|
21
22
|
return {
|
|
@@ -84,4 +85,6 @@ async function getMiniProgramCode(para) {
|
|
|
84
85
|
message: `网络请求失败: ${error.message}`
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
|
-
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export {getMiniProgramCode}
|