feat(token): 新增输入验证码和重新发送验证码接口
- 添加输入验证码接口及请求和响应模型 - 添加重新发送验证码接口及请求和响应模型 - 调整Token相关接口及模型中的字段名tokenName为name - 更新Token列表接口查询参数tokenName为name,status类型调整为枚举 - 维护API文档,补充新增接口的详细说明和示例 - 更新相关类型定义,完善请求参数接口和响应接口 - 修正部分模型字段名以统一接口字段规范
This commit is contained in:
@@ -50,6 +50,8 @@ docs/KamiApiCamelOilV1GetPrefetchOrderLogsRes.md
|
||||
docs/KamiApiCamelOilV1GetSettingsRes.md
|
||||
docs/KamiApiCamelOilV1GetTokenReq.md
|
||||
docs/KamiApiCamelOilV1GetTokenRes.md
|
||||
docs/KamiApiCamelOilV1InputVerificationCodeReq.md
|
||||
docs/KamiApiCamelOilV1InputVerificationCodeRes.md
|
||||
docs/KamiApiCamelOilV1ListAccountReq.md
|
||||
docs/KamiApiCamelOilV1ListAccountRes.md
|
||||
docs/KamiApiCamelOilV1ListCardBindingsByTokenReq.md
|
||||
@@ -72,6 +74,8 @@ docs/KamiApiCamelOilV1OrderHistoryRes.md
|
||||
docs/KamiApiCamelOilV1OrderListItem.md
|
||||
docs/KamiApiCamelOilV1PrefetchOrderListItem.md
|
||||
docs/KamiApiCamelOilV1PrefetchOrderLogItem.md
|
||||
docs/KamiApiCamelOilV1ResendVerificationCodeReq.md
|
||||
docs/KamiApiCamelOilV1ResendVerificationCodeRes.md
|
||||
docs/KamiApiCamelOilV1SubmitOrderReq.md
|
||||
docs/KamiApiCamelOilV1SubmitOrderRes.md
|
||||
docs/KamiApiCamelOilV1TokenInfo.md
|
||||
@@ -492,6 +496,8 @@ models/kami-api-camel-oil-v1-get-prefetch-order-logs-res.ts
|
||||
models/kami-api-camel-oil-v1-get-settings-res.ts
|
||||
models/kami-api-camel-oil-v1-get-token-req.ts
|
||||
models/kami-api-camel-oil-v1-get-token-res.ts
|
||||
models/kami-api-camel-oil-v1-input-verification-code-req.ts
|
||||
models/kami-api-camel-oil-v1-input-verification-code-res.ts
|
||||
models/kami-api-camel-oil-v1-list-account-req.ts
|
||||
models/kami-api-camel-oil-v1-list-account-res.ts
|
||||
models/kami-api-camel-oil-v1-list-card-bindings-by-token-req.ts
|
||||
@@ -514,6 +520,8 @@ models/kami-api-camel-oil-v1-order-history-res.ts
|
||||
models/kami-api-camel-oil-v1-order-list-item.ts
|
||||
models/kami-api-camel-oil-v1-prefetch-order-list-item.ts
|
||||
models/kami-api-camel-oil-v1-prefetch-order-log-item.ts
|
||||
models/kami-api-camel-oil-v1-resend-verification-code-req.ts
|
||||
models/kami-api-camel-oil-v1-resend-verification-code-res.ts
|
||||
models/kami-api-camel-oil-v1-submit-order-req.ts
|
||||
models/kami-api-camel-oil-v1-submit-order-res.ts
|
||||
models/kami-api-camel-oil-v1-token-info.ts
|
||||
|
||||
@@ -49,10 +49,18 @@ import type { KamiApiCamelOilV1DeleteTokenRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1GetTokenRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1InputVerificationCodeReq } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1InputVerificationCodeRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1ListCardBindingsByTokenRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1ListTokensRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1ResendVerificationCodeReq } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1ResendVerificationCodeRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1UpdateTokenReq } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCamelOilV1UpdateTokenRes } from '../models';
|
||||
@@ -269,21 +277,69 @@ export const JDV2TokenManagementApiAxiosParamCreator = function (
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 输入验证码
|
||||
* @param {KamiApiCamelOilV1InputVerificationCodeReq} [kamiApiCamelOilV1InputVerificationCodeReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiTokenInputVerificationCodePost: async (
|
||||
kamiApiCamelOilV1InputVerificationCodeReq?: KamiApiCamelOilV1InputVerificationCodeReq,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/token/input-verification-code`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = {
|
||||
method: 'POST',
|
||||
...baseOptions,
|
||||
...options
|
||||
};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers
|
||||
};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(
|
||||
kamiApiCamelOilV1InputVerificationCodeReq,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 列出 Token
|
||||
* @param {number} current 页数
|
||||
* @param {ApiTokenListGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [tokenName] Token名称
|
||||
* @param {number} [status] 状态
|
||||
* @param {string} [name] Token名称
|
||||
* @param {ApiTokenListGetStatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiTokenListGet: async (
|
||||
current: number,
|
||||
pageSize: ApiTokenListGetPageSizeEnum,
|
||||
tokenName?: string,
|
||||
status?: number,
|
||||
name?: string,
|
||||
status?: ApiTokenListGetStatusEnum,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'current' is not null or undefined
|
||||
@@ -314,8 +370,8 @@ export const JDV2TokenManagementApiAxiosParamCreator = function (
|
||||
localVarQueryParameter['pageSize'] = pageSize;
|
||||
}
|
||||
|
||||
if (tokenName !== undefined) {
|
||||
localVarQueryParameter['tokenName'] = tokenName;
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameter['name'] = name;
|
||||
}
|
||||
|
||||
if (status !== undefined) {
|
||||
@@ -336,6 +392,54 @@ export const JDV2TokenManagementApiAxiosParamCreator = function (
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 重新发送验证码
|
||||
* @param {KamiApiCamelOilV1ResendVerificationCodeReq} [kamiApiCamelOilV1ResendVerificationCodeReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiTokenResendVerificationCodePost: async (
|
||||
kamiApiCamelOilV1ResendVerificationCodeReq?: KamiApiCamelOilV1ResendVerificationCodeReq,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/token/resend-verification-code`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = {
|
||||
method: 'POST',
|
||||
...baseOptions,
|
||||
...options
|
||||
};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers
|
||||
};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(
|
||||
kamiApiCamelOilV1ResendVerificationCodeReq,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改 Token
|
||||
@@ -537,21 +641,55 @@ export const JDV2TokenManagementApiFp = function (
|
||||
configuration
|
||||
)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 输入验证码
|
||||
* @param {KamiApiCamelOilV1InputVerificationCodeReq} [kamiApiCamelOilV1InputVerificationCodeReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiTokenInputVerificationCodePost(
|
||||
kamiApiCamelOilV1InputVerificationCodeReq?: KamiApiCamelOilV1InputVerificationCodeReq,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<KamiApiCamelOilV1InputVerificationCodeRes>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.apiTokenInputVerificationCodePost(
|
||||
kamiApiCamelOilV1InputVerificationCodeReq,
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath =
|
||||
operationServerMap[
|
||||
'JDV2TokenManagementApi.apiTokenInputVerificationCodePost'
|
||||
]?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) =>
|
||||
createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 列出 Token
|
||||
* @param {number} current 页数
|
||||
* @param {ApiTokenListGetPageSizeEnum} pageSize 页码
|
||||
* @param {string} [tokenName] Token名称
|
||||
* @param {number} [status] 状态
|
||||
* @param {string} [name] Token名称
|
||||
* @param {ApiTokenListGetStatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiTokenListGet(
|
||||
current: number,
|
||||
pageSize: ApiTokenListGetPageSizeEnum,
|
||||
tokenName?: string,
|
||||
status?: number,
|
||||
name?: string,
|
||||
status?: ApiTokenListGetStatusEnum,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
@@ -562,7 +700,7 @@ export const JDV2TokenManagementApiFp = function (
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.apiTokenListGet(
|
||||
current,
|
||||
pageSize,
|
||||
tokenName,
|
||||
name,
|
||||
status,
|
||||
options
|
||||
);
|
||||
@@ -579,6 +717,40 @@ export const JDV2TokenManagementApiFp = function (
|
||||
configuration
|
||||
)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 重新发送验证码
|
||||
* @param {KamiApiCamelOilV1ResendVerificationCodeReq} [kamiApiCamelOilV1ResendVerificationCodeReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiTokenResendVerificationCodePost(
|
||||
kamiApiCamelOilV1ResendVerificationCodeReq?: KamiApiCamelOilV1ResendVerificationCodeReq,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<KamiApiCamelOilV1ResendVerificationCodeRes>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.apiTokenResendVerificationCodePost(
|
||||
kamiApiCamelOilV1ResendVerificationCodeReq,
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath =
|
||||
operationServerMap[
|
||||
'JDV2TokenManagementApi.apiTokenResendVerificationCodePost'
|
||||
]?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) =>
|
||||
createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改 Token
|
||||
@@ -697,6 +869,24 @@ export const JDV2TokenManagementApiFactory = function (
|
||||
.apiTokenGetGet(requestParameters.tokenId, options)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 输入验证码
|
||||
* @param {JDV2TokenManagementApiApiTokenInputVerificationCodePostRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiTokenInputVerificationCodePost(
|
||||
requestParameters: JDV2TokenManagementApiApiTokenInputVerificationCodePostRequest = {},
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCamelOilV1InputVerificationCodeRes> {
|
||||
return localVarFp
|
||||
.apiTokenInputVerificationCodePost(
|
||||
requestParameters.kamiApiCamelOilV1InputVerificationCodeReq,
|
||||
options
|
||||
)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 列出 Token
|
||||
@@ -712,12 +902,30 @@ export const JDV2TokenManagementApiFactory = function (
|
||||
.apiTokenListGet(
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.tokenName,
|
||||
requestParameters.name,
|
||||
requestParameters.status,
|
||||
options
|
||||
)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 重新发送验证码
|
||||
* @param {JDV2TokenManagementApiApiTokenResendVerificationCodePostRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiTokenResendVerificationCodePost(
|
||||
requestParameters: JDV2TokenManagementApiApiTokenResendVerificationCodePostRequest = {},
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCamelOilV1ResendVerificationCodeRes> {
|
||||
return localVarFp
|
||||
.apiTokenResendVerificationCodePost(
|
||||
requestParameters.kamiApiCamelOilV1ResendVerificationCodeReq,
|
||||
options
|
||||
)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改 Token
|
||||
@@ -791,6 +999,18 @@ export interface JDV2TokenManagementApiInterface {
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCamelOilV1GetTokenRes>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 输入验证码
|
||||
* @param {JDV2TokenManagementApiApiTokenInputVerificationCodePostRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiTokenInputVerificationCodePost(
|
||||
requestParameters?: JDV2TokenManagementApiApiTokenInputVerificationCodePostRequest,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCamelOilV1InputVerificationCodeRes>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 列出 Token
|
||||
@@ -803,6 +1023,18 @@ export interface JDV2TokenManagementApiInterface {
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCamelOilV1ListTokensRes>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 重新发送验证码
|
||||
* @param {JDV2TokenManagementApiApiTokenResendVerificationCodePostRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiTokenResendVerificationCodePost(
|
||||
requestParameters?: JDV2TokenManagementApiApiTokenResendVerificationCodePostRequest,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCamelOilV1ResendVerificationCodeRes>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 修改 Token
|
||||
@@ -860,6 +1092,13 @@ export interface JDV2TokenManagementApiApiTokenGetGetRequest {
|
||||
readonly tokenId: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for apiTokenInputVerificationCodePost operation in JDV2TokenManagementApi.
|
||||
*/
|
||||
export interface JDV2TokenManagementApiApiTokenInputVerificationCodePostRequest {
|
||||
readonly kamiApiCamelOilV1InputVerificationCodeReq?: KamiApiCamelOilV1InputVerificationCodeReq;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for apiTokenListGet operation in JDV2TokenManagementApi.
|
||||
*/
|
||||
@@ -877,12 +1116,19 @@ export interface JDV2TokenManagementApiApiTokenListGetRequest {
|
||||
/**
|
||||
* Token名称
|
||||
*/
|
||||
readonly tokenName?: string;
|
||||
readonly name?: string;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
readonly status?: number;
|
||||
readonly status?: ApiTokenListGetStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for apiTokenResendVerificationCodePost operation in JDV2TokenManagementApi.
|
||||
*/
|
||||
export interface JDV2TokenManagementApiApiTokenResendVerificationCodePostRequest {
|
||||
readonly kamiApiCamelOilV1ResendVerificationCodeReq?: KamiApiCamelOilV1ResendVerificationCodeReq;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -974,6 +1220,25 @@ export class JDV2TokenManagementApi
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 输入验证码
|
||||
* @param {JDV2TokenManagementApiApiTokenInputVerificationCodePostRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public apiTokenInputVerificationCodePost(
|
||||
requestParameters: JDV2TokenManagementApiApiTokenInputVerificationCodePostRequest = {},
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
return JDV2TokenManagementApiFp(this.configuration)
|
||||
.apiTokenInputVerificationCodePost(
|
||||
requestParameters.kamiApiCamelOilV1InputVerificationCodeReq,
|
||||
options
|
||||
)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 列出 Token
|
||||
@@ -989,13 +1254,32 @@ export class JDV2TokenManagementApi
|
||||
.apiTokenListGet(
|
||||
requestParameters.current,
|
||||
requestParameters.pageSize,
|
||||
requestParameters.tokenName,
|
||||
requestParameters.name,
|
||||
requestParameters.status,
|
||||
options
|
||||
)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 重新发送验证码
|
||||
* @param {JDV2TokenManagementApiApiTokenResendVerificationCodePostRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public apiTokenResendVerificationCodePost(
|
||||
requestParameters: JDV2TokenManagementApiApiTokenResendVerificationCodePostRequest = {},
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
return JDV2TokenManagementApiFp(this.configuration)
|
||||
.apiTokenResendVerificationCodePost(
|
||||
requestParameters.kamiApiCamelOilV1ResendVerificationCodeReq,
|
||||
options
|
||||
)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 修改 Token
|
||||
@@ -1032,3 +1316,12 @@ export enum ApiTokenListGetPageSizeEnum {
|
||||
NUMBER_50 = 50,
|
||||
NUMBER_100 = 100
|
||||
}
|
||||
export enum ApiTokenListGetStatusEnum {
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_5 = 5,
|
||||
NUMBER_2 = 2,
|
||||
NUMBER_3 = 3,
|
||||
NUMBER_4 = 4,
|
||||
NUMBER_0 = 0,
|
||||
NUMBER_6 = 6
|
||||
}
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
|
||||
All URIs are relative to _http://localhost_
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ----------------------------------------------------------------- | --------------------------------------- | ------------------- |
|
||||
| [**apiCardBindingListByTokenGet**](#apicardbindinglistbytokenget) | **GET** /api/card-binding/list-by-token | 查询 Token 绑卡记录 |
|
||||
| [**apiTokenCreatePost**](#apitokencreatepost) | **POST** /api/token/create | 创建 Token |
|
||||
| [**apiTokenDeletePost**](#apitokendeletepost) | **POST** /api/token/delete | 删除 Token |
|
||||
| [**apiTokenGetGet**](#apitokengetget) | **GET** /api/token/get | 获取 Token 信息 |
|
||||
| [**apiTokenListGet**](#apitokenlistget) | **GET** /api/token/list | 列出 Token |
|
||||
| [**apiTokenUpdatePost**](#apitokenupdatepost) | **POST** /api/token/update | 修改 Token |
|
||||
| Method | HTTP request | Description |
|
||||
| ----------------------------------------------------------------------------- | -------------------------------------------- | ------------------- |
|
||||
| [**apiCardBindingListByTokenGet**](#apicardbindinglistbytokenget) | **GET** /api/card-binding/list-by-token | 查询 Token 绑卡记录 |
|
||||
| [**apiTokenCreatePost**](#apitokencreatepost) | **POST** /api/token/create | 创建 Token |
|
||||
| [**apiTokenDeletePost**](#apitokendeletepost) | **POST** /api/token/delete | 删除 Token |
|
||||
| [**apiTokenGetGet**](#apitokengetget) | **GET** /api/token/get | 获取 Token 信息 |
|
||||
| [**apiTokenInputVerificationCodePost**](#apitokeninputverificationcodepost) | **POST** /api/token/input-verification-code | 输入验证码 |
|
||||
| [**apiTokenListGet**](#apitokenlistget) | **GET** /api/token/list | 列出 Token |
|
||||
| [**apiTokenResendVerificationCodePost**](#apitokenresendverificationcodepost) | **POST** /api/token/resend-verification-code | 重新发送验证码 |
|
||||
| [**apiTokenUpdatePost**](#apitokenupdatepost) | **POST** /api/token/update | 修改 Token |
|
||||
|
||||
# **apiCardBindingListByTokenGet**
|
||||
|
||||
@@ -207,6 +209,56 @@ No authorization required
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **apiTokenInputVerificationCodePost**
|
||||
|
||||
> KamiApiCamelOilV1InputVerificationCodeRes apiTokenInputVerificationCodePost()
|
||||
|
||||
### Example
|
||||
|
||||
```typescript
|
||||
import {
|
||||
JDV2TokenManagementApi,
|
||||
Configuration,
|
||||
KamiApiCamelOilV1InputVerificationCodeReq
|
||||
} from './api';
|
||||
|
||||
const configuration = new Configuration();
|
||||
const apiInstance = new JDV2TokenManagementApi(configuration);
|
||||
|
||||
let kamiApiCamelOilV1InputVerificationCodeReq: KamiApiCamelOilV1InputVerificationCodeReq; // (optional)
|
||||
|
||||
const { status, data } = await apiInstance.apiTokenInputVerificationCodePost(
|
||||
kamiApiCamelOilV1InputVerificationCodeReq
|
||||
);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| --------------------------------------------- | --------------------------------------------- | ----------- | ----- |
|
||||
| **kamiApiCamelOilV1InputVerificationCodeReq** | **KamiApiCamelOilV1InputVerificationCodeReq** | | |
|
||||
|
||||
### Return type
|
||||
|
||||
**KamiApiCamelOilV1InputVerificationCodeRes**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
| ----------- | ----------- | ---------------- |
|
||||
| **200** | | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **apiTokenListGet**
|
||||
|
||||
> KamiApiCamelOilV1ListTokensRes apiTokenListGet()
|
||||
@@ -221,25 +273,25 @@ const apiInstance = new JDV2TokenManagementApi(configuration);
|
||||
|
||||
let current: number; //页数 (default to undefined)
|
||||
let pageSize: 5 | 10 | 15 | 20 | 50 | 100; //页码 (default to undefined)
|
||||
let tokenName: string; //Token名称 (optional) (default to undefined)
|
||||
let status: number; //状态 (optional) (default to undefined)
|
||||
let name: string; //Token名称 (optional) (default to undefined)
|
||||
let status: 1 | 5 | 2 | 3 | 4 | 0 | 6; //状态 (optional) (default to undefined)
|
||||
|
||||
const { status, data } = await apiInstance.apiTokenListGet(
|
||||
current,
|
||||
pageSize,
|
||||
tokenName,
|
||||
name,
|
||||
status
|
||||
);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------ | ----------- | -------------------------------- | --- | --- | ----------------------------------------------------------------------- | ---- | --------------------- |
|
||||
| **current** | [**number**] | 页数 | defaults to undefined |
|
||||
| **pageSize** | [\*\*5 | 10 | 15 | 20 | 50 | 100**]**Array<5 | 10 | 15 | 20 | 50 | 100>\*\* | 页码 | defaults to undefined |
|
||||
| **tokenName** | [**string**] | Token名称 | (optional) defaults to undefined |
|
||||
| **status** | [**number**] | 状态 | (optional) defaults to undefined |
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ------------ | ----------- | -------------------------------- | --- | --- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------ | --------------------- | -------------------------------- |
|
||||
| **current** | [**number**] | 页数 | defaults to undefined |
|
||||
| **pageSize** | [\*\*5 | 10 | 15 | 20 | 50 | 100**]**Array<5 | 10 | 15 | 20 | 50 | 100>\*\* | 页码 | defaults to undefined |
|
||||
| **name** | [**string**] | Token名称 | (optional) defaults to undefined |
|
||||
| **status** | [\*\*1 | 5 | 2 | 3 | 4 | 0 | 6**]**Array<1 | 5 | 2 | 3 | 4 | 0 | 6>\*\* | 状态 | (optional) defaults to undefined |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -262,6 +314,56 @@ No authorization required
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **apiTokenResendVerificationCodePost**
|
||||
|
||||
> KamiApiCamelOilV1ResendVerificationCodeRes apiTokenResendVerificationCodePost()
|
||||
|
||||
### Example
|
||||
|
||||
```typescript
|
||||
import {
|
||||
JDV2TokenManagementApi,
|
||||
Configuration,
|
||||
KamiApiCamelOilV1ResendVerificationCodeReq
|
||||
} from './api';
|
||||
|
||||
const configuration = new Configuration();
|
||||
const apiInstance = new JDV2TokenManagementApi(configuration);
|
||||
|
||||
let kamiApiCamelOilV1ResendVerificationCodeReq: KamiApiCamelOilV1ResendVerificationCodeReq; // (optional)
|
||||
|
||||
const { status, data } = await apiInstance.apiTokenResendVerificationCodePost(
|
||||
kamiApiCamelOilV1ResendVerificationCodeReq
|
||||
);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ---------------------------------------------- | ---------------------------------------------- | ----------- | ----- |
|
||||
| **kamiApiCamelOilV1ResendVerificationCodeReq** | **KamiApiCamelOilV1ResendVerificationCodeReq** | | |
|
||||
|
||||
### Return type
|
||||
|
||||
**KamiApiCamelOilV1ResendVerificationCodeRes**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
| ----------- | ----------- | ---------------- |
|
||||
| **200** | | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **apiTokenUpdatePost**
|
||||
|
||||
> KamiApiCamelOilV1UpdateTokenRes apiTokenUpdatePost()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| ---------------- | ---------- | ----------- | --------------------------------- |
|
||||
| **id** | **number** | 绑定记录ID | [optional] [default to undefined] |
|
||||
| **tokenId** | **number** | Token ID | [optional] [default to undefined] |
|
||||
| **tokenName** | **string** | Token名称 | [optional] [default to undefined] |
|
||||
| **name** | **string** | Token名称 | [optional] [default to undefined] |
|
||||
| **orderId** | **number** | 订单ID | [optional] [default to undefined] |
|
||||
| **cardNumber** | **string** | 卡号 | [optional] [default to undefined] |
|
||||
| **cardPassword** | **string** | 卡密 | [optional] [default to undefined] |
|
||||
@@ -21,7 +21,7 @@ import { KamiApiCamelOilV1CardBindingInfo } from './api';
|
||||
const instance: KamiApiCamelOilV1CardBindingInfo = {
|
||||
id,
|
||||
tokenId,
|
||||
tokenName,
|
||||
name,
|
||||
orderId,
|
||||
cardNumber,
|
||||
cardPassword,
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ----------------------- | ---------- | ------------ | --------------------------------- |
|
||||
| **tokenName** | **string** | Token名称 | [default to undefined] |
|
||||
| **tokenValue** | **string** | Token值 | [default to undefined] |
|
||||
| **phone** | **string** | 绑定的手机号 | [optional] [default to undefined] |
|
||||
| **name** | **string** | Token名称 | [default to undefined] |
|
||||
| **phone** | **string** | 绑定的手机号 | [default to undefined] |
|
||||
| **remark** | **string** | 备注 | [optional] [default to undefined] |
|
||||
| **rechargeLimitAmount** | **number** | 充值金额限制 | [default to undefined] |
|
||||
| **rechargeLimitCount** | **number** | 充值次数限制 | [default to undefined] |
|
||||
@@ -17,8 +16,7 @@
|
||||
import { KamiApiCamelOilV1CreateTokenReq } from './api';
|
||||
|
||||
const instance: KamiApiCamelOilV1CreateTokenReq = {
|
||||
tokenName,
|
||||
tokenValue,
|
||||
name,
|
||||
phone,
|
||||
remark,
|
||||
rechargeLimitAmount,
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# KamiApiCamelOilV1InputVerificationCodeReq
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ----------- | ---------- | ----------- | ---------------------- |
|
||||
| **tokenId** | **number** | Token ID | [default to undefined] |
|
||||
| **code** | **string** | 验证码 | [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import { KamiApiCamelOilV1InputVerificationCodeReq } from './api';
|
||||
|
||||
const instance: KamiApiCamelOilV1InputVerificationCodeReq = {
|
||||
tokenId,
|
||||
code
|
||||
};
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
@@ -0,0 +1,19 @@
|
||||
# KamiApiCamelOilV1InputVerificationCodeRes
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ----------- | ---------- | ----------- | --------------------------------- |
|
||||
| **message** | **string** | 信息 | [optional] [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import { KamiApiCamelOilV1InputVerificationCodeRes } from './api';
|
||||
|
||||
const instance: KamiApiCamelOilV1InputVerificationCodeRes = {
|
||||
message
|
||||
};
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ---------- | ----------- | --------------------------------- |
|
||||
| **current** | **number** | 页数 | [default to undefined] |
|
||||
| **pageSize** | **number** | 页码 | [default to undefined] |
|
||||
| **tokenName** | **string** | Token名称 | [optional] [default to undefined] |
|
||||
| **status** | **number** | 状态 | [optional] [default to undefined] |
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ---------- | ----------- | --------------------------------- |
|
||||
| **current** | **number** | 页数 | [default to undefined] |
|
||||
| **pageSize** | **number** | 页码 | [default to undefined] |
|
||||
| **name** | **string** | Token名称 | [optional] [default to undefined] |
|
||||
| **status** | **number** | 状态 | [optional] [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
@@ -17,7 +17,7 @@ import { KamiApiCamelOilV1ListTokensReq } from './api';
|
||||
const instance: KamiApiCamelOilV1ListTokensReq = {
|
||||
current,
|
||||
pageSize,
|
||||
tokenName,
|
||||
name,
|
||||
status
|
||||
};
|
||||
```
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# KamiApiCamelOilV1ResendVerificationCodeReq
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ----------- | ---------- | ----------- | ---------------------- |
|
||||
| **tokenId** | **number** | Token ID | [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import { KamiApiCamelOilV1ResendVerificationCodeReq } from './api';
|
||||
|
||||
const instance: KamiApiCamelOilV1ResendVerificationCodeReq = {
|
||||
tokenId
|
||||
};
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
@@ -0,0 +1,19 @@
|
||||
# KamiApiCamelOilV1ResendVerificationCodeRes
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ----------- | ---------- | ----------- | --------------------------------- |
|
||||
| **message** | **string** | 信息 | [optional] [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import { KamiApiCamelOilV1ResendVerificationCodeRes } from './api';
|
||||
|
||||
const instance: KamiApiCamelOilV1ResendVerificationCodeRes = {
|
||||
message
|
||||
};
|
||||
```
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
@@ -6,8 +6,8 @@
|
||||
| ----------------------- | ---------- | ------------------------------ | --------------------------------- |
|
||||
| **id** | **number** | Token ID | [optional] [default to undefined] |
|
||||
| **userId** | **string** | 用户ID,空字符串表示管理员创建 | [optional] [default to undefined] |
|
||||
| **tokenName** | **string** | Token名称 | [optional] [default to undefined] |
|
||||
| **tokenValue** | **string** | Token值 | [optional] [default to undefined] |
|
||||
| **name** | **string** | Token名称 | [optional] [default to undefined] |
|
||||
| **loginToken** | **string** | 登录Token | [optional] [default to undefined] |
|
||||
| **phone** | **string** | 绑定的手机号 | [optional] [default to undefined] |
|
||||
| **status** | **number** | 状态 | [optional] [default to undefined] |
|
||||
| **bindCount** | **number** | 已绑定卡密数量 | [optional] [default to undefined] |
|
||||
@@ -29,8 +29,8 @@ import { KamiApiCamelOilV1TokenInfo } from './api';
|
||||
const instance: KamiApiCamelOilV1TokenInfo = {
|
||||
id,
|
||||
userId,
|
||||
tokenName,
|
||||
tokenValue,
|
||||
name,
|
||||
loginToken,
|
||||
phone,
|
||||
status,
|
||||
bindCount,
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
| Name | Type | Description | Notes |
|
||||
| ----------------------- | ---------- | ------------ | --------------------------------- |
|
||||
| **tokenId** | **number** | Token ID | [default to undefined] |
|
||||
| **tokenName** | **string** | Token名称 | [default to undefined] |
|
||||
| **phone** | **string** | 绑定的手机号 | [optional] [default to undefined] |
|
||||
| **name** | **string** | Token名称 | [default to undefined] |
|
||||
| **remark** | **string** | 备注 | [optional] [default to undefined] |
|
||||
| **rechargeLimitAmount** | **number** | 充值金额限制 | [default to undefined] |
|
||||
| **rechargeLimitCount** | **number** | 充值次数限制 | [default to undefined] |
|
||||
@@ -18,8 +17,7 @@ import { KamiApiCamelOilV1UpdateTokenReq } from './api';
|
||||
|
||||
const instance: KamiApiCamelOilV1UpdateTokenReq = {
|
||||
tokenId,
|
||||
tokenName,
|
||||
phone,
|
||||
name,
|
||||
remark,
|
||||
rechargeLimitAmount,
|
||||
rechargeLimitCount
|
||||
|
||||
@@ -25,6 +25,8 @@ export * from './kami-api-camel-oil-v1-get-prefetch-order-logs-res';
|
||||
export * from './kami-api-camel-oil-v1-get-settings-res';
|
||||
export * from './kami-api-camel-oil-v1-get-token-req';
|
||||
export * from './kami-api-camel-oil-v1-get-token-res';
|
||||
export * from './kami-api-camel-oil-v1-input-verification-code-req';
|
||||
export * from './kami-api-camel-oil-v1-input-verification-code-res';
|
||||
export * from './kami-api-camel-oil-v1-list-account-req';
|
||||
export * from './kami-api-camel-oil-v1-list-account-res';
|
||||
export * from './kami-api-camel-oil-v1-list-card-bindings-by-token-req';
|
||||
@@ -47,6 +49,8 @@ export * from './kami-api-camel-oil-v1-order-history-res';
|
||||
export * from './kami-api-camel-oil-v1-order-list-item';
|
||||
export * from './kami-api-camel-oil-v1-prefetch-order-list-item';
|
||||
export * from './kami-api-camel-oil-v1-prefetch-order-log-item';
|
||||
export * from './kami-api-camel-oil-v1-resend-verification-code-req';
|
||||
export * from './kami-api-camel-oil-v1-resend-verification-code-res';
|
||||
export * from './kami-api-camel-oil-v1-submit-order-req';
|
||||
export * from './kami-api-camel-oil-v1-submit-order-res';
|
||||
export * from './kami-api-camel-oil-v1-token-info';
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface KamiApiCamelOilV1CardBindingInfo {
|
||||
/**
|
||||
* Token名称
|
||||
*/
|
||||
tokenName?: string;
|
||||
name?: string;
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
|
||||
@@ -16,15 +16,11 @@ export interface KamiApiCamelOilV1CreateTokenReq {
|
||||
/**
|
||||
* Token名称
|
||||
*/
|
||||
tokenName: string;
|
||||
/**
|
||||
* Token值
|
||||
*/
|
||||
tokenValue: string;
|
||||
name: string;
|
||||
/**
|
||||
* 绑定的手机号
|
||||
*/
|
||||
phone?: string;
|
||||
phone: string;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface KamiApiCamelOilV1InputVerificationCodeReq {
|
||||
/**
|
||||
* Token ID
|
||||
*/
|
||||
tokenId: number;
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
code: string;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface KamiApiCamelOilV1InputVerificationCodeRes {
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
message?: string;
|
||||
}
|
||||
@@ -24,11 +24,11 @@ export interface KamiApiCamelOilV1ListTokensReq {
|
||||
/**
|
||||
* Token名称
|
||||
*/
|
||||
tokenName?: string;
|
||||
name?: string;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status?: number;
|
||||
status?: KamiApiCamelOilV1ListTokensReqStatusEnum;
|
||||
}
|
||||
|
||||
export enum KamiApiCamelOilV1ListTokensReqPageSizeEnum {
|
||||
@@ -39,3 +39,12 @@ export enum KamiApiCamelOilV1ListTokensReqPageSizeEnum {
|
||||
NUMBER_50 = 50,
|
||||
NUMBER_100 = 100
|
||||
}
|
||||
export enum KamiApiCamelOilV1ListTokensReqStatusEnum {
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_5 = 5,
|
||||
NUMBER_2 = 2,
|
||||
NUMBER_3 = 3,
|
||||
NUMBER_4 = 4,
|
||||
NUMBER_0 = 0,
|
||||
NUMBER_6 = 6
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface KamiApiCamelOilV1ResendVerificationCodeReq {
|
||||
/**
|
||||
* Token ID
|
||||
*/
|
||||
tokenId: number;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface KamiApiCamelOilV1ResendVerificationCodeRes {
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
message?: string;
|
||||
}
|
||||
@@ -24,11 +24,11 @@ export interface KamiApiCamelOilV1TokenInfo {
|
||||
/**
|
||||
* Token名称
|
||||
*/
|
||||
tokenName?: string;
|
||||
name?: string;
|
||||
/**
|
||||
* Token值
|
||||
* 登录Token
|
||||
*/
|
||||
tokenValue?: string;
|
||||
loginToken?: string;
|
||||
/**
|
||||
* 绑定的手机号
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ export interface KamiApiCamelOilV1TokenInfo {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status?: number;
|
||||
status?: KamiApiCamelOilV1TokenInfoStatusEnum;
|
||||
/**
|
||||
* 已绑定卡密数量
|
||||
*/
|
||||
@@ -78,3 +78,13 @@ export interface KamiApiCamelOilV1TokenInfo {
|
||||
*/
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export enum KamiApiCamelOilV1TokenInfoStatusEnum {
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_5 = 5,
|
||||
NUMBER_2 = 2,
|
||||
NUMBER_3 = 3,
|
||||
NUMBER_4 = 4,
|
||||
NUMBER_0 = 0,
|
||||
NUMBER_6 = 6
|
||||
}
|
||||
|
||||
@@ -20,11 +20,7 @@ export interface KamiApiCamelOilV1UpdateTokenReq {
|
||||
/**
|
||||
* Token名称
|
||||
*/
|
||||
tokenName: string;
|
||||
/**
|
||||
* 绑定的手机号
|
||||
*/
|
||||
phone?: string;
|
||||
name: string;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,7 @@ export interface KamiApiCardInfoWalmartV1OrderSummaryRecord {
|
||||
export enum KamiApiCardInfoWalmartV1OrderSummaryRecordCategoryEnum {
|
||||
Apple = 'apple',
|
||||
CTrip = 'cTrip',
|
||||
CamelOil = 'camelOil',
|
||||
Jd = 'jd',
|
||||
OriginalJd = 'originalJD',
|
||||
Walmart = 'walmart'
|
||||
|
||||
@@ -20,6 +20,7 @@ export interface KamiApiSysUserV1ChannelType {
|
||||
export enum KamiApiSysUserV1ChannelTypeChannelNameEnum {
|
||||
Apple = 'apple',
|
||||
CTrip = 'cTrip',
|
||||
CamelOil = 'camelOil',
|
||||
Jd = 'jd',
|
||||
OriginalJd = 'originalJD',
|
||||
Walmart = 'walmart'
|
||||
|
||||
@@ -14,29 +14,16 @@
|
||||
:wrapper-col-props="{ span: 18 }"
|
||||
label-align="left"
|
||||
>
|
||||
<a-form-item field="tokenName" label="Token名称" required>
|
||||
<a-form-item field="name" label="账户名称" required>
|
||||
<a-input
|
||||
v-model="formModel.tokenName"
|
||||
placeholder="请输入Token名称"
|
||||
v-model="formModel.name"
|
||||
placeholder="请输入账户名称"
|
||||
:max-length="100"
|
||||
show-word-limit
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="!isEditMode"
|
||||
field="tokenValue"
|
||||
label="Token值"
|
||||
required
|
||||
>
|
||||
<a-textarea
|
||||
v-model="formModel.tokenValue"
|
||||
placeholder="请输入Token值"
|
||||
:max-length="1000"
|
||||
:auto-size="{ minRows: 3, maxRows: 6 }"
|
||||
show-word-limit
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="phone" label="绑定手机号" required>
|
||||
<!-- 只有新增时才显示手机号字段 -->
|
||||
<a-form-item v-if="!isEditMode" field="phone" label="绑定手机号" required>
|
||||
<a-input
|
||||
v-model="formModel.phone"
|
||||
placeholder="请输入绑定的手机号"
|
||||
@@ -106,8 +93,7 @@ const formRef = ref<FormInstance>();
|
||||
const generateFormModel = () => {
|
||||
return {
|
||||
tokenId: 0,
|
||||
tokenName: '',
|
||||
tokenValue: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
remark: '',
|
||||
rechargeLimitAmount: 0,
|
||||
@@ -118,17 +104,23 @@ const generateFormModel = () => {
|
||||
const formModel = reactive(generateFormModel());
|
||||
|
||||
const rules = computed(() => ({
|
||||
tokenName: [
|
||||
{ required: true, message: '请输入Token名称' },
|
||||
{ min: 1, max: 100, message: 'Token名称长度为1-100个字符' }
|
||||
],
|
||||
tokenValue: [
|
||||
{ required: !isEditMode.value, message: '请输入Token值' },
|
||||
{ min: 1, max: 1000, message: 'Token值长度为1-1000个字符' }
|
||||
name: [
|
||||
{ required: true, message: '请输入账户名称' },
|
||||
{ min: 1, max: 100, message: '账户名称长度为1-100个字符' }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '请输入绑定手机号' },
|
||||
{ match: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' }
|
||||
{
|
||||
required: !isEditMode.value,
|
||||
validator: (value: string, callback: (error?: string) => void) => {
|
||||
if (!isEditMode.value && !value) {
|
||||
callback('请输入绑定手机号');
|
||||
} else if (!isEditMode.value && !/^1[3-9]\d{9}$/.test(value)) {
|
||||
callback('请输入正确的手机号码');
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
remark: [{ max: 500, message: '备注长度不能超过500个字符' }],
|
||||
rechargeLimitAmount: [
|
||||
@@ -149,8 +141,7 @@ watch(
|
||||
if (editData && isEditMode.value) {
|
||||
// 编辑模式,填充现有数据
|
||||
Object.assign(formModel, {
|
||||
tokenName: editData.tokenName || '',
|
||||
tokenValue: editData.tokenValue || '',
|
||||
name: editData.name || '',
|
||||
phone: editData.phone || '',
|
||||
remark: editData.remark || '',
|
||||
rechargeLimitAmount: editData.rechargeLimitAmount || 0,
|
||||
@@ -178,12 +169,11 @@ const handleBeforeOk = async () => {
|
||||
}
|
||||
|
||||
if (isEditMode.value) {
|
||||
// 编辑Token
|
||||
// 编辑账户
|
||||
await jdV2TokenClient.apiTokenUpdatePost({
|
||||
kamiApiCamelOilV1UpdateTokenReq: {
|
||||
tokenId: formModel.tokenId,
|
||||
tokenName: formModel.tokenName,
|
||||
phone: formModel.phone,
|
||||
name: formModel.name,
|
||||
remark: formModel.remark,
|
||||
rechargeLimitAmount: formModel.rechargeLimitAmount,
|
||||
rechargeLimitCount: formModel.rechargeLimitCount
|
||||
@@ -191,15 +181,14 @@ const handleBeforeOk = async () => {
|
||||
});
|
||||
|
||||
Notification.success({
|
||||
content: '编辑Token成功',
|
||||
content: '编辑账户成功',
|
||||
closable: true
|
||||
});
|
||||
} else {
|
||||
// 新增Token
|
||||
// 新增账户
|
||||
await jdV2TokenClient.apiTokenCreatePost({
|
||||
kamiApiCamelOilV1CreateTokenReq: {
|
||||
tokenName: formModel.tokenName,
|
||||
tokenValue: formModel.tokenValue,
|
||||
name: formModel.name,
|
||||
phone: formModel.phone,
|
||||
remark: formModel.remark,
|
||||
rechargeLimitAmount: formModel.rechargeLimitAmount,
|
||||
@@ -208,7 +197,7 @@ const handleBeforeOk = async () => {
|
||||
});
|
||||
|
||||
Notification.success({
|
||||
content: '新增Token成功',
|
||||
content: '新增账户成功',
|
||||
closable: true
|
||||
});
|
||||
}
|
||||
@@ -218,9 +207,9 @@ const handleBeforeOk = async () => {
|
||||
return true;
|
||||
} catch (err) {
|
||||
const action = isEditMode.value ? '编辑' : '新增';
|
||||
console.error(`${action}Token失败:`, err);
|
||||
console.error(`${action}账户失败:`, err);
|
||||
Notification.error({
|
||||
content: `${action}Token失败`,
|
||||
content: `${action}账户失败`,
|
||||
closable: true
|
||||
});
|
||||
return false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:visible="modalVisible"
|
||||
:title="`Token绑卡记录 - ${tokenName}`"
|
||||
:title="`账户绑卡记录 - ${tokenName}`"
|
||||
width="90%"
|
||||
:footer="false"
|
||||
@cancel="handleCancel"
|
||||
@@ -237,13 +237,13 @@ const columns: TableColumnData[] = [
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: 'Token ID',
|
||||
title: '账户 ID',
|
||||
dataIndex: 'tokenId',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: 'Token名称',
|
||||
dataIndex: 'tokenName',
|
||||
title: '账户名称',
|
||||
dataIndex: 'name',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="8">
|
||||
<a-form-item field="tokenName" label="Token名称">
|
||||
<a-form-item field="name" label="账户名称">
|
||||
<a-input
|
||||
v-model="formModel.tokenName"
|
||||
placeholder="请输入Token名称"
|
||||
v-model="formModel.name"
|
||||
placeholder="请输入账户名称"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -27,8 +27,13 @@
|
||||
placeholder="请选择状态"
|
||||
allow-clear
|
||||
>
|
||||
<a-option :value="0">禁用</a-option>
|
||||
<a-option :value="1">启用</a-option>
|
||||
<a-option :value="0">待验证码</a-option>
|
||||
<a-option :value="1">已登录</a-option>
|
||||
<a-option :value="2">已禁用</a-option>
|
||||
<a-option :value="3">已过期</a-option>
|
||||
<a-option :value="4">登录失败</a-option>
|
||||
<a-option :value="5">验证码已发送</a-option>
|
||||
<a-option :value="6">验证码验证失败</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -173,13 +178,13 @@ const columns: TableColumnData[] = [
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Token名称',
|
||||
dataIndex: 'tokenName',
|
||||
title: '账户名称',
|
||||
dataIndex: 'name',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: 'Token值',
|
||||
dataIndex: 'tokenValue',
|
||||
title: '登录Token',
|
||||
dataIndex: 'loginToken',
|
||||
width: 300,
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
@@ -283,7 +288,7 @@ const columns: TableColumnData[] = [
|
||||
|
||||
const generateFormModel = () => {
|
||||
return {
|
||||
tokenName: '',
|
||||
name: '',
|
||||
status: undefined as number | undefined
|
||||
};
|
||||
};
|
||||
@@ -305,7 +310,7 @@ const fetchData = async (params: any = { current: 1, pageSize: 50 }) => {
|
||||
const { data } = await jdV2TokenClient.apiTokenListGet({
|
||||
current: params.current,
|
||||
pageSize: params.pageSize as unknown as ApiTokenListGetPageSizeEnum,
|
||||
tokenName: params.tokenName,
|
||||
name: params.name,
|
||||
status: params.status
|
||||
});
|
||||
|
||||
@@ -314,9 +319,9 @@ const fetchData = async (params: any = { current: 1, pageSize: 50 }) => {
|
||||
pagination.pageSize = params.pageSize;
|
||||
pagination.total = data.total || 0;
|
||||
} catch (err) {
|
||||
console.error('获取Token列表失败:', err);
|
||||
console.error('获取账户列表失败:', err);
|
||||
Notification.error({
|
||||
content: '获取Token列表失败',
|
||||
content: '获取账户列表失败',
|
||||
closable: true
|
||||
});
|
||||
} finally {
|
||||
@@ -350,7 +355,7 @@ const showAddModal = () => {
|
||||
|
||||
const showBindingRecords = (record: KamiApiCamelOilV1TokenInfo) => {
|
||||
state.currentTokenId = record.id;
|
||||
state.currentTokenName = record.tokenName;
|
||||
state.currentTokenName = record.name;
|
||||
state.bindingRecordsVisible = true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user