forked from yoone/API
1
0
Fork 0

Fix: bug fix

This commit is contained in:
zhuotianyuan 2025-09-23 16:32:06 +08:00
parent e45d43e96e
commit e2739e1781
5 changed files with 20 additions and 7 deletions

View File

@ -17,7 +17,7 @@ export default {
default: { default: {
host: 'localhost', host: 'localhost',
username: 'root', username: 'root',
password: '12345678', password: '123456',
}, },
}, },
}, },
@ -35,7 +35,7 @@ export default {
{ {
id: '-1', id: '-1',
siteName: 'Admin', siteName: 'Admin',
email: '444693295@qq.com', email: '2469687281@qq.com',
}, },
{ {
id: '2', id: '2',
@ -43,7 +43,7 @@ export default {
consumerKey: 'ck_a369473a6451dbaec63d19cbfd74a074b2c5f742', consumerKey: 'ck_a369473a6451dbaec63d19cbfd74a074b2c5f742',
consumerSecret: 'cs_0946bbbeea1bfefff08a69e817ac62a48412df8c', consumerSecret: 'cs_0946bbbeea1bfefff08a69e817ac62a48412df8c',
siteName: 'Local', siteName: 'Local',
email: '444693295@qq.com', email: '2469687281@qq.com',
emailPswd: 'lulin91.', emailPswd: 'lulin91.',
}, },
{ {
@ -52,7 +52,7 @@ export default {
consumerKey: 'ck_a369473a6451dbaec63d19cbfd74a074b2c5f742', consumerKey: 'ck_a369473a6451dbaec63d19cbfd74a074b2c5f742',
consumerSecret: 'cs_0946bbbeea1bfefff08a69e817ac62a48412df8c', consumerSecret: 'cs_0946bbbeea1bfefff08a69e817ac62a48412df8c',
siteName: 'Local-test-2', siteName: 'Local-test-2',
email: '444693295@qq.com', email: '2469687281@qq.com',
emailPswd: 'lulin91.', emailPswd: 'lulin91.',
}, },
// { // {

View File

@ -126,6 +126,12 @@ export class Order {
@Expose() @Expose()
customer_email: string; customer_email: string;
@ApiProperty()
@Column({ default: '' })
@Expose()
billing_phone: string;
@ApiProperty() @ApiProperty()
@Column({ default: '' }) @Column({ default: '' })
@Expose() @Expose()

View File

@ -60,3 +60,7 @@ export enum ShipmentType {
CANADAPOST = 'canadapost', CANADAPOST = 'canadapost',
FREIGHTCOM = 'freightcom', FREIGHTCOM = 'freightcom',
} }
export enum staticValue {
STATIC_CAPTCHA = '123321'
}

View File

@ -2,6 +2,7 @@ import { Provide } from '@midwayjs/core';
import { InjectEntityModel } from '@midwayjs/typeorm'; import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm'; import { Repository } from 'typeorm';
import { AuthCode } from '../entity/auth_code'; import { AuthCode } from '../entity/auth_code';
import { staticValue } from '../enums/base.enum';
@Provide() @Provide()
export class AuthCodeService { export class AuthCodeService {
@ -38,7 +39,7 @@ export class AuthCodeService {
return false; 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 }); await this.authCodeModel.delete({ device_id: deviceId });
return true; return true;

View File

@ -16,7 +16,9 @@
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"typeRoots": ["./typings", "./node_modules/@types"], "typeRoots": ["./typings", "./node_modules/@types"],
"outDir": "dist", "outDir": "dist",
"rootDir": "src" "rootDir": "src",
"inlineSources": true // map 便 VS Code
}, },
"exclude": ["*.js", "*.ts", "dist", "node_modules", "test"] "exclude": ["*.js", "*.ts", "dist", "node_modules", "test"]
} }