93 lines
2.7 KiB
TypeScript
93 lines
2.7 KiB
TypeScript
import { MidwayConfig } from '@midwayjs/core';
|
|
export default {
|
|
koa: {
|
|
port: 7001,
|
|
},
|
|
typeorm: {
|
|
dataSource: {
|
|
default: {
|
|
host: '13.212.62.127',
|
|
username: 'root',
|
|
password: 'Yoone!@.2025',
|
|
},
|
|
},
|
|
},
|
|
// typeorm: {
|
|
// dataSource: {
|
|
// default: {
|
|
// host: 'localhost',
|
|
// port: "33306",
|
|
// username: 'root',
|
|
// password: 'root',
|
|
// database: 'inventory',
|
|
// },
|
|
// },
|
|
// },
|
|
cors: {
|
|
origin: '*', // 允许所有来源跨域请求
|
|
allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], // 允许的 HTTP 方法
|
|
allowHeaders: ['Content-Type', 'Authorization'], // 允许的自定义请求头
|
|
credentials: true, // 允许携带凭据(cookies等)
|
|
},
|
|
jwt: {
|
|
secret: 'YOONE2024!@abc',
|
|
expiresIn: '7d',
|
|
},
|
|
wpSite: [
|
|
// {
|
|
// id: '200',
|
|
// wpApiUrl: "http://simple.local",
|
|
// consumerKey: 'ck_11b446d0dfd221853830b782049cf9a17553f886',
|
|
// consumerSecret: 'cs_2b06729269f659dcef675b8cdff542bf3c1da7e8',
|
|
// name: 'LocalSimple',
|
|
// email: '2469687281@qq.com',
|
|
// emailPswd: 'lulin91.',
|
|
// },
|
|
// {
|
|
// id: '2',
|
|
// wpApiUrl: 'http://t2-shop.local/',
|
|
// consumerKey: 'ck_a369473a6451dbaec63d19cbfd74a074b2c5f742',
|
|
// consumerSecret: 'cs_0946bbbeea1bfefff08a69e817ac62a48412df8c',
|
|
// name: 'Local',
|
|
// email: '2469687281@qq.com',
|
|
// emailPswd: 'lulin91.',
|
|
// },
|
|
// {
|
|
// id: '3',
|
|
// wpApiUrl: 'http://t1-shop.local/',
|
|
// consumerKey: 'ck_a369473a6451dbaec63d19cbfd74a074b2c5f742',
|
|
// consumerSecret: 'cs_0946bbbeea1bfefff08a69e817ac62a48412df8c',
|
|
// name: 'Local-test-2',
|
|
// email: '2469687281@qq.com',
|
|
// emailPswd: 'lulin91.',
|
|
// },
|
|
// {
|
|
// id: '2',
|
|
// wpApiUrl: 'http://localhost:10004',
|
|
// consumerKey: 'ck_dc9e151e9048c8ed3e27f35ac79d2bf7d6840652',
|
|
// consumerSecret: 'cs_d05d625d7b0ac05c6d765671d8417f41d9477e38',
|
|
// name: 'Local',
|
|
// email: 'tom@yoonevape.com',
|
|
// emailPswd: 'lulin91.',
|
|
// },
|
|
],
|
|
freightcom: {
|
|
url: 'https://customer-external-api.ssd-test.freightcom.com',
|
|
token: '6zGj1qPTL1jIkbLmgaiYc6SwHUIXJ2t25htUF8uuFYiCg8ILCY6xnBEbvrX1p79L',
|
|
},
|
|
canadaPost: {
|
|
url: 'https://ct.soa-gw.canadapost.ca',
|
|
username: '65d23d3a75d7baf7',
|
|
password: '56443bb98b68dfdd60f52e',
|
|
customerNumber: '0006122480',
|
|
contractId: '0044168528',
|
|
},
|
|
uniExpress: {
|
|
url: 'https://sjqa.uniexpress.org', // 测试环境url
|
|
// url: 'https://sj.uniexpress.ca', //正式环境url
|
|
clientId: '101018',
|
|
clientSecret: 'cbcb51bea204f3f69c47b5280064408e',
|
|
customerNo: 2067,
|
|
}
|
|
} as MidwayConfig;
|