北斗启航科技教育平台登录系统

This commit is contained in:
2026-03-27 17:50:18 +08:00
commit bdc25653a4
215 changed files with 5299 additions and 0 deletions

244
config/config.default.js Normal file
View File

@@ -0,0 +1,244 @@
/* eslint valid-jsdoc: "off" */
/**
* @param {Egg.EggAppInfo} appInfo app info
*/
module.exports = appInfo => {
/**
* built-in config
* @type {Egg.EggAppConfig}
**/
const config = exports = {};
// use for cookie sign key, should change to your own and keep security
config.keys = appInfo.name + '_1715070357590_9945';
// add your middleware config here
// config.middleware = [];
config.security = {
csrf: {
enable: false
},
};
config.jwt = {
secret: "authentication"
};
config.oAuth2Server = {
debug: true,
grants: ['password', 'client_credentials', 'authorization_code', 'refresh_token'],
};
config.fixedClient = ["insiders-manager", "exam", "exam-manager"];
config.redis = {
// 开发/测试环境
clients: {
db0: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 0,
},
db1: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 1,
},
db2: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 2,
},
db3: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 3,
},
db5: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 5,
},
db6: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 6,
},
db7: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 7,
}
}
// 生产环境
// clients: {
// db0: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 2,
// },
// db1: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 3,
// },
// db2: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 4,
// },
// db3: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 5,
// },
// db5: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 7,
// },
// db6: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 8,
// },
// db7: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 9,
// }
// }
};
config.sequelize = {
// 开发/测试环境
datasources: [
{
dialect: 'mariadb',
host: 'localhost',
port: 3306,
username: 'root',
password: '74191221',
database: 'bside',
},
{
dialect: 'mariadb',
host: 'localhost',
port: 3306,
username: 'root',
password: '74191221',
database: 'cside',
delegate: 'model2',
baseDir: 'model2',
},
{
dialect: 'mariadb',
host: 'localhost',
port: 3306,
username: 'root',
password: '74191221',
database: 'insiders',
delegate: 'model3',
baseDir: 'model3',
},
{
dialect: 'mariadb',
host: 'localhost',
port: 3306,
username: 'root',
password: '74191221',
database: 'bdContest',
delegate: 'model4',
baseDir: 'model4',
},
{
dialect: 'mariadb',
host: 'localhost',
port: 3306,
username: 'root',
password: '74191221',
database: 'bdTrainingExam',
delegate: 'model5',
baseDir: 'model5',
}
]
// 生产环境
// datasources: [
// {
// dialect: 'mariadb',
// host: 'localhost',
// port: 3306,
// username: 'bdqh_platform',
// password: '124689@XXxx',
// database: 'bside',
// },
// {
// dialect: 'mariadb',
// host: 'localhost',
// port: 3306,
// username: 'bdqh_platform',
// password: '124689@XXxx',
// database: 'cside',
// delegate: 'model2',
// baseDir: 'model2',
// },
// {
// dialect: 'mariadb',
// host: 'localhost',
// port: 3306,
// username: 'bdqh_platform',
// password: '124689@XXxx',
// database: 'insiders',
// delegate: 'model3',
// baseDir: 'model3',
// },
// {
// dialect: 'mariadb',
// host: 'localhost',
// port: 3306,
// username: 'bdqh_platform',
// password: '124689@XXxx',
// database: 'bdContest',
// delegate: 'model4',
// baseDir: 'model4',
// },
// {
// dialect: 'mariadb',
// host: 'localhost',
// port: 3306,
// username: 'bdqh_platform',
// password: '124689@XXxx',
// database: 'bdTrainingExam',
// delegate: 'model5',
// baseDir: 'model5',
// }
// ]
};
// add your user config here
const userConfig = {
// myAppName: 'egg',
salt: 'authentication'
};
return {
...config,
...userConfig,
};
};

42
config/plugin.js Normal file
View File

@@ -0,0 +1,42 @@
/** @type Egg.EggPlugin */
module.exports = {
// had enabled by egg
// static: {
// enable: true,
// }
CryptoJS : {
enable: true,
package: 'crypto-js',
},
jwt : {
enable: true,
package: 'egg-jwt',
},
oAuth2Server: {
enable: true,
package: 'egg-oauth2-server',
},
redis : {
enable: true,
package: 'egg-redis',
},
sequelize : {
enable: true,
package: 'egg-sequelize',
},
validate : {
enable: true,
package: 'egg-validate',
},
NodeRsa : {
enable: true,
package: 'node-rsa',
},
};