新增urlTag

This commit is contained in:
ap 2022-03-29 09:34:09 +08:00
parent 880c3ff0de
commit 206151a016
2 changed files with 18 additions and 5 deletions

View File

@ -4,7 +4,7 @@
"description": "",
"private": true,
"dependencies": {
"@cool-midway/core": "^5.0.6",
"@cool-midway/core": "^5.0.7",
"@cool-midway/es": "^5.0.2",
"@cool-midway/file": "^5.0.3",
"@cool-midway/pay": "^5.0.0",

View File

@ -1,9 +1,10 @@
import { Provide } from '@midwayjs/decorator';
import { Get, Inject, Provide } from '@midwayjs/decorator';
import {
CoolController,
BaseController,
CoolUrlTag,
TagTypes,
CoolUrlTagData,
} from '@cool-midway/core';
/**
@ -16,7 +17,19 @@ import {
pageQueryOp: () => {},
})
@CoolUrlTag({
key: TagTypes.ignoreToken,
value: [],
key: TagTypes.IGNORE_TOKEN,
value: ['add'],
})
export class DemoAppTagController extends BaseController {}
export class DemoAppTagController extends BaseController {
@Inject()
tag: CoolUrlTagData;
/**
* token的url
* @returns
*/
@Get('/data')
async data() {
return this.ok(this.tag.byKey(TagTypes.IGNORE_TOKEN));
}
}