text: module.exports = class extends think.Controller {
      __before() {
  
      }
  
      __call() {
          let method = this.http.method.toLowerCase();
          if (method === "options") {
              this.setCorsHeader();
              this.end();
              return;
          }
          this.setCorsHeader();
          return super.__call();
      }
  
      setCorsHeader() {
          this.header("Access-Control-Allow-Origin", this.header("origin") || "*");
          this.header("Access-Control-Allow-Headers", "x-requested-with");
          this.header("Access-Control-Request-Method", "GET,POST,PUT,DELETE");
          this.header("Access-Control-Allow-Credentials", "true");
      }
  };
  