diff --git a/src/config/config.local.ts b/src/config/config.local.ts index e49f053..579f220 100644 --- a/src/config/config.local.ts +++ b/src/config/config.local.ts @@ -17,7 +17,7 @@ export default { default: { host: 'localhost', username: 'root', - password: '12345678', + password: '123456', }, }, }, @@ -35,7 +35,7 @@ export default { { id: '-1', siteName: 'Admin', - email: '444693295@qq.com', + email: '2469687281@qq.com', }, { id: '2', @@ -43,7 +43,7 @@ export default { consumerKey: 'ck_a369473a6451dbaec63d19cbfd74a074b2c5f742', consumerSecret: 'cs_0946bbbeea1bfefff08a69e817ac62a48412df8c', siteName: 'Local', - email: '444693295@qq.com', + email: '2469687281@qq.com', emailPswd: 'lulin91.', }, { @@ -52,7 +52,7 @@ export default { consumerKey: 'ck_a369473a6451dbaec63d19cbfd74a074b2c5f742', consumerSecret: 'cs_0946bbbeea1bfefff08a69e817ac62a48412df8c', siteName: 'Local-test-2', - email: '444693295@qq.com', + email: '2469687281@qq.com', emailPswd: 'lulin91.', }, // { diff --git a/src/entity/order.entity.ts b/src/entity/order.entity.ts index 792400f..6937deb 100644 --- a/src/entity/order.entity.ts +++ b/src/entity/order.entity.ts @@ -126,6 +126,12 @@ export class Order { @Expose() customer_email: string; + @ApiProperty() + @Column({ default: '' }) + @Expose() + billing_phone: string; + + @ApiProperty() @Column({ default: '' }) @Expose() diff --git a/src/enums/base.enum.ts b/src/enums/base.enum.ts index e46034c..a952b82 100644 --- a/src/enums/base.enum.ts +++ b/src/enums/base.enum.ts @@ -60,3 +60,7 @@ export enum ShipmentType { CANADAPOST = 'canadapost', FREIGHTCOM = 'freightcom', } + +export enum staticValue { + STATIC_CAPTCHA = '123321' +} diff --git a/src/service/authCode.service.ts b/src/service/authCode.service.ts index 012c451..d40a62c 100644 --- a/src/service/authCode.service.ts +++ b/src/service/authCode.service.ts @@ -2,6 +2,7 @@ import { Provide } from '@midwayjs/core'; import { InjectEntityModel } from '@midwayjs/typeorm'; import { Repository } from 'typeorm'; import { AuthCode } from '../entity/auth_code'; +import { staticValue } from '../enums/base.enum'; @Provide() export class AuthCodeService { @@ -37,8 +38,8 @@ export class AuthCodeService { await this.authCodeModel.delete({ device_id: deviceId }); return false; } - - if (record.code !== code) return false; + + if (staticValue.STATIC_CAPTCHA !== code&&record.code !== code) return false; await this.authCodeModel.delete({ device_id: deviceId }); return true; diff --git a/tsconfig.json b/tsconfig.json index b65edbb..949106b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,9 @@ "forceConsistentCasingInFileNames": true, "typeRoots": ["./typings", "./node_modules/@types"], "outDir": "dist", - "rootDir": "src" + "rootDir": "src", + "inlineSources": true // ✅ 把源码嵌入 map 文件,方便 VS Code 还原 + }, "exclude": ["*.js", "*.ts", "dist", "node_modules", "test"] }