-
在写入文件的时候,直接打开txt文件看不到写入的内容,在console.log()可以打出所写入的内容;
或者创建文件,提示创建成功,但是在项目中看不到创建的文件,写入的内容也可以用console.log()打出来
-
## DESC
如图,按照文档创建ts项目不成功,没有在根目录创建`tsconfig.json`文件,当使用命令行增加新的Controller也没有出现对应的ts文件,另外`eslint`文件和`gitignore`文件名前面缺了‘.’, 插件加载不到这个文件。
![image](https://user-images.githubusercontent.com/26198634/321425…
-
## DESC
### ENV
OS Platform:
Node.js Version:
ThinkJS Version:
### code
```js
// your code here
```
### error message
```
// your error message here
```
### more descrip…
-
## DESC
### ENV
OS Platform:
Node.js Version:
ThinkJS Version:
### code
```js
// your code here
```
### error message
```
// your error message here
```
### more descrip…
-
我查了文档,里面貌似没有说怎么在事务里加锁,thinkphp对模型的链式调用里有个lock()就是加锁用的。
thinkjs只能执行原生的sql ,在查询语句里加入for update么?感觉有点不方便啊,用thinkjs的原因之一就是提供thinkphp一样的链式调用,自己写sql容易出现一些意料之外的问题。
-
## DESC
我这里有 3 个表(彼此有 id 关联),关系如下:
model/table1.js
```
table2: {
type: think.model.HAS_MANY
}
```
model/table2.js
```
table3: {
type: think.model.HAS_MANY
}
```
当我在 controller/tabl…
-
multipart/form-data 表单同时上传多张图片的时候this.file()获取到的不是数组而是Object
-
## DESC
在service中通过axios库来调用远程的api接口,如果接口返回401未授权的错误状态,这时候需要返回login.html给用户,提示用户登录。
目前是直接在service中抛出{status:401},然后配置trace中间件中401错误对应的模板:
```
{
handle : 'trace',
enable : !th…
-
huanz updated
6 years ago
-
## DESC
在adapter.js中require('socket.io-redis'),产生错误Maximum call stack size exceeded
是不是与think-websocket-socket.io冲突了
### ENV
OS Platform:
windows
Node.js Version:
6.11
ThinkJS Version:
3
#…