first commit

This commit is contained in:
编码猿
2024-09-27 00:54:11 +08:00
commit 05f12f4187
790 changed files with 149163 additions and 0 deletions

1
dist/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
e9969a45-ca59-42c6-9172-d5bf34a034e3

1
dist/config/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
1fc79af0-ea3e-49ca-afaa-ba4de792022d

104
dist/config/dev.js vendored Normal file
View File

@@ -0,0 +1,104 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = __importDefault(require("path"));
/**
* 开发阶段环境配置
*/
exports.dev = {
// 程序默认运行端口
port: 80,
// 绑定的域名
host: "www.geekhelp.cn",
// api接口基地址如果改这个了请改管理后台的axios基地址配置
apiurl: '/bmy/api',
// 初始化 koa2 插件需要的一些配置
initPlugins: {
SessionKey: '4WM7mSy5S5kkxcE1I3',
staticPath: '../resources/static',
viewsPath: '../resources/view' // 页面视图存放路径
},
// 终端的欢迎信息
banner: {
welcome: () => {
return `
👏 VR 产品介绍网站 👏
👉 1PC官网: http://${exports.dev.host}:${exports.dev.port}/
👉 2Admin后台: http://${exports.dev.host}:3030/#/course/all
`;
}
},
logConfig: {
appenders: {
//系统日志
access: {
type: 'dateFile',
pattern: '_yyyy-MM-dd.log',
alwaysIncludePattern: true,
encoding: "utf-8",
category: "access",
filename: path_1.default.join(__dirname, '../../logs/access')
},
// 应用日志
application: {
type: 'dateFile',
pattern: '_yyyy-MM-dd.log',
alwaysIncludePattern: true,
encoding: "utf-8",
category: "application",
filename: path_1.default.join(__dirname, '../../logs/application')
},
out: {
type: 'console'
}
},
categories: {
default: { appenders: ['out'], level: 'info' },
access: { appenders: ['access'], level: 'info' },
application: { appenders: ['application'], level: 'WARN' }
}
},
// 七牛的核心配置,不熟悉七牛请勿修改
qiniu: {
// 七牛秘钥,七牛云管理后台获得,可以改成自己的
accessKey: '0MGmT_rkMiaOeXY09B4EhBnXuDcIYyKlGumQ-zUt',
secretKey: '59dfmEi9Q50rMlz9sxTBCvYDhM7biERAjflBXALb',
// 视频切片的配置
HLSconfig: {
// 被切片后视频存放的基路径,如果需要修改域名,请到域名管理后台 CNAME 泛解析域到七牛云
// 然后再到七牛配置 泛子域名 将二级域名绑定到指定空间,这里 video.* 被绑定到 m3u8video 空间
VideoBaseUrl: 'http://vsassets.geekhelp.cn/',
// 需要被切片的源视频所在七牛云的空间名
FromBucket: 'vrcource',
// 视频被切片后存放的空间名
ToBucket: 'm3u8video',
// 视频切片规则,参考七牛云官网文档来配置,或者在 多媒体队列 中复制切片参数
VideoHlsParams: 'avthumb/m3u8/segtime/10/ab/128k/ar/44100/acodec/libfaac/r/30/vb/1000k/vcodec/libx264/stripmeta/0/noDomain/1|saveas/'
}
},
// 网站浏览器标签卡的基础标题
title: ' | 怪客课堂',
// 本地Mysql数据库配置
typeorm: {
type: 'mysql',
host: "localhost",
charset: "utf8_general_ci",
port: 3306,
username: "root",
password: "lb714500",
database: "shop",
logging: "all",
synchronize: false,
logger: "advanced-console",
cache: {
duration: 30000
},
maxQueryExecutionTime: 1000,
entities: [
`${path_1.default.join(__dirname, '../entity/*{.js,.ts}')}`
]
}
};

7
dist/config/index.js vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// 开发环境配置
const dev_1 = require("./dev");
// 上线环境配置
const prod_1 = require("./prod");
exports.config = process.env.NODE_ENV == "dev" ? dev_1.dev : prod_1.prod;

87
dist/config/prod.js vendored Normal file
View File

@@ -0,0 +1,87 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = __importDefault(require("path"));
/**
* 上线阶段的环境配置
*/
exports.prod = {
port: 9090,
host: "127.0.0.1",
apiurl: '/bmy/api',
uploadPath: '../resources/static/upload/',
initPlugins: {
SessionKey: '4WM7mSy5S5kkxcE1I3',
staticPath: '../resources/static',
viewsPath: '../resources/view'
},
banner: {
welcome: () => {
return `
👏 VR 产品介绍网站 👏
👉 1PC官网: http://${exports.prod.host}:${exports.prod.port}/
👉 2Admin后台: http://${exports.prod.host}:3030/#/course/all
`;
}
},
logConfig: {
appenders: {
access: {
type: 'console',
pattern: '-yyyy-MM-dd.log',
alwaysIncludePattern: true,
encoding: "utf-8",
filename: path_1.default.join(__dirname, '../../logs/access.log') //生成文件路径和文件名
},
//系统日志
application: {
type: 'console',
pattern: '-yyyy-MM-dd.log',
alwaysIncludePattern: true,
encoding: "utf-8",
filename: path_1.default.join(__dirname, '../../logs/application.log') //生成文件路径和文件名
},
out: {
type: 'console'
}
},
categories: {
default: { appenders: ['out'], level: 'info' },
access: { appenders: ['access'], level: 'info' },
application: { appenders: ['application'], level: 'WARN' }
}
},
qiniu: {
accessKey: '0MGmT_rkMiaOeXY09B4EhBnXuDcIYyKlGumQ-zUt',
secretKey: '59dfmEi9Q50rMlz9sxTBCvYDhM7biERAjflBXALb',
HLSconfig: {
VideoBaseUrl: 'http://video.geekhelp.cn/',
FromBucket: 'guaikevideo',
ToBucket: 'm3u8video',
VideoHlsParams: 'avthumb/m3u8/segtime/10/ab/128k/ar/44100/acodec/libfaac/r/30/vb/640k/vcodec/libx264/stripmeta/0/noDomain/1|saveas/'
}
},
title: ' | 怪客课堂',
typeorm: {
type: 'mysql',
host: "localhost",
charset: "utf8_general_ci",
port: 3306,
username: "root",
password: "lb714500",
database: "shop",
logging: "error",
logger: "file",
synchronize: false,
maxQueryExecutionTime: 1000,
cache: {
duration: 30000
},
entities: [
`${path_1.default.join(__dirname, '../entity/*{.js,.ts}')}`
]
}
};

1
dist/controller/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
b8aa34c8-175a-43ce-91ad-e766884dc2a0

1
dist/controller/admin/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
2cb09cb8-309b-4514-b520-44d2e79021dd

View File

@@ -0,0 +1,59 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const JsonResponseMiddlewares_1 = require("../../middleware/JsonResponseMiddlewares");
const typedi_1 = require("typedi");
const config_1 = require("../../config");
const utils_1 = require("../../utils/utils");
const qiniu_1 = require("../../plugins/qiniu");
let AdminController = class AdminController {
/**
* 获取上传token服务于图片视频的上传
* http://www.geekhelp.cn/bmy/api/admin/token
* @param params
* @constructor
*/
Token() {
return __awaiter(this, void 0, void 0, function* () {
return { qn_token: this.qiniu.GenerateToken() };
});
}
};
__decorate([
typedi_1.Inject(),
__metadata("design:type", utils_1.utils)
], AdminController.prototype, "utils", void 0);
__decorate([
typedi_1.Inject(),
__metadata("design:type", qiniu_1.QiNiu)
], AdminController.prototype, "qiniu", void 0);
__decorate([
routing_controllers_1.Post("/token"),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", Promise)
], AdminController.prototype, "Token", null);
AdminController = __decorate([
typedi_1.Service(),
routing_controllers_1.JsonController(`${config_1.config.apiurl}/admin`),
routing_controllers_1.UseInterceptor(JsonResponseMiddlewares_1.JsonResponseInterceptor)
], AdminController);
exports.AdminController = AdminController;

1
dist/controller/api/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
098941e8-0c40-4428-8a75-a93cb6d7ab4c

17
dist/controller/api/TestController.js vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const typedi_1 = require("typedi");
let TestControllerApi = class TestControllerApi {
};
TestControllerApi = __decorate([
typedi_1.Service(),
routing_controllers_1.Controller()
], TestControllerApi);
exports.TestControllerApi = TestControllerApi;

View File

@@ -0,0 +1,17 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const typedi_1 = require("typedi");
let TestControllerApi = class TestControllerApi {
};
TestControllerApi = __decorate([
typedi_1.Service(),
routing_controllers_1.Controller()
], TestControllerApi);
exports.TestControllerApi = TestControllerApi;

110
dist/controller/api/UserControllerApi.js vendored Normal file
View File

@@ -0,0 +1,110 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const config_1 = require("../../config");
const JsonResponseMiddlewares_1 = require("../../middleware/JsonResponseMiddlewares");
const typedi_1 = require("typedi");
const UserServiceImpl_1 = require("../../service/impl/UserServiceImpl");
const UserModel_1 = require("../../model/UserModel");
const LogsMiddlewares_1 = require("../../middleware/LogsMiddlewares");
let UserControllerApi = class UserControllerApi {
/**
* @api {get} /user/oneUser oneUser
* @apiVersion 1.1.0
* @apiDescription 获取一条用户记录
* @apiName oneUser
* @apiGroup user
* @apiParam {string} id 用户id
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "result" : {
* }
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status":200,
* "result":{
* }
* }
* @apiSampleRequest http://www.geekhelp.cn/bmy/api/user/oneUser
* @apiVersion 1.0.0
*/
oneUser(query) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.userServiceImpl.getOneUserService(query.id);
});
}
/**
* @api {get} /user/allUser allUser
* @apiVersion 1.1.0
* @apiDescription 获取所有用户信息
* @apiName allUser
* @apiGroup user
* @apiSuccessExample {json} 请求成功的返回:
* {
* "status" : 200,
* "result" : {
* }
* }
* @apiErrorExample {json} 请求失败的返回
* {
* "status":200,
* "result":{
* }
* }
* @apiSampleRequest http://www.geekhelp.cn/bmy/api/user/allUser
* @apiVersion 1.0.0
*/
allUser() {
return __awaiter(this, void 0, void 0, function* () {
return yield this.userServiceImpl.getAllUserService();
});
}
};
__decorate([
typedi_1.Inject(),
__metadata("design:type", UserServiceImpl_1.UserServiceImpl)
], UserControllerApi.prototype, "userServiceImpl", void 0);
__decorate([
routing_controllers_1.Get("/oneUser"),
routing_controllers_1.UseBefore(LogsMiddlewares_1.LogsMiddlewares),
__param(0, routing_controllers_1.QueryParams()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [UserModel_1.UserModel]),
__metadata("design:returntype", Promise)
], UserControllerApi.prototype, "oneUser", null);
__decorate([
routing_controllers_1.Get("/allUser"),
routing_controllers_1.UseBefore(LogsMiddlewares_1.LogsMiddlewares),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", Promise)
], UserControllerApi.prototype, "allUser", null);
UserControllerApi = __decorate([
typedi_1.Service(),
routing_controllers_1.JsonController(`${config_1.config.apiurl}/user`),
routing_controllers_1.UseInterceptor(JsonResponseMiddlewares_1.JsonResponseInterceptor)
], UserControllerApi);
exports.UserControllerApi = UserControllerApi;

View File

@@ -0,0 +1,17 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const typedi_1 = require("typedi");
let homeControllerApi = class homeControllerApi {
};
homeControllerApi = __decorate([
typedi_1.Service(),
routing_controllers_1.Controller()
], homeControllerApi);
exports.homeControllerApi = homeControllerApi;

1
dist/controller/home/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
7187985f-096d-45fa-b2af-836bc0200513

View File

@@ -0,0 +1,44 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const utils_1 = require("../../utils/utils");
let AboutControllerHome = class AboutControllerHome {
About(session) {
return {
title: utils_1.utils.titleName("关于"),
isShowAction: {
header: true,
footer: true
},
banner: {
bannerTitle: '关于怪客',
bannerUrl: '/img/banner_5.jpg',
},
login: session.user ? session.user : false
};
}
};
__decorate([
routing_controllers_1.Get("/about"),
routing_controllers_1.Render("home/page/about"),
__param(0, routing_controllers_1.Session()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], AboutControllerHome.prototype, "About", null);
AboutControllerHome = __decorate([
routing_controllers_1.Controller()
], AboutControllerHome);
exports.AboutControllerHome = AboutControllerHome;

View File

@@ -0,0 +1,35 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const utils_1 = require("../../utils/utils");
let ErrorControllerHome = class ErrorControllerHome {
Error() {
return {
title: utils_1.utils.titleName("404..."),
isShowAction: {
header: false,
footer: false
}
};
}
};
__decorate([
routing_controllers_1.Get("/error"),
routing_controllers_1.Render("home/page/error"),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], ErrorControllerHome.prototype, "Error", null);
ErrorControllerHome = __decorate([
routing_controllers_1.Controller()
], ErrorControllerHome);
exports.ErrorControllerHome = ErrorControllerHome;

View File

@@ -0,0 +1,53 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const utils_1 = require("../../utils/utils");
const typedi_1 = require("typedi");
let IndexControllerHome = class IndexControllerHome {
Index(session) {
return __awaiter(this, void 0, void 0, function* () {
return {
title: utils_1.utils.titleName("首页"),
isShowAction: {
header: true,
footer: true
},
login: session.user ? session.user : false
};
});
}
};
__decorate([
routing_controllers_1.Get("/"),
routing_controllers_1.Render("home/page/index"),
__param(0, routing_controllers_1.Session()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", Promise)
], IndexControllerHome.prototype, "Index", null);
IndexControllerHome = __decorate([
typedi_1.Service(),
routing_controllers_1.Controller()
], IndexControllerHome);
exports.IndexControllerHome = IndexControllerHome;

View File

@@ -0,0 +1,17 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const typedi_1 = require("typedi");
let TestControllerHome = class TestControllerHome {
};
TestControllerHome = __decorate([
typedi_1.Service(),
routing_controllers_1.Controller()
], TestControllerHome);
exports.TestControllerHome = TestControllerHome;

View File

@@ -0,0 +1,56 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const routing_controllers_1 = require("routing-controllers");
const utils_1 = require("../../utils/utils");
let UserActionController = class UserActionController {
reg(session, res) {
return __awaiter(this, void 0, void 0, function* () {
if (!session || !session.user) {
return {
title: utils_1.utils.titleName("注册"),
isShowAction: {
header: false,
footer: false
}
};
}
else {
res.redirect('/error');
return res;
}
});
}
};
__decorate([
routing_controllers_1.Get("/register"),
routing_controllers_1.Render("home/page/register"),
__param(0, routing_controllers_1.Session()), __param(1, routing_controllers_1.Res()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object]),
__metadata("design:returntype", Promise)
], UserActionController.prototype, "reg", null);
UserActionController = __decorate([
routing_controllers_1.Controller()
], UserActionController);
exports.UserActionController = UserActionController;

5
dist/controller/home/UserOperation.js vendored Normal file
View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class UserOperation {
}
exports.UserOperation = UserOperation;

1
dist/dao/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
57ab335b-1140-4a98-977d-5aca05301cac

42
dist/dao/UserDao.js vendored Normal file
View File

@@ -0,0 +1,42 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const typedi_1 = require("typedi");
const UserEntity_1 = require("../entity/UserEntity");
const typeorm_1 = require("typeorm");
let UserDao = class UserDao {
/**
* 查询用户具体信息
* @param id
*/
getOneUserDao(id) {
return __awaiter(this, void 0, void 0, function* () {
return yield typeorm_1.getRepository(UserEntity_1.UserEntity)
.findOne({ where: { user_id: id } });
});
}
AllUser() {
return __awaiter(this, void 0, void 0, function* () {
return yield typeorm_1.getRepository(UserEntity_1.UserEntity)
.find();
});
}
};
UserDao = __decorate([
typedi_1.Service()
], UserDao);
exports.UserDao = UserDao;

15
dist/dao/testDao.js vendored Normal file
View File

@@ -0,0 +1,15 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const typedi_1 = require("typedi");
let TestDao = class TestDao {
};
TestDao = __decorate([
typedi_1.Service()
], TestDao);
exports.TestDao = TestDao;

1
dist/entity/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
56ca8436-62b3-4234-a965-e67b67bfdc2a

22
dist/entity/TestEntity.js vendored Normal file
View File

@@ -0,0 +1,22 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const typeorm_1 = require("typeorm");
let TestEntity = class TestEntity {
};
__decorate([
typeorm_1.PrimaryGeneratedColumn(),
__metadata("design:type", Number)
], TestEntity.prototype, "user_id", void 0);
TestEntity = __decorate([
typeorm_1.Entity("user")
], TestEntity);
exports.TestEntity = TestEntity;

50
dist/entity/UserEntity.js vendored Normal file
View File

@@ -0,0 +1,50 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const typeorm_1 = require("typeorm");
let UserEntity = class UserEntity {
};
__decorate([
typeorm_1.PrimaryGeneratedColumn(),
__metadata("design:type", Number)
], UserEntity.prototype, "user_id", void 0);
__decorate([
typeorm_1.Column(),
__metadata("design:type", String)
], UserEntity.prototype, "user_name", void 0);
__decorate([
typeorm_1.Column(),
__metadata("design:type", String)
], UserEntity.prototype, "user_pwd", void 0);
__decorate([
typeorm_1.Column(),
__metadata("design:type", String)
], UserEntity.prototype, "user_time", void 0);
__decorate([
typeorm_1.Column(),
__metadata("design:type", String)
], UserEntity.prototype, "user_money", void 0);
__decorate([
typeorm_1.Column(),
__metadata("design:type", String)
], UserEntity.prototype, "user_pic", void 0);
__decorate([
typeorm_1.Column(),
__metadata("design:type", String)
], UserEntity.prototype, "user_address", void 0);
__decorate([
typeorm_1.Column(),
__metadata("design:type", String)
], UserEntity.prototype, "user_phone", void 0);
UserEntity = __decorate([
typeorm_1.Entity("user")
], UserEntity);
exports.UserEntity = UserEntity;

7
dist/index.js vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* 启动文件入口
*/
const app_1 = require("./run/app");
new app_1.App();

1
dist/middleware/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
05e72bdf-a9fa-4a35-b7f3-07070a0c3f9b

16
dist/middleware/CheckLoginMiddleware.js vendored Normal file
View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* 判断用户是否登录,如果登录则继续访问,没有去登录
*/
class CheckLoginMiddleware {
use(context, next) {
if (!context.session || !context.session.user) {
context.redirect(`/reg?from=${context.request.url}`);
}
else {
return next();
}
}
}
exports.CheckLoginMiddleware = CheckLoginMiddleware;

View File

@@ -0,0 +1,34 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const ResultDataMiddlewares_1 = require("./ResultDataMiddlewares");
const typedi_1 = require("typedi");
const logs_1 = require("../utils/logs");
// 拦截controller在数据响应给前端按照标准格式输出数据同时session存储用户
let JsonResponseInterceptor = class JsonResponseInterceptor {
intercept(action, content) {
if (content == undefined || content.length == 0) {
logs_1.Logs.ApplicationLogger().error(action);
return this.resultDataMiddlewares.error(action, "没有数据");
}
else if (content.length != 0) {
return this.resultDataMiddlewares.success(content);
}
}
};
__decorate([
typedi_1.Inject(),
__metadata("design:type", ResultDataMiddlewares_1.ResultDataMiddlewares)
], JsonResponseInterceptor.prototype, "resultDataMiddlewares", void 0);
JsonResponseInterceptor = __decorate([
typedi_1.Service()
], JsonResponseInterceptor);
exports.JsonResponseInterceptor = JsonResponseInterceptor;

33
dist/middleware/LogsMiddlewares.js vendored Normal file
View File

@@ -0,0 +1,33 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const typedi_1 = require("typedi");
const logs_1 = require("../utils/logs");
const moment_1 = __importDefault(require("moment"));
/**
* controller 拦截器
* 拦截 controller 被访问前,进行访问的日志记录
*/
let LogsMiddlewares = class LogsMiddlewares {
use(context, next) {
if (context.request.method == "GET") {
logs_1.Logs.ApplicationLogger().warn(`${moment_1.default().format('YYYY-MM-DD HH:mm:ss')} ${context.request.ip} ${context.request.method} ${context.request.url} ${JSON.stringify(context.request.querystring)} ${JSON.stringify(context.request.header)} \n`);
}
else {
logs_1.Logs.ApplicationLogger().warn(`${moment_1.default().format('YYYY-MM-DD HH:mm:ss')} ${context.request.ip} ${context.request.method} ${context.request.url} ${JSON.stringify(context.request.body)} ${JSON.stringify(context.request.header)} \n`);
}
return next();
}
};
LogsMiddlewares = __decorate([
typedi_1.Service()
], LogsMiddlewares);
exports.LogsMiddlewares = LogsMiddlewares;

View File

@@ -0,0 +1,68 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const typedi_1 = require("typedi");
let ResultDataMiddlewares = class ResultDataMiddlewares {
get status() {
return this._status;
}
set status(value) {
this._status = value;
}
get data() {
return this._data;
}
set data(value) {
this._data = value;
}
get methods() {
return this._methods;
}
set methods(value) {
this._methods = value;
}
get url() {
return this._url;
}
set url(value) {
this._url = value;
}
/**
* 数据请求成功
* @param _data 需要返回给前端的数据
*/
success(_data) {
this.status = 200;
this.data = _data;
return JSON.stringify({
status: this.status,
time: new Date(),
result: this.data
});
}
/**
* 数据请求失败
* @param action 请求对象
*/
error(action, message) {
this.status = action.response.status; // 状态码
this.data = message; // 错误信息
this.methods = action.request.method; // 请求方式
this.url = action.request.url; // 请求地址
return JSON.stringify({
methods: this.methods,
status: this.status,
result: this.data,
url: this.url
});
}
};
ResultDataMiddlewares = __decorate([
typedi_1.Service()
], ResultDataMiddlewares);
exports.ResultDataMiddlewares = ResultDataMiddlewares;

1
dist/model/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
62509948-3cb9-4cfd-b16c-6b716f2f10a7

21
dist/model/TestModel.js vendored Normal file
View File

@@ -0,0 +1,21 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const class_validator_1 = require("class-validator");
class TestModel {
}
__decorate([
class_validator_1.MinLength(1, {
message: 'id参数必须有'
}),
__metadata("design:type", String)
], TestModel.prototype, "id", void 0);
exports.TestModel = TestModel;

21
dist/model/UserModel.js vendored Normal file
View File

@@ -0,0 +1,21 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const class_validator_1 = require("class-validator");
class UserModel {
}
__decorate([
class_validator_1.MinLength(1, {
message: 'id参数必须有'
}),
__metadata("design:type", String)
], UserModel.prototype, "id", void 0);
exports.UserModel = UserModel;

1
dist/plugins/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
e1d9fe15-2a0a-4008-8e49-4708275b0431

67
dist/plugins/qiniu.js vendored Normal file
View File

@@ -0,0 +1,67 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const qiniu_1 = __importDefault(require("qiniu"));
const typedi_1 = require("typedi");
const index_1 = require("../config/index");
let QiNiu = class QiNiu {
constructor() {
this.FromBucket = index_1.config.qiniu.HLSconfig.FromBucket;
this.ToBucket = index_1.config.qiniu.HLSconfig.ToBucket;
this.VideoHlsParams = index_1.config.qiniu.HLSconfig.VideoHlsParams;
this.accessKey = index_1.config.qiniu.accessKey;
this.secretKey = index_1.config.qiniu.secretKey;
this.mac = new qiniu_1.default.auth.digest.Mac(this.accessKey, this.secretKey);
}
/**
*
* @param BucketName
* @constructor
*/
GenerateToken(BucketName = "vrcource") {
let putPolicy = new qiniu_1.default.rs.PutPolicy({
scope: BucketName,
expires: 7200
});
return putPolicy.uploadToken(this.mac);
}
/**
* 根据前端传递的 filename 文件名,对需要的视频进行切片配置,
* 返回给前端 token前端拿到 token 后通过form data将视频和
* token 传递给七牛七牛会根据token开始切片任务。这里不需要
* 配置七牛切片成功后的回调通知,因为已经可以通过基地址+m3u8文件名拿到
* 切片后的地址
* @param params
* @constructor
*/
GenerateHlsToken(params) {
let M3u8FileName = new Date().getTime();
let saveHlsEntry = qiniu_1.default.util.urlsafeBase64Encode(`${this.ToBucket}:${M3u8FileName}`);
const options = {
scope: `${this.FromBucket}:${params['filename']}`,
persistentOps: `${this.VideoHlsParams}${saveHlsEntry}`,
persistentPipeline: 'guaikem3u8',
};
let putPolicy = new qiniu_1.default.rs.PutPolicy(options);
return {
filePath: `${index_1.config.qiniu.HLSconfig.VideoBaseUrl}${M3u8FileName}`,
token: putPolicy.uploadToken(this.mac)
};
}
};
QiNiu = __decorate([
typedi_1.Service(),
__metadata("design:paramtypes", [])
], QiNiu);
exports.QiNiu = QiNiu;

1
dist/resources/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
38915049-bd60-4d85-b3cc-1ae2601f8b2b

1
dist/resources/static/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
365311b5-32c3-4360-939e-37b708a867d8

1
dist/resources/static/css/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
170d6805-a0da-431b-a81c-9e6340f10c51

0
dist/resources/static/css/base.css vendored Executable file
View File

1
dist/resources/static/css/home/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
b2b8dbcc-6779-4432-9b90-614361ec29bd

View File

@@ -0,0 +1,3 @@
.about {
color: red;
}

View File

@@ -0,0 +1,38 @@
.error {
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
}
.error img {
width: 270px;
margin-bottom: 20px;
}
.error .i-message {
margin-left: 19px;
}
.error .i-message .action {
margin-top: 10px;
}
.error .i-message .action a[href="/"] {
margin-right: 15px;
}
.error .i-message ul {
padding-left: 20px;
margin-top: 8px;
}
.error .i-message h3 {
font-size: 17px;
margin-bottom: 10px;
line-height: 27px;
font-weight: 500;
letter-spacing: 2px;
}
.error .i-message a {
color: #8d8d8d;
}
body,
html,
.error {
height: 100%;
}

0
dist/resources/static/css/home/index.css vendored Executable file
View File

View File

@@ -0,0 +1,4 @@
.register {
font-size: 30px;
color: green;
}

View File

@@ -0,0 +1,3 @@
.Test {
color: red;
}

1
dist/resources/static/css/tpl/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
01ac1c31-34b6-4927-9ea5-ac59aba566af

0
dist/resources/static/css/tpl/colors.css vendored Executable file
View File

0
dist/resources/static/css/tpl/mixins.css vendored Executable file
View File

1
dist/resources/static/fonts/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
59158044-dfca-4e36-8cb9-881640318e07

1
dist/resources/static/img/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
27366949-82a2-4b1e-996e-69b53b999cbd

BIN
dist/resources/static/img/banner.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

BIN
dist/resources/static/img/banner_1.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

BIN
dist/resources/static/img/banner_2.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 KiB

BIN
dist/resources/static/img/banner_3.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 KiB

BIN
dist/resources/static/img/banner_4.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

BIN
dist/resources/static/img/banner_5.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

BIN
dist/resources/static/img/banner_6.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

BIN
dist/resources/static/img/banner_7.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
dist/resources/static/img/bgError.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
dist/resources/static/img/discountbanner.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
dist/resources/static/img/favicon.ico vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
dist/resources/static/img/getbg.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
dist/resources/static/img/spjcdet_img1.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
dist/resources/static/img/spjcdet_img2.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
dist/resources/static/img/spjcdet_img3.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
dist/resources/static/img/spjcdet_img4.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
dist/resources/static/img/wx.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
dist/resources/static/img/youh.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

1
dist/resources/static/js/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
02011504-1fc5-4c66-9f5d-410cc1527d8f

32
dist/resources/static/js/app.js vendored Executable file
View File

@@ -0,0 +1,32 @@
requirejs.config({ require.js
baseUrl: '/js',
waitSeconds: 0,
paths: {
app: 'app',
jquery: 'lib/jquery.min',
swiper: 'lib/swiper/swiper.min',
zui: 'lib/zui/js/zui.min',
utils: 'utils/index',
config: 'config/index'
},
map: {
'*': {
'css': 'lib/css'
}
},
shim : { // 按需加载css
'app/index': { deps: ['css!/css/home/index.css','css!/js/lib/swiper/swiper.min.css'] },
'app/about': { deps: ['css!/css/home/about.css'] },
'app/register': { deps: ['css!/css/home/register.css'] }
}
});
// 读取每个页面自定义属性data-module获取js文件名然后自动加载并调用非对应页面的js文件中的 init 方法
requirejs(["jquery"],function ($) {
var module = $('.pages').attr('data-module');
if(module != undefined){
requirejs([ `app/${ module }` ], function (module) {
module.init();
})
}
});

1
dist/resources/static/js/app/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
1db48167-07c0-46b2-a84c-beea2247a27e

12
dist/resources/static/js/app/about.js vendored Executable file
View File

@@ -0,0 +1,12 @@
define(['jquery','utils'],function ($,utils) {
function about() {
}
about.prototype = {
init () {
}
};
return new about();
});

31
dist/resources/static/js/app/index.js vendored Executable file
View File

@@ -0,0 +1,31 @@
define(['jquery','swiper','utils', 'zui'],function ($,swiper,utils) {
function Index() {
}
Index.prototype = {
init () {
new $.zui.Messager('zui弹窗。', {
icon: 'heart',
placement: 'center'
}).show();
},
//初始化 swiper 轮播图
newSwiper () {
// new swiper ('.swiper-container', {
// direction: 'horizontal',
// loop: true,
// autoplay: true,
// pagination: {
// el: '.swiper-pagination',
// clickable :true,
// }
// });
},
}
return new Index();
})

View File

@@ -0,0 +1,14 @@
define(['jquery','swiper','utils'],function ($,swiper,utils) {
function Register() {
}
Register.prototype = {
init () {
console.log("用户注册")
},
};
return new Register();
});

12
dist/resources/static/js/app/test.js vendored Normal file
View File

@@ -0,0 +1,12 @@
define(['jquery','utils'],function ($,utils) {
function test() {
}
test.prototype = {
init () {
}
};
return new test();
});

View File

@@ -0,0 +1 @@
ca35505f-8930-4df3-a682-0fd0d46d8672

10
dist/resources/static/js/config/index.js vendored Executable file
View File

@@ -0,0 +1,10 @@
/**
* 网站前端的 config 配置文件
*/
define([], function () {
return {
// 请求基地址
baseURL: 'http://www.geekhelp.cn/bmy/api'
}
})

1
dist/resources/static/js/lib/.pydio vendored Normal file
View File

@@ -0,0 +1 @@
4a41c117-dab4-467b-ac47-10e619694a1b

169
dist/resources/static/js/lib/css.js vendored Executable file
View File

@@ -0,0 +1,169 @@
/*
* Require-CSS RequireJS css! loader plugin
* 0.1.10
* Guy Bedford 2014
* MIT
*/
/*
*
* Usage:
* require(['css!./mycssFile']);
*
* Tested and working in (up to latest versions as of March 2013):
* Android
* iOS 6
* IE 6 - 10
* Chrome 3 - 26
* Firefox 3.5 - 19
* Opera 10 - 12
*
* browserling.com used for virtual testing environment
*
* Credit to B Cavalier & J Hann for the IE 6 - 9 method,
* refined with help from Martin Cermak
*
* Sources that helped along the way:
* - https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent
* - http://www.phpied.com/when-is-a-stylesheet-really-loaded/
* - https://github.com/cujojs/curl/blob/master/src/curl/plugin/css.js
*
*/
define(function() {
//>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
if (typeof window == 'undefined')
return { load: function(n, r, load){ load() } };
var head = document.getElementsByTagName('head')[0];
var engine = window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/) || 0;
// use <style> @import load method (IE < 9, Firefox < 18)
var useImportLoad = false;
// set to false for explicit <link> load checking when onload doesn't work perfectly (webkit)
var useOnload = true;
// trident / msie
if (engine[1] || engine[7])
useImportLoad = parseInt(engine[1]) < 6 || parseInt(engine[7]) <= 9;
// webkit
else if (engine[2] || engine[8] || 'WebkitAppearance' in document.documentElement.style)
useOnload = false;
// gecko
else if (engine[4])
useImportLoad = parseInt(engine[4]) < 18;
//>>excludeEnd('excludeRequireCss')
//main api object
var cssAPI = {};
//>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
cssAPI.pluginBuilder = './css-builder';
// <style> @import load method
var curStyle, curSheet;
var createStyle = function () {
curStyle = document.createElement('style');
head.appendChild(curStyle);
curSheet = curStyle.styleSheet || curStyle.sheet;
}
var ieCnt = 0;
var ieLoads = [];
var ieCurCallback;
var createIeLoad = function(url) {
curSheet.addImport(url);
curStyle.onload = function(){ processIeLoad() };
ieCnt++;
if (ieCnt == 31) {
createStyle();
ieCnt = 0;
}
}
var processIeLoad = function() {
ieCurCallback();
var nextLoad = ieLoads.shift();
if (!nextLoad) {
ieCurCallback = null;
return;
}
ieCurCallback = nextLoad[1];
createIeLoad(nextLoad[0]);
}
var importLoad = function(url, callback) {
if (!curSheet || !curSheet.addImport)
createStyle();
if (curSheet && curSheet.addImport) {
// old IE
if (ieCurCallback) {
ieLoads.push([url, callback]);
}
else {
createIeLoad(url);
ieCurCallback = callback;
}
}
else {
// old Firefox
curStyle.textContent = '@import "' + url + '";';
var loadInterval = setInterval(function() {
try {
curStyle.sheet.cssRules;
clearInterval(loadInterval);
callback();
} catch(e) {}
}, 10);
}
}
// <link> load method
var linkLoad = function(url, callback) {
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
if (useOnload)
link.onload = function() {
link.onload = function() {};
// for style dimensions queries, a short delay can still be necessary
setTimeout(callback, 7);
}
else
var loadInterval = setInterval(function() {
for (var i = 0; i < document.styleSheets.length; i++) {
var sheet = document.styleSheets[i];
if (sheet.href == link.href) {
clearInterval(loadInterval);
return callback();
}
}
}, 10);
link.href = url;
head.appendChild(link);
}
//>>excludeEnd('excludeRequireCss')
cssAPI.normalize = function(name, normalize) {
if (name.substr(name.length - 4, 4) == '.css')
name = name.substr(0, name.length - 4);
return normalize(name);
}
//>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
cssAPI.load = function(cssId, req, load, config) {
(useImportLoad ? importLoad : linkLoad)(req.toUrl(cssId + '.css'), load);
}
//>>excludeEnd('excludeRequireCss')
return cssAPI;
});

2
dist/resources/static/js/lib/jquery.min.js vendored Executable file

File diff suppressed because one or more lines are too long

5
dist/resources/static/js/lib/require.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
f339ebb7-06a3-48e8-baf7-8d9d09cd207c

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
cf5aa45d-ffa5-4900-ad0f-dcd919985f34

View File

@@ -0,0 +1 @@
88e5667e-2864-4e40-85e6-8a81d2895142

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
4838b9ad-5d30-440e-9e10-667e9204b448

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More