first commit
23
.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/dist
|
||||||
|
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
BIN
NeuronGraph界面修改需求0501.pdf
Normal file
1
康唯唯私活/.pydio
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ef039233-c0f6-4bb4-9eb1-adb26e1b7c43
|
||||||
1
康唯唯私活/Vr项目/.pydio
Normal file
@@ -0,0 +1 @@
|
|||||||
|
85bf1ded-bae8-4965-b533-13c6566c2794
|
||||||
12
康唯唯私活/Vr项目/code/.babelrc
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
[
|
||||||
|
"latest", {
|
||||||
|
"es2015": {
|
||||||
|
"modules": false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"plugins": ["@babel/plugin-transform-runtime"]
|
||||||
|
}
|
||||||
17
康唯唯私活/Vr项目/code/.gitignore
vendored
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
node_modules/
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
yarn-error.log
|
||||||
|
.vscode/
|
||||||
|
.DS_Store
|
||||||
|
.cache/
|
||||||
|
src/resources/view/admin/node_modules/
|
||||||
|
src/resources/view/admin/.cache/
|
||||||
|
src/resources/view/admin/dist/
|
||||||
|
bin/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
1
康唯唯私活/Vr项目/code/.pydio
Normal file
@@ -0,0 +1 @@
|
|||||||
|
5ed16461-d0b6-482d-9892-81787de8a3f3
|
||||||
180
康唯唯私活/Vr项目/code/README.md
Executable file
@@ -0,0 +1,180 @@
|
|||||||
|
## 1:VR官网私活项目
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> 1:原型图:https://free.modao.cc/app/67b1afad2d125ea39cb3b35b3eb707ed7155f7e0?simulator_type=device&sticky=#screen=s183A4A44521583911381203
|
||||||
|
|
||||||
|
> 2:参考网站:https://www.gvrbox.com/home
|
||||||
|
|
||||||
|
> 3:PC前端使用的UI框架:https://www.openzui.com/
|
||||||
|
|
||||||
|
## 2:技术栈
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 1: TypeScript
|
||||||
|
- 2: Koa2.js(全家桶)
|
||||||
|
- 3: jade + less
|
||||||
|
- 4: GraphQL
|
||||||
|
- 5: TypeOrm
|
||||||
|
- 6: TypeDi
|
||||||
|
- 7: class-validator
|
||||||
|
- 8: Gulp
|
||||||
|
- 9: Routing-controllers
|
||||||
|
- 10: Require.js
|
||||||
|
- 11: Vue.js(全家桶) & TypeScript
|
||||||
|
- 12: Node.js
|
||||||
|
- 13: Parcel
|
||||||
|
- 14:Nginx 负载均衡
|
||||||
|
- 15: Docker
|
||||||
|
- 16: Mysql,主从读写分离
|
||||||
|
- 17: Bmob 在线后端云
|
||||||
|
- 18: 七牛视频云存储方案
|
||||||
|
- 19: 阿里云免费 https 证书
|
||||||
|
- 21: SpringBoot 微服务全家桶技术
|
||||||
|
- ... 此处省略一万字
|
||||||
|
|
||||||
|
|
||||||
|
## 3:项目说明
|
||||||
|
|
||||||
|
这是一套基于`Nodejs` + `koa2` + `Typescript` + `Routing-controllers` 纯手工搭建的项目基本框架,可以直接用在`传统网站`+`管理后台`的项目开发中。
|
||||||
|
|
||||||
|
就算你不会`php`,不会`java`也能够让前端的你无缝的对接和使用,独立开发网站不再是梦...
|
||||||
|
|
||||||
|
本项目中已经集成了:
|
||||||
|
|
||||||
|
- 1:`koa-log4`实现系统日志(程序日志access,运行日志application),日志放在`logs`文件夹中,当然你也可以在`/src/config`中指定日志输入路径。
|
||||||
|
|
||||||
|
- 2:基于`ApiDoc`实现接口帮助文档,可在方法上使用注释的方式生成接口文档,运行命令:`npm run doc` 生成文档。
|
||||||
|
|
||||||
|
- 3:接口测试,主要在`rest/`文件夹中,使用`*.http`进行接口调试。
|
||||||
|
|
||||||
|
- 4:实现`k-init cli`可以直接通过命令创建各种文件。
|
||||||
|
|
||||||
|
- 5:`Pm2` 实现负载均衡,上线部署使用命令:`npm run online`。
|
||||||
|
|
||||||
|
- 6:`七牛云` 实现资源文件的上传和存储,案例请看:[前端demo.vue](https://gitee.com/bmycode/VRofficialWebsite/blob/master/src/resources/view/admin/src/view/template/demo.vue),后端:[AdminController.ts](https://gitee.com/bmycode/VRofficialWebsite/blob/master/src/controller/admin/AdminController.ts)。
|
||||||
|
|
||||||
|
- 7:~~集成`支付宝支付`功能,可以直接配置然后使用(PS:支付涉及很多核心参数配置,所以该功能被删除,如需要请QQ私聊)~~。
|
||||||
|
|
||||||
|
- 8:基于`Java`开发的思想,设计`service层`,`dao层`,`entity层`,`model层`等,当然在`Node.js`中使用略有差异,不影响。
|
||||||
|
|
||||||
|
- 9:基于还未正式发布的`Vue3` + `Element` 实现管理后台页面,管理后台已实现登录权限控制等。
|
||||||
|
|
||||||
|
- 10:`PC`端的前端主要使用`require.js`实现`js`模块化,`less`+`jade`实现`Css`样式和`Html`。
|
||||||
|
|
||||||
|
- 11:数据库基于`Mysql`,数据库操作使用`Node ORM`:`typeorm`,如果不熟悉`Mysql`又不想去学习,那么可以自己集成第三方后端云数据库,减少数据库相关的学习和开发成本。
|
||||||
|
|
||||||
|
- 12:~~基于新的打包工具`parcel`对管理后台的`vue`页面进行打包,后面会重新改造为`Vue3`作为项目管理后台~~
|
||||||
|
|
||||||
|
- 13:基于`gulp`完成对`PC`前端`less`的编译和静态资源的复制等。
|
||||||
|
|
||||||
|
|
||||||
|
## 4:k-init cli 使用帮助
|
||||||
|
|
||||||
|
参考`PHP`的框架`Laravel`提供的命令`artisan`实现终端创建项目中各种文件的功能,解决新增页面需要手工创建一大堆文件的麻烦!!
|
||||||
|
|
||||||
|
命令:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ./bin/kinit -h
|
||||||
|
|
||||||
|
Usage: kinit [options]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-t, --file-type <type> 文件类型: [controller,dao,entity,model,service,impl,jade,less,js]
|
||||||
|
-n, --file-name <name> 被创建的文件名称
|
||||||
|
-p, --file-path <path> 为 -t 参数指定 controller 文件夹名
|
||||||
|
-i, --is-create <is> 是否为 -t 参数自动创建相关文件类型 (default: false)
|
||||||
|
-v, --version 显示当前的版本
|
||||||
|
-h, --help display help for command
|
||||||
|
```
|
||||||
|
|
||||||
|
### 例子 1:
|
||||||
|
|
||||||
|
比如现在需要在`src/controller/api`下单独创建接口,那么可以使用命令:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ./bin/kinit -t controller -p api -n Test
|
||||||
|
```
|
||||||
|
|
||||||
|
参数说明:
|
||||||
|
|
||||||
|
- `-t controller`:表示创建的文件类型为`controller`
|
||||||
|
- `-p api`:表示需要在`src/controller/`文件夹的`api/`文件夹下创建文件,因为`controller`里面有三个文件夹,所以需要指定文件夹名称
|
||||||
|
- `-n Test`:表示创建的文件名称是`Test`
|
||||||
|
|
||||||
|
### 例子 2:
|
||||||
|
|
||||||
|
现在我需要新增一个`PC`官网前台页面,比如**详情页(Info)**,那么按照先前传统的过程我们需要手工去创建:`controller`,`dao`,`entity`,`model`,`service`,`impl`,`jade`,`less`,`js`等一堆文件!真的很烦,而且还要在这么多的文件中写入测试代码,更烦!!
|
||||||
|
|
||||||
|
这种需求很常见,但是现在不必忍受,因为你可以使用命令来自动化创建所有文件,文件中包含实例代码:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ./bin/kinit -t controller -p home -n Info -i true
|
||||||
|
```
|
||||||
|
|
||||||
|
参数说明(其他参数和上面一样):
|
||||||
|
|
||||||
|
- `-i true`:表示是否需要为`Info`自动创建其他更多的各种文件,需要:`true`,不需要:`false` 或者 不写参数`-i`即可。
|
||||||
|
|
||||||
|
### 例子 3:
|
||||||
|
|
||||||
|
创建其他类型的文件,命令都一样。例如:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ ./bin/kinit -t entity -n Test # 创建 TestEntity 数据库实体
|
||||||
|
$ ./bin/kinit -t model -n Test # 创建 TestModel 这里主要做数据校验的功能
|
||||||
|
$ ./bin/kinit -t dao -n Test # 创建 TestDao 数据库操作层
|
||||||
|
$ ./bin/kinit -t service -n Test # 创建 TestService Service层
|
||||||
|
$ ./bin/kinit -t impl -n Test # 创建 TestServiceImpl Service实现层
|
||||||
|
$ ./bin/kinit -t jade -n Test # 创建 Test.jade 静态页面View层
|
||||||
|
$ ./bin/kinit -t js -n Test # 创建 Test.js 静态页面的js逻辑
|
||||||
|
$ ./bin/kinit -t less -n Test # 创建 Test.less 静态页面的css样式
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5:插件 routing-controllers 的坑
|
||||||
|
|
||||||
|
- Bug: 使用注解 `@Render` 渲染模板后,第二次访问其他页面但是展示效果还是上次的页面,页面不进行渲染
|
||||||
|
|
||||||
|
- 路径:`node_modules/routing-controllers/driver/koa/KoaDriver.js`
|
||||||
|
- 行数:`250`行
|
||||||
|
|
||||||
|
解决: 删除下面代码:
|
||||||
|
|
||||||
|
```js
|
||||||
|
// 保留,不要修改
|
||||||
|
var renderOptions_1 = result && result instanceof Object ? result : {};
|
||||||
|
|
||||||
|
// 开始 - 下面的都删除
|
||||||
|
this.koa.use(function (ctx, next) {
|
||||||
|
return __awaiter(this, void 0, void 0, function () {
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0: return [4 /*yield*/, ctx.render(action.renderedTemplate, renderOptions_1)];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// 结束 - 上面的都删除
|
||||||
|
````
|
||||||
|
|
||||||
|
删除后,使用使用下面代码替换:
|
||||||
|
|
||||||
|
```js
|
||||||
|
return options.response.render(action.renderedTemplate, renderOptions_1);
|
||||||
|
```
|
||||||
|
|
||||||
|
最后改好的的样子如下:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var renderOptions_1 = result && result instanceof Object ? result : {};
|
||||||
|
return options.response.render(action.renderedTemplate, renderOptions_1);
|
||||||
|
```
|
||||||
|
|
||||||
|
- Github 问题反馈地址:[https://github.com/../434](https://github.com/typestack/routing-controllers/pull/434)
|
||||||
|
|
||||||
|
- Github 修复分支记录:[https://github.com/types..](https://github.com/typestack/routing-controllers/pull/434/files/001b45a416e3f1dbde33e7e91fadb09111d4061d)
|
||||||
15
康唯唯私活/Vr项目/code/apidoc.json
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "怪客课堂",
|
||||||
|
"version": "1.1.0",
|
||||||
|
"description": "怪客课堂,基于Nodejs + Koa2 + TypeScript 构建的网站",
|
||||||
|
"title": "怪客课堂",
|
||||||
|
"url" : "http://www. geekhelp.cn/bmy/api",
|
||||||
|
"header": {
|
||||||
|
"title": "My own header title",
|
||||||
|
"filename": "./md/header.md"
|
||||||
|
},
|
||||||
|
"footer": {
|
||||||
|
"title": "My own footer title",
|
||||||
|
"filename": "./md/footer.md"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
康唯唯私活/Vr项目/code/dist/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
b7736e27-f3b0-4001-a3ad-7dadb39dee00
|
||||||
1
康唯唯私活/Vr项目/code/dist/config/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
aa9e1ee9-107f-4dbb-a071-b4687c443383
|
||||||
104
康唯唯私活/Vr项目/code/dist/config/dev.js
vendored
Normal 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 产品介绍网站 👏
|
||||||
|
|
||||||
|
👉 1:PC官网: http://${exports.dev.host}:${exports.dev.port}/
|
||||||
|
👉 2:Admin后台: 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
康唯唯私活/Vr项目/code/dist/config/index.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/config/prod.js
vendored
Normal 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 产品介绍网站 👏
|
||||||
|
|
||||||
|
👉 1:PC官网: http://${exports.prod.host}:${exports.prod.port}/
|
||||||
|
👉 2:Admin后台: 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
康唯唯私活/Vr项目/code/dist/controller/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
05f0e743-af8d-497d-98b5-6cdcbc9684f4
|
||||||
1
康唯唯私活/Vr项目/code/dist/controller/admin/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
90f170cb-bcb7-4834-9a9c-b544cb8a760e
|
||||||
59
康唯唯私活/Vr项目/code/dist/controller/admin/AdminController.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/controller/api/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
fa6e2a7e-3b34-490e-b02c-2b874b327b0d
|
||||||
17
康唯唯私活/Vr项目/code/dist/controller/api/TestController.js
vendored
Normal 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;
|
||||||
17
康唯唯私活/Vr项目/code/dist/controller/api/TestControllerApi.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/controller/api/UserControllerApi.js
vendored
Normal 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;
|
||||||
17
康唯唯私活/Vr项目/code/dist/controller/api/homeControllerApi.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/controller/home/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
fc489d19-05dc-4124-af04-491f3a17dd12
|
||||||
44
康唯唯私活/Vr项目/code/dist/controller/home/AboutControllerHome.js
vendored
Normal 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;
|
||||||
35
康唯唯私活/Vr项目/code/dist/controller/home/ErrorControllerHome.js
vendored
Normal 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;
|
||||||
53
康唯唯私活/Vr项目/code/dist/controller/home/IndexControllerHome.js
vendored
Normal 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;
|
||||||
17
康唯唯私活/Vr项目/code/dist/controller/home/TestControllerHome.js
vendored
Normal 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;
|
||||||
56
康唯唯私活/Vr项目/code/dist/controller/home/UserActionController.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/controller/home/UserOperation.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
class UserOperation {
|
||||||
|
}
|
||||||
|
exports.UserOperation = UserOperation;
|
||||||
1
康唯唯私活/Vr项目/code/dist/dao/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
e4f8ffd5-80a1-469b-9b40-94bf8a0fdea5
|
||||||
42
康唯唯私活/Vr项目/code/dist/dao/UserDao.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/dao/testDao.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/entity/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
41a502c7-d47d-447e-b73e-0054dfee4b32
|
||||||
22
康唯唯私活/Vr项目/code/dist/entity/TestEntity.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/entity/UserEntity.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
/**
|
||||||
|
* 启动文件入口
|
||||||
|
*/
|
||||||
|
const app_1 = require("./run/app");
|
||||||
|
new app_1.App();
|
||||||
1
康唯唯私活/Vr项目/code/dist/middleware/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
6980b776-0b58-4318-a2f3-604edb16a6e9
|
||||||
16
康唯唯私活/Vr项目/code/dist/middleware/CheckLoginMiddleware.js
vendored
Normal 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;
|
||||||
34
康唯唯私活/Vr项目/code/dist/middleware/JsonResponseMiddlewares.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/middleware/LogsMiddlewares.js
vendored
Normal 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;
|
||||||
68
康唯唯私活/Vr项目/code/dist/middleware/ResultDataMiddlewares.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/model/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
a77161da-f741-4398-b4a0-5f0c7469e3f6
|
||||||
21
康唯唯私活/Vr项目/code/dist/model/TestModel.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/model/UserModel.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/plugins/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
484d2077-315b-4502-9425-7b22c9a26559
|
||||||
67
康唯唯私活/Vr项目/code/dist/plugins/qiniu.js
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/resources/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ad35604f-b0f6-4a9f-868c-5be7a1bc5456
|
||||||
1
康唯唯私活/Vr项目/code/dist/resources/static/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
df33aa55-4803-471c-8433-67d71c001a1b
|
||||||
1
康唯唯私活/Vr项目/code/dist/resources/static/css/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
429b0bea-56d6-433c-8175-f896aee23802
|
||||||
0
康唯唯私活/Vr项目/code/dist/resources/static/css/base.css
vendored
Executable file
1
康唯唯私活/Vr项目/code/dist/resources/static/css/home/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2e267447-1860-4e47-888e-19827d3cd38a
|
||||||
3
康唯唯私活/Vr项目/code/dist/resources/static/css/home/about.css
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.about {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
38
康唯唯私活/Vr项目/code/dist/resources/static/css/home/error.css
vendored
Normal 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
康唯唯私活/Vr项目/code/dist/resources/static/css/home/index.css
vendored
Executable file
4
康唯唯私活/Vr项目/code/dist/resources/static/css/home/register.css
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.register {
|
||||||
|
font-size: 30px;
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
3
康唯唯私活/Vr项目/code/dist/resources/static/css/home/test.css
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.Test {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
1
康唯唯私活/Vr项目/code/dist/resources/static/css/tpl/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
0fc03c51-4b6b-4a6c-adc2-ade3bd9367db
|
||||||
0
康唯唯私活/Vr项目/code/dist/resources/static/css/tpl/colors.css
vendored
Executable file
0
康唯唯私活/Vr项目/code/dist/resources/static/css/tpl/mixins.css
vendored
Executable file
1
康唯唯私活/Vr项目/code/dist/resources/static/fonts/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
985602a4-c3a9-46b9-9aa9-754d85db7413
|
||||||
1
康唯唯私活/Vr项目/code/dist/resources/static/img/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
e1ffcee7-d2b8-48d7-a57d-3fd4e533a98a
|
||||||
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/banner.png
vendored
Executable file
|
After Width: | Height: | Size: 340 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/banner_1.png
vendored
Executable file
|
After Width: | Height: | Size: 232 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/banner_2.png
vendored
Executable file
|
After Width: | Height: | Size: 492 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/banner_3.png
vendored
Executable file
|
After Width: | Height: | Size: 492 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/banner_4.jpg
vendored
Executable file
|
After Width: | Height: | Size: 142 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/banner_5.jpg
vendored
Executable file
|
After Width: | Height: | Size: 200 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/banner_6.jpg
vendored
Executable file
|
After Width: | Height: | Size: 123 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/banner_7.png
vendored
Executable file
|
After Width: | Height: | Size: 96 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/bgError.png
vendored
Executable file
|
After Width: | Height: | Size: 40 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/discountbanner.png
vendored
Executable file
|
After Width: | Height: | Size: 108 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/favicon.ico
vendored
Executable file
|
After Width: | Height: | Size: 40 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/getbg.png
vendored
Executable file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/spjcdet_img1.png
vendored
Executable file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/spjcdet_img2.jpg
vendored
Executable file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/spjcdet_img3.png
vendored
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/spjcdet_img4.png
vendored
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/wx.png
vendored
Executable file
|
After Width: | Height: | Size: 114 KiB |
BIN
康唯唯私活/Vr项目/code/dist/resources/static/img/youh.png
vendored
Executable file
|
After Width: | Height: | Size: 3.9 KiB |
1
康唯唯私活/Vr项目/code/dist/resources/static/js/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
c2a34f1e-dabb-4ccf-a9b0-dbe3135588cb
|
||||||
32
康唯唯私活/Vr项目/code/dist/resources/static/js/app.js
vendored
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
requirejs.config({
|
||||||
|
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
康唯唯私活/Vr项目/code/dist/resources/static/js/app/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
4765c3ab-e96b-4baf-b932-777ed1069641
|
||||||
12
康唯唯私活/Vr项目/code/dist/resources/static/js/app/about.js
vendored
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
define(['jquery','utils'],function ($,utils) {
|
||||||
|
function about() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
about.prototype = {
|
||||||
|
init () {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return new about();
|
||||||
|
});
|
||||||
30
康唯唯私活/Vr项目/code/dist/resources/static/js/app/index.js
vendored
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
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();
|
||||||
|
})
|
||||||
14
康唯唯私活/Vr项目/code/dist/resources/static/js/app/register.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
define(['jquery','swiper','utils'],function ($,swiper,utils) {
|
||||||
|
function Register() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Register.prototype = {
|
||||||
|
init () {
|
||||||
|
console.log("用户注册")
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
return new Register();
|
||||||
|
});
|
||||||
1
康唯唯私活/Vr项目/code/dist/resources/static/js/config/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
4d771ed8-a00e-47ab-ac69-4f32d7793174
|
||||||
10
康唯唯私活/Vr项目/code/dist/resources/static/js/config/index.js
vendored
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* 网站前端的 config 配置文件
|
||||||
|
*/
|
||||||
|
define([], function () {
|
||||||
|
return {
|
||||||
|
|
||||||
|
// 请求基地址
|
||||||
|
baseURL: 'http://www.geekhelp.cn/bmy/api'
|
||||||
|
}
|
||||||
|
})
|
||||||
1
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
5f81b52a-66ad-4d15-9454-9c9186df3db5
|
||||||
169
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/css.js
vendored
Executable 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
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/jquery.min.js
vendored
Executable file
5
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/require.js
vendored
Executable file
1
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/swiper/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
5bc44bb9-5c1f-469b-b2d2-2d2af5a5c101
|
||||||
12
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/swiper/swiper.min.css
vendored
Normal file
13
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/swiper/swiper.min.js
vendored
Executable file
1
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/swiper/swiper.min.js.map
vendored
Normal file
1
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/zui/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
c442cfa6-404c-49b4-b24d-0780498e1c91
|
||||||
1
康唯唯私活/Vr项目/code/dist/resources/static/js/lib/zui/css/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
67671134-a2dc-4eb5-b622-48c26de86b7c
|
||||||