We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
think找不到命名空间
OS Platform:win10
Node.js Version:14.0.0
ThinkJS Version:3.2.11
import { Context, think } from 'thinkjs'; export default class extends think.Controller { constructor(ctx: Context) { super(ctx); // 调用父级的 constructor 方法,并把 ctx 传递进去 } __before() { // 头部数据处理 const method = this.method.toLowerCase(); this.header('Access-Control-Allow-Origin', this.header('origin') || '*'); this.header( 'Access-Control-Allow-Headers', 'Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, Authorization' ); this.header('Access-Control-Allow-Methods', 'GET,POST,OPTIONS,PUT,DELETE'); this.header('Access-Control-Allow-Credentials', true); if (method === 'options') { return this.success(); } } }
![Snipaste_2022-10-18_10-32-44](https://user-images.githubusercontent.com/57247313/196364803-f7cfacbf-6d8f-45f9-9787-0e15ac38e546.png)
// your detail description
The text was updated successfully, but these errors were encountered:
No branches or pull requests
DESC
think找不到命名空间
ENV
OS Platform:win10
Node.js Version:14.0.0
ThinkJS Version:3.2.11
code
error message
more description
// your detail description
The text was updated successfully, but these errors were encountered: