-
## DESC
[2017-08-21 01:03:41.593] [INFO] [default] - Server running at http://127.0.0.1:8360
[2017-08-21 01:03:41.593] [INFO] [default] - ThinkJS version: 3.0.0
[2017-08-21 01:03:41.593] [INFO] […
-
RT
-
Currently thinkjs read env config from config/env/[mode].js, this could be ugly when meet the situation like this:
![image](https://cloud.githubusercontent.com/assets/9482138/26407489/e10459f6-40cd…
-
mongo model _id查询时,需要_id 类型必须是string,如果为ObjectID会报错,
查看thinkjs源码发现框架会自动将_id字段转换成ObjectID,如果传入已为ObjectID,就会报错。
建议将增加类型检测,已为ObjectID时,框架不再做转换
``` javascript
let ObjectID = require('mongodb-core').BSON.…
-
## DESC
**output_resource.js: line 81**
let buffer = new Buffer(to - from + 1);
**_fs.readSync(fd, buffer, 0, to - from , from);_** // 第四个参数 length是否应该是 to-from+1?
fs.closeSync(fd);…
-
if (!options.preflightContinue ) {
res.statusCode = 204;
res.end();
//这边加入
return res.prevent();
}
在大约26…
-
文档、实例也很丰富,感觉比 thinkjs 还丰富。
thinkjs 加油啊
-
## DESC
目前我想升版(因為將來資料表會4-500個左右),之前2版模組使用時可分目錄
使用時 加上 斜線 可做區分 列如 let arrList1=await this.model('ac/ac_group')
但是3版看我有去查看源碼
\node_modules\think-model\lib\index.js 第31行
const model = function (n…
-
## DESC
对于Post请求,在logic中验证int类型,如果使用application/json格式传递数据,验证有问题。
具体表现为当int=0是,ThinkJS会认为该值不存在而返回参数不存在的错误。当使用application/x-www-form-urlencoded格式,则能够正确处理int=0的情况。
(例如:
this.allowMethods = 'post…
-
## DESC
大神们辛苦了~~
照着官方文档,连接数据库,报错 :# Error: ER_NO_DB_ERROR: No database selected
下面是数据库连接代码:
```js
module.exports = {
type: 'mysql',
common:{
log_sql:true,
log_connect:tr…
51kad updated
7 years ago