q-koa 12.5.1 → 12.5.4
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/core/app.js +6 -6
- package/core/config.js +1 -0
- package/core/file/plugins/weixin/controller.js +2 -2
- package/package.json +1 -1
package/core/app.js
CHANGED
|
@@ -290,6 +290,12 @@ class APP {
|
|
|
290
290
|
console.log(
|
|
291
291
|
`first app is http://localhost:3001/${appName}/setting/findOne`
|
|
292
292
|
)
|
|
293
|
+
} else {
|
|
294
|
+
this.app[appName].service.log.push({
|
|
295
|
+
app: this.app[appName],
|
|
296
|
+
url: `http://${this.config.ip}:${this.port}/setting/findOne`,
|
|
297
|
+
message: `${this.config.ip}:${this.port}项目启动成功`,
|
|
298
|
+
})
|
|
293
299
|
}
|
|
294
300
|
|
|
295
301
|
const version = require('q-koa/package.json').version
|
|
@@ -1173,11 +1179,6 @@ class APP {
|
|
|
1173
1179
|
ctx.SUCCESS(result)
|
|
1174
1180
|
}
|
|
1175
1181
|
if (fn === 'sum') {
|
|
1176
|
-
const requiredInclude = myInclude.filter(
|
|
1177
|
-
(item) =>
|
|
1178
|
-
(item.where && !item.hasOwnProperty('required')) ||
|
|
1179
|
-
(item.hasOwnProperty('required') && item.required)
|
|
1180
|
-
)
|
|
1181
1182
|
if (!(attributes && attributes.length === 1)) {
|
|
1182
1183
|
throw new Error(`${fn}方法需要attributes一个`)
|
|
1183
1184
|
}
|
|
@@ -1185,7 +1186,6 @@ class APP {
|
|
|
1185
1186
|
attributes[0],
|
|
1186
1187
|
{
|
|
1187
1188
|
where: _where,
|
|
1188
|
-
include: requiredInclude,
|
|
1189
1189
|
}
|
|
1190
1190
|
)
|
|
1191
1191
|
ctx.SUCCESS(result)
|
package/core/config.js
CHANGED
|
@@ -1474,7 +1474,7 @@ exports.checkPay = async (ctx, _data) => {
|
|
|
1474
1474
|
return { prefix, out_trade_no, ...payResult }
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
1477
|
-
exports.checkPayOnly = async (ctx) => {
|
|
1477
|
+
exports.checkPayOnly = async (ctx, _data) => {
|
|
1478
1478
|
const { app, appName, controller } = getAppByCtx(ctx)
|
|
1479
1479
|
|
|
1480
1480
|
const {
|
|
@@ -1484,7 +1484,7 @@ exports.checkPayOnly = async (ctx) => {
|
|
|
1484
1484
|
pay_config = 'weixin_pay',
|
|
1485
1485
|
type = 'MP-WEIXIN',
|
|
1486
1486
|
out_trade_no: _out_trade_no,
|
|
1487
|
-
} = ctx.request.body
|
|
1487
|
+
} = _data || ctx.request.body
|
|
1488
1488
|
|
|
1489
1489
|
const appConfig = getConfig(app)
|
|
1490
1490
|
const app_id = (await appConfig.getObject(config)).app_id
|