-
## DESC
框架直接集成了 websocket ,相当的方便,不过有个地方不是很明白,如果我希望一个controller或者module常驻后台,这个该怎么整?
## ENV
Platform:
Node.js Version:
ThinkJS Version:
-
## DESC
[教程链接](https://thinkjs.org/zh-cn/doc/2.2/question.html)
https://thinkjs.org/zh-cn/doc/2.2/question.html
controller是reset api
#### 一。官方设置
``` javascript
// base
export default cl…
-
## DESC
执行语句A:let data = await model.limit(2).select(
后台记录:
[SQL] SHOW COLUMNS FROM `a_temp` 8ms
[SQL] SELECT * FROM `a_temp` LIMIT 2 1ms
执行语句B: let data = await …
-
后台能看到文章总数,但是点击 文章管理,页面管理 ,没任何反应。
![TIM图片20170617215220.png](https://ooo.0o0.ooo/2017/06/17/59453462d409f.png)
服务器系统:linux
Node.js版本:4.8.3
V8引擎版本:4.5.103.47
MySQL版本:10.0.31-MariaDB-1~jessie
T…
istek updated
7 years ago
-
## DESC
## ENV
Platform: windows
Node.js Version:8
ThinkJS Version:
@welefen Followed the instructions, it looks good shows log in console, but no response when visit in the browser…
-
我用的是thinkjs 3.0构建的项目,
感觉官方提供的think-pagination 很好用,
但是我发现如果在controller下面用pagination的话,每一次都调用一下很是繁琐,
所以我想把分页组件做到 adapter里面,我的配置如下
```js
// src/common/adapter.js
const pagination = require('think-p…
-
## DESC
调用mongo fieldReverse函数没去取反,与field函数运行结果一样
Platform:window 8
Node.js Version:6.10.3
ThinkJS Version:2.2.18
-
## 提一点小疑惑?
看了ThinkJS3.0的文档说3.0抛弃了2.0中的核心架构。
最近将一个cms系统从ThinkJS2.x迁移到ThinkJS3.x过程中发现以前使用的think对象内置的方法依然有效,比如think.md5()、think.uuid()、think.isEmpty()等等。
这些在ThinkJS3.0文档中的think对象描述部分并没提及。
## 弱弱的问一下
…
-
## DESC
logic 层验证数据 不想使用默认的this.fail() 形式返回json, 想直接返回404页面, 为何
return think.statusAction(404, this.http) 后 还是走到了controller里面呢
## ENV development
Platform: osx
Node.js Version: 7.1
Th…
-
出现问题的版本:1.2.10
问题描述:模型alias函数在联表查询时SQL语句拼错,代码如下:
js代码
```
...
// 查询方法
D('Channel').alias('c').join({
table: 'product.app',
join: 'left',
as : 'app',
on : ['channel_id', 'app_id']
}).f…