feat(token): 新增输入验证码和重新发送验证码接口

- 添加输入验证码接口及请求和响应模型
- 添加重新发送验证码接口及请求和响应模型
- 调整Token相关接口及模型中的字段名tokenName为name
- 更新Token列表接口查询参数tokenName为name,status类型调整为枚举
- 维护API文档,补充新增接口的详细说明和示例
- 更新相关类型定义,完善请求参数接口和响应接口
- 修正部分模型字段名以统一接口字段规范
This commit is contained in:
danial
2025-12-09 18:47:24 +08:00
parent 2c51071d0d
commit 86a19135a8
27 changed files with 703 additions and 131 deletions

View File

@@ -50,6 +50,8 @@ docs/KamiApiCamelOilV1GetPrefetchOrderLogsRes.md
docs/KamiApiCamelOilV1GetSettingsRes.md docs/KamiApiCamelOilV1GetSettingsRes.md
docs/KamiApiCamelOilV1GetTokenReq.md docs/KamiApiCamelOilV1GetTokenReq.md
docs/KamiApiCamelOilV1GetTokenRes.md docs/KamiApiCamelOilV1GetTokenRes.md
docs/KamiApiCamelOilV1InputVerificationCodeReq.md
docs/KamiApiCamelOilV1InputVerificationCodeRes.md
docs/KamiApiCamelOilV1ListAccountReq.md docs/KamiApiCamelOilV1ListAccountReq.md
docs/KamiApiCamelOilV1ListAccountRes.md docs/KamiApiCamelOilV1ListAccountRes.md
docs/KamiApiCamelOilV1ListCardBindingsByTokenReq.md docs/KamiApiCamelOilV1ListCardBindingsByTokenReq.md
@@ -72,6 +74,8 @@ docs/KamiApiCamelOilV1OrderHistoryRes.md
docs/KamiApiCamelOilV1OrderListItem.md docs/KamiApiCamelOilV1OrderListItem.md
docs/KamiApiCamelOilV1PrefetchOrderListItem.md docs/KamiApiCamelOilV1PrefetchOrderListItem.md
docs/KamiApiCamelOilV1PrefetchOrderLogItem.md docs/KamiApiCamelOilV1PrefetchOrderLogItem.md
docs/KamiApiCamelOilV1ResendVerificationCodeReq.md
docs/KamiApiCamelOilV1ResendVerificationCodeRes.md
docs/KamiApiCamelOilV1SubmitOrderReq.md docs/KamiApiCamelOilV1SubmitOrderReq.md
docs/KamiApiCamelOilV1SubmitOrderRes.md docs/KamiApiCamelOilV1SubmitOrderRes.md
docs/KamiApiCamelOilV1TokenInfo.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-settings-res.ts
models/kami-api-camel-oil-v1-get-token-req.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-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-req.ts
models/kami-api-camel-oil-v1-list-account-res.ts models/kami-api-camel-oil-v1-list-account-res.ts
models/kami-api-camel-oil-v1-list-card-bindings-by-token-req.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-order-list-item.ts
models/kami-api-camel-oil-v1-prefetch-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-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-req.ts
models/kami-api-camel-oil-v1-submit-order-res.ts models/kami-api-camel-oil-v1-submit-order-res.ts
models/kami-api-camel-oil-v1-token-info.ts models/kami-api-camel-oil-v1-token-info.ts

View File

@@ -49,10 +49,18 @@ import type { KamiApiCamelOilV1DeleteTokenRes } from '../models';
// @ts-ignore // @ts-ignore
import type { KamiApiCamelOilV1GetTokenRes } from '../models'; import type { KamiApiCamelOilV1GetTokenRes } from '../models';
// @ts-ignore // @ts-ignore
import type { KamiApiCamelOilV1InputVerificationCodeReq } from '../models';
// @ts-ignore
import type { KamiApiCamelOilV1InputVerificationCodeRes } from '../models';
// @ts-ignore
import type { KamiApiCamelOilV1ListCardBindingsByTokenRes } from '../models'; import type { KamiApiCamelOilV1ListCardBindingsByTokenRes } from '../models';
// @ts-ignore // @ts-ignore
import type { KamiApiCamelOilV1ListTokensRes } from '../models'; import type { KamiApiCamelOilV1ListTokensRes } from '../models';
// @ts-ignore // @ts-ignore
import type { KamiApiCamelOilV1ResendVerificationCodeReq } from '../models';
// @ts-ignore
import type { KamiApiCamelOilV1ResendVerificationCodeRes } from '../models';
// @ts-ignore
import type { KamiApiCamelOilV1UpdateTokenReq } from '../models'; import type { KamiApiCamelOilV1UpdateTokenReq } from '../models';
// @ts-ignore // @ts-ignore
import type { KamiApiCamelOilV1UpdateTokenRes } from '../models'; import type { KamiApiCamelOilV1UpdateTokenRes } from '../models';
@@ -269,21 +277,69 @@ export const JDV2TokenManagementApiAxiosParamCreator = function (
options: localVarRequestOptions 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 * @summary 列出 Token
* @param {number} current 页数 * @param {number} current 页数
* @param {ApiTokenListGetPageSizeEnum} pageSize 页码 * @param {ApiTokenListGetPageSizeEnum} pageSize 页码
* @param {string} [tokenName] Token名称 * @param {string} [name] Token名称
* @param {number} [status] 状态 * @param {ApiTokenListGetStatusEnum} [status] 状态
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
apiTokenListGet: async ( apiTokenListGet: async (
current: number, current: number,
pageSize: ApiTokenListGetPageSizeEnum, pageSize: ApiTokenListGetPageSizeEnum,
tokenName?: string, name?: string,
status?: number, status?: ApiTokenListGetStatusEnum,
options: RawAxiosRequestConfig = {} options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => { ): Promise<RequestArgs> => {
// verify required parameter 'current' is not null or undefined // verify required parameter 'current' is not null or undefined
@@ -314,8 +370,8 @@ export const JDV2TokenManagementApiAxiosParamCreator = function (
localVarQueryParameter['pageSize'] = pageSize; localVarQueryParameter['pageSize'] = pageSize;
} }
if (tokenName !== undefined) { if (name !== undefined) {
localVarQueryParameter['tokenName'] = tokenName; localVarQueryParameter['name'] = name;
} }
if (status !== undefined) { if (status !== undefined) {
@@ -336,6 +392,54 @@ export const JDV2TokenManagementApiAxiosParamCreator = function (
options: localVarRequestOptions 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 * @summary 修改 Token
@@ -537,21 +641,55 @@ export const JDV2TokenManagementApiFp = function (
configuration configuration
)(axios, localVarOperationServerBasePath || basePath); )(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 * @summary 列出 Token
* @param {number} current 页数 * @param {number} current 页数
* @param {ApiTokenListGetPageSizeEnum} pageSize 页码 * @param {ApiTokenListGetPageSizeEnum} pageSize 页码
* @param {string} [tokenName] Token名称 * @param {string} [name] Token名称
* @param {number} [status] 状态 * @param {ApiTokenListGetStatusEnum} [status] 状态
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
async apiTokenListGet( async apiTokenListGet(
current: number, current: number,
pageSize: ApiTokenListGetPageSizeEnum, pageSize: ApiTokenListGetPageSizeEnum,
tokenName?: string, name?: string,
status?: number, status?: ApiTokenListGetStatusEnum,
options?: RawAxiosRequestConfig options?: RawAxiosRequestConfig
): Promise< ): Promise<
( (
@@ -562,7 +700,7 @@ export const JDV2TokenManagementApiFp = function (
const localVarAxiosArgs = await localVarAxiosParamCreator.apiTokenListGet( const localVarAxiosArgs = await localVarAxiosParamCreator.apiTokenListGet(
current, current,
pageSize, pageSize,
tokenName, name,
status, status,
options options
); );
@@ -579,6 +717,40 @@ export const JDV2TokenManagementApiFp = function (
configuration configuration
)(axios, localVarOperationServerBasePath || basePath); )(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 * @summary 修改 Token
@@ -697,6 +869,24 @@ export const JDV2TokenManagementApiFactory = function (
.apiTokenGetGet(requestParameters.tokenId, options) .apiTokenGetGet(requestParameters.tokenId, options)
.then(request => request(axios, basePath)); .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 * @summary 列出 Token
@@ -712,12 +902,30 @@ export const JDV2TokenManagementApiFactory = function (
.apiTokenListGet( .apiTokenListGet(
requestParameters.current, requestParameters.current,
requestParameters.pageSize, requestParameters.pageSize,
requestParameters.tokenName, requestParameters.name,
requestParameters.status, requestParameters.status,
options options
) )
.then(request => request(axios, basePath)); .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 * @summary 修改 Token
@@ -791,6 +999,18 @@ export interface JDV2TokenManagementApiInterface {
options?: RawAxiosRequestConfig options?: RawAxiosRequestConfig
): AxiosPromise<KamiApiCamelOilV1GetTokenRes>; ): 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 * @summary 列出 Token
@@ -803,6 +1023,18 @@ export interface JDV2TokenManagementApiInterface {
options?: RawAxiosRequestConfig options?: RawAxiosRequestConfig
): AxiosPromise<KamiApiCamelOilV1ListTokensRes>; ): 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 * @summary 修改 Token
@@ -860,6 +1092,13 @@ export interface JDV2TokenManagementApiApiTokenGetGetRequest {
readonly tokenId: number; readonly tokenId: number;
} }
/**
* Request parameters for apiTokenInputVerificationCodePost operation in JDV2TokenManagementApi.
*/
export interface JDV2TokenManagementApiApiTokenInputVerificationCodePostRequest {
readonly kamiApiCamelOilV1InputVerificationCodeReq?: KamiApiCamelOilV1InputVerificationCodeReq;
}
/** /**
* Request parameters for apiTokenListGet operation in JDV2TokenManagementApi. * Request parameters for apiTokenListGet operation in JDV2TokenManagementApi.
*/ */
@@ -877,12 +1116,19 @@ export interface JDV2TokenManagementApiApiTokenListGetRequest {
/** /**
* Token名称 * 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)); .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 * @summary 列出 Token
@@ -989,13 +1254,32 @@ export class JDV2TokenManagementApi
.apiTokenListGet( .apiTokenListGet(
requestParameters.current, requestParameters.current,
requestParameters.pageSize, requestParameters.pageSize,
requestParameters.tokenName, requestParameters.name,
requestParameters.status, requestParameters.status,
options options
) )
.then(request => request(this.axios, this.basePath)); .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 * @summary 修改 Token
@@ -1032,3 +1316,12 @@ export enum ApiTokenListGetPageSizeEnum {
NUMBER_50 = 50, NUMBER_50 = 50,
NUMBER_100 = 100 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
}

View File

@@ -2,14 +2,16 @@
All URIs are relative to _http://localhost_ All URIs are relative to _http://localhost_
| Method | HTTP request | Description | | Method | HTTP request | Description |
| ----------------------------------------------------------------- | --------------------------------------- | ------------------- | | ----------------------------------------------------------------------------- | -------------------------------------------- | ------------------- |
| [**apiCardBindingListByTokenGet**](#apicardbindinglistbytokenget) | **GET** /api/card-binding/list-by-token | 查询 Token 绑卡记录 | | [**apiCardBindingListByTokenGet**](#apicardbindinglistbytokenget) | **GET** /api/card-binding/list-by-token | 查询 Token 绑卡记录 |
| [**apiTokenCreatePost**](#apitokencreatepost) | **POST** /api/token/create | 创建 Token | | [**apiTokenCreatePost**](#apitokencreatepost) | **POST** /api/token/create | 创建 Token |
| [**apiTokenDeletePost**](#apitokendeletepost) | **POST** /api/token/delete | 删除 Token | | [**apiTokenDeletePost**](#apitokendeletepost) | **POST** /api/token/delete | 删除 Token |
| [**apiTokenGetGet**](#apitokengetget) | **GET** /api/token/get | 获取 Token 信息 | | [**apiTokenGetGet**](#apitokengetget) | **GET** /api/token/get | 获取 Token 信息 |
| [**apiTokenListGet**](#apitokenlistget) | **GET** /api/token/list | 列出 Token | | [**apiTokenInputVerificationCodePost**](#apitokeninputverificationcodepost) | **POST** /api/token/input-verification-code | 输入验证码 |
| [**apiTokenUpdatePost**](#apitokenupdatepost) | **POST** /api/token/update | 修改 Token | | [**apiTokenListGet**](#apitokenlistget) | **GET** /api/token/list | 列出 Token |
| [**apiTokenResendVerificationCodePost**](#apitokenresendverificationcodepost) | **POST** /api/token/resend-verification-code | 重新发送验证码 |
| [**apiTokenUpdatePost**](#apitokenupdatepost) | **POST** /api/token/update | 修改 Token |
# **apiCardBindingListByTokenGet** # **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) [[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** # **apiTokenListGet**
> KamiApiCamelOilV1ListTokensRes apiTokenListGet() > KamiApiCamelOilV1ListTokensRes apiTokenListGet()
@@ -221,25 +273,25 @@ const apiInstance = new JDV2TokenManagementApi(configuration);
let current: number; //页数 (default to undefined) let current: number; //页数 (default to undefined)
let pageSize: 5 | 10 | 15 | 20 | 50 | 100; //页码 (default to undefined) let pageSize: 5 | 10 | 15 | 20 | 50 | 100; //页码 (default to undefined)
let tokenName: string; //Token名称 (optional) (default to undefined) let name: string; //Token名称 (optional) (default to undefined)
let status: number; //状态 (optional) (default to undefined) let status: 1 | 5 | 2 | 3 | 4 | 0 | 6; //状态 (optional) (default to undefined)
const { status, data } = await apiInstance.apiTokenListGet( const { status, data } = await apiInstance.apiTokenListGet(
current, current,
pageSize, pageSize,
tokenName, name,
status status
); );
``` ```
### Parameters ### Parameters
| Name | Type | Description | Notes | | Name | Type | Description | Notes |
| ------------- | ------------ | ----------- | -------------------------------- | --- | --- | ----------------------------------------------------------------------- | ---- | --------------------- | | ------------ | ------------ | ----------- | -------------------------------- | --- | --- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------ | --------------------- | -------------------------------- |
| **current** | [**number**] | 页数 | defaults to undefined | | **current** | [**number**] | 页数 | defaults to undefined |
| **pageSize** | [\*\*5 | 10 | 15 | 20 | 50 | 100**]**Array<5 &#124; 10 &#124; 15 &#124; 20 &#124; 50 &#124; 100>\*\* | 页码 | defaults to undefined | | **pageSize** | [\*\*5 | 10 | 15 | 20 | 50 | 100**]**Array<5 &#124; 10 &#124; 15 &#124; 20 &#124; 50 &#124; 100>\*\* | 页码 | defaults to undefined |
| **tokenName** | [**string**] | Token名称 | (optional) defaults to undefined | | **name** | [**string**] | Token名称 | (optional) defaults to undefined |
| **status** | [**number**] | 状态 | (optional) defaults to undefined | | **status** | [\*\*1 | 5 | 2 | 3 | 4 | 0 | 6**]**Array<1 &#124; 5 &#124; 2 &#124; 3 &#124; 4 &#124; 0 &#124; 6>\*\* | 状态 | (optional) defaults to undefined |
### Return type ### 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) [[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** # **apiTokenUpdatePost**
> KamiApiCamelOilV1UpdateTokenRes apiTokenUpdatePost() > KamiApiCamelOilV1UpdateTokenRes apiTokenUpdatePost()

View File

@@ -6,7 +6,7 @@
| ---------------- | ---------- | ----------- | --------------------------------- | | ---------------- | ---------- | ----------- | --------------------------------- |
| **id** | **number** | 绑定记录ID | [optional] [default to undefined] | | **id** | **number** | 绑定记录ID | [optional] [default to undefined] |
| **tokenId** | **number** | Token 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] | | **orderId** | **number** | 订单ID | [optional] [default to undefined] |
| **cardNumber** | **string** | 卡号 | [optional] [default to undefined] | | **cardNumber** | **string** | 卡号 | [optional] [default to undefined] |
| **cardPassword** | **string** | 卡密 | [optional] [default to undefined] | | **cardPassword** | **string** | 卡密 | [optional] [default to undefined] |
@@ -21,7 +21,7 @@ import { KamiApiCamelOilV1CardBindingInfo } from './api';
const instance: KamiApiCamelOilV1CardBindingInfo = { const instance: KamiApiCamelOilV1CardBindingInfo = {
id, id,
tokenId, tokenId,
tokenName, name,
orderId, orderId,
cardNumber, cardNumber,
cardPassword, cardPassword,

View File

@@ -4,9 +4,8 @@
| Name | Type | Description | Notes | | Name | Type | Description | Notes |
| ----------------------- | ---------- | ------------ | --------------------------------- | | ----------------------- | ---------- | ------------ | --------------------------------- |
| **tokenName** | **string** | Token名称 | [default to undefined] | | **name** | **string** | Token名称 | [default to undefined] |
| **tokenValue** | **string** | Token值 | [default to undefined] | | **phone** | **string** | 绑定的手机号 | [default to undefined] |
| **phone** | **string** | 绑定的手机号 | [optional] [default to undefined] |
| **remark** | **string** | 备注 | [optional] [default to undefined] | | **remark** | **string** | 备注 | [optional] [default to undefined] |
| **rechargeLimitAmount** | **number** | 充值金额限制 | [default to undefined] | | **rechargeLimitAmount** | **number** | 充值金额限制 | [default to undefined] |
| **rechargeLimitCount** | **number** | 充值次数限制 | [default to undefined] | | **rechargeLimitCount** | **number** | 充值次数限制 | [default to undefined] |
@@ -17,8 +16,7 @@
import { KamiApiCamelOilV1CreateTokenReq } from './api'; import { KamiApiCamelOilV1CreateTokenReq } from './api';
const instance: KamiApiCamelOilV1CreateTokenReq = { const instance: KamiApiCamelOilV1CreateTokenReq = {
tokenName, name,
tokenValue,
phone, phone,
remark, remark,
rechargeLimitAmount, rechargeLimitAmount,

View File

@@ -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)

View File

@@ -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)

View File

@@ -2,12 +2,12 @@
## Properties ## Properties
| Name | Type | Description | Notes | | Name | Type | Description | Notes |
| ------------- | ---------- | ----------- | --------------------------------- | | ------------ | ---------- | ----------- | --------------------------------- |
| **current** | **number** | 页数 | [default to undefined] | | **current** | **number** | 页数 | [default to undefined] |
| **pageSize** | **number** | 页码 | [default to undefined] | | **pageSize** | **number** | 页码 | [default to undefined] |
| **tokenName** | **string** | Token名称 | [optional] [default to undefined] | | **name** | **string** | Token名称 | [optional] [default to undefined] |
| **status** | **number** | 状态 | [optional] [default to undefined] | | **status** | **number** | 状态 | [optional] [default to undefined] |
## Example ## Example
@@ -17,7 +17,7 @@ import { KamiApiCamelOilV1ListTokensReq } from './api';
const instance: KamiApiCamelOilV1ListTokensReq = { const instance: KamiApiCamelOilV1ListTokensReq = {
current, current,
pageSize, pageSize,
tokenName, name,
status status
}; };
``` ```

View File

@@ -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)

View File

@@ -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)

View File

@@ -6,8 +6,8 @@
| ----------------------- | ---------- | ------------------------------ | --------------------------------- | | ----------------------- | ---------- | ------------------------------ | --------------------------------- |
| **id** | **number** | Token ID | [optional] [default to undefined] | | **id** | **number** | Token ID | [optional] [default to undefined] |
| **userId** | **string** | 用户ID空字符串表示管理员创建 | [optional] [default to undefined] | | **userId** | **string** | 用户ID空字符串表示管理员创建 | [optional] [default to undefined] |
| **tokenName** | **string** | Token名称 | [optional] [default to undefined] | | **name** | **string** | Token名称 | [optional] [default to undefined] |
| **tokenValue** | **string** | Token | [optional] [default to undefined] | | **loginToken** | **string** | 登录Token | [optional] [default to undefined] |
| **phone** | **string** | 绑定的手机号 | [optional] [default to undefined] | | **phone** | **string** | 绑定的手机号 | [optional] [default to undefined] |
| **status** | **number** | 状态 | [optional] [default to undefined] | | **status** | **number** | 状态 | [optional] [default to undefined] |
| **bindCount** | **number** | 已绑定卡密数量 | [optional] [default to undefined] | | **bindCount** | **number** | 已绑定卡密数量 | [optional] [default to undefined] |
@@ -29,8 +29,8 @@ import { KamiApiCamelOilV1TokenInfo } from './api';
const instance: KamiApiCamelOilV1TokenInfo = { const instance: KamiApiCamelOilV1TokenInfo = {
id, id,
userId, userId,
tokenName, name,
tokenValue, loginToken,
phone, phone,
status, status,
bindCount, bindCount,

View File

@@ -5,8 +5,7 @@
| Name | Type | Description | Notes | | Name | Type | Description | Notes |
| ----------------------- | ---------- | ------------ | --------------------------------- | | ----------------------- | ---------- | ------------ | --------------------------------- |
| **tokenId** | **number** | Token ID | [default to undefined] | | **tokenId** | **number** | Token ID | [default to undefined] |
| **tokenName** | **string** | Token名称 | [default to undefined] | | **name** | **string** | Token名称 | [default to undefined] |
| **phone** | **string** | 绑定的手机号 | [optional] [default to undefined] |
| **remark** | **string** | 备注 | [optional] [default to undefined] | | **remark** | **string** | 备注 | [optional] [default to undefined] |
| **rechargeLimitAmount** | **number** | 充值金额限制 | [default to undefined] | | **rechargeLimitAmount** | **number** | 充值金额限制 | [default to undefined] |
| **rechargeLimitCount** | **number** | 充值次数限制 | [default to undefined] | | **rechargeLimitCount** | **number** | 充值次数限制 | [default to undefined] |
@@ -18,8 +17,7 @@ import { KamiApiCamelOilV1UpdateTokenReq } from './api';
const instance: KamiApiCamelOilV1UpdateTokenReq = { const instance: KamiApiCamelOilV1UpdateTokenReq = {
tokenId, tokenId,
tokenName, name,
phone,
remark, remark,
rechargeLimitAmount, rechargeLimitAmount,
rechargeLimitCount rechargeLimitCount

View File

@@ -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-settings-res';
export * from './kami-api-camel-oil-v1-get-token-req'; 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-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-req';
export * from './kami-api-camel-oil-v1-list-account-res'; export * from './kami-api-camel-oil-v1-list-account-res';
export * from './kami-api-camel-oil-v1-list-card-bindings-by-token-req'; 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-order-list-item';
export * from './kami-api-camel-oil-v1-prefetch-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-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-req';
export * from './kami-api-camel-oil-v1-submit-order-res'; export * from './kami-api-camel-oil-v1-submit-order-res';
export * from './kami-api-camel-oil-v1-token-info'; export * from './kami-api-camel-oil-v1-token-info';

View File

@@ -24,7 +24,7 @@ export interface KamiApiCamelOilV1CardBindingInfo {
/** /**
* Token名称 * Token名称
*/ */
tokenName?: string; name?: string;
/** /**
* 订单ID * 订单ID
*/ */

View File

@@ -16,15 +16,11 @@ export interface KamiApiCamelOilV1CreateTokenReq {
/** /**
* Token名称 * Token名称
*/ */
tokenName: string; name: string;
/**
* Token值
*/
tokenValue: string;
/** /**
* 绑定的手机号 * 绑定的手机号
*/ */
phone?: string; phone: string;
/** /**
* 备注 * 备注
*/ */

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -24,11 +24,11 @@ export interface KamiApiCamelOilV1ListTokensReq {
/** /**
* Token名称 * Token名称
*/ */
tokenName?: string; name?: string;
/** /**
* 状态 * 状态
*/ */
status?: number; status?: KamiApiCamelOilV1ListTokensReqStatusEnum;
} }
export enum KamiApiCamelOilV1ListTokensReqPageSizeEnum { export enum KamiApiCamelOilV1ListTokensReqPageSizeEnum {
@@ -39,3 +39,12 @@ export enum KamiApiCamelOilV1ListTokensReqPageSizeEnum {
NUMBER_50 = 50, NUMBER_50 = 50,
NUMBER_100 = 100 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
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -24,11 +24,11 @@ export interface KamiApiCamelOilV1TokenInfo {
/** /**
* Token名称 * 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; 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
}

View File

@@ -20,11 +20,7 @@ export interface KamiApiCamelOilV1UpdateTokenReq {
/** /**
* Token名称 * Token名称
*/ */
tokenName: string; name: string;
/**
* 绑定的手机号
*/
phone?: string;
/** /**
* 备注 * 备注
*/ */

View File

@@ -22,6 +22,7 @@ export interface KamiApiCardInfoWalmartV1OrderSummaryRecord {
export enum KamiApiCardInfoWalmartV1OrderSummaryRecordCategoryEnum { export enum KamiApiCardInfoWalmartV1OrderSummaryRecordCategoryEnum {
Apple = 'apple', Apple = 'apple',
CTrip = 'cTrip', CTrip = 'cTrip',
CamelOil = 'camelOil',
Jd = 'jd', Jd = 'jd',
OriginalJd = 'originalJD', OriginalJd = 'originalJD',
Walmart = 'walmart' Walmart = 'walmart'

View File

@@ -20,6 +20,7 @@ export interface KamiApiSysUserV1ChannelType {
export enum KamiApiSysUserV1ChannelTypeChannelNameEnum { export enum KamiApiSysUserV1ChannelTypeChannelNameEnum {
Apple = 'apple', Apple = 'apple',
CTrip = 'cTrip', CTrip = 'cTrip',
CamelOil = 'camelOil',
Jd = 'jd', Jd = 'jd',
OriginalJd = 'originalJD', OriginalJd = 'originalJD',
Walmart = 'walmart' Walmart = 'walmart'

View File

@@ -14,29 +14,16 @@
:wrapper-col-props="{ span: 18 }" :wrapper-col-props="{ span: 18 }"
label-align="left" label-align="left"
> >
<a-form-item field="tokenName" label="Token名称" required> <a-form-item field="name" label="账户名称" required>
<a-input <a-input
v-model="formModel.tokenName" v-model="formModel.name"
placeholder="请输入Token名称" placeholder="请输入账户名称"
:max-length="100" :max-length="100"
show-word-limit show-word-limit
/> />
</a-form-item> </a-form-item>
<a-form-item <!-- 只有新增时才显示手机号字段 -->
v-if="!isEditMode" <a-form-item v-if="!isEditMode" field="phone" label="绑定手机号" required>
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-input <a-input
v-model="formModel.phone" v-model="formModel.phone"
placeholder="请输入绑定的手机号" placeholder="请输入绑定的手机号"
@@ -106,8 +93,7 @@ const formRef = ref<FormInstance>();
const generateFormModel = () => { const generateFormModel = () => {
return { return {
tokenId: 0, tokenId: 0,
tokenName: '', name: '',
tokenValue: '',
phone: '', phone: '',
remark: '', remark: '',
rechargeLimitAmount: 0, rechargeLimitAmount: 0,
@@ -118,17 +104,23 @@ const generateFormModel = () => {
const formModel = reactive(generateFormModel()); const formModel = reactive(generateFormModel());
const rules = computed(() => ({ const rules = computed(() => ({
tokenName: [ name: [
{ required: true, message: '请输入Token名称' }, { required: true, message: '请输入账户名称' },
{ min: 1, max: 100, message: 'Token名称长度为1-100个字符' } { min: 1, max: 100, message: '账户名称长度为1-100个字符' }
],
tokenValue: [
{ required: !isEditMode.value, message: '请输入Token值' },
{ min: 1, max: 1000, message: 'Token值长度为1-1000个字符' }
], ],
phone: [ 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个字符' }], remark: [{ max: 500, message: '备注长度不能超过500个字符' }],
rechargeLimitAmount: [ rechargeLimitAmount: [
@@ -149,8 +141,7 @@ watch(
if (editData && isEditMode.value) { if (editData && isEditMode.value) {
// 编辑模式,填充现有数据 // 编辑模式,填充现有数据
Object.assign(formModel, { Object.assign(formModel, {
tokenName: editData.tokenName || '', name: editData.name || '',
tokenValue: editData.tokenValue || '',
phone: editData.phone || '', phone: editData.phone || '',
remark: editData.remark || '', remark: editData.remark || '',
rechargeLimitAmount: editData.rechargeLimitAmount || 0, rechargeLimitAmount: editData.rechargeLimitAmount || 0,
@@ -178,12 +169,11 @@ const handleBeforeOk = async () => {
} }
if (isEditMode.value) { if (isEditMode.value) {
// 编辑Token // 编辑账户
await jdV2TokenClient.apiTokenUpdatePost({ await jdV2TokenClient.apiTokenUpdatePost({
kamiApiCamelOilV1UpdateTokenReq: { kamiApiCamelOilV1UpdateTokenReq: {
tokenId: formModel.tokenId, tokenId: formModel.tokenId,
tokenName: formModel.tokenName, name: formModel.name,
phone: formModel.phone,
remark: formModel.remark, remark: formModel.remark,
rechargeLimitAmount: formModel.rechargeLimitAmount, rechargeLimitAmount: formModel.rechargeLimitAmount,
rechargeLimitCount: formModel.rechargeLimitCount rechargeLimitCount: formModel.rechargeLimitCount
@@ -191,15 +181,14 @@ const handleBeforeOk = async () => {
}); });
Notification.success({ Notification.success({
content: '编辑Token成功', content: '编辑账户成功',
closable: true closable: true
}); });
} else { } else {
// 新增Token // 新增账户
await jdV2TokenClient.apiTokenCreatePost({ await jdV2TokenClient.apiTokenCreatePost({
kamiApiCamelOilV1CreateTokenReq: { kamiApiCamelOilV1CreateTokenReq: {
tokenName: formModel.tokenName, name: formModel.name,
tokenValue: formModel.tokenValue,
phone: formModel.phone, phone: formModel.phone,
remark: formModel.remark, remark: formModel.remark,
rechargeLimitAmount: formModel.rechargeLimitAmount, rechargeLimitAmount: formModel.rechargeLimitAmount,
@@ -208,7 +197,7 @@ const handleBeforeOk = async () => {
}); });
Notification.success({ Notification.success({
content: '新增Token成功', content: '新增账户成功',
closable: true closable: true
}); });
} }
@@ -218,9 +207,9 @@ const handleBeforeOk = async () => {
return true; return true;
} catch (err) { } catch (err) {
const action = isEditMode.value ? '编辑' : '新增'; const action = isEditMode.value ? '编辑' : '新增';
console.error(`${action}Token失败:`, err); console.error(`${action}账户失败:`, err);
Notification.error({ Notification.error({
content: `${action}Token失败`, content: `${action}账户失败`,
closable: true closable: true
}); });
return false; return false;

View File

@@ -1,7 +1,7 @@
<template> <template>
<a-modal <a-modal
v-model:visible="modalVisible" v-model:visible="modalVisible"
:title="`Token绑卡记录 - ${tokenName}`" :title="`账户绑卡记录 - ${tokenName}`"
width="90%" width="90%"
:footer="false" :footer="false"
@cancel="handleCancel" @cancel="handleCancel"
@@ -237,13 +237,13 @@ const columns: TableColumnData[] = [
width: 100 width: 100
}, },
{ {
title: 'Token ID', title: '账户 ID',
dataIndex: 'tokenId', dataIndex: 'tokenId',
width: 100 width: 100
}, },
{ {
title: 'Token名称', title: '账户名称',
dataIndex: 'tokenName', dataIndex: 'name',
width: 150, width: 150,
ellipsis: true, ellipsis: true,
tooltip: true tooltip: true

View File

@@ -13,10 +13,10 @@
> >
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="8"> <a-col :span="8">
<a-form-item field="tokenName" label="Token名称"> <a-form-item field="name" label="账户名称">
<a-input <a-input
v-model="formModel.tokenName" v-model="formModel.name"
placeholder="请输入Token名称" placeholder="请输入账户名称"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -27,8 +27,13 @@
placeholder="请选择状态" placeholder="请选择状态"
allow-clear allow-clear
> >
<a-option :value="0">禁用</a-option> <a-option :value="0">待验证码</a-option>
<a-option :value="1">启用</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-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -173,13 +178,13 @@ const columns: TableColumnData[] = [
} }
}, },
{ {
title: 'Token名称', title: '账户名称',
dataIndex: 'tokenName', dataIndex: 'name',
width: 150 width: 150
}, },
{ {
title: 'Token', title: '登录Token',
dataIndex: 'tokenValue', dataIndex: 'loginToken',
width: 300, width: 300,
ellipsis: true, ellipsis: true,
tooltip: true tooltip: true
@@ -283,7 +288,7 @@ const columns: TableColumnData[] = [
const generateFormModel = () => { const generateFormModel = () => {
return { return {
tokenName: '', name: '',
status: undefined as number | undefined status: undefined as number | undefined
}; };
}; };
@@ -305,7 +310,7 @@ const fetchData = async (params: any = { current: 1, pageSize: 50 }) => {
const { data } = await jdV2TokenClient.apiTokenListGet({ const { data } = await jdV2TokenClient.apiTokenListGet({
current: params.current, current: params.current,
pageSize: params.pageSize as unknown as ApiTokenListGetPageSizeEnum, pageSize: params.pageSize as unknown as ApiTokenListGetPageSizeEnum,
tokenName: params.tokenName, name: params.name,
status: params.status status: params.status
}); });
@@ -314,9 +319,9 @@ const fetchData = async (params: any = { current: 1, pageSize: 50 }) => {
pagination.pageSize = params.pageSize; pagination.pageSize = params.pageSize;
pagination.total = data.total || 0; pagination.total = data.total || 0;
} catch (err) { } catch (err) {
console.error('获取Token列表失败:', err); console.error('获取账户列表失败:', err);
Notification.error({ Notification.error({
content: '获取Token列表失败', content: '获取账户列表失败',
closable: true closable: true
}); });
} finally { } finally {
@@ -350,7 +355,7 @@ const showAddModal = () => {
const showBindingRecords = (record: KamiApiCamelOilV1TokenInfo) => { const showBindingRecords = (record: KamiApiCamelOilV1TokenInfo) => {
state.currentTokenId = record.id; state.currentTokenId = record.id;
state.currentTokenName = record.tokenName; state.currentTokenName = record.name;
state.bindingRecordsVisible = true; state.bindingRecordsVisible = true;
}; };