q-koa 11.4.0 → 11.4.1

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.
@@ -1352,7 +1352,13 @@ exports.refund_notify = async (ctx) => {
1352
1352
  app_key: key.length > 10 ? key : partner_key,
1353
1353
  })
1354
1354
 
1355
- const { out_refund_no, out_trade_no, total_fee, refund_fee } = refundResult
1355
+ const {
1356
+ out_refund_no,
1357
+ out_trade_no,
1358
+ total_fee,
1359
+ refund_fee,
1360
+ refund_desc,
1361
+ } = refundResult
1356
1362
 
1357
1363
  const refund_price = Number(refund_fee) / 100
1358
1364
 
@@ -1367,9 +1373,7 @@ exports.refund_notify = async (ctx) => {
1367
1373
  : Number(out_refund_no)
1368
1374
  const type = out_refund_no.includes('_') ? out_refund_no.split('_')[1] : ''
1369
1375
  const model = prefix ? `${prefix}_order` : 'order'
1370
- // console.log(
1371
- // `微信退款回调 prefix:${prefix}/model:${model}/order_id:${order_id}/type:${type}`
1372
- // )
1376
+ console.log(`微信退款回调 ${refund_desc}`)
1373
1377
  if (app.service[model] && app.service[model].refund_notify) {
1374
1378
  await app.service[model].refund_notify({
1375
1379
  app,
@@ -1377,6 +1381,7 @@ exports.refund_notify = async (ctx) => {
1377
1381
  order: model,
1378
1382
  refund_price,
1379
1383
  type,
1384
+ out_refund_no,
1380
1385
  })
1381
1386
  }
1382
1387
 
@@ -1706,7 +1711,7 @@ exports.setMsgJumpPath = async (ctx) => {
1706
1711
  const { app, appName } = getAppByCtx(ctx)
1707
1712
  const appConfig = getConfig(app)
1708
1713
 
1709
- const {config = 'weixin_mp' ,path='pages/index/index'} = ctx.request.body
1714
+ const { config = 'weixin_mp', path = 'pages/index/index' } = ctx.request.body
1710
1715
  const { app_id, app_secrect } = await appConfig.getObject(config)
1711
1716
 
1712
1717
  const weixinMp = new WeixinMp({
@@ -1721,4 +1726,4 @@ exports.setMsgJumpPath = async (ctx) => {
1721
1726
  })
1722
1727
 
1723
1728
  ctx.SUCCESS('ok')
1724
- }
1729
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "11.4.0",
3
+ "version": "11.4.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {