q-koa 7.9.4 → 7.9.7
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.
|
@@ -174,11 +174,11 @@ exports.getPhone = async (ctx) => {
|
|
|
174
174
|
exports.mp_getPhoneNew = async (ctx) => {
|
|
175
175
|
const { app, appName } = getAppByCtx(ctx)
|
|
176
176
|
|
|
177
|
-
const { code } = ctx.request.body
|
|
177
|
+
const { code, config = 'weixin_mp' } = ctx.request.body
|
|
178
178
|
|
|
179
179
|
const user_id = ctx.request[appName + '-user'].id
|
|
180
180
|
const appConfig = getConfig(app)
|
|
181
|
-
const { app_id, app_secrect } = await appConfig.getObject(
|
|
181
|
+
const { app_id, app_secrect } = await appConfig.getObject(config)
|
|
182
182
|
|
|
183
183
|
const weixinMp = new WeixinMp({
|
|
184
184
|
appid: app_id,
|
|
@@ -27,7 +27,7 @@ exports.refund = async ({
|
|
|
27
27
|
pfx: await fsPromise.readFile(
|
|
28
28
|
path.resolve(
|
|
29
29
|
__dirname,
|
|
30
|
-
`${process.cwd()}/app/${appName}/plugins/weixin/apiclient_cert.p12`
|
|
30
|
+
`${process.cwd()}/app/${appName}/plugins/weixin/${pay_config}/apiclient_cert.p12`
|
|
31
31
|
)
|
|
32
32
|
), // 微信商户平台证书
|
|
33
33
|
})
|
|
@@ -77,7 +77,7 @@ exports.cash = async ({ ctx, id, user_id, number }) => {
|
|
|
77
77
|
pfx: await fsPromise.readFile(
|
|
78
78
|
path.resolve(
|
|
79
79
|
__dirname,
|
|
80
|
-
`${process.cwd()}/app/${appName}/plugins/weixin/apiclient_cert.p12`
|
|
80
|
+
`${process.cwd()}/app/${appName}/plugins/weixin/${pay_config}/apiclient_cert.p12`
|
|
81
81
|
)
|
|
82
82
|
), // 微信商户平台证书
|
|
83
83
|
})
|