-
## DESC
如何在session.js配置两个cookie的超时
``` javascript
export default {
name: 'admin',
type: 'file',
secret: '~2S^@LT#',
timeout: 24 * 3600,
cookie: { // cookie options
length: 32,
http…
-
系统概况
服务器系统:linux
Node.js版本:5.3.0
V8引擎版本:4.6.85.31
MySQL版本:5.6.28
ThinkJS版本:2.2.16
FireKylin版本:0.15.1
[2017年终总结](https://liushaohua.cn/post/2017.html)
-
## DESC
我按照`ThinkJS`文档中的写法,在controller中抛出404错误,
```js
return think.statusAction(404, this.http);
```
但是我在浏览器中查看响应的状态码却仍然是`200`
## ENV
Platform: MacOS
Node.js Version: v6.3.1
ThinkJS…
-
## DESC
As stated in the officiel repo https://github.com/bkonkle/babel-preset-es2015-loose
> The preset that this project is based on, babel-preset-es2015, now supports setting the "loose" option…
-
/firekylin/src/home/service/install.js 源码里
```js
/**
* insert data
* @return {[type]} [description]
*/
async insertData(){
let model = this.getModel(true);
let dbExist = a…
-
## DESC
關於model中呼叫其它model有建立my sql TEMPORARY TABLE的問題
情境說明
[]會發生錯誤的情境
1.model_A呼叫model_B的一個method_1
2.model_B的method_1
執行下面動作(下面SQL語句有簡略描述)
2.1. DROP TEMPORARY TABLE IF EXISTS temp_a1;
…
-
± |master U:1 ?:1 ✗| → node --harmony www/testing.js
[2016-04-21 09:38:06] [THINK] Server running at http://127.0.0.1:8360/
[2016-04-21 09:38:06] [THINK] ThinkJS Version: 2.2.1
[2016-04-21 09:38:06] …
-
## DESC
用file模式存session的时候,会出现保存成功,获取不到的情况
## ENV
Platform:
Node.js Version: 6.3.0
ThinkJS Version: 2.2.5
-
## DESC
在创建表的model时,当使用 think.model.MANY_TO_MANY时, rModel只有填真实表名才能关联成功。
比如,有个关联关系表 bind , 存储了 device表和user的多对多关系,如果在建bind表时,将其建成device_user.js , 然后再init 函数里 将 this.tableName = "bind" 方式制定模型的表名,那在…
-
## DESC
#### base logic代码
``` javascript
export default class extends think.logic.base {
/**
* some base method in here
*/
init(http){
super.init(http);
this.aa = 10;
cons…