45 Commits
Author SHA1 Message Date
hello-hao 8542ca2afc :art:完善新功能 2022-04-15 19:14:15 +08:00
hello-hao 5feabe5bf3 :art:完善新功能 2022-04-08 19:07:50 +08:00
hello-hao 10cafd8add 📝 2022-04-08 16:56:05 +08:00
hello-hao e528b75c76 📝 2022-04-08 16:51:06 +08:00
hello-hao 9d8827032e 📝 2022-04-07 10:50:01 +08:00
hello-hao a190bc5077 📝 2022-04-07 10:38:26 +08:00
hello-hao 6083ae97a3 :bug:修复代码问题 2022-04-07 10:35:56 +08:00
hello-hao 95889c42ef :bug:修复部分场景下出现的错误 2022-03-28 15:43:03 +08:00
hello-hao 9a6ce4d5eb 📝 2022-03-28 15:42:15 +08:00
hello-hao fdfd8391e3 📝 2022-03-28 15:12:59 +08:00
hello-hao 276d329276 :art:优化核心代码 2022-03-28 15:12:38 +08:00
hello-hao 2997d9ee72 :bug:修复问题优化代码 2022-03-17 13:42:57 +08:00
hello-hao c754825b93 📝 2022-02-27 16:52:02 +08:00
hello-hao 723a9c15ab 📝 2022-02-27 16:49:08 +08:00
hello-hao 4c6a19a4ab 🔖 2022-02-21 19:01:38 +08:00
hello-hao d09b5c2656 :bug:修复个人相册显示所有图片的错误逻辑,修复图像筛选功能,新增部分功能 2022-02-21 18:45:41 +08:00
hello-hao 68f175679f 🔖 2022-02-21 18:37:53 +08:00
hello-hao 43cfc832a8 :bug:紧急修复多个对象存储上传失败问题 2022-02-16 16:53:31 +08:00
hello-hao 6df3267b18 📝 2022-02-16 16:50:53 +08:00
hello-hao b0562203c2 📝 2022-02-11 14:14:11 +08:00
hello-hao 995582f7c6 📝 2022-02-08 13:41:13 +08:00
hello-hao e347ec2367 📝 2022-02-08 13:39:32 +08:00
hello-hao ffcd4dbf40 :bug:修复添加分发群组数据保存不全 2022-01-27 11:28:22 +08:00
hello-hao 6ee1673d83 :sparkles:分发群组/图像鉴别 2022-01-27 11:27:23 +08:00
hello-hao 7b0db6fe16 📝 2022-01-27 11:24:20 +08:00
hello-hao 1baed6a29a 📝 2021-12-29 14:05:39 +08:00
hello-hao a4855adbe6 :art:优化响应头和返回值判断逻辑 2021-12-29 11:12:24 +08:00
hello-hao b0cd5ca51f 📝 2021-12-15 10:28:03 +08:00
hello-hao 00b2f58916 📝 2021-11-29 11:34:33 +08:00
hello-hao 78b3206f65 🚑 2021-11-29 11:27:26 +08:00
hello-hao feb13edc66 📝 2021-11-29 11:21:56 +08:00
hello-hao 4700d79f35 📝 2021-11-16 14:14:40 +08:00
hello-hao 5a9bb8a509 📝 2021-11-01 11:16:43 +08:00
hello-hao 13bc21df93 📝 2021-11-01 10:36:44 +08:00
923453645@qq.com d4a4076d05 🔖 2021-10-29 22:46:13 +08:00
hello-hao 8390f355a8 :art:完善程序功能 2021-10-29 18:25:53 +08:00
hello-hao 8c0bef5127 🎨 2021-10-29 16:13:08 +08:00
hello-hao 696f8eac9c 🎨 2021-10-29 16:06:06 +08:00
hello-hao d6dd42546b 🎨 2021-10-29 16:00:10 +08:00
hello-hao 208a1a3c00 :art:优化核心代码 2021-10-29 15:03:35 +08:00
hello-hao 679094533f 📝 2021-10-29 14:58:53 +08:00
hello-hao ed695d7cb7 :wrench:更新配置文件 2021-10-29 14:46:05 +08:00
hello-hao 1dc014a231 :rocket:数据库表结构 2021-10-29 14:44:38 +08:00
hello-hao fd675264a5 :art:优化整体架构 2021-10-29 14:23:40 +08:00
hello-hao 738bd5873d :arrow_up:升级依赖 2021-10-29 14:07:02 +08:00
360 changed files with 681 additions and 66569 deletions
+1
View File
@@ -3,3 +3,4 @@
*.css linguist-language=java *.css linguist-language=java
*.html linguist-language=java *.html linguist-language=java
+1
View File
@@ -74,3 +74,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
For answers to common questions about this code of conduct, see For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq https://www.contributor-covenant.org/faq
+124 -57
View File
@@ -1,111 +1,178 @@
# Hellohao图床 - 强大的图像托管服务程序 # Hellohao图像托管程序 - 也许这会是最优秀的图床程序
![宣传图Banner](https://upload.cc/i1/2022/02/11/HSg5tX.png)
![banner.png](http://img.wwery.com/Hellohao/HqXVDR2b.png)
![Visual Studio Marketplace Rating (Stars)](https://img.shields.io/visual-studio-marketplace/stars/ritwickdey.LiveServer?style=flat-square) ![Visual Studio Marketplace Rating (Stars)](https://img.shields.io/visual-studio-marketplace/stars/ritwickdey.LiveServer?style=flat-square)
![https://img.shields.io/badge/license-AGPL-blue.svg?style=flat-square](https://img.shields.io/badge/license-AGPL-blue.svg?longCache=true&style=flat-square) ![https://img.shields.io/badge/license-AGPL-blue.svg?style=flat-square](https://img.shields.io/badge/license-AGPL-blue.svg?longCache=true&style=flat-square)
![https://img.shields.io/badge/language-java-orange.svg?style=flat-square](https://img.shields.io/badge/language-java-yellow.svg?longCache=true&style=popout-square) ![https://img.shields.io/badge/language-java-orange.svg?style=flat-square](https://img.shields.io/badge/language-java-yellow.svg?longCache=true&style=popout-square)
**Hellohao图像托管程序**这是一个基于多家对象存储源 JAVA语言编写SpringBoot框架开发的开源图像托管程序。
### 前言
**Hellohao图像托管程序**(图床)这是一个由JAVA语言编写SpringBoot框架开发的开源图像托管程序。具备多对象存储源对接,采用`前后端分离`式设计的一款专门托管图像的程序,支持多种格式的图像 多功能的图床系统。
程序主要使用领域:`个人照片存储``团队共享图像``博客/商城等网站图片托管``图像批量云分享`等。具备优秀的多用户图像上传功能和完善的图像查询管理逻辑,同时支持对接多家对象存储。 程序主要使用领域:`个人照片存储``团队共享图像``博客/商城等网站图片托管``图像批量云分享`等。具备优秀的多用户图像上传功能和完善的图像查询管理逻辑,同时支持对接多家对象存储。
> 无论你使用开源版或者Core版,都希望你能给我点个赞,你的`star`是对一名开发者最大的支持
**存储源支持:** **存储源支持:**
开源版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,`U-File`,`FTP` 开源版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,~~`U-File`~~,`FTP`
Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,`U-File`,`FTP`,`Backblaze(B2)`,`百度云BOS`,`青云Qingstor`,`Ucloud US3`,`Minio`,`AWS S3` Core版:`本地`,`阿里OSS`,`又拍USS`,`七牛KODO`,`腾讯COS`,`网易NOS`,~~`U-File`~~,`FTP`,`Backblaze(B2)`,`百度云BOS`,`青云Qingstor`,`Ucloud US3`,`Minio`,`AWS S3`
### 更新日志 `20220407`
- **修复** 修复了用户数据量较大时进行操作的一些异常表现
- **提高** 系统稳定性
- **优化** 页面显示
### 引导
[官网](https://tbed.hellohao.cn) | [宣传视频](https://www.bilibili.com/video/BV11r4y1y7mH/) | [文档](http://doc.wwery.com) | [演示站](http://tc.wwery.com)
[^_^]:程序宣传视频:[自制宣传视频](https://www.bilibili.com/video/BV11r4y1y7mH/)
[^_^]:官网(含Core版)[https://tbed.hellohao.cn](https://tbed.hellohao.cn)
[^_^]:前端源码:[https://github.com/Hello-hao/tbed-web](https://github.com/Hello-hao/tbed-web)
[^_^]:文档地址:[https://doc.hellohao.cn](https://doc.hellohao.cn)
[^_^]:程序展示:[https://tc.hellohao.cn](https://tc.hellohao.cn)
[^_^]:作者博客:[https://www.hellohao.cn](https://www.hellohao.cn)
[^_^]:官网(含Core版)(备用)[http://tbed.wwery.com](http://tbed.wwery.com)
[^_^]:文档地址(备用)[http://doc.wwery.com](http://doc.wwery.com)
[^_^]:程序展示(备用)[http://tc.wwery.com](http://tc.wwery.com)
[^_^]:作者博客(备用)[http://www.wwery.com](http://www.wwery.com)
## 重构版已经开始进行 ### 主要功能
### 程序宣传视频:[点击查看](https://www.bilibili.com/video/BV11r4y1y7mH/) - [x] 前后端分离式架构设计,部署更方便
> 目前Core版本(付费版已经重构完成,即将发布正式版) - [x] 个人相册浏览,图像详细资料展示卡片
> 开源版正在开发中
作者正在夜以继日的努力开发中,敬请期待! - [x] 支持 图片拖拽、截图直接(Ctrl+V)
源代码不可用请谅解,如需搭建请前往下载编译包直接部署。
主站地址(包含Core版购买地址): [http://tbed.hellohao.cn/](http://tbed.hellohao.cn/) - [x] 支持URL地址批量上传
程序Demo: [http://tc.hellohao.cn](http://tc.hellohao.cn) - [x] 一键复制嵌入式链接代码,也可以自定义嵌入式代码格式
开源版/Core版 文档地址: [http://doc.hellohao.cn](http://doc.hellohao.cn) - [x] 对接邮箱服务,注册/找回密码等功能
开源版编译包下载(内部版请前往主站获取): [https://github.com/Hello-hao/Tbed/releases/](https://github.com/Hello-hao/Tbed/releases/) - [x] 违规图像实时多线程鉴别
--- - [x] 图片定期暂存
> 一下是旧版程序的介绍和截图,等新版开发出来后再贴图 - [x] 支持多种图像格式如:`jfif`,`webp`,`ico`,`svg`
## 系统预览
- [x] 支持画廊批量分享模式
- [x] 账户图像查重上传
- [x] 配置IP黑名单操作
- [x] 站点上传可控API接口
- [x] 设置用户可用容量
- [x] 账户扩容码批量生成
- [x] 细致的上传分发配置,分发群组功能
- [x] 游客、用户的上传管理
- [x] 图像直链二维码生成
![图床后台管理.png](http://cdn.wwery.com/Hellohao/c208e0825054822.png)
![图床后台管理2.png](http://cdn.wwery.com/Hellohao/6c7690825054822.png) ### 系统预览
![图床后台管理3.png](http://cdn.wwery.com/Hellohao/2a79b0825054822.png)
![图床后台管理4.png](http://cdn.wwery.com/Hellohao/5c1800825054824.png) ![首页](https://upload.cc/i1/2022/02/11/t2wCEF.png)
![控制台详情](https://upload.cc/i1/2022/02/11/Al8UrH.png)
![相册](https://upload.cc/i1/2022/02/11/2LhEHJ.png)
![多存储源](https://upload.cc/i1/2022/02/11/gOPxZW.png)
![站点设置](https://upload.cc/i1/2022/02/11/Hj7pWM.png)
[^_^]: ![首页](http://img.wwery.com/Hellohao/xI9TSKcI.png)
[^_^]: ![控制台详情](http://img.wwery.com/Hellohao/klytOMWr.png)
[^_^]: ![相册](http://img.wwery.com/Hellohao/2UQkXTHw.png)
[^_^]: ![多存储源](http://img.wwery.com/Hellohao/xXSMlsTg.png)
[^_^]: ![站点设置](http://img.wwery.com/Hellohao/n5zXistG.png)
## 运行环境 ### 运行环境
- JDK 1.8 - JDK 1.8
- MySQL5.5+ - MySQL5.5+
- Redis
### 所用技术
## 部署 #### 前端主要技术
### 修改配置文件 - vue
- iview
- vuex
- axios
#### 后端主要技术
- SpringBoot
- MyBatis
- MySQL
- Maven
- JWT认证
- Shiro
打开 `application.properties` 修改 `MySQL``服务器端口` 等连接信息.
### 部署 ### 部署
前提是你的服务器必须要有`JDK1.8`环境,和`mysql`数据库。 > 部署方式分为两种:
> 1.一键脚本部署:`Tbed-together.zip`(操作简单)
```shell > 2.自定义部署 前后端分离式部署:`Tbed.zip`(拓展性高适合有一定java前后端分离部署经验的人)
#JDK安装命令 > 需要注意:一键部署的端口为:服务器:`10088` 前端:`10089`
yum install java-1.8*
```
`Tbed.jar``application.properties`放到服务器你想存放的目录比如`/home`,注意这两个文件必须要在同一目录下不能分开。
依次运行如下命令:
```shell
cd /home
java -jar Tbed.jar
```
详细部署教程参考程序[相关文档](http://doc.hellohao.cn)
### 启动项目 ### 启动项目
启动后访问地址为:http://localhost:8088 , `8088`就是你配置`server.port=8088`的端口. 初始用户名:`admin`
初始邮箱:`admin`
初始密码:`admin`
初始用户名:admin ### 微信小程序
初始邮箱:admin > 目前已有测试版,更多功能开发中,开发进度的快慢要根据作者的工作压力、心情状况等自身情况进行评估。
初始密码`admin` > 暂时无法给出具体发布小程序的时间。大家期待吧。
![Hellohao图像托管](https://upload.cc/i1/2022/03/28/Vnp0bT.png)
注意:上边的`/home`是你的jar包和application.properties文件放的目录。 [^_^]: ![小程序UI](https://upload.cc/i1/2022/02/11/6kPmr8.png)
项目运行起来不要关闭xshell窗口,否则项目将不能访问。可以使用一些后台命令把项目锁定后台。如`nohup``screen`,推荐使用`screen`
### PC客户端
作者精力不够,工作繁忙,暂停更新
### 声明 ### 声明
程序免费提供给个人用户使用,未经允许不得作为盈利商业使用,如果你想商用或程序定制,请先与我们联系,分享你的利益 项目遵循[GNU Affero General Public License v3.0](https://choosealicense.com/licenses/agpl-3.0/#)开源协议,使用前请悉知
源码仅供感兴趣的开发者做开发逻辑参考,不得在未经开发者同意的情况下以他人名义修改并发布使用编译包 如果你想商用或程序定制,请先与我们联系,分享你的利益
如果你想个人修改并使用我的源码,请保留原作者的版权,并开源你修改过的源码。
### 反馈交流 ### 反馈交流
**如果你遇到BUG可以去我的博客反馈** **如果你遇到BUG欢迎反馈**
Hellohao博客: [http://www.hellohao.cn/](http://www.hellohao.cn/)
欢迎加入Hellohao开发者交流群,群聊号码:**864800972** 欢迎加入Hellohao开发者交流群,群聊号码:**864800972**
@@ -113,5 +180,5 @@ Hellohao博客: [http://www.hellohao.cn/](http://www.hellohao.cn/)
**如果你也支持Hellohao图床,可以请我喝杯咖啡。我会持续更新Hellohao图床** **如果你也支持Hellohao图床,可以请我喝杯咖啡。我会持续更新Hellohao图床**
**捐赠地址:** [**http://tbed.hellohao.cn/pay**](http://tbed.hellohao.cn/pay) **捐赠地址:** [**https://tbed.hellohao.cn/pay**](https://tbed.hellohao.cn/pay)
+1 -30
View File
@@ -6,7 +6,7 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.1</version> <version>2.5.1</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/>
</parent> </parent>
<groupId>cn.hellohao</groupId> <groupId>cn.hellohao</groupId>
<artifactId>Tbed</artifactId> <artifactId>Tbed</artifactId>
@@ -58,9 +58,6 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- 自定义依赖添加 -->
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId> <artifactId>spring-boot-starter-data-redis</artifactId>
@@ -77,22 +74,12 @@
<artifactId>java-jwt</artifactId> <artifactId>java-jwt</artifactId>
<version>3.16.0</version> <version>3.16.0</version>
</dependency> </dependency>
<!-- 下边两个都是为了检查类型-->
<!-- https://mvnrepository.com/artifact/jmimemagic/jmimemagic -->
<!-- <dependency>-->
<!-- <groupId>jmimemagic</groupId>-->
<!-- <artifactId>jmimemagic</artifactId>-->
<!-- <version>0.1.2</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-core -->
<dependency> <dependency>
<groupId>org.apache.tika</groupId> <groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId> <artifactId>tika-core</artifactId>
<version>2.0.0</version> <version>2.0.0</version>
</dependency> </dependency>
<!-- 实体类标识注解如:不能为空 最大长度 等 -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId> <artifactId>spring-tx</artifactId>
@@ -118,11 +105,6 @@
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
<version>4.5.13</version> <version>4.5.13</version>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.httpcomponents</groupId>-->
<!-- <artifactId>httpmime</artifactId>-->
<!-- <version>4.5.12</version>-->
<!-- </dependency>-->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
@@ -171,7 +153,6 @@
<version>0.0.4</version> <version>0.0.4</version>
</dependency> </dependency>
<!-- 对象存储依赖-->
<dependency> <dependency>
<groupId>com.netease.cloud</groupId> <groupId>com.netease.cloud</groupId>
<artifactId>nos-sdk-java-publiccloud</artifactId> <artifactId>nos-sdk-java-publiccloud</artifactId>
@@ -192,7 +173,6 @@
<artifactId>activation</artifactId> <artifactId>activation</artifactId>
<version>1.1.1</version> <version>1.1.1</version>
</dependency> </dependency>
<!-- no more than 2.3.3-->
<dependency> <dependency>
<groupId>org.glassfish.jaxb</groupId> <groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId> <artifactId>jaxb-runtime</artifactId>
@@ -231,15 +211,6 @@
<version>5.2.6.RELEASE</version> <version>5.2.6.RELEASE</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- 解析xml的依赖-->
<!-- <dependency>-->
<!-- <groupId>dom4j</groupId>-->
<!-- <artifactId>dom4j</artifactId>-->
<!-- <version>1.6.1</version>-->
<!-- </dependency>-->
</dependencies> </dependencies>
<build> <build>
+15 -17
View File
@@ -11,7 +11,7 @@
Target Server Version : 50720 Target Server Version : 50720
File Encoding : 65001 File Encoding : 65001
Date: 28/10/2021 22:17:33 Date: 29/10/2021 14:42:28
*/ */
SET NAMES utf8mb4; SET NAMES utf8mb4;
@@ -80,7 +80,7 @@ CREATE TABLE `config` (
-- ---------------------------- -- ----------------------------
-- Records of config -- Records of config
-- ---------------------------- -- ----------------------------
INSERT INTO `config` VALUES (1, 7, 1, 'Hellohao图床', 'Hellohao图像托管,是一家免费开源的图像托管,即时分享你的美好瞬间。', 'https://hellohao-cloud.oss-cn-beijing.aliyuncs.com/books_x264.mp4http://cdn.wwery.com/Hellohao/439550606022825.jpg', '1', '<p style=\"color:#7c7c88;\">&copy; 2019 <a href=\"http://www.Hellohao.cn/\" target=\"_blank\" title=\"Hellohao\">Hellohao</a><span>&nbsp;&nbsp;- All Rights Reserved</span> </p>', '也许...|这将是最好用的图床|为了更好的用户体验,建议您注册本站继续免费使用Hellohao图床。本站不得上传任何形式的非法图片,一旦发现,永久删除并禁封账户。情节严重者将相关资料交于相关部门处理。', 'var _hmt = _hmt || [];\n(function() {\n var hm = document.createElement(\"script\");\n hm.src = \"https://hm.baidu.com/hm.js?16c326e608c984c9bae6a63eda861888\";\n var s = document.getElementsByTagName(\"script\")[0]; \n s.parentNode.insertBefore(hm, s);\n})();\n\n', 'http://api.hellohao.cn', '', 'http://cdn.wwery.com/Hellohao/3e1901120091153.jpg', 1, 'Hellohao图像托管,是一家免费开源的图像托管,即时分享你的美好瞬间。', 'hellohao图床,图床,图片上传,开源图床,hellohao,图像托管,图片分享', 'https://hellohao.nos-eastchina1.126.net/BlogImg/favicon.ico', 2, '这将是你用过最优秀的图像托管程序', NULL, '<img width=\"300px\" src=\"http://img.wwery.com/Hellohao/7SpMQnE3.png\">\n <br />\n <br />\n <p>也许,这将是你用到最优秀的图像托管程序</p>\n <p>本程序为Hellohao图象托管程序的重构Dev</p>\n <br/>\n <p style=\"color: #656565;\">作者:hellohao独立开发</p>\n <p style=\"color: #656565;\">www.hellohao.cn</p>'); INSERT INTO `config` VALUES (1, 7, 1, 'Hellohao图床', 'Hellohao图像托管,是一家免费开源的图像托管,即时分享你的美好瞬间。', 'https://hellohao-cloud.oss-cn-beijing.aliyuncs.com/books_x264.mp4http://cdn.wwery.com/Hellohao/439550606022825.jpg', '1', '<p style=\"color:#7c7c88;\">&copy; 2019 <a href=\"http://www.Hellohao.cn/\" target=\"_blank\" title=\"Hellohao\">Hellohao</a><span>&nbsp;&nbsp;- All Rights Reserved</span> </p>', '也许...|这将是最好用的图床|为了更好的用户体验,建议您注册本站继续免费使用Hellohao图床。本站不得上传任何形式的非法图片,一旦发现,永久删除并禁封账户。情节严重者将相关资料交于相关部门处理。', 'var _hmt = _hmt || [];\n(function() {\n var hm = document.createElement(\"script\");\n hm.src = \"https://hm.baidu.com/hm.js?16c326e608c984c9bae6a63eda861888\";\n var s = document.getElementsByTagName(\"script\")[0]; \n s.parentNode.insertBefore(hm, s);\n})();\n\n', 'http://api.hellohao.cn', '', 'http://cdn.wwery.com/Hellohao/3e1901120091153.jpg', 1, 'Hellohao图像托管,是一家免费开源的图像托管,即时分享你的美好瞬间。', 'hellohao图床,图床,图片上传,开源图床,hellohao,图像托管,图片分享', 'https://hellohao.nos-eastchina1.126.net/BlogImg/favicon.ico', 2, '这将是你用过最优秀的图像托管程序', NULL, '<img width=\"300px\" src=\"http://img.wwery.com/Hellohao/rPscRYwz.png\">\n <br />\n <br />\n <p>也许,这将是你用到最优秀的图像托管程序</p>\n <p>本程序为Hellohao图象托管程序</p>\n <br/>\n <p style=\"color: #656565;\">作者:hellohao独立开发</p>\n <p style=\"color: #656565;\">www.hellohao.cn</p>');
-- ---------------------------- -- ----------------------------
-- Table structure for emailconfig -- Table structure for emailconfig
@@ -100,7 +100,7 @@ CREATE TABLE `emailconfig` (
-- ---------------------------- -- ----------------------------
-- Records of emailconfig -- Records of emailconfig
-- ---------------------------- -- ----------------------------
INSERT INTO `emailconfig` VALUES (1, 'hellohao@hellohao.cn', '123456', 'smtp.qq.com', '465', 'Hellohao图床', 0); INSERT INTO `emailconfig` VALUES (1, '', '', '', '465', 'Hellohao图床', 0);
-- ---------------------------- -- ----------------------------
-- Table structure for group -- Table structure for group
@@ -157,7 +157,7 @@ CREATE TABLE `imgdata` (
`violation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `violation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE, PRIMARY KEY (`id`) USING BTREE,
INDEX `index_md5key_url`(`md5key`(255), `imgurl`(255)) USING BTREE INDEX `index_md5key_url`(`md5key`(255), `imgurl`(255)) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compressed; ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compressed;
-- ---------------------------- -- ----------------------------
-- Records of imgdata -- Records of imgdata
@@ -216,16 +216,14 @@ CREATE TABLE `keys` (
-- ---------------------------- -- ----------------------------
-- Records of keys -- Records of keys
-- ---------------------------- -- ----------------------------
INSERT INTO `keys` VALUES (1, '1', '1', '1', '1', '1', 2, '阿里云'); INSERT INTO `keys` VALUES (1, '', '', '', '', '', 2, '阿里云');
INSERT INTO `keys` VALUES (2, '1', '1', '1', '1', '1', 1, '网易云'); INSERT INTO `keys` VALUES (2, '', '', '', '', '', 1, '网易云');
INSERT INTO `keys` VALUES (3, '1', '1', '0', '1', '1', 3, '又拍'); INSERT INTO `keys` VALUES (3, '', '', '0', '', '', 3, '又拍');
INSERT INTO `keys` VALUES (4, '1', '1', '1', '1', '1', 4, '七牛云'); INSERT INTO `keys` VALUES (4, '', '', '', '', '', 4, '七牛云');
INSERT INTO `keys` VALUES (5, '0', '0', '0', '0', 'http://127.0.0.1:8088', 5, 'Localhost'); INSERT INTO `keys` VALUES (5, '0', '0', '0', '0', 'http://127.0.0.1:8089', 5, 'Localhost');
INSERT INTO `keys` VALUES (6, '1', '1', '1', '1', '1', 6, '腾讯云'); INSERT INTO `keys` VALUES (6, '', '', '', '', '', 6, '腾讯云');
INSERT INTO `keys` VALUES (8, '1', '1', '0', '1', '1', 8, 'UFile'); INSERT INTO `keys` VALUES (8, '', '', '0', '', '', 8, 'UFile');
INSERT INTO `keys` VALUES (9, '1', '1', '1', '1', '1', 9, 'B2'); INSERT INTO `keys` VALUES (13, '', '', '', '0', '', 7, 'ftp');
INSERT INTO `keys` VALUES (10, '1', '1', '1', '1', '1', 10, 'minio');
INSERT INTO `keys` VALUES (13, '1', '1', '1', '0', '1', 7, 'ftp');
-- ---------------------------- -- ----------------------------
-- Table structure for sysconfig -- Table structure for sysconfig
@@ -267,7 +265,7 @@ CREATE TABLE `uploadconfig` (
-- ---------------------------- -- ----------------------------
-- Records of uploadconfig -- Records of uploadconfig
-- ---------------------------- -- ----------------------------
INSERT INTO `uploadconfig` VALUES (1, '1048576', '5242880', 1, 5, 'gif,jpg,jpeg,bmp,png,jfif,webp,ico,svg', 1, 1, 1, '2147483648', '104857600', '', 1); INSERT INTO `uploadconfig` VALUES (1, '10485760', '20971520', 5, 10, 'gif,jpg,jpeg,bmp,png,jfif,webp', 1, 0, 0, '524288000', '104857600', '', 1);
-- ---------------------------- -- ----------------------------
-- Table structure for user -- Table structure for user
@@ -285,12 +283,12 @@ CREATE TABLE `user` (
`memory` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `memory` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`groupid` int(255) NULL DEFAULT NULL, `groupid` int(255) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ---------------------------- -- ----------------------------
-- Records of user -- Records of user
-- ---------------------------- -- ----------------------------
INSERT INTO `user` VALUES (1, 'admin', 'YWRtaW4=', 'admin', '2019-01-10', 2, 'a7d513e6e0084057a6f1c7b395ddbe6b', 1, '2147483648', 1); INSERT INTO `user` VALUES (1, 'admin', 'YWRtaW4=', 'admin', '2019-01-10', 2, 'e95c0571bfe04ec680c249fb15cc22e9', 1, '2147483648', 1);
-- ---------------------------- -- ----------------------------
-- Table structure for usergroup -- Table structure for usergroup
@@ -29,7 +29,6 @@ public class OriginFilter {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration corsConfiguration = new CorsConfiguration(); CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.setAllowCredentials(true); corsConfiguration.setAllowCredentials(true);
// corsConfiguration.setAllowedOriginPatterns(Collections.singletonList(allowedOrigins.replace(" ", "")));
corsConfiguration.setAllowedOriginPatterns(Collections.singletonList(CorsConfiguration.ALL)); corsConfiguration.setAllowedOriginPatterns(Collections.singletonList(CorsConfiguration.ALL));
corsConfiguration.setAllowedHeaders(Collections.singletonList(CorsConfiguration.ALL)); corsConfiguration.setAllowedHeaders(Collections.singletonList(CorsConfiguration.ALL));
corsConfiguration.setAllowedMethods(Collections.singletonList(CorsConfiguration.ALL)); corsConfiguration.setAllowedMethods(Collections.singletonList(CorsConfiguration.ALL));
@@ -42,28 +41,3 @@ public class OriginFilter {
} }
//@Configuration
//public class OriginFilter implements WebMvcConfigurer {
//
// @Value("${CROS_ALLOWED_ORIGINS}")
// private String allowedOrigins;
//
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// // 允许跨域访问的路径
// registry.addMapping("/**")
// // 允许跨域访问的源
// .allowedOrigins("http://服务器Ip:9528","http://服务器Ip:9001")
// // 允许请求方法
// .allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")
// // 预检间隔时间
// .maxAge(168000)
// // 允许头部设置
// .allowedHeaders("*")
// // 是否发送cookie
// .allowCredentials(true);
// }
//
//}
@@ -43,17 +43,14 @@ public class ShiroConfig {
} }
//安全对象
@Bean @Bean
public DefaultWebSecurityManager defaultWebSecurityManager(@Qualifier("userRealm") UserRealm userRealm){ public DefaultWebSecurityManager defaultWebSecurityManager(@Qualifier("userRealm") UserRealm userRealm){
DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager(); DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager();
//关联UserRealm
defaultWebSecurityManager.setRealm(userRealm); defaultWebSecurityManager.setRealm(userRealm);
defaultWebSecurityManager.setRememberMeManager(null); defaultWebSecurityManager.setRememberMeManager(null);
return defaultWebSecurityManager; return defaultWebSecurityManager;
} }
//创建 realm 对象
@Bean(name = "userRealm") @Bean(name = "userRealm")
public UserRealm userRealm(){ public UserRealm userRealm(){
return new UserRealm(); return new UserRealm();
@@ -25,7 +25,6 @@ public class UserRealm extends AuthorizingRealm {
@Autowired @Autowired
private UserService userService; private UserService userService;
//授权
@Override @Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) { protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
@@ -22,9 +22,7 @@ public class JWTUtil {
private static String EXPIRE_TIME = ""; private static String EXPIRE_TIME = "";
private static String SECRET = "www.hellohao.cn"; private static String SECRET = "www.hellohao.cn";
//生成Token
public static String createToken(User user){ public static String createToken(User user){
// Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.SECOND,604800 );//单位秒,604800 为7天 calendar.add(Calendar.SECOND,604800 );//单位秒,604800 为7天
Algorithm algorithm = Algorithm.HMAC256(SECRET); Algorithm algorithm = Algorithm.HMAC256(SECRET);
@@ -33,14 +31,11 @@ public class JWTUtil {
.withClaim("username", user.getUsername()) .withClaim("username", user.getUsername())
.withClaim("uid", user.getUid()) .withClaim("uid", user.getUid())
.withClaim("password", user.getPassword()) .withClaim("password", user.getPassword())
//到期时间
.withExpiresAt(calendar.getTime()) .withExpiresAt(calendar.getTime())
//创建一个新的JWT,并使用给定的算法进行标记
.sign(algorithm); .sign(algorithm);
return token; return token;
} }
//验证Token
public static JSONObject checkToken(String token){ public static JSONObject checkToken(String token){
JWTVerifier jwtVerifier = JWT.require(Algorithm.HMAC256(SECRET)).build();//验证对象 JWTVerifier jwtVerifier = JWT.require(Algorithm.HMAC256(SECRET)).build();//验证对象
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
@@ -68,13 +63,5 @@ public class JWTUtil {
} }
public static void main(String[] args) {
User user = new User();
user.setEmail("Hellohao@qq.com");
user.setUsername("Hellohao");
String token = createToken(user);
System.out.println(token);
checkToken(token);
// checkToken("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjM3NDYwOTUsImVtYWlsIjoiSGVsbG9oYW9AcXEuY29tIiwidXNlcm5hbWUiOiJIZWxsb2hhbyJ9.sFnAq1VU0wuiowaTtgJNNkMzRHPmRg4leNguhh0OMCA");
}
} }
@@ -0,0 +1,13 @@
package cn.hellohao.config;
import java.io.File;
/**
* @author Hellohao
* @version 1.0
* @date 29/11/2021 上午 10:35
*/
public class GlobalConstant {
public static String SYSTYPE = "LINUX";
public static String LOCPATH = File.separator + "HellohaoData";
}
@@ -12,7 +12,7 @@ public class WebImgConfigurer implements WebMvcConfigurer {
@Override @Override
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
String filePath = File.separator + "HellohaoData" + File.separator; String filePath = GlobalConstant.LOCPATH + File.separator;
registry.addResourceHandler("/ota/**").addResourceLocations("file:"+filePath); registry.addResourceHandler("/ota/**").addResourceLocations("file:"+filePath);
} }
@@ -14,10 +14,8 @@ import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpSession;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@@ -38,8 +36,6 @@ public class AdminController {
@Autowired @Autowired
private UserServiceImpl userService; private UserServiceImpl userService;
@Autowired @Autowired
private UserServiceImpl userServiceImpl;
@Autowired
private ImgreviewService imgreviewService; private ImgreviewService imgreviewService;
@Autowired @Autowired
private ImgTempService imgTempService; private ImgTempService imgTempService;
@@ -81,11 +77,9 @@ public class AdminController {
UploadConfig uploadConfig = uploadConfigService.getUpdateConfig(); UploadConfig uploadConfig = uploadConfigService.getUpdateConfig();
Imgreview imgreview = imgreviewService.selectByPrimaryKey(1);//查询非法个数 Imgreview imgreview = imgreviewService.selectByPrimaryKey(1);//查询非法个数
Imgreview isImgreviewOK = imgreviewService.selectByusing(1);//查询有没有启动鉴别功能 Imgreview isImgreviewOK = imgreviewService.selectByusing(1);//查询有没有启动鉴别功能
//普通用户
String ok = "false"; String ok = "false";
jsonObject.put("myImgTotal", imgService.countimg(user.getId())); //我的图片数 jsonObject.put("myImgTotal", imgService.countimg(user.getId())); //我的图片数
jsonObject.put("myAlbumTitle", albumService.selectAlbumCount(user.getId()));//我的画廊数量 jsonObject.put("myAlbumTitle", albumService.selectAlbumCount(user.getId()));//我的画廊数量
//计算自己的百分比 已用量/分配量
long memory = Long.valueOf(user.getMemory());//分配量 long memory = Long.valueOf(user.getMemory());//分配量
Long usermemory = imgService.getusermemory(user.getId())==null?0L:imgService.getusermemory(user.getId()); Long usermemory = imgService.getusermemory(user.getId())==null?0L:imgService.getusermemory(user.getId());
if(memory==0){ if(memory==0){
@@ -102,10 +96,10 @@ public class AdminController {
if(user.getLevel()>1){ if(user.getLevel()>1){
ok = "true"; ok = "true";
//管理员 //管理员
jsonObject.put("imgTotal", imgService.counts(null) ); //admin 站点图片数 jsonObject.put("imgTotal", imgService.counts(null) ); //站点图片数
jsonObject.put("userTotal", userService.getUserTotal()); //admin 用户个数 jsonObject.put("userTotal", userService.getUserTotal());
jsonObject.put("ViolationImgTotal", imgreview.getCount()); //admin 非法图片 jsonObject.put("ViolationImgTotal", imgreview.getCount()); //非法图片
jsonObject.put("ViolationSwitch", isImgreviewOK==null?0:isImgreviewOK.getId()); //admin 非法图片开关 jsonObject.put("ViolationSwitch", isImgreviewOK==null?0:isImgreviewOK.getId()); //非法图片开关
jsonObject.put("VisitorUpload", uploadConfig.getIsupdate());//是否禁用了游客上传 jsonObject.put("VisitorUpload", uploadConfig.getIsupdate());//是否禁用了游客上传
jsonObject.put("VisitorMemory", SetFiles.readableFileSize(Long.valueOf(uploadConfig.getVisitormemory())));//访客共大小 jsonObject.put("VisitorMemory", SetFiles.readableFileSize(Long.valueOf(uploadConfig.getVisitormemory())));//访客共大小
if(uploadConfig.getIsupdate()!=1){ if(uploadConfig.getIsupdate()!=1){
@@ -136,7 +130,6 @@ public class AdminController {
return msg; return msg;
} }
@PostMapping(value = "/SpaceExpansion")//new @PostMapping(value = "/SpaceExpansion")//new
@ResponseBody @ResponseBody
public Msg SpaceExpansion(@RequestParam(value = "data", defaultValue = "") String data) { public Msg SpaceExpansion(@RequestParam(value = "data", defaultValue = "") String data) {
@@ -173,8 +166,7 @@ public class AdminController {
} }
} }
@PostMapping("/getRecently")//new
@PostMapping("/getRecently")//new 获取榜单和最近上传
@ResponseBody @ResponseBody
public Msg getRecently(@RequestParam(value = "data", defaultValue = "") String data) { public Msg getRecently(@RequestParam(value = "data", defaultValue = "") String data) {
Msg msg = new Msg(); Msg msg = new Msg();
@@ -184,11 +176,9 @@ public class AdminController {
User user = (User) subject.getPrincipal(); User user = (User) subject.getPrincipal();
user = userService.getUsers(user); user = userService.getUsers(user);
if(user.getLevel()>1){ if(user.getLevel()>1){
//管理员 可以看榜单数据 和最近上传
jsonObject.put("RecentlyUser",imgService.RecentlyUser()); jsonObject.put("RecentlyUser",imgService.RecentlyUser());
jsonObject.put("RecentlyUploaded",imgService.RecentlyUploaded(user.getId())); jsonObject.put("RecentlyUploaded",imgService.RecentlyUploaded(user.getId()));
}else{ }else{
//普通用户只能看最近上传
jsonObject.put("RecentlyUploaded",imgService.RecentlyUploaded(user.getId())); jsonObject.put("RecentlyUploaded",imgService.RecentlyUploaded(user.getId()));
} }
}catch (Exception e){ }catch (Exception e){
@@ -284,12 +274,12 @@ public class AdminController {
JSONObject jsonObj = JSONObject.parseObject(data); JSONObject jsonObj = JSONObject.parseObject(data);
Integer pageNum = jsonObj.getInteger("pageNum"); Integer pageNum = jsonObj.getInteger("pageNum");
Integer pageSize = jsonObj.getInteger("pageSize"); Integer pageSize = jsonObj.getInteger("pageSize");
String username = jsonObj.getString("username");
Integer source = jsonObj.getInteger("source"); Integer source = jsonObj.getInteger("source");
String starttime = jsonObj.getString("starttime"); String starttime = jsonObj.getString("starttime");
String stoptime = jsonObj.getString("stoptime"); String stoptime = jsonObj.getString("stoptime");
String selectUserType = jsonObj.getString("selectUserType");//me/all
String username = jsonObj.getString("username");
Integer selecttype = jsonObj.getInteger("selecttype"); Integer selecttype = jsonObj.getInteger("selecttype");
String classifuids = jsonObj.getString("classifuids");
boolean violation = jsonObj.getBoolean("violation"); boolean violation = jsonObj.getBoolean("violation");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(starttime!=null){ if(starttime!=null){
@@ -315,18 +305,18 @@ public class AdminController {
if(violation){ if(violation){
img.setViolation("true"); img.setViolation("true");
} }
img.setUsername(username);
img.setSource(source);
img.setSelecttype(selecttype);
img.setStarttime(starttime); img.setStarttime(starttime);
img.setStoptime(stoptime); img.setStoptime(stoptime);
if(classifuids!=null){
String[] calssif = classifuids.split(",");
img.setClassifuidlist(calssif);
}
if(subject.hasRole("admin")){ if(subject.hasRole("admin")){
//管理员 sql根据userid是否等于空做的判断, img.setSource(source);
img.setUserid(null); if(selectUserType.equals("me")){
img.setUserid(user.getId());
img.setUsername(null);
img.setSelecttype(null);
}else{
img.setUsername(username);
img.setSelecttype(selecttype);
}
}else{ }else{
//普通用户 //普通用户
img.setUserid(user.getId()); img.setUserid(user.getId());
@@ -389,7 +379,6 @@ public class AdminController {
userOld.setId(u.getId()); userOld.setId(u.getId());
User userInfo = userService.getUsers(userOld); User userInfo = userService.getUsers(userOld);
if(!userInfo.getUsername().equals(username)){ if(!userInfo.getUsername().equals(username)){
//要修改用户名
Integer countusername = userService.countusername(username); Integer countusername = userService.countusername(username);
if(countusername == 1 || !SysName.CheckSysName(username)){ if(countusername == 1 || !SysName.CheckSysName(username)){
msg.setCode("110406"); msg.setCode("110406");
@@ -400,7 +389,6 @@ public class AdminController {
} }
} }
if(!userInfo.getEmail().equals(email)){ if(!userInfo.getEmail().equals(email)){
//要修改邮箱
Integer countmail = userService.countmail(email); Integer countmail = userService.countmail(email);
if(countmail == 1){ if(countmail == 1){
msg.setCode("110407"); msg.setCode("110407");
@@ -426,7 +414,6 @@ public class AdminController {
return msg; return msg;
} }
@PostMapping("/deleImages") //new @PostMapping("/deleImages") //new
@ResponseBody @ResponseBody
public Msg deleImages(@RequestParam(value = "data", defaultValue = "") String data) { public Msg deleImages(@RequestParam(value = "data", defaultValue = "") String data) {
@@ -454,11 +441,10 @@ public class AdminController {
Keys key = keysService.selectKeys(keyid); Keys key = keysService.selectKeys(keyid);
if(!subject.hasRole("admin")){ if(!subject.hasRole("admin")){
if(image.getUserid()!=user.getId()){ if(!image.getUserid().equals(user.getId())){
break; break;
} }
} }
//删除图片
boolean isDele = false; boolean isDele = false;
try{ try{
if (key.getStorageType() == 1) { if (key.getStorageType() == 1) {
@@ -478,19 +464,16 @@ public class AdminController {
}else if (key.getStorageType() == 8) { }else if (key.getStorageType() == 8) {
isDele = uFileImageupload.delUFile(key.getId(), imgname); isDele = uFileImageupload.delUFile(key.getId(), imgname);
}else { }else {
System.err.println("未获取到对象存储参数,删除失败"); System.err.println("未获取到对象存储参数,删除失败");
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
//删除库
if(isDele){ if(isDele){
try { try {
//删除图像表之前先删除临时数据表,图像表也会删除
imgTempService.delImgAndExp(image.getImguid()); imgTempService.delImgAndExp(image.getImguid());
imgService.deleimg(imgid); imgService.deleimg(imgid);
imgAndAlbumService.deleteImgAndAlbum(imgname); imgAndAlbumService.deleteImgAndAlbum(image.getImgurl());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
msg.setInfo("图片记录删除失败,请重试"); msg.setInfo("图片记录删除失败,请重试");
@@ -501,15 +484,13 @@ public class AdminController {
}else{ }else{
imgTempService.delImgAndExp(image.getImguid()); imgTempService.delImgAndExp(image.getImguid());
imgService.deleimg(imgid); imgService.deleimg(imgid);
imgAndAlbumService.deleteImgAndAlbum(imgname); imgAndAlbumService.deleteImgAndAlbum(image.getImgurl());
msg.setInfo("图片记录已删除,但是图片源删除失败"); msg.setInfo("图片记录已删除,但是图片源删除失败");
} }
} }
System.out.println("返回的值:"+msg.toString());
return msg; return msg;
} }
//工具函数 //工具函数
private static String getChinaes(int v){ private static String getChinaes(int v){
String ch = ""; String ch = "";
@@ -30,8 +30,6 @@ import java.util.Map;
@Controller @Controller
@RequestMapping("/admin/root") @RequestMapping("/admin/root")
public class AdminRootController { public class AdminRootController {
@Autowired
private NOSImageupload nOSImageupload;
@Autowired @Autowired
private ConfigService configService; private ConfigService configService;
@Autowired @Autowired
@@ -43,12 +41,8 @@ public class AdminRootController {
@Autowired @Autowired
private UploadConfigService uploadConfigService; private UploadConfigService uploadConfigService;
@Autowired @Autowired
private NoticeService noticeService;
@Autowired
private SysConfigService sysConfigService; private SysConfigService sysConfigService;
@Autowired @Autowired
private GroupService groupService;
@Autowired
private ImgService imgService; private ImgService imgService;
@Autowired @Autowired
private ImgreviewService imgreviewService; private ImgreviewService imgreviewService;
@@ -68,7 +62,6 @@ public class AdminRootController {
map.put("count", rolePageInfo.getTotal()); map.put("count", rolePageInfo.getTotal());
map.put("users", rolePageInfo.getList()); map.put("users", rolePageInfo.getList());
return map; return map;
} }
@@ -259,7 +252,6 @@ public class AdminRootController {
return msg; return msg;
} }
@PostMapping("/getSettingConfig") //new @PostMapping("/getSettingConfig") //new
@ResponseBody @ResponseBody
public Msg getSettingConfig(@RequestParam(value = "data", defaultValue = "") String data) { public Msg getSettingConfig(@RequestParam(value = "data", defaultValue = "") String data) {
@@ -382,7 +374,6 @@ public class AdminRootController {
EmailConfig emailConfig = JSON.toJavaObject(jsonObj,EmailConfig.class); EmailConfig emailConfig = JSON.toJavaObject(jsonObj,EmailConfig.class);
if(null==emailConfig.getEmails() || null==emailConfig.getEmailkey() || null==emailConfig.getEmailurl() if(null==emailConfig.getEmails() || null==emailConfig.getEmailkey() || null==emailConfig.getEmailurl()
|| null==emailConfig.getPort() || null==emailConfig.getEmailname() || null==tomail){ || null==emailConfig.getPort() || null==emailConfig.getEmailname() || null==tomail){
// if(jsonObj.size()==0){
msg.setCode("110400"); msg.setCode("110400");
msg.setInfo("邮箱配置参数不能为空"); msg.setInfo("邮箱配置参数不能为空");
}else{ }else{
@@ -2,7 +2,8 @@ package cn.hellohao.controller;
import cn.hellohao.pojo.*; import cn.hellohao.pojo.*;
import cn.hellohao.pojo.vo.PageResultBean; import cn.hellohao.pojo.vo.PageResultBean;
import cn.hellohao.service.*; import cn.hellohao.service.ImgAndAlbumService;
import cn.hellohao.service.UserService;
import cn.hellohao.service.impl.AlbumServiceImpl; import cn.hellohao.service.impl.AlbumServiceImpl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@@ -13,10 +14,10 @@ import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpSession;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@@ -30,14 +31,8 @@ public class AlbumController {
@Autowired @Autowired
AlbumServiceImpl albumServiceImpl; AlbumServiceImpl albumServiceImpl;
@Autowired @Autowired
private ConfigService configService;
@Autowired
private ImgService imgService;
@Autowired
ImgAndAlbumService imgAndAlbumService; ImgAndAlbumService imgAndAlbumService;
@Autowired @Autowired
private UploadConfigService uploadConfigService;
@Autowired
private UserService userService; private UserService userService;
@PostMapping("/admin/getGalleryList") //new @PostMapping("/admin/getGalleryList") //new
@@ -105,6 +100,38 @@ public class AlbumController {
} }
//后台列表要修改时的查询表单
@PostMapping("/admin/getAlbumListForKey") //new
@ResponseBody
public Msg getAlbumListForKey(@RequestParam(value = "data", defaultValue = "") String data){
Msg msg = new Msg();
try{
JSONObject jsonObject = JSONObject.parseObject(data);
String key = jsonObject.getString("key");
Subject subject = SecurityUtils.getSubject();
User user = (User) subject.getPrincipal();
Album album = new Album();
album.setAlbumkey(key);
if(subject.hasRole("admin")){
album.setUserid(null);
}else{
album.setUserid(user.getId());
}
JSONObject jsonObj = new JSONObject();
Album album1 = albumServiceImpl.selectAlbum(album);
List<Images> imagesList = imgAndAlbumService.selectImgForAlbumkey(key);
jsonObj.put("album",album1);
jsonObj.put("imagesList",imagesList);
msg.setData(jsonObj);
}catch (Exception e){
e.printStackTrace();
msg.setCode("500");
msg.setInfo("获取画廊数据错误");
}
return msg;
}
@PostMapping("/getAlbumImgList") //new @PostMapping("/getAlbumImgList") //new
@ResponseBody @ResponseBody
public Msg getAlbumImgList(@RequestParam("data") String data) { public Msg getAlbumImgList(@RequestParam("data") String data) {
@@ -141,7 +168,7 @@ public class AlbumController {
} }
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
User u = (User) subject.getPrincipal(); User u = (User) subject.getPrincipal();
String uuid = "TOALBUM"+ UUID.randomUUID().toString().replace("-", "").toLowerCase().substring(0,5)+"N"; String uuid = "TOALBUM"+ UUID.randomUUID().toString().replace("-", "").toLowerCase().substring(0,7)+"N";
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Album album = new Album(); Album album = new Album();
album.setAlbumtitle(albumtitle); album.setAlbumtitle(albumtitle);
@@ -178,6 +205,65 @@ public class AlbumController {
} }
@PostMapping("/admin/UpdateForAlbum")//new
@ResponseBody
public Msg UpdateForAlbum(@RequestParam(value = "data", defaultValue = "") String data){
data = StringEscapeUtils.unescapeHtml4(data);
Msg msg = new Msg();
try {
JSONObject jsonObject = JSONObject.parseObject(data);
String albumkey = jsonObject.getString("albumkey");
String albumtitle = jsonObject.getString("albumtitle");
String password = jsonObject.getString("password");
JSONArray jsonArray = JSONArray.parseArray(jsonObject.getString("albumlist"));
if(null!=password){
// String regex = "^[a-z0-9A-Z\u4e00-\u9fa5]+$";
// return str.matches(regex);
password = password.replace(" ", "");
if(password.replace(" ", "").equals("") || password.length()<3){
msg.setCode("110403");
msg.setInfo("密码长度不得小于三位有效字符");
return msg;
}
}
if(albumtitle==null || jsonArray.size()==0){
msg.setCode("110404");
msg.setInfo("标题和图片参数不能为空");
return msg;
}
Subject subject = SecurityUtils.getSubject();
User u = (User) subject.getPrincipal();
Album album = new Album();
album.setAlbumtitle(albumtitle);
album.setPassword(password);
album.setAlbumkey(albumkey);
albumServiceImpl.updateAlbum(album);
imgAndAlbumService.deleteImgAndAlbumForKey(albumkey);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject img = jsonArray.getJSONObject(i);
ImgAndAlbum imgAndAlbum = new ImgAndAlbum();
imgAndAlbum.setImgname(img.getString("imgurl"));
imgAndAlbum.setAlbumkey(albumkey);
imgAndAlbum.setNotes(img.getString("notes"));
albumServiceImpl.addAlbumForImgAndAlbumMapper(imgAndAlbum);
}
final JSONObject json = new JSONObject();
json.put("url",albumkey);
json.put("title",albumtitle);
json.put("password",password);
msg.setCode("200");
msg.setInfo("画廊修改成功");
msg.setData(json);
}catch (Exception e){
e.printStackTrace();
msg.setCode("500");
msg.setInfo("修改画廊失败");
}
return msg;
}
@PostMapping("/checkPass")//new @PostMapping("/checkPass")//new
@ResponseBody @ResponseBody
public Msg checkPass(@RequestParam(value = "data", defaultValue = "") String data) { public Msg checkPass(@RequestParam(value = "data", defaultValue = "") String data) {
@@ -1,26 +1,15 @@
package cn.hellohao.controller; package cn.hellohao.controller;
import cn.hellohao.pojo.*; import cn.hellohao.pojo.Msg;
import cn.hellohao.service.*; import cn.hellohao.service.impl.ClientService;
import cn.hellohao.service.impl.*;
import cn.hellohao.utils.*;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.text.SimpleDateFormat;
import java.util.*;
/** /**
* @author Hellohao * @author Hellohao
@@ -26,7 +26,6 @@ public class CodeController {
@Autowired @Autowired
private CodeService codeService; private CodeService codeService;
@RequestMapping(value = "/selectCodeList")//new @RequestMapping(value = "/selectCodeList")//new
@ResponseBody @ResponseBody
public Map<String, Object> selectCodeList(@RequestParam(value = "data", defaultValue = "") String data) { public Map<String, Object> selectCodeList(@RequestParam(value = "data", defaultValue = "") String data) {
@@ -3,16 +3,12 @@ package cn.hellohao.controller;
import cn.hellohao.exception.StorageSourceInitException; import cn.hellohao.exception.StorageSourceInitException;
import cn.hellohao.utils.Print; import cn.hellohao.utils.Print;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.validation.BindException;
import org.springframework.validation.ObjectError;
import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import java.net.SocketException; import java.net.SocketException;
import java.util.Date;
import java.util.List;
/** /**
* @author Hellohao * @author Hellohao
@@ -24,7 +20,6 @@ import java.util.List;
public class ExceptionHandling { public class ExceptionHandling {
@ExceptionHandler @ExceptionHandler
//@ResponseBody
public ModelAndView test(StorageSourceInitException ssie){ public ModelAndView test(StorageSourceInitException ssie){
ModelAndView modelAndView = new ModelAndView("index"); ModelAndView modelAndView = new ModelAndView("index");
Print.Normal("异常拦截成功:"+ ssie.getMessage()); Print.Normal("异常拦截成功:"+ ssie.getMessage());
@@ -39,7 +34,6 @@ public class ExceptionHandling {
Print.Normal("存储源配置不正确,初始化失败"+ e.getMessage()); Print.Normal("存储源配置不正确,初始化失败"+ e.getMessage());
e.printStackTrace(); e.printStackTrace();
modelAndView.addObject("error",e.getMessage()); modelAndView.addObject("error",e.getMessage());
//返回错误信息,并显示给用户
return e.getMessage(); return e.getMessage();
} }
@ExceptionHandler @ExceptionHandler
@@ -48,7 +42,6 @@ public class ExceptionHandling {
Print.Normal("系统内部错误:"+ e.getMessage()); Print.Normal("系统内部错误:"+ e.getMessage());
e.printStackTrace(); e.printStackTrace();
modelAndView.addObject("error",e.getMessage()); modelAndView.addObject("error",e.getMessage());
//返回错误信息,并显示给用户
return e.getMessage(); return e.getMessage();
} }
@@ -57,11 +50,8 @@ public class ExceptionHandling {
ModelAndView modelAndView = new ModelAndView("/index"); ModelAndView modelAndView = new ModelAndView("/index");
Print.Normal("URL访问类型不正确:"+ e.getMessage()); Print.Normal("URL访问类型不正确:"+ e.getMessage());
//e.printStackTrace();
modelAndView.addObject("error","URL访问类型不正确。"); modelAndView.addObject("error","URL访问类型不正确。");
model.addAttribute("error","URL访问类型不正确。"); model.addAttribute("error","URL访问类型不正确。");
//返回错误信息,并显示给用户
//return e.getMessage();
return "exception"; return "exception";
} }
@@ -3,8 +3,6 @@ package cn.hellohao.controller;
import cn.hellohao.pojo.Group; import cn.hellohao.pojo.Group;
import cn.hellohao.pojo.Msg; import cn.hellohao.pojo.Msg;
import cn.hellohao.service.GroupService; import cn.hellohao.service.GroupService;
import cn.hellohao.service.KeysService;
import cn.hellohao.service.UserService;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@@ -28,18 +26,12 @@ import java.util.Map;
public class GroupController { public class GroupController {
@Autowired @Autowired
private GroupService groupService; private GroupService groupService;
@Autowired
private KeysService keysService;
@Autowired
private UserService userService;
@PostMapping("/getGrouplistForUsers") //new @PostMapping("/getGrouplistForUsers") //new
@ResponseBody @ResponseBody
public Msg getGrouplistForUsers() { public Msg getGrouplistForUsers() {
Msg msg = new Msg(); Msg msg = new Msg();
//只获取用户组type为0的,只有是0的才是未分配用户组的,才能给指定用户设置
List<Group> groupList = groupService.grouplist(0); List<Group> groupList = groupService.grouplist(0);
msg.setData(groupList); msg.setData(groupList);
return msg; return msg;
@@ -84,20 +84,54 @@ public class IndexController {
return msg; return msg;
} }
@PostMapping(value = "/upload")// new
@PostMapping(value = "/upload")//upimg new
@ResponseBody @ResponseBody
public Msg upimg(HttpServletRequest request,HttpSession httpSession public Msg upimg(HttpServletRequest request,HttpSession httpSession
, @RequestParam(value = "file", required = false) MultipartFile multipartFile,Integer day, , @RequestParam(value = "file", required = false) MultipartFile multipartFile,Integer day) {
@RequestParam(value = "classifications", defaultValue = "" ) String classifications) { return uploadServicel.uploadForLoc(request,multipartFile,day,null);
final JSONArray jsonArray = new JSONArray(); }
if(!classifications.equals("")){
String[] calssif = classifications.split(","); @PostMapping(value = "/uploadForUrl") //new
for (int i = 0; i < calssif.length; i++) { @ResponseBody
jsonArray.add(calssif[i]); public Msg upurlimg(HttpServletRequest request,@RequestParam(value = "data", defaultValue = "") String data) {
JSONObject jsonObj = JSONObject.parseObject(data);
Integer setday = jsonObj.getInteger("day");
String imgUrl = jsonObj.getString("imgUrl");
String[] URLArr = imgUrl.split("\n");
Subject subject = SecurityUtils.getSubject();
User user = (User) subject.getPrincipal();
UploadConfig updateConfig = uploadConfigService.getUpdateConfig();
int syscounts = 0;
if(null==user){
syscounts = updateConfig.getImgcounttourists();
}else{
syscounts = updateConfig.getImgcountuser();
}
Msg retMsg = new Msg();
JSONObject jsonObject = new JSONObject();
JSONArray retArray = new JSONArray();
int errcounts = 0;
int excess = 0;
for (int i = 0; i < URLArr.length; i++) {
int temp = i+1;
if(syscounts>=temp){
Msg msg = uploadServicel.uploadForLoc(request, null, setday, URLArr[i]);
if(!msg.getCode().equals("200")){
errcounts++;
}else{
retArray.add(msg);
}
}else{
excess++;
} }
} }
return uploadServicel.uploadForLoc(request,multipartFile,day,null,jsonArray); jsonObject.put("counts",URLArr.length);
jsonObject.put("errcounts",errcounts);
jsonObject.put("excess",excess);
jsonObject.put("urls",retArray);
retMsg.setData(jsonObject);
return retMsg;
} }
@RequestMapping(value = "/getUploadInfo")//new @RequestMapping(value = "/getUploadInfo")//new
@@ -118,6 +152,8 @@ public class IndexController {
}else{ }else{
jsonObject.put("filesize",Integer.valueOf(updateConfig.getFilesizeuser())/1024); jsonObject.put("filesize",Integer.valueOf(updateConfig.getFilesizeuser())/1024);
jsonObject.put("imgcount",updateConfig.getImgcountuser()); jsonObject.put("imgcount",updateConfig.getImgcountuser());
jsonObject.put("uploadSwitch",updateConfig.getUserclose());
jsonObject.put("uploadInfo","系统暂时关闭了用户上传功能");
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
@@ -126,7 +162,6 @@ public class IndexController {
return msg; return msg;
} }
@RequestMapping("/checkStatus") @RequestMapping("/checkStatus")
@ResponseBody @ResponseBody
public Msg checkStatus(HttpServletRequest request) { public Msg checkStatus(HttpServletRequest request) {
@@ -164,13 +199,10 @@ public class IndexController {
return msg; return msg;
} }
@GetMapping("/verifyCode") @GetMapping("/verifyCode")
public void verifyCode(HttpServletRequest request, HttpServletResponse response,HttpSession httpSession) { public void verifyCode(HttpServletRequest request, HttpServletResponse response,HttpSession httpSession) {
IVerifyCodeGen iVerifyCodeGen = new SimpleCharVerifyCodeGenImpl(); IVerifyCodeGen iVerifyCodeGen = new SimpleCharVerifyCodeGenImpl();
try { try {
//登录页面验证码
VerifyCode verifyCode = iVerifyCodeGen.generate(80, 38); VerifyCode verifyCode = iVerifyCodeGen.generate(80, 38);
String code = verifyCode.getCode(); String code = verifyCode.getCode();
String userIP = GetIPS.getIpAddr(request); String userIP = GetIPS.getIpAddr(request);
@@ -225,7 +257,6 @@ public class IndexController {
} }
} }
//删除图像
@PostMapping("/deleImagesByUid") //new @PostMapping("/deleImagesByUid") //new
@ResponseBody @ResponseBody
public Msg deleImagesByUid(@RequestParam(value = "data", defaultValue = "") String data) { public Msg deleImagesByUid(@RequestParam(value = "data", defaultValue = "") String data) {
@@ -236,7 +267,7 @@ public class IndexController {
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
User user = (User) subject.getPrincipal(); User user = (User) subject.getPrincipal();
if(null!=user){ if(null!=user){
if(user.getId()!=image.getUserid()){ if(!user.getId().equals(image.getUserid())){
msg.setInfo("删除失败,该图片不允许你执行操作"); msg.setInfo("删除失败,该图片不允许你执行操作");
msg.setCode("100403"); msg.setCode("100403");
return msg; return msg;
@@ -269,7 +300,7 @@ public class IndexController {
//删除库 //删除库
if(isDele){ if(isDele){
try { try {
imgAndAlbumService.deleteImgAndAlbum(imgname); imgAndAlbumService.deleteImgAndAlbum(image.getImgurl());
imgTempService.delImgAndExp(image.getImguid()); imgTempService.delImgAndExp(image.getImguid());
imgService.deleimg(image.getId()); imgService.deleimg(image.getId());
} catch (Exception e) { } catch (Exception e) {
@@ -280,7 +311,7 @@ public class IndexController {
} }
msg.setInfo("删除成功"); msg.setInfo("删除成功");
}else{ }else{
imgAndAlbumService.deleteImgAndAlbum(imgname); imgAndAlbumService.deleteImgAndAlbum(image.getImgurl());
imgTempService.delImgAndExp(image.getImguid()); imgTempService.delImgAndExp(image.getImguid());
imgService.deleimg(image.getId()); imgService.deleimg(image.getId());
msg.setInfo("图片记录已删除,但是图片源删除失败"); msg.setInfo("图片记录已删除,但是图片源删除失败");
@@ -290,8 +321,6 @@ public class IndexController {
return msg; return msg;
} }
//没有权限
@RequestMapping("/authError") @RequestMapping("/authError")
@ResponseBody @ResponseBody
public Msg authError(HttpServletRequest request){ public Msg authError(HttpServletRequest request){
@@ -301,7 +330,6 @@ public class IndexController {
return msg; return msg;
} }
//认证失败
@RequestMapping("/jurisError") @RequestMapping("/jurisError")
@ResponseBody @ResponseBody
public Msg jurisError(HttpServletRequest request){ public Msg jurisError(HttpServletRequest request){
@@ -2,7 +2,6 @@ package cn.hellohao.controller;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Random;
import java.util.UUID; import java.util.UUID;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@@ -22,8 +21,8 @@ import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
@Controller @Controller
@@ -40,13 +39,11 @@ public class UserController {
@Autowired @Autowired
private SysConfigService sysConfigService; private SysConfigService sysConfigService;
@Autowired @Autowired
private UserGroupService userGroupService;
@Autowired
IRedisService iRedisService; IRedisService iRedisService;
@PostMapping("/register") @PostMapping("/register")
@ResponseBody @ResponseBody
public Msg Register(HttpServletRequest request,@RequestParam(value = "data", defaultValue = "") String data) {//Validated public Msg Register(HttpServletRequest request, @RequestParam(value = "data", defaultValue = "") String data) {//Validated
Msg msg = new Msg(); Msg msg = new Msg();
JSONObject jsonObj = JSONObject.parseObject(data); JSONObject jsonObj = JSONObject.parseObject(data);
String username = jsonObj.getString("username"); String username = jsonObj.getString("username");
@@ -112,7 +109,6 @@ public class UserController {
Integer type = 0; Integer type = 0;
if(emailConfig.getUsing()==1){ if(emailConfig.getUsing()==1){
user.setIsok(0); user.setIsok(0);
//注册完发激活链接
Thread thread = new Thread() { Thread thread = new Thread() {
public void run() { public void run() {
Integer a = NewSendEmail.sendEmail(emailConfig,user.getUsername(), uid, user.getEmail(),config); Integer a = NewSendEmail.sendEmail(emailConfig,user.getUsername(), uid, user.getEmail(),config);
@@ -121,7 +117,6 @@ public class UserController {
thread.start(); thread.start();
msg.setInfo("注册成功,请注意查收邮箱尽快激活账户"); msg.setInfo("注册成功,请注意查收邮箱尽快激活账户");
}else{ }else{
//直接注册
user.setIsok(1); user.setIsok(1);
msg.setInfo("注册成功,快去登陆吧"); msg.setInfo("注册成功,快去登陆吧");
} }
@@ -208,8 +203,6 @@ public class UserController {
} }
//邮箱激活
@RequestMapping(value = "/activation", method = RequestMethod.GET) @RequestMapping(value = "/activation", method = RequestMethod.GET)
public String activation(Model model, HttpServletRequest request, HttpSession session, String activation, String username) { public String activation(Model model, HttpServletRequest request, HttpSession session, String activation, String username) {
Config config = configService.getSourceype(); Config config = configService.getSourceype();
@@ -232,7 +225,6 @@ public class UserController {
} }
} }
//退出
@PostMapping(value = "/logout")//new @PostMapping(value = "/logout")//new
@ResponseBody @ResponseBody
public Msg exit(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { public Msg exit(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
@@ -244,7 +236,6 @@ public class UserController {
return msg; return msg;
} }
//retrievepass
@PostMapping("/retrievePass") //new @PostMapping("/retrievePass") //new
@ResponseBody @ResponseBody
public Msg retrievePass(HttpServletRequest request, @RequestParam(value = "data", defaultValue = "") String data) { public Msg retrievePass(HttpServletRequest request, @RequestParam(value = "data", defaultValue = "") String data) {
@@ -307,7 +298,6 @@ public class UserController {
return msg; return msg;
} }
//邮箱激活
@RequestMapping(value = "/retrieve", method = RequestMethod.GET) //new @RequestMapping(value = "/retrieve", method = RequestMethod.GET) //new
public String retrieve(Model model, String activation,String cip) { public String retrieve(Model model, String activation,String cip) {
Integer ret = 0; Integer ret = 0;
@@ -341,10 +331,5 @@ public class UserController {
} }
private Integer number1;
private Integer istmp1;
private Integer number2;
private Integer istmp2;
} }
@@ -23,4 +23,6 @@ public interface AlbumMapper {
List<Album> selectAlbumURLList(Album album); List<Album> selectAlbumURLList(Album album);
Integer selectAlbumCount(@Param("userid") Integer userid); Integer selectAlbumCount(@Param("userid") Integer userid);
Integer updateAlbum(Album album);
} }
+3 -3
View File
@@ -17,6 +17,8 @@ public interface ImgMapper {
Integer deleimg(@Param("id") Integer id); Integer deleimg(@Param("id") Integer id);
Integer deleimgForImgUid(@Param("imguid") String imguid);
Images selectByPrimaryKey(@Param("id") Integer id); Images selectByPrimaryKey(@Param("id") Integer id);
Integer counts(@Param("userid") Integer userid); Integer counts(@Param("userid") Integer userid);
@@ -34,14 +36,12 @@ public interface ImgMapper {
Integer md5Count(Images images); Integer md5Count(Images images);
Images selectImgUrlByMD5(@Param("md5key") String md5key); List<Images> selectImgUrlByMD5(@Param("md5key") String md5key);
List<Images> RecentlyUploaded(@Param("userid") Integer userid); List<Images> RecentlyUploaded(@Param("userid") Integer userid);
List<User> RecentlyUser(); List<User> RecentlyUser();
Integer addGreat(@Param("id") Integer id);
List<String> getyyyy(@Param("userid") Integer userid); List<String> getyyyy(@Param("userid") Integer userid);
List<Images> countByM(Images images); List<Images> countByM(Images images);
@@ -1,9 +0,0 @@
package cn.hellohao.dao;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface NoticeMapper {
String getNotice();
}
@@ -1,12 +0,0 @@
package cn.hellohao.pojo;
import java.io.File;
/**
* @author Hellohao
* @version 1.0
* @date 2020-04-04 2:12
*/
public class FixedResources {
public static final String LOCPATH = File.separator + "HellohaoData";
}
+12 -4
View File
@@ -7,10 +7,7 @@ public class User {
//@NotBlank(message = "用户名不能为空") //@NotBlank(message = "用户名不能为空")
// @Length(min = 6, max = 20, message = "用户名需要为 6 - 20 个字符") // @Length(min = 6, max = 20, message = "用户名需要为 6 - 20 个字符")
private String username; private String username;
//@NotBlank(message = "密码不能为空")
private String password; private String password;
// @NotBlank(message = "邮箱不能为空")
//@Email(message = "邮箱格式不正确")
private String email; private String email;
private String birthder; private String birthder;
private Integer level; private Integer level;
@@ -20,13 +17,15 @@ public class User {
private Integer groupid; private Integer groupid;
private String groupname; private String groupname;
private Long counts;//用户img counts
public User() { public User() {
super(); super();
} }
public User(Integer id, String username, String password, String email, String birthder, Integer level, String uid, public User(Integer id, String username, String password, String email, String birthder, Integer level, String uid,
Integer isok, String memory, Integer groupid,String groupname) { Integer isok, String memory, Integer groupid,String groupname,Long counts) {
this.id = id; this.id = id;
this.username = username; this.username = username;
this.password = password; this.password = password;
@@ -38,6 +37,7 @@ public class User {
this.memory = memory; this.memory = memory;
this.groupid = groupid; this.groupid = groupid;
this.groupname = groupname; this.groupname = groupname;
this.counts = counts;
} }
public Integer getId() { public Integer getId() {
@@ -127,4 +127,12 @@ public class User {
public void setGroupname(String groupname) { public void setGroupname(String groupname) {
this.groupname = groupname; this.groupname = groupname;
} }
public Long getCounts() {
return counts;
}
public void setCounts(Long counts) {
this.counts = counts;
}
} }
@@ -1,20 +0,0 @@
package cn.hellohao.quartz;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;
@EnableScheduling
@Component
public class FirstJob{
public void task(){
//System.out.println("任务1执行....");
TempImgTask tempImgTask = new TempImgTask();
try {
tempImgTask.start();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
@@ -1,88 +0,0 @@
package cn.hellohao.quartz;
import cn.hellohao.quartz.FirstJob;
import cn.hellohao.quartz.SecondJob;
import cn.hellohao.quartz.SpringUtil;
import org.quartz.JobDetail;
import org.quartz.Trigger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.CronTriggerFactoryBean;
import org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean;
@Configuration
public class QuartzConfigration {
//直接读取properties文件的值
// @Value("${Expression}")
private String Expression = "0 0 1 1 * ?";
// 配置触发器1
@Bean(name = "firstTrigger")
public SimpleTriggerFactoryBean firstTrigger(JobDetail firstJobDetail) {
SimpleTriggerFactoryBean trigger = new SimpleTriggerFactoryBean();
trigger.setJobDetail(firstJobDetail);
// 设置任务启动延迟
trigger.setStartDelay(0);
// 每5秒执行一次
trigger.setRepeatInterval(3600000);//一小时
return trigger;
}
// 配置定时任务1
@Bean(name = "firstJobDetail")
public MethodInvokingJobDetailFactoryBean firstJobDetail() {
FirstJob firstJob = (FirstJob) SpringUtil.getBean(FirstJob.class);
MethodInvokingJobDetailFactoryBean jobDetail = new MethodInvokingJobDetailFactoryBean();
// 是否并发执行
jobDetail.setConcurrent(false);
// 为需要执行的实体类对应的对象
jobDetail.setTargetObject(firstJob);
// 需要执行的方法
jobDetail.setTargetMethod("task");
return jobDetail;
}
// 配置触发器2
@Bean(name = "secondTrigger")
public CronTriggerFactoryBean secondTrigger(JobDetail secondJobDetail) {
CronTriggerFactoryBean trigger = new CronTriggerFactoryBean();
trigger.setJobDetail(secondJobDetail);
// cron表达式
trigger.setCronExpression(Expression);
//trigger.setCronExpression("0 0/1 * * * ?");
return trigger;
}
// 配置定时任务2
@Bean(name = "secondJobDetail")
public MethodInvokingJobDetailFactoryBean secondJobDetail() {
SecondJob secondJob = (SecondJob) SpringUtil.getBean(SecondJob.class);
MethodInvokingJobDetailFactoryBean jobDetail = new MethodInvokingJobDetailFactoryBean();
// 是否并发执行
jobDetail.setConcurrent(false);
// 为需要执行的实体类对应的对象
jobDetail.setTargetObject(secondJob);
// 需要执行的方法
jobDetail.setTargetMethod("task");
return jobDetail;
}
// 配置Scheduler
@Bean(name = "scheduler")
public SchedulerFactoryBean schedulerFactory(Trigger firstTrigger, Trigger secondTrigger) {
SchedulerFactoryBean bean = new SchedulerFactoryBean();
// 延时启动,应用启动1秒后
bean.setStartupDelay(1);
// 注册触发器
bean.setTriggers(firstTrigger, secondTrigger);
return bean;
}
}
@@ -0,0 +1,49 @@
package cn.hellohao.quartz;
import cn.hellohao.quartz.job.FirstJob;
import org.quartz.JobDetail;
import org.quartz.Trigger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean;
@Configuration
public class QuartzConfiguration {
// 配置定时任务1
@Bean(name = "firstJobDetail")
public MethodInvokingJobDetailFactoryBean firstJobDetail(FirstJob firstJob) {
MethodInvokingJobDetailFactoryBean jobDetail = new MethodInvokingJobDetailFactoryBean();
// 是否并发执行
jobDetail.setConcurrent(true);
// 为需要执行的实体类对应的对象
jobDetail.setTargetObject(firstJob);
// 需要执行的方法
jobDetail.setTargetMethod("task");
return jobDetail;
}
// 配置触发器1
@Bean(name = "firstTrigger")
public SimpleTriggerFactoryBean firstTrigger(JobDetail firstJobDetail) {
SimpleTriggerFactoryBean trigger = new SimpleTriggerFactoryBean();
trigger.setJobDetail(firstJobDetail);
// 设置任务启动延迟
trigger.setStartDelay(0);
// 单位毫秒 60000是一分钟
trigger.setRepeatInterval(60000);
return trigger;
}
@Bean(name = "scheduler")
public SchedulerFactoryBean schedulerFactory(Trigger firstTrigger, Trigger secondTrigger) {
SchedulerFactoryBean bean = new SchedulerFactoryBean();
// 延时启动,应用启动5秒后
bean.setStartupDelay(5);
// 注册触发器
bean.setTriggers(firstTrigger, secondTrigger);
return bean;
}
}
@@ -1,134 +0,0 @@
package cn.hellohao.quartz;
import cn.hellohao.pojo.Images;
import cn.hellohao.pojo.Imgreview;
import cn.hellohao.pojo.Keys;
import cn.hellohao.service.impl.ImgServiceImpl;
import cn.hellohao.service.impl.ImgreviewServiceImpl;
import cn.hellohao.service.impl.KeysServiceImpl;
import cn.hellohao.service.impl.NOSImageupload;
import cn.hellohao.utils.LocUpdateImg;
import cn.hellohao.utils.SpringContextHolder;
import com.alibaba.fastjson.JSON;
import com.baidu.aip.contentcensor.AipContentCensor;
import com.baidu.aip.contentcensor.EImgType;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/*
单任务执行,并且通过控制器的接口实现时间间隔的动态修改
任务类
* */
//@Configuration
@Component
public class SchedulerTask {
@Autowired
private ImgServiceImpl imgService;
@Autowired
private ImgreviewServiceImpl imgreviewService;
@Autowired
private KeysServiceImpl keysService;
private static AipContentCensor client;
private static SchedulerTask schedulerTask;
@PostConstruct
public void init() {
schedulerTask = this; }
private static void Initializes(Imgreview imgreview) {
client = new AipContentCensor(imgreview.getAppId(), imgreview.getApiKey(), imgreview.getSecretKey());
client.setConnectionTimeoutInMillis(2000);
client.setSocketTimeoutInMillis(60000);
}
public void start(){
//查询鉴黄key
Imgreview imgreview = schedulerTask.imgreviewService.selectByPrimaryKey(1);
if(imgreview.getUsing()==1){
//初始化鉴黄
SchedulerTask.Initializes(imgreview);
//计算出昨天的日期
Date d = new Date();
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");
String oldtime = df.format(new Date(d.getTime() - 1 * 24 * 60 * 60 * 1000));
//服务器获取出这个时间段的值然后遍历
List<Images> imglist= schedulerTask.imgService.gettimeimg(oldtime);
for (Images images : imglist) {
String imgurl = images.getImgurl();
System.err.println("正在鉴定的图片:" + imgurl);
JSONObject res = client.antiPorn(imgurl);
res = client.imageCensorUserDefined(imgurl, EImgType.URL, null);
System.err.println("返回的鉴黄json:"+res.toString());
com.alibaba.fastjson.JSONArray jsonArray = JSON.parseArray("[" + res.toString() + "]");
for (Object o : jsonArray) {
com.alibaba.fastjson.JSONObject jsonObject = (com.alibaba.fastjson.JSONObject) o;
com.alibaba.fastjson.JSONArray data = jsonObject.getJSONArray("data");
Integer conclusionType = jsonObject.getInteger("conclusionType");
if (conclusionType == 2) {
for (Object datum : data) {
com.alibaba.fastjson.JSONObject imgdata = (com.alibaba.fastjson.JSONObject) datum;
if (imgdata.getInteger("type") == 1) {
//标记图片
Integer ret = schedulerTask.imgService.deleimgname(images.getImgname()); //删除数据库图片信息
//Imgreview imgreview1 =imgreviewService.selectByPrimaryKey(1);
Imgreview imgreview1 = new Imgreview();
imgreview1.setId(1);
Integer count = imgreview.getCount();
System.out.println("违法图片总数:" + count);
imgreview1.setCount(count + 1);
schedulerTask.imgreviewService.updateByPrimaryKeySelective(imgreview1);
Keys key =null;
if(images.getSource()==1){
key =schedulerTask.keysService.selectKeys(images.getSource());
schedulerTask.imgService.delect(key, images.getImgname());
}else if (images.getSource()==2){
key = schedulerTask.keysService.selectKeys(images.getSource());
schedulerTask.imgService.delectOSS(key, images.getImgname());
}else if(images.getSource()==3){
key = schedulerTask.keysService.selectKeys(images.getSource());
schedulerTask.imgService.delectUSS(key, images.getImgname());
}else if(images.getSource()==4){
key = schedulerTask.keysService.selectKeys(images.getSource());
schedulerTask.imgService.delectKODO(key, images.getImgname());
}else if(images.getSource()==5){
LocUpdateImg.deleteLOCImg(images.getImgname());
}else if(images.getSource()==6){
key = schedulerTask.keysService.selectKeys(images.getSource());
schedulerTask.imgService.delectCOS(key, images.getImgname());
}else if(images.getSource()==7){
key = schedulerTask.keysService.selectKeys(images.getSource());
schedulerTask.imgService.delectFTP(key, images.getImgname());
}else if(images.getSource()==8){
key = schedulerTask.keysService.selectKeys(images.getSource());
schedulerTask.imgService.delectUFile(key, images.getImgname());
}else{
System.err.println("未获取到对象存储参数,上传失败。");
}
if (ret == 1) {
System.err.println("存在色情图片,删除成功。");
} else {
System.err.println("存在色情图片,删除失败");
}
}
}
}
}
}
}
}
}
@@ -1,16 +0,0 @@
package cn.hellohao.quartz;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;
@EnableScheduling
@Component
public class SecondJob{
public void task() {
//System.out.println("任务2执行....");
SchedulerTask schedulerTask = new SchedulerTask();
schedulerTask.start();
}
}
@@ -1,40 +0,0 @@
package cn.hellohao.quartz;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
@Component
public class SpringUtil implements ApplicationContextAware {
private static ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if (SpringUtil.applicationContext == null) {
SpringUtil.applicationContext = applicationContext;
}
}
//获取applicationContext
public static ApplicationContext getApplicationContext() {
return applicationContext;
}
//通过name获取 Bean.
public static Object getBean(String name) {
return getApplicationContext().getBean(name);
}
//通过class获取Bean.
public static <T> T getBean(Class<T> clazz) {
return getApplicationContext().getBean(clazz);
}
//通过name,以及Clazz返回指定的Bean
public static <T> T getBean(String name, Class<T> clazz) {
return getApplicationContext().getBean(name, clazz);
}
}
@@ -1,150 +0,0 @@
package cn.hellohao.quartz;
import cn.hellohao.pojo.FixedResources;
import cn.hellohao.pojo.Keys;
import cn.hellohao.service.impl.ImgServiceImpl;
import cn.hellohao.service.impl.KeysServiceImpl;
import cn.hellohao.utils.DeleImg;
import cn.hellohao.utils.LocUpdateImg;
import cn.hellohao.utils.Print;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/*
单任务执行,并且通过控制器的接口实现时间间隔的动态修改
任务类
* */
//@Configuration
@Component
public class TempImgTask {
@Autowired
private ImgServiceImpl imgService;
@Autowired
private KeysServiceImpl keysService;
private static TempImgTask tempImgTask;
@PostConstruct
public void init() {
tempImgTask = this;
tempImgTask.imgService = this.imgService;
tempImgTask.keysService = this.keysService;
}
public void start() throws InterruptedException {
File f = new File(FixedResources.LOCPATH);
if (!f.exists()) {
f.mkdirs();
}
List<String> list = new ArrayList<>();
File file = new File(File.separator + "HellohaoData"+File.separator+"img.ini");
//判断文件是否存在
if (file.exists()) {
StringBuilder result = new StringBuilder();
try {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "GBK"));//构造一个BufferedReader类来读取文件
String s = null;
while ((s = br.readLine()) != null) {//使用readLine方法,一次读一行
result.append(System.lineSeparator() + s);
String str = s;
String[] strArr = str.split("\\|");
System.out.println(strArr.length); //这里输出3
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date sd1=new Date();//大时间 当前时间
Date sd2=df.parse(strArr[1]);//小时间
if(sd1.after(sd2)){//等于false时说明图片时间大于或者等于当前时间
Integer ret = tempImgTask.imgService.deleimgname(strArr[0]);//删除库里图片数据
Keys key =null;
if(Integer.parseInt(strArr[2])==1){
key = tempImgTask.keysService.selectKeys(Integer.parseInt(strArr[2]));
tempImgTask.imgService.delect(key,strArr[0]);
}else if (Integer.parseInt(strArr[2])==2){
key = tempImgTask.keysService.selectKeys(Integer.parseInt(strArr[2]));
tempImgTask.imgService.delectOSS(key, strArr[0]);
}else if(Integer.parseInt(strArr[2])==3){
key = tempImgTask.keysService.selectKeys(Integer.parseInt(strArr[2]));
tempImgTask.imgService.delectUSS(key, strArr[0]);
}else if(Integer.parseInt(strArr[2])==4){
key = tempImgTask.keysService.selectKeys(Integer.parseInt(strArr[2]));
tempImgTask.imgService.delectKODO(key, strArr[0]);
}else if(Integer.parseInt(strArr[2])==5){
LocUpdateImg.deleteLOCImg(strArr[0]);
}else if(Integer.parseInt(strArr[2])==6){
key = tempImgTask.keysService.selectKeys(Integer.parseInt(strArr[2]));
tempImgTask.imgService.delectCOS(key,strArr[0]);
}else if(Integer.parseInt(strArr[2])==7){
key = tempImgTask.keysService.selectKeys(Integer.parseInt(strArr[2]));
tempImgTask.imgService.delectFTP(key, strArr[0]);
}else{
System.err.println("未获取到对象存储参数,上传失败。");
}
}else{
//没有过期的临时图片
list.add(s);
}
}
br.close();
} catch (Exception e) {
e.printStackTrace();
}
//return result.toString();
textcr(list);
} else {
//Print.warning("file not exists, 不进行暂存扫描处理");
try {
file.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public static void main(String[] args) throws Exception {
clearInfoForFile(File.separator + "HellohaoData"+File.separator+"img.ini");
}
/**
* 清空文件内容
* @param fileName
*/
public static void clearInfoForFile(String fileName) {
//Print.Normal("清空原ini文件");
File file =new File(fileName);
try {
if(!file.exists()) {
file.createNewFile();
}
FileWriter fileWriter =new FileWriter(file);
fileWriter.write("");
fileWriter.flush();
fileWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
}
//遍历没有过期的list文本,依次插入
public static void textcr(List<String> list){
clearInfoForFile(File.separator + "HellohaoData"+File.separator+"img.ini");
//Print.Normal("开始重新插入没有过期的文本");
for (String s : list) {
DeleImg.charu(s);
}
}
}
@@ -0,0 +1,95 @@
package cn.hellohao.quartz.job;
import cn.hellohao.pojo.Images;
import cn.hellohao.pojo.Keys;
import cn.hellohao.service.ImgTempService;
import cn.hellohao.service.KeysService;
import cn.hellohao.service.impl.*;
import cn.hellohao.utils.LocUpdateImg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Component
@EnableScheduling
public class FirstJob {
@Autowired
private ImgServiceImpl imgService;
@Autowired
private NOSImageupload nosImageupload;
@Autowired
private OSSImageupload ossImageupload;
@Autowired
private COSImageupload cosImageupload;
@Autowired
private KODOImageupload kodoImageupload;
@Autowired
private USSImageupload ussImageupload;
@Autowired
private UFileImageupload uFileImageupload;
@Autowired
private FTPImageupload ftpImageupload;
@Autowired
ImgTempService imgTempService;
@Autowired
KeysService keysService;
private static FirstJob firstJob;
@PostConstruct
public void init() {
firstJob = this;
}
//调用的任务主体
public void task() {
// System.out.println("定时任务.//开始");
try{
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String currdate = format.format(new Date());
List<Images> imagesList = imgTempService.selectDelImgUidList(currdate);
if(imagesList.size()==0){
// System.out.println("定时任务.//没有期限图片");
return;
}
for (Images images : imagesList) {
imgTempService.delImgAndExp(images.getImguid());
imgService.deleimgForImgUid(images.getImguid());
Keys keys = keysService.selectKeys(images.getSource());
if(keys.getStorageType()==1){
firstJob.nosImageupload.delNOS(keys.getId(),images.getImgname());
}else if (keys.getStorageType()==2){
firstJob.ossImageupload.delOSS(keys.getId(), images.getImgname());
}else if(keys.getStorageType()==3){
firstJob.ussImageupload.delUSS(keys.getId(), images.getImgname());
}else if(keys.getStorageType()==4){
firstJob.kodoImageupload.delKODO(keys.getId(), images.getImgname());
}else if(keys.getStorageType()==5){
LocUpdateImg.deleteLOCImg(images.getImgname());
}else if(keys.getStorageType()==6){
firstJob.cosImageupload.delCOS(keys.getId(),images.getImgname());
}else if(keys.getStorageType()==7){
firstJob.ftpImageupload.delFTP(keys.getId(), images.getImgname());
}else if(keys.getStorageType()==8){
firstJob.uFileImageupload.delUFile(keys.getId(), images.getImgname());
}else{
System.err.println("未获取到对象存储参数,上传失败。");
}
}
}catch (Exception e){
System.err.println("任务查询期限图像发生错误");
e.printStackTrace();
}
}
}
@@ -0,0 +1,18 @@
package cn.hellohao.quartz.job;
import java.text.SimpleDateFormat;
import java.util.Date;
//@Component
//@EnableScheduling
public class ThirdJob {
public void task() {
System.out.println("任务3执行....当前时间为" + dateFormat().format(new Date()));
}
private SimpleDateFormat dateFormat() {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss");
return simpleDateFormat;
}
}
@@ -26,4 +26,6 @@ public interface AlbumService {
List<Album> selectAlbumURLList(Album album); List<Album> selectAlbumURLList(Album album);
Integer selectAlbumCount(Integer userid); Integer selectAlbumCount(Integer userid);
Integer updateAlbum(Album album);
} }
@@ -15,6 +15,8 @@ public interface ImgService {
Integer deleimg(Integer id); Integer deleimg(Integer id);
Integer deleimgForImgUid(String imguid);
Integer countimg(Integer userid); Integer countimg(Integer userid);
Images selectByPrimaryKey(Integer id); Images selectByPrimaryKey(Integer id);
@@ -35,14 +37,12 @@ public interface ImgService {
Integer md5Count(Images images); Integer md5Count(Images images);
Images selectImgUrlByMD5(String md5key); List<Images> selectImgUrlByMD5(String md5key);
List<Images> RecentlyUploaded(Integer userid); List<Images> RecentlyUploaded(Integer userid);
List<User> RecentlyUser(); List<User> RecentlyUser();
Integer addGreat(Integer id);
List<String> getyyyy(Integer userid); List<String> getyyyy(Integer userid);
List<Images> countByM(Images images); List<Images> countByM(Images images);
@@ -1,9 +0,0 @@
package cn.hellohao.service;
import org.springframework.stereotype.Service;
@Service
public interface NoticeService {
String getNotice();
}
@@ -84,6 +84,11 @@ public class AlbumServiceImpl implements AlbumService {
return albumMapper.selectAlbumCount(userid); return albumMapper.selectAlbumCount(userid);
} }
@Override
public Integer updateAlbum(Album album) {
return albumMapper.updateAlbum(album);
}
@Transactional @Transactional
public Integer delete(String albumkey) { public Integer delete(String albumkey) {
Integer ret1 = albumMapper.deleteAlbum(albumkey); Integer ret1 = albumMapper.deleteAlbum(albumkey);
@@ -108,4 +113,6 @@ public class AlbumServiceImpl implements AlbumService {
} }
return ret1; return ret1;
} }
} }
@@ -47,14 +47,16 @@ public class COSImageupload {
returnImage.setImgSize(entry.getValue().length()); returnImage.setImgSize(entry.getValue().length());
returnImage.setCode("200"); returnImage.setCode("200");
} catch (CosServiceException serverException) { } catch (CosServiceException serverException) {
returnImage.setCode("400");
serverException.printStackTrace(); serverException.printStackTrace();
} catch (CosClientException clientException) { } catch (CosClientException clientException) {
returnImage.setCode("400");
clientException.printStackTrace(); clientException.printStackTrace();
} }
} }
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
returnImage.setCode("200"); returnImage.setCode("500");
} }
return returnImage; return returnImage;
} }
@@ -71,16 +73,16 @@ public class COSImageupload {
COSCredentials cred = new BasicCOSCredentials(secretId, secretKey); COSCredentials cred = new BasicCOSCredentials(secretId, secretKey);
Region region = new Region(k.getEndpoint()); Region region = new Region(k.getEndpoint());
ClientConfig clientConfig = new ClientConfig(region); ClientConfig clientConfig = new ClientConfig(region);
COSClient cosClient = new COSClient(cred, clientConfig); COSClient cos = new COSClient(cred, clientConfig);
ListObjectsRequest listObjectsRequest = new ListObjectsRequest(); ListObjectsRequest listObjectsRequest = new ListObjectsRequest();
listObjectsRequest.setBucketName(k.getBucketname()); listObjectsRequest.setBucketName(k.getBucketname());
listObjectsRequest.setDelimiter("/"); listObjectsRequest.setDelimiter("/");
listObjectsRequest.setMaxKeys(1); listObjectsRequest.setMaxKeys(1);
ObjectListing objectListing = null; ObjectListing objectListing = null;
try { try {
objectListing = cosClient.listObjects(listObjectsRequest); objectListing = cos.listObjects(listObjectsRequest);
ret = 1; ret = 1;
cosClient = cosClient; cosClient = cos;
key = k; key = k;
} catch (Exception e) { } catch (Exception e) {
System.out.println("COS Object Is null"); System.out.println("COS Object Is null");
@@ -61,8 +61,6 @@ public class ClientService {
@Autowired @Autowired
private UploadConfigMapper uploadConfigMapper; private UploadConfigMapper uploadConfigMapper;
@Autowired @Autowired
private NoticeMapper noticeMapper;
@Autowired
private ImgMapper imgMapper; private ImgMapper imgMapper;
@Autowired @Autowired
ImgreviewMapper imgreviewMapper; ImgreviewMapper imgreviewMapper;
@@ -128,7 +126,7 @@ public class ClientService {
e.printStackTrace(); e.printStackTrace();
System.out.println("未获取到图片的MD5,成成UUID"); System.out.println("未获取到图片的MD5,成成UUID");
} }
Msg fileMiME = TypeDict.FileMiME(file, uploadConfig.getSuffix()); Msg fileMiME = TypeDict.FileMiME(file);
if (!fileMiME.getCode().equals("200")) { if (!fileMiME.getCode().equals("200")) {
//非图像文本 //非图像文本
msg.setCode("4009"); msg.setCode("4009");
@@ -155,10 +153,10 @@ public class ClientService {
imaOBJ.setMd5key(md5key); imaOBJ.setMd5key(md5key);
imaOBJ.setUserid(u.getId()); imaOBJ.setUserid(u.getId());
if (imgMapper.md5Count(imaOBJ) > 0) { if (imgMapper.md5Count(imaOBJ) > 0) {
Images images = imgMapper.selectImgUrlByMD5(md5key); List<Images> images = imgMapper.selectImgUrlByMD5(md5key);
jsonObject.put("url", images.getImgurl()); jsonObject.put("url", images.get(0).getImgurl());
jsonObject.put("name", file.getName()); jsonObject.put("name", file.getName());
jsonObject.put("size", images.getSizes()); jsonObject.put("size", images.get(0).getSizes());
msg.setData(jsonObject); msg.setData(jsonObject);
return msg; return msg;
} }
@@ -22,7 +22,6 @@ public class FTPImageupload {
public ReturnImage ImageuploadFTP(Map<String, File> fileMap, String username,Integer keyID) { public ReturnImage ImageuploadFTP(Map<String, File> fileMap, String username,Integer keyID) {
ReturnImage returnImage = new ReturnImage(); ReturnImage returnImage = new ReturnImage();
Keys key = null;
String[] host = key.getEndpoint().split("\\:"); String[] host = key.getEndpoint().split("\\:");
String h = host[0]; String h = host[0];
Integer p = Integer.parseInt(host[1]); Integer p = Integer.parseInt(host[1]);
@@ -88,8 +88,8 @@ public class GroupServiceImpl implements GroupService {
if(group.getUsertype()!=0){ if(group.getUsertype()!=0){
Group groupFroUserType = groupMapper.getGroupFroUserType(group.getUsertype()); Group groupFroUserType = groupMapper.getGroupFroUserType(group.getUsertype());
if(groupFroUserType!=null){ if(groupFroUserType!=null){
if(groupFroUserType.getUsertype()==group.getUsertype()){ if(groupFroUserType.getUsertype().equals(group.getUsertype())){
if(groupFroUserType.getId()==group.getId()){ if(groupFroUserType.getId().equals(group.getId())){
groupMapper.setgroup(group); groupMapper.setgroup(group);
msg.setInfo("修改成功"); msg.setInfo("修改成功");
}else{ }else{
@@ -57,6 +57,10 @@ public class ImgServiceImpl implements ImgService {
return imgMapper.deleimg(id); return imgMapper.deleimg(id);
} }
@Override
public Integer deleimgForImgUid(String imguid) {
return imgMapper.deleimgForImgUid(imguid);
}
public Images selectByPrimaryKey(Integer id) { public Images selectByPrimaryKey(Integer id) {
return imgMapper.selectByPrimaryKey(id); return imgMapper.selectByPrimaryKey(id);
@@ -216,7 +220,7 @@ public class ImgServiceImpl implements ImgService {
} }
@Override @Override
public Images selectImgUrlByMD5(String md5key) { public List<Images> selectImgUrlByMD5(String md5key) {
return imgMapper.selectImgUrlByMD5(md5key); return imgMapper.selectImgUrlByMD5(md5key);
} }
@@ -230,10 +234,6 @@ public class ImgServiceImpl implements ImgService {
return imgMapper.RecentlyUser(); return imgMapper.RecentlyUser();
} }
@Override
public Integer addGreat(Integer id) {
return imgMapper.addGreat(id);
}
public List<String> getyyyy(Integer userid){ public List<String> getyyyy(Integer userid){
return imgMapper.getyyyy(userid); return imgMapper.getyyyy(userid);
@@ -33,7 +33,6 @@ public class KODOImageupload {
public ReturnImage ImageuploadKODO(Map<String, File> fileMap, String username, Integer keyID){ public ReturnImage ImageuploadKODO(Map<String, File> fileMap, String username, Integer keyID){
ReturnImage returnImage = new ReturnImage(); ReturnImage returnImage = new ReturnImage();
Keys key = null;
Configuration cfg; Configuration cfg;
if (key.getEndpoint().equals("1")) { if (key.getEndpoint().equals("1")) {
cfg = new Configuration(Zone.zone0()); cfg = new Configuration(Zone.zone0());
@@ -53,7 +52,6 @@ public class KODOImageupload {
try { try {
for (Map.Entry<String, File> entry : fileMap.entrySet()) { for (Map.Entry<String, File> entry : fileMap.entrySet()) {
String ShortUID = SetText.getShortUuid(); String ShortUID = SetText.getShortUuid();
java.text.DateFormat format1 = new java.text.SimpleDateFormat("MMddhhmmss");
file = entry.getValue(); file = entry.getValue();
try { try {
Response response = uploadManager.put(file,username + "/" + ShortUID + "." + entry.getKey(),upToken); Response response = uploadManager.put(file,username + "/" + ShortUID + "." + entry.getKey(),upToken);
@@ -63,6 +61,7 @@ public class KODOImageupload {
returnImage.setImgSize(entry.getValue().length()); returnImage.setImgSize(entry.getValue().length());
returnImage.setCode("200"); returnImage.setCode("200");
} catch (QiniuException ex) { } catch (QiniuException ex) {
returnImage.setCode("400");
Response r = ex.response; Response r = ex.response;
System.err.println(r.toString()); System.err.println(r.toString());
try { try {
@@ -76,10 +75,8 @@ public class KODOImageupload {
returnImage.setCode("500"); returnImage.setCode("500");
} }
return returnImage; return returnImage;
} }
//初始化
public static Integer Initialize(Keys k) { public static Integer Initialize(Keys k) {
int ret = -1; int ret = -1;
if (k.getEndpoint() != null && k.getAccessSecret() != null && k.getEndpoint() != null if (k.getEndpoint() != null && k.getAccessSecret() != null && k.getEndpoint() != null
@@ -101,15 +98,14 @@ public class KODOImageupload {
UploadManager uploadManager = new UploadManager(cfg); UploadManager uploadManager = new UploadManager(cfg);
Auth auth = Auth.create(k.getAccessKey(), k.getAccessSecret()); Auth auth = Auth.create(k.getAccessKey(), k.getAccessSecret());
String upToken = auth.uploadToken(k.getBucketname(),null,7200,null);//auth.uploadToken(k.getBucketname()); String upToken = auth.uploadToken(k.getBucketname(),null,7200,null);//auth.uploadToken(k.getBucketname());
BucketManager bmObj = new BucketManager(auth, cfg);
BucketManager bucketManager = new BucketManager(auth, cfg);
BucketManager.FileListIterator fileListIterator = null; BucketManager.FileListIterator fileListIterator = null;
try { try {
fileListIterator = bucketManager.createFileListIterator(k.getBucketname(), "", 1, "/"); fileListIterator = bmObj.createFileListIterator(k.getBucketname(), "", 1, "/");
FileInfo[] items = fileListIterator.next(); FileInfo[] items = fileListIterator.next();
if(items!=null){ if(items!=null){
ret = 1; ret = 1;
bucketManager = bucketManager; bucketManager = bmObj;
key = k; key = k;
} }
}catch (Exception e){ }catch (Exception e){
@@ -58,13 +58,13 @@ public class NOSImageupload {
&& !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ){ && !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ){
// 初始化 // 初始化
Credentials credentials = new BasicCredentials(k.getAccessKey(), k.getAccessSecret()); Credentials credentials = new BasicCredentials(k.getAccessKey(), k.getAccessSecret());
NosClient nosClient = new NosClient(credentials); NosClient nosObj = new NosClient(credentials);
nosClient.setEndpoint(k.getEndpoint()); nosObj.setEndpoint(k.getEndpoint());
ObjectListing objectListing = null; ObjectListing objectListing = null;
try { try {
objectListing = nosClient.listObjects(k.getBucketname()); objectListing = nosObj.listObjects(k.getBucketname());
ret = 1; ret = 1;
nosClient = nosClient; nosClient = nosObj;
key = k; key = k;
}catch (Exception e){ }catch (Exception e){
System.out.println("NOS Object Is null"); System.out.println("NOS Object Is null");
@@ -1,18 +0,0 @@
package cn.hellohao.service.impl;
import cn.hellohao.dao.NoticeMapper;
import cn.hellohao.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class NoticeServiceImpl implements NoticeService {
@Autowired
private NoticeMapper noticeMapper;
@Override
public String getNotice() {
return noticeMapper.getNotice();
}
}
@@ -1,6 +1,7 @@
package cn.hellohao.service.impl; package cn.hellohao.service.impl;
import cn.hellohao.pojo.Keys; import cn.hellohao.pojo.Keys;
import cn.hellohao.pojo.Msg;
import cn.hellohao.pojo.ReturnImage; import cn.hellohao.pojo.ReturnImage;
import cn.hellohao.utils.*; import cn.hellohao.utils.*;
import com.aliyun.oss.OSS; import com.aliyun.oss.OSS;
@@ -14,7 +15,7 @@ import java.util.*;
@Service @Service
public class OSSImageupload { public class OSSImageupload {
static OSSClient ossClient; static OSS ossClient;
static Keys key; static Keys key;
public ReturnImage ImageuploadOSS(Map<String, File> fileMap, String username,Integer keyID){ public ReturnImage ImageuploadOSS(Map<String, File> fileMap, String username,Integer keyID){
@@ -24,10 +25,11 @@ public class OSSImageupload {
meta.setHeader("Content-Disposition", "inline"); meta.setHeader("Content-Disposition", "inline");
try { try {
for (Map.Entry<String, File> entry : fileMap.entrySet()) { for (Map.Entry<String, File> entry : fileMap.entrySet()) {
String ShortUID = SetText.getShortUuid();//UUID.randomUUID().toString().replace("-", "").toLowerCase().substring(0,5);//生成一个没有-的uuid,然后取前5位 String ShortUID = SetText.getShortUuid();
java.text.DateFormat format1 = new java.text.SimpleDateFormat("MMddhhmmss"); java.text.DateFormat format1 = new java.text.SimpleDateFormat("MMddhhmmss");
// String times = format1.format(new Date());
file = entry.getValue(); file = entry.getValue();
Msg fileMiME = TypeDict.FileMiME(file);
meta.setHeader("content-type", fileMiME.getData().toString());
System.out.println("待上传的图片:"+username + "/" + ShortUID + "." + entry.getKey()); System.out.println("待上传的图片:"+username + "/" + ShortUID + "." + entry.getKey());
ossClient.putObject(key.getBucketname(), username + "/" + ShortUID + "." + entry.getKey(),file); ossClient.putObject(key.getBucketname(), username + "/" + ShortUID + "." + entry.getKey(),file);
returnImage.setImgname(username + "/" + ShortUID + "." + entry.getKey());//entry.getValue().getOriginalFilename() returnImage.setImgname(username + "/" + ShortUID + "." + entry.getKey());//entry.getValue().getOriginalFilename()
@@ -41,23 +43,20 @@ public class OSSImageupload {
} }
return returnImage; return returnImage;
} }
//初始化
public static Integer Initialize(Keys k) { public static Integer Initialize(Keys k) {
int ret = -1; int ret = -1;
ObjectListing objectListing = null; ObjectListing objectListing = null;
if(k.getEndpoint()!=null && k.getAccessSecret()!=null && k.getAccessKey()!=null && k.getEndpoint()!=null if(k.getEndpoint()!=null && k.getAccessSecret()!=null && k.getAccessKey()!=null && k.getEndpoint()!=null
&& k.getBucketname()!=null && k.getRequestAddress()!=null ) { && k.getBucketname()!=null && k.getRequestAddress()!=null ) {
if(!k.getEndpoint().equals("") && !k.getAccessSecret().equals("") && !k.getAccessKey().equals("") && !k.getEndpoint().equals("") if(!k.getEndpoint().equals("") && !k.getAccessSecret().equals("") && !k.getAccessKey().equals("") && !k.getEndpoint().equals("")
&& !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ) { && !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ) {
OSS ossClient = new OSSClientBuilder().build(k.getEndpoint(), k.getAccessKey(), k.getAccessSecret()); OSS ossObj = new OSSClientBuilder().build(k.getEndpoint(), k.getAccessKey(), k.getAccessSecret());
try { try {
objectListing = ossClient.listObjects(k.getBucketname()); objectListing = ossObj.listObjects(k.getBucketname());
ret=1; ret=1;
ossClient = ossClient; ossClient = ossObj;
key = k; key = k;
} catch (Exception e) { } catch (Exception e) {
System.out.println("OSS Object Is null"); System.out.println("OSS Object Is null");
@@ -1,6 +1,7 @@
package cn.hellohao.service.impl; package cn.hellohao.service.impl;
import cn.hellohao.pojo.Keys; import cn.hellohao.pojo.Keys;
import cn.hellohao.pojo.Msg;
import cn.hellohao.pojo.ReturnImage; import cn.hellohao.pojo.ReturnImage;
import cn.hellohao.pojo.UploadConfig; import cn.hellohao.pojo.UploadConfig;
import cn.hellohao.utils.*; import cn.hellohao.utils.*;
@@ -26,6 +27,8 @@ public class UFileImageupload {
for (Map.Entry<String, File> entry : fileMap.entrySet()) { for (Map.Entry<String, File> entry : fileMap.entrySet()) {
String ShortUID = SetText.getShortUuid(); String ShortUID = SetText.getShortUuid();
file = entry.getValue(); file = entry.getValue();
Msg fileMiME = TypeDict.FileMiME(file);
meta.setHeader("content-type", fileMiME.getData().toString());
uFile.setContentMD5(UpYun.md5(file)); uFile.setContentMD5(UpYun.md5(file));
boolean result = uFile.writeFile(username + "/" + ShortUID + "." + entry.getKey(), file, true); boolean result = uFile.writeFile(username + "/" + ShortUID + "." + entry.getKey(), file, true);
if(result){ if(result){
@@ -34,6 +37,7 @@ public class UFileImageupload {
returnImage.setImgSize(entry.getValue().length()); returnImage.setImgSize(entry.getValue().length());
returnImage.setCode("200"); returnImage.setCode("200");
}else{ }else{
returnImage.setCode("400");
System.err.println("上传失败"); System.err.println("上传失败");
} }
} }
@@ -53,12 +57,12 @@ public class UFileImageupload {
if(!k.getAccessSecret().equals("") && !k.getAccessKey().equals("") if(!k.getAccessSecret().equals("") && !k.getAccessKey().equals("")
&& !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ) { && !k.getBucketname().equals("") && !k.getRequestAddress().equals("") ) {
// 创建UpYun实例。 // 创建UpYun实例。
UpYun uFile = new UpYun(k.getBucketname(), k.getAccessKey(), k.getAccessSecret()); UpYun ufObj = new UpYun(k.getBucketname(), k.getAccessKey(), k.getAccessSecret());
List<UpYun.FolderItem> items = null; List<UpYun.FolderItem> items = null;
try { try {
items = uFile.readDir("/",null); items = ufObj.readDir("/",null);
ret = 1; ret = 1;
uFile = uFile; uFile = ufObj;
key = k; key = k;
} catch (Exception e) { } catch (Exception e) {
System.out.println("UFile Object Is null"); System.out.println("UFile Object Is null");
@@ -1,6 +1,7 @@
package cn.hellohao.service.impl; package cn.hellohao.service.impl;
import cn.hellohao.pojo.Keys; import cn.hellohao.pojo.Keys;
import cn.hellohao.pojo.Msg;
import cn.hellohao.pojo.ReturnImage; import cn.hellohao.pojo.ReturnImage;
import cn.hellohao.pojo.UploadConfig; import cn.hellohao.pojo.UploadConfig;
import cn.hellohao.utils.*; import cn.hellohao.utils.*;
@@ -29,6 +30,8 @@ public class USSImageupload {
for (Map.Entry<String, File> entry : fileMap.entrySet()) { for (Map.Entry<String, File> entry : fileMap.entrySet()) {
String ShortUID = SetText.getShortUuid(); String ShortUID = SetText.getShortUuid();
file = entry.getValue(); file = entry.getValue();
Msg fileMiME = TypeDict.FileMiME(file);
meta.setHeader("content-type", fileMiME.getData().toString());
upyun.setContentMD5(UpYun.md5(file)); upyun.setContentMD5(UpYun.md5(file));
boolean result = upyun.writeFile(username + "/" + ShortUID + "." + entry.getKey(), file, true); boolean result = upyun.writeFile(username + "/" + ShortUID + "." + entry.getKey(), file, true);
if(result){ if(result){
@@ -37,6 +40,7 @@ public class USSImageupload {
returnImage.setImgSize(entry.getValue().length()); returnImage.setImgSize(entry.getValue().length());
returnImage.setCode("200"); returnImage.setCode("200");
}else{ }else{
returnImage.setCode("400");
System.err.println("上传失败"); System.err.println("上传失败");
} }
} }
@@ -57,12 +61,12 @@ public class USSImageupload {
&& !k.getRequestAddress().equals("") ) { && !k.getRequestAddress().equals("") ) {
// 初始化 // 初始化
// 创建UpYun实例。 // 创建UpYun实例。
UpYun upyun = new UpYun(k.getBucketname(), k.getAccessKey(), k.getAccessSecret()); UpYun upObj= new UpYun(k.getBucketname(), k.getAccessKey(), k.getAccessSecret());
List<UpYun.FolderItem> items = null; List<UpYun.FolderItem> items = null;
try { try {
items = upyun.readDir("/",null); items = upObj.readDir("/",null);
ret = 1; ret = 1;
upyun = upyun; upyun = upObj;
key = k; key = k;
} catch (Exception e) { } catch (Exception e) {
System.out.println("USS Object Is null"); System.out.println("USS Object Is null");
@@ -52,7 +52,7 @@ public class UploadServicel {
public Msg uploadForLoc(HttpServletRequest request, public Msg uploadForLoc(HttpServletRequest request,
MultipartFile multipartFile, Integer setday, String imgUrl, JSONArray selectTreeList) { MultipartFile multipartFile, Integer setday, String imgUrl) {
Msg msg = new Msg(); Msg msg = new Msg();
try{ try{
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
@@ -110,7 +110,7 @@ public class UploadServicel {
e.printStackTrace(); e.printStackTrace();
System.out.println("未获取到图片的MD5,成成UUID"); System.out.println("未获取到图片的MD5,成成UUID");
} }
Msg fileMiME = TypeDict.FileMiME(file, uploadConfig.getSuffix()); Msg fileMiME = TypeDict.FileMiME(file);
if(!fileMiME.getCode().equals("200")) { if(!fileMiME.getCode().equals("200")) {
//非图像文本 //非图像文本
msg.setCode("4000"); msg.setCode("4000");
@@ -127,10 +127,10 @@ public class UploadServicel {
imaOBJ.setMd5key(md5key); imaOBJ.setMd5key(md5key);
imaOBJ.setUserid(u==null?0:u.getId()); imaOBJ.setUserid(u==null?0:u.getId());
if(imgMapper.md5Count(imaOBJ)>0){ if(imgMapper.md5Count(imaOBJ)>0){
Images images = imgMapper.selectImgUrlByMD5(md5key); List<Images> images = imgMapper.selectImgUrlByMD5(md5key);
jsonObject.put("url", images.getImgurl()); jsonObject.put("url", images.get(0).getImgurl());
jsonObject.put("name",file.getName()); jsonObject.put("name",file.getName());
jsonObject.put("imguid",images.getImguid()); jsonObject.put("imguid",images.get(0).getImguid());
// jsonObject.put("shortLink",images.getShortlink()); // jsonObject.put("shortLink",images.getShortlink());
msg.setData(jsonObject); msg.setData(jsonObject);
return msg; return msg;
@@ -220,10 +220,10 @@ public class UploadServicel {
//先判断是不是有效链接 //先判断是不是有效链接
// final boolean valid = ImgUrlUtil.isValid(imgurl); // final boolean valid = ImgUrlUtil.isValid(imgurl);
if(true){ if(true){
Long imgsize = null; Long imgsize = 0L;
try { try {
imgsize = ImgUrlUtil.getFileLength(imgurl); // imgsize = ImgUrlUtil.getFileLength(imgurl);
if(imgsize>0){ if(imgsize==0){
// String uuid= UUID.randomUUID().toString().replace("-", ""); // String uuid= UUID.randomUUID().toString().replace("-", "");
String ShortUID = SetText.getShortUuid(); String ShortUID = SetText.getShortUuid();
String savePath = request.getSession().getServletContext().getRealPath("/")+File.separator+"hellohaotmp"+File.separator; String savePath = request.getSession().getServletContext().getRealPath("/")+File.separator+"hellohaotmp"+File.separator;
@@ -245,7 +245,7 @@ public class UploadServicel {
msg.setCode("500"); msg.setCode("500");
msg.setInfo("获取资源失败"); msg.setInfo("获取资源失败");
} }
} catch (IOException e) { } catch (Exception e) {
msg.setCode("500"); msg.setCode("500");
msg.setInfo("获取资源失败"); msg.setInfo("获取资源失败");
} }
@@ -253,15 +253,15 @@ public class UploadServicel {
msg.setCode("500"); msg.setCode("500");
msg.setInfo("该链接无效"); msg.setInfo("该链接无效");
} }
return msg; return msg;
} }
private static Group group; //上传用户或游客的所属分组
public static Group group; //上传用户或游客的所属分组 private static Long memory;//上传用户或游客的分配容量 memory
public static Long memory;//上传用户或者游客的分配容量 memory private static Long TotleMemory;//用户或者游客下可使用的总容量 //maxsize
public static Long TotleMemory;//用户或者游客下可使用的总容量 //maxsize private static Long UsedTotleMemory;//用户或者游客已经用掉的总容量 //usermemory
public static Long UsedTotleMemory;//用户或者游客已经用掉的总容量 //usermemory private static String updatePath="tourist";
public static String updatePath="tourist";
//判断用户 或 游客 当前上传图片的一系列校验 //判断用户 或 游客 当前上传图片的一系列校验
private Msg updateImgCheck(User user, UploadConfig uploadConfig){ private Msg updateImgCheck(User user, UploadConfig uploadConfig){
@@ -276,6 +276,7 @@ public class UploadServicel {
msg.setInfo("系统已禁用游客上传"); msg.setInfo("系统已禁用游客上传");
return msg; return msg;
} }
updatePath="tourist";
group = GetCurrentSource.GetSource(null); group = GetCurrentSource.GetSource(null);
memory = Long.valueOf(uploadConfig.getVisitormemory());//单位 B 游客设置总量 memory = Long.valueOf(uploadConfig.getVisitormemory());//单位 B 游客设置总量
TotleMemory = Long.valueOf(uploadConfig.getFilesizetourists());//单位 B 游客单文件大小 TotleMemory = Long.valueOf(uploadConfig.getFilesizetourists());//单位 B 游客单文件大小
@@ -1,59 +0,0 @@
package cn.hellohao.utils;
import java.io.*;
public class DeleImg {
public static void charu(String imgUrlText) {
String filePath =File.separator + "HellohaoData" ;
File file = new File(filePath);
File file1 = new File(filePath+File.separator+"img.ini");
if(!file.exists()){
file.mkdirs();
}
if(!file1.exists()){
try {
file1.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
FileWriter fw = null;
try {
//如果文件存在,则追加内容;如果文件不存在,则创建文件
fw = new FileWriter(file1, true);
} catch (IOException e) {
e.printStackTrace();
}
PrintWriter pw = new PrintWriter(fw);
pw.println(imgUrlText);
pw.flush();
try {
fw.flush();
pw.close();
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
// 读取文件内容
public static String readFile(String path) {//路径
File file = new File(path);
StringBuilder result = new StringBuilder();
try {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "GBK"));//构造一个BufferedReader类来读取文件
String s = null;
while ((s = br.readLine()) != null) {//使用readLine方法,一次读一行
result.append(System.lineSeparator() + s);
Print.Normal( s);
}
br.close();
} catch (Exception e) {
e.printStackTrace();
}
return result.toString();
}
}
+25 -10
View File
@@ -1,5 +1,6 @@
package cn.hellohao.utils; package cn.hellohao.utils;
import cn.hellohao.config.GlobalConstant;
import org.omg.CORBA.Environment; import org.omg.CORBA.Environment;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -8,6 +9,7 @@ import org.springframework.context.annotation.Configuration;
import java.io.File; import java.io.File;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Properties;
import java.util.UUID; import java.util.UUID;
/** /**
@@ -28,7 +30,8 @@ public class FirstRun implements InitializingBean {
private String jdbcurl; private String jdbcurl;
@Override @Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() {
isWindows();
RunSqlScript.USERNAME = jdbcusername; RunSqlScript.USERNAME = jdbcusername;
RunSqlScript.PASSWORD = jdbcpass; RunSqlScript.PASSWORD = jdbcpass;
RunSqlScript.DBURL = jdbcurl; RunSqlScript.DBURL = jdbcurl;
@@ -83,11 +86,11 @@ public class FirstRun implements InitializingBean {
Print.Normal("Stage 7"); Print.Normal("Stage 7");
} }
Integer ret6 = RunSqlScript.RunSelectCount(judgeTable+"'imgandalbum' and column_name = 'notes' and TABLE_SCHEMA='picturebed'"); // Integer ret6 = RunSqlScript.RunSelectCount(judgeTable+"'imgandalbum' and column_name = 'notes' and TABLE_SCHEMA='picturebed'");
if(ret6==0){ // if(ret6==0){
RunSqlScript.RunInsert(sql11); // RunSqlScript.RunInsert(sql11);
Print.Normal("Stage 8"); // Print.Normal("Stage 8");
} // }
RunSqlScript.RunInsert(sql10); RunSqlScript.RunInsert(sql10);
@@ -95,6 +98,8 @@ public class FirstRun implements InitializingBean {
RunSqlScript.RunInsert(inddx_md5key); RunSqlScript.RunInsert(inddx_md5key);
RunSqlScript.RunInsert("UPDATE `keys` SET `Endpoint` = '0' WHERE `id` = 8"); RunSqlScript.RunInsert("UPDATE `keys` SET `Endpoint` = '0' WHERE `id` = 8");
Print.Normal("Stage success"); Print.Normal("Stage success");
clears();
} }
//检查表是否存在,后边加'imgdata' and column_name = 'explains' 检查字段是否存在 //检查表是否存在,后边加'imgdata' and column_name = 'explains' 检查字段是否存在
@@ -115,7 +120,7 @@ public class FirstRun implements InitializingBean {
private String sql10 = "alter table config modify column `explain` varchar(1000),modify column links varchar(1000),modify column notice varchar(1000),modify column baidu varchar(1000)"; private String sql10 = "alter table config modify column `explain` varchar(1000),modify column links varchar(1000),modify column notice varchar(1000),modify column baidu varchar(1000)";
//添加imgandalbum字段notes(添加画廊图片说明) //添加imgandalbum字段notes(添加画廊图片说明)
private String sql11 = "alter table imgandalbum add notes varchar(1000) DEFAULT ' '"; // private String sql11 = "alter table imgandalbum add notes varchar(1000) DEFAULT ' '";
private String inddx_md5key = "ALTER TABLE imgdata ADD INDEX index_md5key_url ( md5key,imgurl)"; private String inddx_md5key = "ALTER TABLE imgdata ADD INDEX index_md5key_url ( md5key,imgurl)";
// create index yarn_app_result_i4 on yarn_app_result (flow_exec_id(100), another_column(50)); // create index yarn_app_result_i4 on yarn_app_result (flow_exec_id(100), another_column(50));
@@ -124,11 +129,11 @@ public class FirstRun implements InitializingBean {
private String compressed = "alter table imgdata row_format=compressed"; private String compressed = "alter table imgdata row_format=compressed";
private void clears(){ private void clears(){
File file1 = new File(File.separator+"HellohaoData"+File.separator+"hellohaotempimg"); File file1 = new File(GlobalConstant.LOCPATH+File.separator+"hellohaotempimg");
File file2 = new File(File.separator+"HellohaoData"+File.separator+"hellohaotempwatermarimg"); File file2 = new File(GlobalConstant.LOCPATH+File.separator+"hellohaotempwatermarimg");
//判断目录有没有创建 //判断目录有没有创建
File file = new File(File.separator+"HellohaoData"); File file = new File(GlobalConstant.LOCPATH);
if(!file.exists()){ if(!file.exists()){
file.mkdirs(); file.mkdirs();
file1.mkdirs(); file1.mkdirs();
@@ -143,4 +148,14 @@ public class FirstRun implements InitializingBean {
} }
public boolean isWindows() {
System.out.println("当前系统类型:"+System.getProperties().getProperty("os.name").toUpperCase());
if(System.getProperties().getProperty("os.name").toUpperCase().contains("MAC")){
GlobalConstant.SYSTYPE = "MAC";
Properties props=System.getProperties();
GlobalConstant.LOCPATH = props.getProperty("user.home")+File.separator+".HellohaoData";
}
return System.getProperties().getProperty("os.name").toUpperCase().indexOf("WINDOWS") != -1;
}
} }
@@ -1,8 +1,6 @@
package cn.hellohao.utils; package cn.hellohao.utils;
import cn.hellohao.service.impl.ImgServiceImpl; import cn.hellohao.service.impl.ImgServiceImpl;
import cn.hellohao.service.impl.ImgreviewServiceImpl;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
@@ -27,9 +25,6 @@ public class GetIPS implements Runnable {
thread.start(); thread.start();
} }
/*** * 用于测试跨域 * @author huangweii * 2015年5月29日 */
public static String getIpAddr(HttpServletRequest request){ public static String getIpAddr(HttpServletRequest request){
String ip = request.getHeader("X-Forwarded-For"); String ip = request.getHeader("X-Forwarded-For");
if(org.apache.commons.lang3.StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)){ if(org.apache.commons.lang3.StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)){
@@ -90,12 +90,11 @@ public class ImgUrlUtil {
* @param savePath * @param savePath
* @throws IOException * @throws IOException
*/ */
public static Map<String ,Object> downLoadFromUrl(String urlStr, String fileName, String savePath){ public static Map<String ,Object> downLoadFromUrl(String urlStr,String fileName,String savePath){
Map<String ,Object> resmap = new HashMap<>(); Map<String ,Object> resmap = new HashMap<>();
Map<String ,String> map = checkURLStatusCode(urlStr); Map<String ,String> map = checkURLStatusCode(urlStr);
if(map.get("Check").equals("false")){ if(map.size()==0 || map.get("Check").equals("false")){
// StatusCode
resmap.put("res",false); resmap.put("res",false);
resmap.put("StatusCode",map.get("StatusCode")); resmap.put("StatusCode",map.get("StatusCode"));
return resmap; return resmap;
@@ -128,13 +127,14 @@ public class ImgUrlUtil {
//下载并且保存成功后 判断格式 如果不是图像格式 就删除 //下载并且保存成功后 判断格式 如果不是图像格式 就删除
// //
if(new File(saveDir+File.separator+fileName).exists()){ if(new File(saveDir+File.separator+fileName).exists()){
Msg msg = TypeDict.FileMiME(file,null); Msg msg = TypeDict.FileMiME(file);
if(msg.getCode().equals("200")){ if(msg.getCode().equals("200")){
File f = new File(saveDir+File.separator+fileName); File f = new File(saveDir+File.separator+fileName);
String imgPath = saveDir+File.separator+fileName+"."+(msg.getData().toString().replace("image/","")); String imgPath = saveDir+File.separator+fileName+"."+(msg.getData().toString().replace("image/",""));
f.renameTo(new File(imgPath)); f.renameTo(new File(imgPath));
resmap.put("res",true); resmap.put("res",true);
resmap.put("imgPath",imgPath); resmap.put("imgPath",imgPath);
resmap.put("imgsize",new File(imgPath).length());
}else{ }else{
new File(saveDir+File.separator+fileName).delete(); new File(saveDir+File.separator+fileName).delete();
resmap.put("res",false); resmap.put("res",false);
@@ -1,5 +1,6 @@
package cn.hellohao.utils; package cn.hellohao.utils;
import cn.hellohao.config.GlobalConstant;
import cn.hellohao.pojo.Keys; import cn.hellohao.pojo.Keys;
import cn.hellohao.pojo.ReturnImage; import cn.hellohao.pojo.ReturnImage;
import cn.hellohao.pojo.UploadConfig; import cn.hellohao.pojo.UploadConfig;
@@ -16,7 +17,7 @@ public class LocUpdateImg {
public static boolean deleteLOCImg(String imagename){ public static boolean deleteLOCImg(String imagename){
boolean isDele = false; boolean isDele = false;
try { try {
String filePath =File.separator + "HellohaoData" + File.separator+imagename; String filePath = GlobalConstant.LOCPATH + File.separator+imagename;
File file = new File(filePath); File file = new File(filePath);
isDele = file.delete(); isDele = file.delete();
}catch (Exception e){ }catch (Exception e){
@@ -30,7 +31,7 @@ public class LocUpdateImg {
KeysServiceImpl keysService = SpringContextHolder.getBean(KeysServiceImpl.class); KeysServiceImpl keysService = SpringContextHolder.getBean(KeysServiceImpl.class);
final Keys key = keysService.selectKeys(keyID); final Keys key = keysService.selectKeys(keyID);
ReturnImage returnImage = new ReturnImage(); ReturnImage returnImage = new ReturnImage();
String filePath =File.separator + "HellohaoData" + File.separator; String filePath =GlobalConstant.LOCPATH + File.separator;
File file = null; File file = null;
for (Map.Entry<String, File> entry : fileMap.entrySet()) { for (Map.Entry<String, File> entry : fileMap.entrySet()) {
String ShortUID = SetText.getShortUuid(); String ShortUID = SetText.getShortUuid();
@@ -69,7 +69,7 @@ MIDI (mid),文件头:4D546864
} }
//apache大法 //apache大法
public static Msg FileMiME(File file, String suffix){ public static Msg FileMiME(File file ){
final Msg msg = new Msg(); final Msg msg = new Msg();
try { try {
Tika tika = new Tika(); Tika tika = new Tika();
+5 -4
View File
@@ -7,16 +7,16 @@ spring.datasource.url=jdbc:mysql://localhost:3306/tbed?useUnicode=true&character
#端口 #端口
server.port=8089 server.port=8089
#前端域名需要带协议头http(s):// #前端域名需要带协议头http(s)://
CROS_ALLOWED_ORIGINS=http://localhost:8080 CROS_ALLOWED_ORIGINS=http://127.0.0.1:8080
#下边的配置项不需要修改。 #下边的配置项不需要修改。
logging.config=classpath:logback-spring.xml #logging.config=classpath:logback-spring.xml
logging.file.path=/HellohaoData/tbedlog #logging.file.path=/HellohaoData/tbedlog
spring.thymeleaf.suffix=.html spring.thymeleaf.suffix=.html
mybatis.configuration.map-underscore-to-camel-case=true mybatis.configuration.map-underscore-to-camel-case=true
mybatis.mapper-locations=classpath:mapper/*.xml mybatis.mapper-locations=classpath:mapper/*.xml
#logging.level.cn.hellohao.dao=debug logging.level.cn.hellohao.dao=debug
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8 spring.jackson.time-zone=GMT+8
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
@@ -44,3 +44,4 @@ spring.datasource.druid.stat-view-servlet.login-username=hellohao@dealer
spring.datasource.druid.stat-view-servlet.login-password=52BNmXPJL0rQQ3CU spring.datasource.druid.stat-view-servlet.login-password=52BNmXPJL0rQQ3CU
spring.datasource.druid.stat-view-servlet.allow=127.0.0.1 spring.datasource.druid.stat-view-servlet.allow=127.0.0.1
spring.datasource.druid.web-stat-filter.exclusions=false spring.datasource.druid.web-stat-filter.exclusions=false
log4j2.formatMsgNoLookups=True
-1
View File
@@ -1 +0,0 @@
存储源删除
-3
View File
@@ -1,3 +0,0 @@
aaaaaaaaaaa
vbbbbbbbbbbbbbb
cccccccccccc
+13
View File
@@ -63,5 +63,18 @@
</where> </where>
</select> </select>
<update id="updateAlbum" parameterType="cn.hellohao.pojo.Album">
UPDATE `album`
<set>
<if test="albumtitle != null">
albumtitle = #{albumtitle},
</if>
<if test="password != null">
password = #{password},
</if>
</set>
WHERE
albumkey = #{albumkey}
</update>
</mapper> </mapper>
+2 -3
View File
@@ -10,7 +10,6 @@
<!-- `group`--> <!-- `group`-->
<!-- </select>--> <!-- </select>-->
<select id="grouplist" resultType="cn.hellohao.pojo.Group" parameterType="integer"> <select id="grouplist" resultType="cn.hellohao.pojo.Group" parameterType="integer">
SELECT SELECT
g.id,g.groupname,g.keyid,g.usertype,g.compress,k.storageType,k.keyname g.id,g.groupname,g.keyid,g.usertype,g.compress,k.storageType,k.keyname
@@ -33,7 +32,7 @@
</select> </select>
<insert id="addgroup" parameterType="cn.hellohao.pojo.Group"> <insert id="addgroup" parameterType="cn.hellohao.pojo.Group">
insert into `group` (id,groupname,keyid) values (null,#{groupname},#{keyid}) insert into `group` (id,groupname,keyid,usertype,compress) values (null,#{groupname},#{keyid},#{usertype},#{compress})
</insert> </insert>
<select id="GetCountFroUserType" parameterType="integer" resultType="integer"> <select id="GetCountFroUserType" parameterType="integer" resultType="integer">
@@ -49,7 +48,7 @@
</delete> </delete>
<update id="setgroup" parameterType="cn.hellohao.pojo.Group"> <update id="setgroup" parameterType="cn.hellohao.pojo.Group">
UPDATE `group` SET groupname=#{groupname},keyid=#{keyid} where id = #{id}; UPDATE `group` SET groupname=#{groupname},keyid=#{keyid},usertype=#{usertype},compress=#{compress} where id = #{id};
</update> </update>
<select id="getGroupFroUserType" parameterType="integer" resultType="cn.hellohao.pojo.Group"> <select id="getGroupFroUserType" parameterType="integer" resultType="cn.hellohao.pojo.Group">
+31 -18
View File
@@ -19,7 +19,6 @@
a.imguid, a.imguid,
a.format, a.format,
a.about, a.about,
a.great,
a.violation a.violation
FROM FROM
imgdata a imgdata a
@@ -38,20 +37,35 @@
and and
a.updatetime &lt;= #{stoptime} a.updatetime &lt;= #{stoptime}
</if> </if>
<if test="violation == 'true'">
<if test="userid != null"> and
<choose> a.violation !=""
<when test="selecttype != null">
and
a.userid not in (#{userid})
</when>
<otherwise>
and
a.userid = #{userid}
</otherwise>
</choose>
</if> </if>
<choose>
<when test="userid!=null and userid!=''">
and
a.userid = #{userid}
</when>
<otherwise>
<if test="username != null and username != ''">
<choose>
<when test="selecttype==1">
and
a.userid in ( SELECT id from `user` where username LIKE '%${username}%')
</when>
<otherwise>
and
a.userid not in ( SELECT id from `user` where username LIKE '%${username}%')
</otherwise>
</choose>
</if>
</otherwise>
</choose>
<if test="imguid != null">
and
a.imguid = #{imguid}
</if>
order by a.id desc order by a.id desc
</select> </select>
@@ -64,6 +78,9 @@
DELETE FROM imgdata WHERE id=#{id} DELETE FROM imgdata WHERE id=#{id}
</delete> </delete>
<delete id="deleimgForImgUid" parameterType="string">
DELETE FROM imgdata WHERE imguid = #{imguid}
</delete>
<select id="selectByPrimaryKey" parameterType="integer" resultType="cn.hellohao.pojo.Images"> <select id="selectByPrimaryKey" parameterType="integer" resultType="cn.hellohao.pojo.Images">
select * from imgdata where id = #{id} select * from imgdata where id = #{id}
@@ -128,15 +145,11 @@
<select id="RecentlyUser" resultType="cn.hellohao.pojo.User"> <select id="RecentlyUser" resultType="cn.hellohao.pojo.User">
select count(i.id) as counts ,i.userid,u.username from imgdata i select count(i.id) as counts ,i.userid,u.username from imgdata i
LEFT JOIN `user` u on i.userid = u.id LEFT JOIN `user` u on i.userid = u.id
where i.userid not in (0) where i.userid not in (0)
GROUP BY i.userid ORDER BY counts DESC LIMIT 20 GROUP BY i.userid ORDER BY counts DESC LIMIT 20
</select> </select>
<!-- 点赞后累加数 -->
<update id="addGreat" parameterType="integer">
update imgdata set great = (great+1) where id = #{id}
</update>
<select id="getyyyy" parameterType="integer" resultType="string"> <select id="getyyyy" parameterType="integer" resultType="string">
@@ -40,7 +40,10 @@
`usermemory` = #{usermemory}, `usermemory` = #{usermemory},
</if> </if>
<if test="blacklist != null"> <if test="blacklist != null">
`blacklist` = #{blacklist} `blacklist` = #{blacklist},
</if>
<if test="userclose != null">
`userclose` = #{userclose}
</if> </if>
</set> </set>
+2 -2
View File
@@ -105,8 +105,8 @@
<!-- 插入图片信息 --> <!-- 插入图片信息 -->
<insert id="insertimg" parameterType="cn.hellohao.pojo.Images"> <insert id="insertimg" parameterType="cn.hellohao.pojo.Images">
INSERT INTO imgdata (id, imgname, imgurl, userid, updatetime,sizes,abnormal,source,imgtype,md5key,imguid,format,about,great,violation) INSERT INTO imgdata (id, imgname, imgurl, userid, updatetime,sizes,abnormal,source,imgtype,md5key,imguid,format,about,violation)
VALUES (NULL, #{imgname}, #{imgurl}, #{userid}, #{updatetime},#{sizes},#{abnormal},#{source},#{imgtype},#{md5key},#{imguid},#{format},#{about},"0",null) VALUES (NULL, #{imgname}, #{imgurl}, #{userid}, #{updatetime},#{sizes},#{abnormal},#{source},#{imgtype},#{md5key},#{imguid},#{format},#{about},null)
</insert> </insert>
<!-- 修改资料 --> <!-- 修改资料 -->
@@ -1,35 +0,0 @@
@charset "utf-8";
/* CSS Document */
/*Reset*/
*{box-sizing:content-box;}
a:hover, a:focus{text-decoration:none;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}
table{border-collapse:collapse;border-spacing:0;}
body{-webkit-text-size-adjust:none;}
fieldset,img{border:0;}
img{ vertical-align: top; max-width: 100%; }
address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:normal;}
ol,ul{list-style:none;}
caption,th{text-align:left;}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
q:before,q:after{content:'';}
abbr,acronym {border:0;}
.clearfix:after{visibility:hidden;display: block;font-size:0;content:" ";clear:both;height:0;}
* html .clearfix{ zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
.cli{ clear:both; font-size:0; height:0; overflow:hidden;display:block;}
.lclear{clear:left;font-size:0;height:0;overflow:hidden;}
.fl{float:left;}
.fr{float:right;}
/* ֹ
iframe{nifm2:expression(this.src='about:blank',this.outerHTML='');}
script{no2js:expression((this.src.toLowerCase().indexOf('http')==0)?document.close():'');}
*/
/* ıԼ˶
div{word-wrap: break-word;word-break: normal;}
p{text-align:justify; text-justify:inter-ideograph;}
*/
/*general*/
body{font-size:12px;font-family:'微软雅黑',"宋体","Arial Narrow",Helvetica,sans-serif;color:#000;line-height:1.2;text-align:left;}
a{color:#333;text-decoration:none;}
@@ -1,113 +0,0 @@
html,body{
width:100%;
height:100%;
}
canvas{
display:block;
vertical-align:bottom;
}
.count-particles{
background: #000022;
position: absolute;
top: 48px;
left: 0;
width: 80px;
color: #13E8E9;
font-size: .8em;
text-align: left;
text-indent: 4px;
line-height: 14px;
padding-bottom: 2px;
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
}
.js-count-particles{
font-size: 1.1em;
}
#stats,
.count-particles{
-webkit-user-select: none;
margin-top: 5px;
margin-left: 5px;
}
#stats{
border-radius: 3px 3px 0 0;
overflow: hidden;
}
.count-particles{
border-radius: 0 0 3px 3px;
}
/* #particles-js{
width: 100%;
height: 100%;
position: relative;
background-image: url(../img/bg.jpg);
background-position: 50% 50%;
background-size: cover;
background-repeat: no-repeat;
margin-left: auto;
margin-right: auto;
} */
.sk-rotating-plane {
display: none;
width: 80px;
height: 80px;
margin: auto;
background-color: white;
-webkit-animation: sk-rotating-plane 1.2s infinite ease-in-out;
animation: sk-rotating-plane 1.2s infinite ease-in-out;
z-index: 1;
position: absolute;
top: 50%;
left: 50%;
margin-left: -40px;
margin-top: -80px;
}
.sk-rotating-plane.active{display: block;}
@keyframes sk-rotating-plane{
0% {
-webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg);
transform: perspective(120px) rotateX(0deg) rotateY(0deg);
}
50% {
-webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
}
100% {
-webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
}
}
@keyframes login-small{
0%{
transform: scale(1);-moz-transform: scale(1); /* Firefox 4 */-webkit-transform: scale(1); /* Safari 和 Chrome */-o-transform: scale(1); /* Opera */-ms-transform:scale(1); /* IE 9 */
}
100%{
transform: scale(0.2);-moz-transform: scale(0.1); /* Firefox 4 */-webkit-transform: scale(0.2); /* Safari 和 Chrome */-o-transform: scale(0.1); /* Opera */-ms-transform:scale(0.1); /* IE 9 */
}
}
.login{z-index: 2;position:absolute;width: 350px;border-radius: 5px;height: 500px;background: white;box-shadow: 0px 0px 5px #333333;top: 50%;left: 50%;margin-top: -250px;margin-left: -175px;transition: all 1s;-moz-transition: all 1s; /* Firefox 4 */-webkit-transition: all 1s; /* Safari 和 Chrome */-o-transition: all 1s; /* Opera */}
.login-top{font-size: 24px;margin-top: 100px;padding-left: 40px;box-sizing: border-box;color: #333333;margin-bottom: 50px;}
.login-center{width: 100%;box-sizing: border-box;padding: 0 40px;margin-bottom: 30px;}
.login-center-img{width: 20px;height: 20px;float: left;margin-top: 5px;}
.login-center-img>img{width: 100%;}
.login-center-input{float: left;width: 265px/*230px*/;margin-left: 0px;height: 30px;position: relative;}
.login-center-input input{z-index: 2;transition: all 0.5s;padding-left: 10px;color: #333333;width: 105%;height: 30px;border: 0;border-bottom: 1px solid #cccccc;border-top: 1px solid #ffffff;border-left: 1px solid #ffffff;border-right: 1px solid #ffffff;box-sizing: border-box;outline: none;position: relative;}
.login-center-input input:focus{border: 1px solid dodgerblue;}
.login-center-input-text{background: white;padding: 0 5px;position: absolute;z-index: 0;opacity: 0;height: 20px;top: 50%;margin-top: -10px;font-size: 14px;left: 5px;color: dodgerblue;line-height: 20px;transition: all 0.5s;-moz-transition: all 0.5s; /* Firefox 4 */-webkit-transition: all 0.5s; /* Safari 和 Chrome */-o-transition: all 0.5s; /* Opera */}
.login-center-input input:focus~.login-center-input-text{top: 0;z-index: 3;opacity: 1;margin-top: -15px;}
.login.active{-webkit-animation: login-small 0.8s ; animation: login-small 0.8s ;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}
.login-button{cursor: pointer;width: 250px;text-align: center;height: 40px;line-height: 40px;background-color: dodgerblue;border-radius: 5px;margin: 0 auto;margin-top: 50px;color: white;}
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
-43
View File
@@ -1,43 +0,0 @@
body{
background-color:#FFF;
/*background: #5583EE;background: -moz-linear-gradient(right, #5583EE 0%, #41D8DD 100%);background: -webkit-linear-gradient(right, #5583EE 0%, #41D8DD 100%);background: linear-gradient(to right, #5583EE 0%, #41D8DD 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5583EE', endColorstr='#41D8DD',GradientType=1 );*/
}
h1{
color:rgb(225,223,220);
/*margin-top:160px;*/
margin-top:18%;
font-size:80px;
}
h3{
color:rgb(225,223,220);
}
img{
/*width:30px;*/
/*height:30px;*/
}
video#bgvid {
position: fixed; right: 0; bottom: 0;
min-width: 100%; min-height: 100%;
width: auto; height: auto; z-index: -100;
background-size: cover;
}
.box{
width:100%;
}
.wForm{
margin-top: 10px;
}
.wBtn{
margin-top: 20px;
width: 200px;
height: 80px;
border-radius: 130px;
opacity: 0.9;
font-size: 26px;
}
@@ -1 +0,0 @@
.kenburnsy{position:relative;overflow:hidden;width:100%}.kenburnsy .slide,.kenburnsy.fullscreen{position:absolute;top:0;left:0;right:0;bottom:0}.kenburnsy.fullscreen{z-index:-1}.kenburnsy img{display:none}.kenburnsy .slide{background-repeat:no-repeat;background-position:center center;background-size:cover;transform-origin:center;transform:translateZ(0)}
File diff suppressed because it is too large Load Diff
@@ -1,5 +0,0 @@
.wordsrotator_words{display:inline-block; width:100%; position:relative; -webkit-transition:width 1s; -moz-transition:width 1s; -o-transition:width 1s; transition:width 1s;}
.wordsrotator_words .wordsrotator_wordOut, .wordsrotator_words .wordsrotator_wordIn{position:relative; display:inline-block; -webkit-animation-duration:1s; -webkit-animation-timing-function:ease; -webkit-animation-fill-mode:both; -moz-animation-duration:1s; -moz-animation-timing-function:ease; -moz-animation-fill-mode:both; -ms-animation-duration:1s; -ms-animation-timing-function:ease; -ms-animation-fill-mode:both;}
.wordsrotator_words .wordsrotator_wordOut{width:100%; display:inline-block; position:absolute; left:0px; -webkit-backface-visibility:hidden;}
.wordsrotator_words .wordsrotator_wordOut span{width:auto; position:relative; -webkit-backface-visibility:hidden;}
.wordsrotator_words .wordsrotator_wordIn{opacity:0; -webkit-backface-visibility:hidden;}
@@ -1,248 +0,0 @@
/*
* Core Owl Carousel CSS File
* v1.3.3
*/
/* clearfix */
.owl-carousel .owl-wrapper:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
/* display none until init */
.owl-carousel{
display: none;
position: relative;
width: 100%;
-ms-touch-action: pan-y;
margin-left:0px;
}
.owl-carousel .owl-wrapper{
display: none;
position: relative;
-webkit-transform: translate3d(0px, 0px, 0px);
padding:0px 0px;
}
.owl-carousel .owl-wrapper-outer{
overflow: hidden;
position: relative;
width: 99.9%;
}
.carousel-no-pad.owl-carousel{
margin-left:0px;
padding:0px;
}
.carousel-no-pad.owl-carousel .owl-wrapper{
padding:0px;
}
.carousel-no-pad.owl-carousel .owl-wrapper-outer{
width:100%;
}
.owl-carousel .owl-wrapper-outer.autoHeight{
-webkit-transition: height 500ms ease-in-out;
-moz-transition: height 500ms ease-in-out;
-ms-transition: height 500ms ease-in-out;
-o-transition: height 500ms ease-in-out;
transition: height 500ms ease-in-out;
}
.owl-carousel .owl-item{
float: left;
padding:0px 5px;
}
.owl-controls .owl-page,
.owl-controls .owl-buttons div{
cursor: pointer;
}
.owl-controls {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* mouse grab icon */
.grabbing {
cursor:url(../img/grabbing.png) 8 8, move;
}
/* fix */
.owl-carousel .owl-wrapper,
.owl-carousel .owl-item{
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-webkit-transform: translate3d(0,0,0);
-moz-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
}
/*
* Owl Carousel CSS3 Transitions
* v1.3.2
*/
.owl-origin {
-webkit-perspective: 1200px;
-webkit-perspective-origin-x : 50%;
-webkit-perspective-origin-y : 50%;
-moz-perspective : 1200px;
-moz-perspective-origin-x : 50%;
-moz-perspective-origin-y : 50%;
perspective : 1200px;
}
/* fade */
.owl-fade-out {
z-index: 10;
-webkit-animation: fadeOut .7s both ease;
-moz-animation: fadeOut .7s both ease;
animation: fadeOut .7s both ease;
}
.owl-fade-in {
-webkit-animation: fadeIn .7s both ease;
-moz-animation: fadeIn .7s both ease;
animation: fadeIn .7s both ease;
}
/* backSlide */
.owl-backSlide-out {
-webkit-animation: backSlideOut 1s both ease;
-moz-animation: backSlideOut 1s both ease;
animation: backSlideOut 1s both ease;
}
.owl-backSlide-in {
-webkit-animation: backSlideIn 1s both ease;
-moz-animation: backSlideIn 1s both ease;
animation: backSlideIn 1s both ease;
}
/* goDown */
.owl-goDown-out {
-webkit-animation: scaleToFade .7s ease both;
-moz-animation: scaleToFade .7s ease both;
animation: scaleToFade .7s ease both;
}
.owl-goDown-in {
-webkit-animation: goDown .6s ease both;
-moz-animation: goDown .6s ease both;
animation: goDown .6s ease both;
}
/* scaleUp */
.owl-fadeUp-in {
-webkit-animation: scaleUpFrom .5s ease both;
-moz-animation: scaleUpFrom .5s ease both;
animation: scaleUpFrom .5s ease both;
}
.owl-fadeUp-out {
-webkit-animation: scaleUpTo .5s ease both;
-moz-animation: scaleUpTo .5s ease both;
animation: scaleUpTo .5s ease both;
}
/* Keyframes */
/*empty*/
@-webkit-keyframes empty {
0% {opacity: 1}
}
@-moz-keyframes empty {
0% {opacity: 1}
}
@keyframes empty {
0% {opacity: 1}
}
@-webkit-keyframes fadeIn {
0% { opacity:0; }
100% { opacity:1; }
}
@-moz-keyframes fadeIn {
0% { opacity:0; }
100% { opacity:1; }
}
@keyframes fadeIn {
0% { opacity:0; }
100% { opacity:1; }
}
@-webkit-keyframes fadeOut {
0% { opacity:1; }
100% { opacity:0; }
}
@-moz-keyframes fadeOut {
0% { opacity:1; }
100% { opacity:0; }
}
@keyframes fadeOut {
0% { opacity:1; }
100% { opacity:0; }
}
@-webkit-keyframes backSlideOut {
25% { opacity: .5; -webkit-transform: translateZ(-500px); }
75% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); }
100% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); }
}
@-moz-keyframes backSlideOut {
25% { opacity: .5; -moz-transform: translateZ(-500px); }
75% { opacity: .5; -moz-transform: translateZ(-500px) translateX(-200%); }
100% { opacity: .5; -moz-transform: translateZ(-500px) translateX(-200%); }
}
@keyframes backSlideOut {
25% { opacity: .5; transform: translateZ(-500px); }
75% { opacity: .5; transform: translateZ(-500px) translateX(-200%); }
100% { opacity: .5; transform: translateZ(-500px) translateX(-200%); }
}
@-webkit-keyframes backSlideIn {
0%, 25% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(200%); }
75% { opacity: .5; -webkit-transform: translateZ(-500px); }
100% { opacity: 1; -webkit-transform: translateZ(0) translateX(0); }
}
@-moz-keyframes backSlideIn {
0%, 25% { opacity: .5; -moz-transform: translateZ(-500px) translateX(200%); }
75% { opacity: .5; -moz-transform: translateZ(-500px); }
100% { opacity: 1; -moz-transform: translateZ(0) translateX(0); }
}
@keyframes backSlideIn {
0%, 25% { opacity: .5; transform: translateZ(-500px) translateX(200%); }
75% { opacity: .5; transform: translateZ(-500px); }
100% { opacity: 1; transform: translateZ(0) translateX(0); }
}
@-webkit-keyframes scaleToFade {
to { opacity: 0; -webkit-transform: scale(.8); }
}
@-moz-keyframes scaleToFade {
to { opacity: 0; -moz-transform: scale(.8); }
}
@keyframes scaleToFade {
to { opacity: 0; transform: scale(.8); }
}
@-webkit-keyframes goDown {
from { -webkit-transform: translateY(-100%); }
}
@-moz-keyframes goDown {
from { -moz-transform: translateY(-100%); }
}
@keyframes goDown {
from { transform: translateY(-100%); }
}
@-webkit-keyframes scaleUpFrom {
from { opacity: 0; -webkit-transform: scale(1.5); }
}
@-moz-keyframes scaleUpFrom {
from { opacity: 0; -moz-transform: scale(1.5); }
}
@keyframes scaleUpFrom {
from { opacity: 0; transform: scale(1.5); }
}
@-webkit-keyframes scaleUpTo {
to { opacity: 0; -webkit-transform: scale(1.5); }
}
@-moz-keyframes scaleUpTo {
to { opacity: 0; -moz-transform: scale(1.5); }
}
@keyframes scaleUpTo {
to { opacity: 0; transform: scale(1.5); }
}
@@ -1,99 +0,0 @@
/*
* Owl Carousel Owl Demo Theme
* v1.3.3
*/
.owl-theme .owl-controls{
margin-top: 39px;
text-align: center;
}
/* Styling Next and Prev buttons */
.owl-theme .owl-controls .owl-buttons div{
color: #FFF;
display: inline-block;
zoom: 1;
*display: inline;/*IE7 life-saver */
margin: 5px;
padding: 3px 10px;
font-size: 12px;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
background: #869791;
filter: Alpha(Opacity=50);/*IE7 fix*/
opacity: 0.5;
}
/* Clickable class fix problem with hover on touch devices */
/* Use it for non-touch hover action */
.owl-theme .owl-controls.clickable .owl-buttons div:hover{
filter: Alpha(Opacity=100);/*IE7 fix*/
opacity: 1;
text-decoration: none;
}
/* Styling Pagination*/
.owl-theme .owl-controls .owl-page{
display: inline-block;
zoom: 1;
*display: inline;/*IE7 life-saver */
}
.owl-theme .owl-controls .owl-page span{
display: block;
width: 8px;
height: 8px;
margin: 0px 7px 0px 7px;
padding: 0px;
background: white;
-webkit-transition:all 0.5s ease;
-moz-transition:all 0.5s ease;
-o-transition:all 0.5s ease;
-ms-transition:all 0.5s ease;
transition:all 0.5s ease;
-webkit-transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
-o-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-transform: rotateY(0deg);
-moz-transform: rotateY(0deg);
-ms-transform: rotateY(0deg);
-o-transform: rotateY(0deg);
transform: rotateY(0deg);
-webkit-border-radius:50%;
-moz-border-radius:50%;
-ms-border-radius:50%;
-o-border-radius:50%;
border-radius:50%;
}
.owl-theme .owl-controls .owl-page.active span,
.owl-theme .owl-controls.clickable .owl-page:hover span{
background:#d7f257;
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
-ms-transform: rotateY(180deg);
-o-transform: rotateY(180deg);
transform: rotateY(180deg);
}
/* If PaginationNumbers is true */
.owl-theme .owl-controls .owl-page span.owl-numbers{
height: auto;
width: auto;
color: #FFF;
padding: 2px 10px;
font-size: 12px;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
}
/* preloading images */
.owl-item.loading{
min-height: 150px;
background: url(AjaxLoader.gif) no-repeat center center
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -1,547 +0,0 @@
*, ::after, ::before {
box-sizing: border-box;
}
body {
font-family: "Open Sans",sans-serif;
font-display: auto;
font-weight: 400;
font-size: 15px;
line-height: 24px;
color: #222;
background: #fff;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
.pb-70 {
padding-bottom: 70px!important;
}
.pt-80 {
padding-top: 80px!important;
}
.font__weight-thin {
font-weight: 100;
}
.divider {
width: 35px;
height: 2px;
background: #2775ff;
margin: 25px auto 32px;
border: 0;
}
.panel__head, .panel__list {
text-align: left;
}
.panel__wrapper-icon .panel__head {
background: linear-gradient(to right,#2775ff,#7202bb);
padding: 24px 40px;
box-shadow: 0 6px 30px 0 rgba(0,0,0,.12);
color: rgba(255,255,255,.9);
}
@media (min-width: 768px)
.panel__wrapper-icon .panel__head {
padding: 24px 50px;
}
@media (min-width: 992px)
.panel__wrapper-icon .panel__head {
display: flex;
align-items: center;
}
@media (min-width: 992px)
.panel__wrapper-icon .panel__head p {
margin-top: 0;
margin-left: 58px;
}
.panel__wrapper-icon .panel__head p {
flex: 1;
margin-top: 20px;
}
.font__size-14 {
font-size: .875rem;
}
.panel__head, .panel__list {
text-align: left;
}
.panel__wrapper-icon .panel__list {
background: #fff;
box-shadow: 0 6px 30px 0 rgba(0,0,0,.12);
}
.panel__head, .panel__list {
text-align: left;
}
.panel__list {
list-style: none;
margin: 0;
}
.panel__wrapper-icon .panel__list li {
color: #4e4e4e;
font-family: 'Open Sans',sans-serif;
font-size: 14px;
border-bottom: 1px solid #ececec;
position: relative;
z-index: 1;
padding: 28px;
}
.panel__wrapper-icon .panel__list li .line {
position: absolute;
top: 50%;
transform: translate(0,-50%);
left: 0;
width: 3px;
height: 40px;
background: linear-gradient(to bottom,#2775ff,#7202bb);
opacity: 0;
transition: all .3s ease;
}
.panel__wrapper-icon .panel__list li:hover {
z-index: 2;
}
.panel__wrapper-icon .panel__list li:hover .line {
opacity: 1;
left: -15px;
transition-delay: .1s;
}
.panel__wrapper-icon .panel__list li:nth-child(2n) {
background: #f6f6f6;
}
@media screen and (min-width: 576px)
.panel__wrapper-icon .panel__list li {
padding-left: 110px;
}
.panel__wrapper-icon .panel__list li {
color: #4e4e4e;
font-family: 'Open Sans',sans-serif;
font-size: 14px;
border-bottom: 1px solid #ececec;
position: relative;
z-index: 1;
padding: 28px;
}
abbr, acronym, address, applet, article, aside, audio, b, big, body, button, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, nav, object, ol, output, p, pre, ruby, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
vertical-align: top;
}
.panel__wrapper-icon .panel__list li:hover:after, .panel__wrapper-table .panel__list li:hover:after {
transform: scale(1);
opacity: 1;
}
.panel__wrapper-gradient .panel__list li:after, .panel__wrapper-icon .panel__list li:after, .panel__wrapper-table .panel__list li:after {
content: '';
position: absolute;
top: -6px;
left: -15px;
right: -15px;
bottom: -6px;
background: #fff;
box-shadow: 0 6px 30px 0 rgba(0,0,0,.12);
opacity: 0;
transition: all .3s ease;
transform: scale(.95);
z-index: -1;
}
.font__family-open-sans {
font-family: 'Open Sans',sans-serif;
}
.panel__wrapper-icon .panel__head p {
margin-top: 0;
margin-left: 58px;
}
.panel__wrapper-icon .panel__head {
display: flex;
align-items: center;
}
.font__size-21 {
font-size: 1.3125rem;
}
.font__family-montserrat {
font-family: 'Montserrat',sans-serif;
}
.panel__wrapper-icon .panel__list li .icon {
font-size: 36px;
color: #2775ff;
opacity: .5;
transition: all .3s ease;
position: relative;
margin-bottom: 20px;
width: auto!important;
height: auto!important;
line-height: normal!important;
margin-left: 0!important;
}
.icon {
display: inline-block;
text-align: center;
}
.fal, .far {
font-weight: 600!important;
}
.panel__wrapper-icon .panel__list li {
color: #4e4e4e;
font-family: 'Open Sans',sans-serif;
font-size: 14px;
border-bottom: 1px solid #ececec;
position: relative;
z-index: 1;
padding: 28px;
}
.panel__wrapper-icon .panel__list li .icon {
position: absolute;
left: 40px;
margin-bottom: 0;
top: 50%;
transform: translate(0,-50%);
}
.panel__wrapper-icon .panel__list li {
padding-left: 110px;
}
.panel__wrapper-icon .panel__list li:hover .icon {
opacity: 1;
}
/************************************/
.list-inline-4 li:hover>.after, .list-inline-5>li.list-counter:hover .list-shape, .list-inline-5>li.list-counter:hover>.after {
opacity: 1;
}
.list-inline-4 li>.after {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 50px;
background: linear-gradient(to right,#2775ff,#7202bb);
z-index: -1;
transition: all .4s ease;
opacity: 0;
}
.list-inline-4 li>.before {
top: 50%;
transform: translateY(-50%);
left: 1.25em;
width: 16px;
height: 16px;
border: 2px solid #fff;
border-radius: 50%;
}
.list-inline-3 li>.after, .list-inline-4 li>.before {
position: absolute;
transition: all .4s ease;
background: #2775ff;
}
.list-inline-4 li {
display: block;
text-align: left;
border: 1px solid #eee;
border-radius: 50px;
padding: .875em .875em .875em 3.4375em;
position: relative;
z-index: 1;
transition: all .4s ease;
}
.font__size-16 {
font-size: 1rem;
}
.font__family-montserrat {
font-family: 'Montserrat',sans-serif;
}
.list-inline-4 li {
display: block;
text-align: left;
border: 1px solid #eee;
border-radius: 50px;
padding: .875em .875em .875em 3.4375em;
position: relative;
z-index: 1;
transition: all .4s ease;
}
.mb-35 {
margin-bottom: 35px!important;
}
.mb-100 {
margin-bottom: 100px!important;
}
.list-inline-4 li+li {
margin-top: 10px;
}
.list-inline-4 li:hover>.after, .list-inline-5>li.list-counter:hover .list-shape, .list-inline-5>li.list-counter:hover>.after {
opacity: 1;
}
.list-inline-4 li .icon {
position: absolute;
top: 50%;
right: 25px;
transform: translateY(-50%);
color: #fff;
z-index: 2;
}
.list-inline-4 li:hover>.before {
background: 0 0;
width: 14px;
height: 14px;
}
.list-inline-4 li:hover {
color: #fff;
box-shadow: 0 5px 16px 0 rgba(165,165,165,.5);
}
.list-inline-3 li:hover, .list-inline-3 li:hover a, .list-inline-4 li:hover a, .list-inline-5>li.list-counter:hover, .list-inline-5>li.list-counter:hover a, .list-inline-5>li.list-counter:hover>.before, .list-inline-6 li:hover:before {
color: #fff;
}
.fa-angle-right:before {
content: "\f105";
}
[class*=list-inline] a {
transition: none;
text-decoration: none!important;
}
.letter-spacing-60 {
letter-spacing: .06em;
}
.font__size-46 {
font-size: 2.875rem;
}
.font__weight-thin {
font-weight: 100;
}
.font__family-roboto {
font-family: 'Roboto',sans-serif;
}
.text-uppercase {
text-transform: uppercase!important;
}
.line__height-26 {
line-height: 1.625rem;
}
.font__size-16 {
font-size: 1rem;
}
.font__weight-normal {
font-weight: 400;
}
.brk-dark-font-color {
color: #585858;
}
.brk-dark-font-color{ font-family: "Open Sans",sans-serif;}
.pb-70 {
padding-bottom: 70px!important;
}
a {
font: inherit;
color: inherit;
text-decoration: none;
}
/*******************************************/
.overflow-hid {
overflow: hidden!important;
}
.bg__style {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
}
.position-relative {
position: relative!important;
}
.brk-abs-bg-overlay, .brk-abs-img, .brk-abs-overlay {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.opacity-90 {
opacity: .9;
}
.brk-base-bg-gradient-50deg {
background-image: linear-gradient(to right, #2775ff, #008dff, #00a2ff, #00b5ff, #00c6ff);
}
.info-box__wrapper-web {
padding: 70px 20px;
}
.info-box__wrapper-web {
text-align: left;
padding: 50px 20px;
position: relative;
z-index: 1;
display: flex;
align-items: center;
}
[class*=info-box__wrapper] {
transition: all .4s ease;
}
.info-box__wrapper-strict, .info-box__wrapper-web .shape {
position: relative;
z-index: 1;
}
.info-box__wrapper-web .shape:before {
content: '';
width: 15px;
height: 15px;
border: 2px solid #fff;
border-radius: 50%;
}
.info-box__wrapper-web .livicon-evo, .info-box__wrapper-web .shape:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.info-box__wrapper-web .shape>.after, .info-box__wrapper-web .shape>.before {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
background-color: #fff;
transition: all .4s ease;
border-radius: 50%;
z-index: -1;
}
.info-box__wrapper-web .shape>.before {
transform: scale(1.35);
}
.info-box__wrapper-web .svg-wrap {
position: relative;
z-index: 1;
display: inline-block;
background: linear-gradient(to top,var(--brk-base-6),var(--brk-base-2));
transition: all .4s ease;
border-radius: 50%;
width: 75px;
height: 75px;
box-shadow: 0 0 10px 0 rgba(0,0,0,.15);
transform: scale(0);
}
.info-box__wrapper-web .svg-wrap svg {
width: 45px;
height: 45px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
z-index: 2;
}
[class*=info-box__wrapper] svg {
transition: all .4s ease;
width: 84px;
height: 84px;
}
.info-box__wrapper-web .shape>.after, .info-box__wrapper-web .shape>.before {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
background-color: #fff;
transition: all .4s ease;
border-radius: 50%;
z-index: -1;
}
.info-box__wrapper-web .shape:after {
content: '';
}
.info-box__wrapper-web .shape:after {
position: absolute;
bottom: calc(50% + 7px);
left: calc(50% - 1px);
width: 2px;
height: 100vh;
background: #fff;
}
.info-box__wrapper-web .content>* {
color: #fff;
}
.info-box__wrapper-web .content p {
color: #b3daee;
margin-top: 15px;
}
.info-box__wrapper-web.current .shape>.before, .info-box__wrapper-web:hover .shape>.before, .wpb_column.current .info-box__wrapper-web .shape>.before {
-webkit-animation: 1.5s brk-pulse .3s infinite;
animation: 1.5s brk-pulse .3s infinite;
opacity: .1;
}
.info-box__wrapper-web .shape>.after, .info-box__wrapper-web .shape>.before {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
background-color: #fff;
transition: all .4s ease;
border-radius: 50%;
z-index: -1;
}
.info-box__wrapper-web .shape>.before {
transform: scale(1.35);
}
.info-box__wrapper-web.current .svg-wrap, .info-box__wrapper-web:hover .svg-wrap {
transform: scale(1);
}
.info-box__wrapper-web .svg-wrap {
position: relative;
z-index: 1;
display: inline-block;
background: linear-gradient(to top,#0b98f6,#00c6ff);
transition: all .4s ease;
border-radius: 50%;
width: 75px;
height: 75px;
box-shadow: 0 0 10px 0 rgba(0,0,0,.15);
transform: scale(0);
}
.info-box__wrapper-shuffle.current svg *, .info-box__wrapper-shuffle:hover svg *, .info-box__wrapper-web svg *, .wpb_column.current .info-box__wrapper-strict svg * {
stroke: #fff;
}
.wpb_column.current .info-box__wrapper-web .svg-wrap {
transform: scale(1);
}
.wpb_column.current .info-box__wrapper-web .shape > .before {
animation: 1.5s brk-pulse 0.3s infinite;
opacity: 0.1;
}
.wpb_column.current .info-box__wrapper-web .shape > .after {
animation: brk-pulse 1.5s infinite;
opacity: 0.2;
}
@-webkit-keyframes brk-pulse{0%{transform:scale(1)}50%{transform:scale(2)}to{transform:scale(1);opacity:0}}@keyframes brk-pulse{0%{transform:scale(1)}50%{transform:scale(2)}to{transform:scale(1);opacity:0}}@-webkit-keyframes brk-pulse-paused{0%,to{transform:scale(1)}20%{transform:scale(1.2)}60%{transform:scale(.9);opacity:0}}@keyframes brk-pulse-paused{0%,to{transform:scale(1)}20%{transform:scale(1.2)}60%{transform:scale(.9);opacity:0}}
-170
View File
@@ -1,170 +0,0 @@
/*常规验证码*/
.verify-code {
font-size: 20px;
text-align: center;
cursor: pointer;
margin-bottom: 5px;
border: 1px solid #ddd;
}
.cerify-code-panel {
height:100%;
overflow:hidden;
}
.verify-code-area {
float:left;
}
.verify-input-area {
float: left;
width: 60%;
padding-right: 10px;
}
.verify-change-area {
line-height: 30px;
float: left;
}
.varify-input-code {
display:inline-block;
width: 100%;
height: 25px;
}
.verify-change-code {
color: #337AB7;
cursor: pointer;
}
.verify-btn {
width: 200px;
height: 30px;
background-color: #337AB7;
color:#FFFFFF;
border:none;
margin-top: 10px;
}
/*滑动验证码*/
.verify-bar-area {
position: relative;
background: #FFFFFF;
text-align: center;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
}
.verify-bar-area .verify-move-block {
position: absolute;
top: 0px;
left: 0;
background: #fff;
cursor: pointer;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
box-shadow: 0 0 2px #888888;
-webkit-border-radius: 1px;
}
.verify-bar-area .verify-move-block:hover {
background-color: #337ab7;
color: #FFFFFF;
}
.verify-bar-area .verify-left-bar {
position: absolute;
top: -1px;
left: -1px;
background: #f0fff0;
cursor: pointer;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #ddd;
}
.verify-img-panel {
margin:0;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #ddd;
border-radius: 3px;
position: relative;
}
.verify-img-panel .verify-refresh {
width: 25px;
height: 25px;
text-align:center;
padding: 5px;
cursor: pointer;
position: absolute;
top: 0;
right: 0;
z-index: 2;
}
.verify-img-panel .icon-refresh {
font-size: 20px;
color: #fff;
}
.verify-img-panel .verify-gap {
background-color: #fff;
position: relative;
z-index: 2;
border:1px solid #fff;
}
.verify-bar-area .verify-move-block .verify-sub-block {
position: absolute;
text-align: center;
z-index: 3;
border: 1px solid #fff;
}
.verify-bar-area .verify-move-block .verify-icon {
font-size: 18px;
}
.verify-bar-area .verify-msg {
z-index : 3;
}
/*字体图标的css*/
@font-face {font-family: "iconfont";
src: url('../fonts/iconfont.eot?t=1508229193188'); /* IE9*/
src: url('../fonts/iconfont.eot?t=1508229193188#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAaAAAsAAAAACUwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW7kiSY21hcAAAAYAAAAB3AAABuM+qBlRnbHlmAAAB+AAAAnQAAALYnrUwT2hlYWQAAARsAAAALwAAADYPNwajaGhlYQAABJwAAAAcAAAAJAfeA4dobXR4AAAEuAAAABMAAAAYF+kAAGxvY2EAAATMAAAADgAAAA4CvAGsbWF4cAAABNwAAAAfAAAAIAEVAF1uYW1lAAAE/AAAAUUAAAJtPlT+fXBvc3QAAAZEAAAAPAAAAE3oPPXPeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sM4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDxbwtzwv4EhhrmBoQEozAiSAwAw1A0UeJzFkcENgCAMRX8RjCGO4gTe9eQcnhzAfXC2rqG/hYsT8MmD9gdS0gJIAAaykAjIBYHppCvuD8juR6zMJ67A89Zdn/f1aNPikUn8RvYo8G20CjKim6Rf6b9m34+WWd/vBr+oW8V6q3vF5qKlYrPRp4L0Ad5nGL8AeJxFUc9rE0EYnTezu8lMsrvtbrqb3TRt0rS7bdOmdI0JbWmCtiItIv5oi14qevCk9SQVLFiQgqAF8Q9QLKIHLx48FkHo3ZNnFUXwD5C2B6dO6sFhmI83w7z3fe8RnZCjb2yX5YlLhskkmScXCIFRxYBFiyjH9Rqtoqes9/g5i8WVuJyqDNTYLPwBI+cljXrkGynDhoU+nCgnjbhGY5yst+gMEq8IBIXwsjPU67CnEPm4b0su0h309Fd67da4XBhr55KSm17POk7gOE/Shq6nKdVsC7d9j+tcGPKVboc9u/0jtB/ZIA7PXTVLBef6o/paccjnwOYm3ELJetPuDrvV3gg91wlSXWY6H5qVwRzWf2TybrYYfSdqoXOwh/Qa8RWIjBTiSI3h614/vKSNRhONOrsnQi6Xf4nQFQDTmJE1NKbhI6crHEJO/+S5QPxhYJRRyvBFBP+5T9EPpEAIVzzRQIrjmJ6jY1WTo+NXTMchuBsKuS8PRZATSMl9oTA4uNLkeIA0V1UeqOoGQh7IAxGo+7T83fn3T+voqCNPPAUazUYUI7LgKSV1Jk2oUeghYGhZ+cKOe2FjVu5ZKEY2VkE13AK1+jI4r1KLbPlZfrKiPhOXKPRj7q9sj9XJ7LFHNmrKJS3VCdhXGSdKrtmoQaWeMjQVt0KD6sGPOx0oH2fgtzoNROxtNq8F3tzYM/n+TjKSX5qf2jx941276TIr9FjXxKr8eX/6bK4yuopwo9py1sw8F9kdw4AmurRpLUM3tYx5ZnKpfHPi8dzz19vJ6MjyxYUrpqeb1uLs3eGV6vr21pSqpeWkqonAN9oUyIiXpv8XvlN5e3icY2BkYGAA4n0vN4fG89t8ZeBmYQCBa9wPPRH0/wcsDMwmQC4HAxNIFABAfAqaAHicY2BkYGBu+N/AEMPCAAJAkpEBFbABAEcMAm94nGNhYGBgfsnAwMKAigESnwEBAAAAAAAAdgCkANoBCAFsAAB4nGNgZGBgYGMIZGBlAAEmIOYCQgaG/2A+AwARSAFzAHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nGNgYoAALgbsgI2RiZGZkYWRlZGNkZ2BsYI1OSM1OZs1OSe/OJW1KDM9o4S9KDWtKLU4g4EBAJ79CeQ=') format('woff'),
url('../fonts/iconfont.ttf?t=1508229193188') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('../fonts/iconfont.svg?t=1508229193188#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-check:before { content: "\e645"; }
.icon-close:before { content: "\e646"; }
.icon-right:before { content: "\e6a3"; }
.icon-refresh:before { content: "\e6a4"; }
-456
View File
@@ -1,456 +0,0 @@
/*!
* Viewer.js v1.3.5
* https://fengyuanchen.github.io/viewerjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-07-04T11:00:13.705Z
*/
.viewer-zoom-in::before,
.viewer-zoom-out::before,
.viewer-one-to-one::before,
.viewer-reset::before,
.viewer-prev::before,
.viewer-play::before,
.viewer-next::before,
.viewer-rotate-left::before,
.viewer-rotate-right::before,
.viewer-flip-horizontal::before,
.viewer-flip-vertical::before,
.viewer-fullscreen::before,
.viewer-fullscreen-exit::before,
.viewer-close::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 280px;
color: transparent;
display: block;
font-size: 0;
height: 20px;
line-height: 0;
width: 20px;
}
.viewer-zoom-in::before {
background-position: 0 0;
content: 'Zoom In';
}
.viewer-zoom-out::before {
background-position: -20px 0;
content: 'Zoom Out';
}
.viewer-one-to-one::before {
background-position: -40px 0;
content: 'One to One';
}
.viewer-reset::before {
background-position: -60px 0;
content: 'Reset';
}
.viewer-prev::before {
background-position: -80px 0;
content: 'Previous';
}
.viewer-play::before {
background-position: -100px 0;
content: 'Play';
}
.viewer-next::before {
background-position: -120px 0;
content: 'Next';
}
.viewer-rotate-left::before {
background-position: -140px 0;
content: 'Rotate Left';
}
.viewer-rotate-right::before {
background-position: -160px 0;
content: 'Rotate Right';
}
.viewer-flip-horizontal::before {
background-position: -180px 0;
content: 'Flip Horizontal';
}
.viewer-flip-vertical::before {
background-position: -200px 0;
content: 'Flip Vertical';
}
.viewer-fullscreen::before {
background-position: -220px 0;
content: 'Enter Full Screen';
}
.viewer-fullscreen-exit::before {
background-position: -240px 0;
content: 'Exit Full Screen';
}
.viewer-close::before {
background-position: -260px 0;
content: 'Close';
}
.viewer-container {
bottom: 0;
direction: ltr;
font-size: 0;
left: 0;
line-height: 0;
overflow: hidden;
position: absolute;
right: 0;
-webkit-tap-highlight-color: transparent;
top: 0;
-ms-touch-action: none;
touch-action: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.viewer-container::-moz-selection,
.viewer-container *::-moz-selection {
background-color: transparent;
}
.viewer-container::selection,
.viewer-container *::selection {
background-color: transparent;
}
.viewer-container img {
display: block;
height: auto;
max-height: none !important;
max-width: none !important;
min-height: 0 !important;
min-width: 0 !important;
width: 100%;
}
.viewer-canvas {
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
top: 0;
}
.viewer-canvas > img {
height: auto;
margin: 15px auto;
max-width: 90% !important;
width: auto;
}
.viewer-footer {
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
text-align: center;
}
.viewer-navbar {
background-color: rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.viewer-list {
-webkit-box-sizing: content-box;
box-sizing: content-box;
height: 50px;
margin: 0;
overflow: hidden;
padding: 1px 0;
}
.viewer-list > li {
color: transparent;
cursor: pointer;
float: left;
font-size: 0;
height: 50px;
line-height: 0;
opacity: 0.5;
overflow: hidden;
-webkit-transition: opacity 0.15s;
transition: opacity 0.15s;
width: 30px;
}
.viewer-list > li:hover {
opacity: 0.75;
}
.viewer-list > li + li {
margin-left: 1px;
}
.viewer-list > .viewer-loading {
position: relative;
}
.viewer-list > .viewer-loading::after {
border-width: 2px;
height: 20px;
margin-left: -10px;
margin-top: -10px;
width: 20px;
}
.viewer-list > .viewer-active,
.viewer-list > .viewer-active:hover {
opacity: 1;
}
.viewer-player {
background-color: #000;
bottom: 0;
cursor: none;
display: none;
left: 0;
position: absolute;
right: 0;
top: 0;
}
.viewer-player > img {
left: 0;
position: absolute;
top: 0;
}
.viewer-toolbar > ul {
display: inline-block;
margin: 0 auto 5px;
overflow: hidden;
padding: 3px 0;
}
.viewer-toolbar > ul > li {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
cursor: pointer;
float: left;
height: 24px;
overflow: hidden;
-webkit-transition: background-color 0.15s;
transition: background-color 0.15s;
width: 24px;
}
.viewer-toolbar > ul > li:hover {
background-color: rgba(0, 0, 0, 0.8);
}
.viewer-toolbar > ul > li::before {
margin: 2px;
}
.viewer-toolbar > ul > li + li {
margin-left: 1px;
}
.viewer-toolbar > ul > .viewer-small {
height: 18px;
margin-bottom: 3px;
margin-top: 3px;
width: 18px;
}
.viewer-toolbar > ul > .viewer-small::before {
margin: -1px;
}
.viewer-toolbar > ul > .viewer-large {
height: 30px;
margin-bottom: -3px;
margin-top: -3px;
width: 30px;
}
.viewer-toolbar > ul > .viewer-large::before {
margin: 5px;
}
.viewer-tooltip {
background-color: rgba(0, 0, 0, 0.8);
border-radius: 10px;
color: #fff;
display: none;
font-size: 12px;
height: 20px;
left: 50%;
line-height: 20px;
margin-left: -25px;
margin-top: -10px;
position: absolute;
text-align: center;
top: 50%;
width: 50px;
}
.viewer-title {
color: #ccc;
display: inline-block;
font-size: 12px;
line-height: 1;
margin: 0 5% 5px;
max-width: 90%;
opacity: 0.8;
overflow: hidden;
text-overflow: ellipsis;
-webkit-transition: opacity 0.15s;
transition: opacity 0.15s;
white-space: nowrap;
}
.viewer-title:hover {
opacity: 1;
}
.viewer-button {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
cursor: pointer;
height: 80px;
overflow: hidden;
position: absolute;
right: -40px;
top: -40px;
-webkit-transition: background-color 0.15s;
transition: background-color 0.15s;
width: 80px;
}
.viewer-button:focus,
.viewer-button:hover {
background-color: rgba(0, 0, 0, 0.8);
}
.viewer-button::before {
bottom: 15px;
left: 15px;
position: absolute;
}
.viewer-fixed {
position: fixed;
}
.viewer-open {
overflow: hidden;
}
.viewer-show {
display: block;
}
.viewer-hide {
display: none;
}
.viewer-backdrop {
background-color: rgba(0, 0, 0, 0.5);
}
.viewer-invisible {
visibility: hidden;
}
.viewer-move {
cursor: move;
cursor: -webkit-grab;
cursor: grab;
}
.viewer-fade {
opacity: 0;
}
.viewer-in {
opacity: 1;
}
.viewer-transition {
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
@-webkit-keyframes viewer-spinner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes viewer-spinner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.viewer-loading::after {
-webkit-animation: viewer-spinner 1s linear infinite;
animation: viewer-spinner 1s linear infinite;
border: 4px solid rgba(255, 255, 255, 0.1);
border-left-color: rgba(255, 255, 255, 0.5);
border-radius: 50%;
content: '';
display: inline-block;
height: 40px;
left: 50%;
margin-left: -20px;
margin-top: -20px;
position: absolute;
top: 50%;
width: 40px;
z-index: 1;
}
@media (max-width: 767px) {
.viewer-hide-xs-down {
display: none;
}
}
@media (max-width: 991px) {
.viewer-hide-sm-down {
display: none;
}
}
@media (max-width: 1199px) {
.viewer-hide-md-down {
display: none;
}
}
@@ -1,211 +0,0 @@
body{ background-color:#fcfcfc;}
.grid {
position: relative;
margin: 0 auto;
}
.js .grid::after {
content: '';
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
background-size: 60px auto;
-webkit-transition: opacity 0.3s;
transition: opacity 0.3s;
}
.js .grid--loaded::after {
opacity: 0;
}
.grid__item {
width: 270px;
padding: 10px;
}
.grid__item--current {
opacity: 0 !important;
}
.img-wrap {
display: block;
}
.img-wrap:focus,
.img-wrap:hover {
outline: none;
}
.img-wrap img {
display: block;
max-width: 100%;
}
.preview {
position: fixed;
z-index: 1000;
top: 0;
left: 0;
display: -webkit-flex;
display: -ms-flex;
display: flex;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-ms-flex-line-pack: center;
-webkit-align-content: center;
align-content: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
width: 100%;
height: 100%;
pointer-events: none;
}
.preview--open {
pointer-events: auto;
}
/* circle overlay (generated SVG) */
.overlay {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}
.overlay circle {
-webkit-transition: fill-opacity 0.3s, -webkit-transform 0s 0.3s;
transition: fill-opacity 0.3s, transform 0s 0.3s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
-webkit-transform: scale3d(0, 0, 1);
transform: scale3d(0, 0, 1);
fill: #1f1d1d;
fill-opacity: 0;
}
.preview--open .overlay circle {
-webkit-transition: -webkit-transform 0.4s;
transition: transform 0.4s;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
fill-opacity: 1;
}
.clone {
position: fixed;
z-index: 110;
-webkit-transition: -webkit-transform 0.6s cubic-bezier(0.5, 1, 0.2, 1);
transition: transform 0.6s cubic-bezier(0.5, 1, 0.2, 1);
-webkit-backface-visibility: hidden;
}
.original {
position: relative;
z-index: 120;
display: block;
object-fit: contain;
-webkit-transition: opacity 0.2s;
transition: opacity 0.2s;
-webkit-backface-visibility: hidden;
}
.preview--open .animate {
/* open */
-webkit-transition: -webkit-transform 0.6s, opacity 0.2s;
transition: transform 0.6s, opacity 0.2s;
}
.animate {
/* close */
-webkit-transition: -webkit-transform 0.3s, opacity 0.2s;
transition: transform 0.3s, opacity 0.2s;
}
.description {
color: #fff;
}
.js .description--grid {
display: none;
}
.description--preview {
position: fixed;
z-index: 140;
bottom: 0;
left: 0;
width: 100%;
padding: 2em 1em;
text-align: center;
opacity: 0;
background: linear-gradient(180deg, transparent, #1f1d1d);
-webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
transition: opacity 0.3s, transform 0.3s;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
.preview--open .description--preview {
opacity: 1;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/* Close button */
.action {
font-size: 1.5em;
margin: 0;
padding: 0;
cursor: pointer;
vertical-align: top;
color: #6bd68a;
border: none;
background: none;
}
.action:hover,
.action:focus {
color: #6bd68a;
outline: none;
}
.action--close {
position: fixed;
z-index: 150;
top: 0;
right: 0;
padding: 1em;
opacity: 0;
-webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
transition: opacity 0.3s, transform 0.3s;
-webkit-transform: scale3d(0.6, 0.6, 1);
transform: scale3d(0.6, 0.6, 1);
}
.preview--image-loaded .action--close {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
.text-hidden {
position: absolute;
display: block;
overflow: hidden;
width: 0;
height: 0;
color: transparent;
}
@@ -1,164 +0,0 @@
#verification{
margin-top: 100px;
}
.container{
color: #555;
}
.ghost {
position: relative;
animation: ghostUpdown 1s infinite alternate;
-webkit-animation: ghostUpdown 1s infinite alternate;
}
.sign-content.popup-in-content{
background: #fff;
border-radius: 5px;
padding: 60px 0 100px;
}
.popup-in-txt {
max-width: 500px;
margin: 0 auto;
}
.btn.signin_btn, .btn.signin_btn:focus {
width: 90%;
padding: 0;
height: 50px;
background: #5a84fd;
color: #fff;
font-size: 14px;
text-transform: uppercase;
border-radius: 3px;
box-shadow: 0 5px 30px rgba(0,66,255,.3);
margin-top: 23px;
margin: 15px;
}
.container ul{
padding: 0;
margin: 0 auto;
list-style: none;
}
.container ul li {
list-style: none;
}
/*=============Style css=========*/
.tlinks{text-indent:-9999px;height:0;line-height:0;font-size:0;overflow:hidden;}
/*-------------------------------------
2. Kit-name-head
--------------------------------------*/
.kit-name-head{
display: none;
height: 120px;
}
.kit-name-txt{
/*padding: 75px 0 71px;*/
padding: 33px 0 71px;
text-align: center;
}
.kit-name-head h2 {
font-size: 33px;
font-weight: 600;
color: #fff;
margin-bottom: 8px;/*18*/
}
.kit-name-head h2::first-letter {
text-transform: lowercase;
}
.kit-name-head h3{
font-size: 16px;
font-weight: 500;
color: #fff;
}
/*-------------------------------------
3. Form-demo
--------------------------------------*/
.single-form-demo-set {
text-align: center;
padding: 60px 0;
}
.single-form-img-content { margin-top: 60px;}
/*.form-img*/
.form-img {
position: relative;
box-shadow:0px 5px 30px 5px rgba(154,154,154,.3);
-webkit-transition: .5s;
-moz-transition:.5s;
-ms-transition:.5s;
-o-transition:.5s;
transition: .5s;
}
.form-img-hover{
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background:transparent;
-webkit-transform: scale(0);
-moz-transform:scale(0);
-ms-transform:scale(0);
-o-transform:scale(0);
transform: scale(0);
}
.form-img:hover .form-img-hover{
-webkit-transform: scale(1);
-moz-transform:scale(1);
-ms-transform:scale(1);
-o-transform:scale(1);
transform: scale(1);
-webkit-transition: .5s;
-moz-transition:.5s;
-ms-transition:.5s;
-o-transition:.5s;
transition: .5s;
}
.form-img:hover {
box-shadow:0px 5px 30px 5px rgba(154,154,154,.7);
}
/*.form-img*/
/*===============================
Scroll Top
===============================*/
#scroll-Top .return-to-top {
position: fixed;
right: 30px;
bottom: 30px;
display: none;
width: 40px;
line-height: 40px;
height: 40px;
text-align: center;
font-size: 30px;
cursor: pointer;
color: #fff;
background:#5a84fd;
border:1px solid #5a84fd;
border-radius:5px;
-webkit-transition: .5s;
-moz-transition:.5s;
-ms-transition:.5s;
-o-transition:.5s;
transition: .5s;
z-index: 2;
}
#scroll-Top .return-to-top:hover {
background:transparent;
color: #26d9b3;
border:1px solid #26d9b3;
border-radius:50%;
}
/*========================Thank you=================
@@ -1,85 +0,0 @@
/*!
* classie v1.0.1
* class helper functions
* from bonzo https://github.com/ded/bonzo
* MIT license
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
* classie.remove( elem, 'my-unwanted-class' )
* classie.toggle( elem, 'my-class' )
*/
/*jshint browser: true, strict: true, undef: true, unused: true */
/*global define: false, module: false */
( function( window ) {
'use strict';
// class helper functions from bonzo https://github.com/ded/bonzo
function classReg( className ) {
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
}
// classList support for class management
// altho to be fair, the api sucks because it won't accept multiple classes at once
var hasClass, addClass, removeClass;
if ( 'classList' in document.documentElement ) {
hasClass = function( elem, c ) {
return elem.classList.contains( c );
};
addClass = function( elem, c ) {
elem.classList.add( c );
};
removeClass = function( elem, c ) {
elem.classList.remove( c );
};
}
else {
hasClass = function( elem, c ) {
return classReg( c ).test( elem.className );
};
addClass = function( elem, c ) {
if ( !hasClass( elem, c ) ) {
elem.className = elem.className + ' ' + c;
}
};
removeClass = function( elem, c ) {
elem.className = elem.className.replace( classReg( c ), ' ' );
};
}
function toggleClass( elem, c ) {
var fn = hasClass( elem, c ) ? removeClass : addClass;
fn( elem, c );
}
var classie = {
// full names
hasClass: hasClass,
addClass: addClass,
removeClass: removeClass,
toggleClass: toggleClass,
// short names
has: hasClass,
add: addClass,
remove: removeClass,
toggle: toggleClass
};
// transport
if ( typeof define === 'function' && define.amd ) {
// AMD
define( classie );
} else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = classie;
} else {
// browser global
window.classie = classie;
}
})( window );
-1
View File
@@ -1 +0,0 @@
(function(k,m){var g="3.7.0";var d=k.html5||{};var h=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;var c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;var q;var i="_html5shiv";var a=0;var o={};var e;(function(){try{var t=m.createElement("a");t.innerHTML="<xyz></xyz>";q=("hidden" in t);e=t.childNodes.length==1||(function(){(m.createElement)("a");var v=m.createDocumentFragment();return(typeof v.cloneNode=="undefined"||typeof v.createDocumentFragment=="undefined"||typeof v.createElement=="undefined")}())}catch(u){q=true;e=true}}());function f(t,v){var w=t.createElement("p"),u=t.getElementsByTagName("head")[0]||t.documentElement;w.innerHTML="x<style>"+v+"</style>";return u.insertBefore(w.lastChild,u.firstChild)}function l(){var t=j.elements;return typeof t=="string"?t.split(" "):t}function p(t){var u=o[t[i]];if(!u){u={};a++;t[i]=a;o[a]=u}return u}function n(w,t,v){if(!t){t=m}if(e){return t.createElement(w)}if(!v){v=p(t)}var u;if(v.cache[w]){u=v.cache[w].cloneNode()}else{if(c.test(w)){u=(v.cache[w]=v.createElem(w)).cloneNode()}else{u=v.createElem(w)}}return u.canHaveChildren&&!h.test(w)?v.frag.appendChild(u):u}function r(v,x){if(!v){v=m}if(e){return v.createDocumentFragment()}x=x||p(v);var y=x.frag.cloneNode(),w=0,u=l(),t=u.length;for(;w<t;w++){y.createElement(u[w])}return y}function s(t,u){if(!u.cache){u.cache={};u.createElem=t.createElement;u.createFrag=t.createDocumentFragment;u.frag=u.createFrag()}t.createElement=function(v){if(!j.shivMethods){return u.createElem(v)}return n(v,t,u)};t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/[\w\-]+/g,function(v){u.createElem(v);u.frag.createElement(v);return'c("'+v+'")'})+");return n}")(j,u.frag)}function b(t){if(!t){t=m}var u=p(t);if(j.shivCSS&&!q&&!u.hasCSS){u.hasCSS=!!f(t,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")}if(!e){s(t,u)}return t}var j={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:g,shivCSS:(d.shivCSS!==false),supportsUnknownElements:e,shivMethods:(d.shivMethods!==false),type:"default",shivDocument:b,createElement:n,createDocumentFragment:r};k.html5=j;b(m)}(this,document));
File diff suppressed because one or more lines are too long
@@ -1,364 +0,0 @@
/**
* cbpGridGallery.js v1.0.0
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2014, Codrops
* http://www.codrops.com
*/
;( function( window ) {
'use strict';
var docElem = window.document.documentElement,
transEndEventNames = {
'WebkitTransition': 'webkitTransitionEnd',
'MozTransition': 'transitionend',
'OTransition': 'oTransitionEnd',
'msTransition': 'MSTransitionEnd',
'transition': 'transitionend'
},
transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
support = {
transitions : Modernizr.csstransitions,
support3d : Modernizr.csstransforms3d
};
function setTransform( el, transformStr ) {
el.style.WebkitTransform = transformStr;
el.style.msTransform = transformStr;
el.style.transform = transformStr;
}
// from http://responsejs.com/labs/dimensions/
function getViewportW() {
var client = docElem['clientWidth'],
inner = window['innerWidth'];
if( client < inner )
return inner;
else
return client;
}
function extend( a, b ) {
for( var key in b ) {
if( b.hasOwnProperty( key ) ) {
a[key] = b[key];
}
}
return a;
}
function CBPGridGallery( el, options ) {
this.el = el;
this.options = extend( {}, this.options );
extend( this.options, options );
this._init();
}
CBPGridGallery.prototype.options = {
};
CBPGridGallery.prototype._init = function() {
// main grid
this.grid = this.el.querySelector( 'section.grid-wrap > ul.grid' );
// main grid items
this.gridItems = [].slice.call( this.grid.querySelectorAll( 'li:not(.grid-sizer)' ) );
// items total
this.itemsCount = this.gridItems.length;
// slideshow grid
this.slideshow = this.el.querySelector( 'section.slideshow > ul' );
// slideshow grid items
this.slideshowItems = [].slice.call( this.slideshow.children );
// index of current slideshow item
this.current = -1;
// slideshow control buttons
this.ctrlPrev = this.el.querySelector( 'section.slideshow > nav > span.nav-prev' );
this.ctrlNext = this.el.querySelector( 'section.slideshow > nav > span.nav-next' );
this.ctrlClose = this.el.querySelector( 'section.slideshow > nav > span.nav-close' );
// init masonry grid
this._initMasonry();
// init events
this._initEvents();
};
CBPGridGallery.prototype._initMasonry = function() {
var grid = this.grid;
imagesLoaded( grid, function() {
new Masonry( grid, {
itemSelector: 'li',
columnWidth: grid.querySelector( '.grid-sizer' )
});
});
};
CBPGridGallery.prototype._initEvents = function() {
var self = this;
// open the slideshow when clicking on the main grid items
this.gridItems.forEach( function( item, idx ) {
item.addEventListener( 'click', function() {
self._openSlideshow( idx );
} );
} );
// slideshow controls
this.ctrlPrev.addEventListener( 'click', function() { self._navigate( 'prev' ); } );
this.ctrlNext.addEventListener( 'click', function() { self._navigate( 'next' ); } );
this.ctrlClose.addEventListener( 'click', function() { self._closeSlideshow(); } );
// window resize
window.addEventListener( 'resize', function() { self._resizeHandler(); } );
// keyboard navigation events
document.addEventListener( 'keydown', function( ev ) {
if ( self.isSlideshowVisible ) {
var keyCode = ev.keyCode || ev.which;
switch (keyCode) {
case 37:
self._navigate( 'prev' );
break;
case 39:
self._navigate( 'next' );
break;
case 27:
self._closeSlideshow();
break;
}
}
} );
// trick to prevent scrolling when slideshow is visible
window.addEventListener( 'scroll', function() {
if ( self.isSlideshowVisible ) {
window.scrollTo( self.scrollPosition ? self.scrollPosition.x : 0, self.scrollPosition ? self.scrollPosition.y : 0 );
}
else {
self.scrollPosition = { x : window.pageXOffset || docElem.scrollLeft, y : window.pageYOffset || docElem.scrollTop };
}
});
};
CBPGridGallery.prototype._openSlideshow = function( pos ) {
this.isSlideshowVisible = true;
this.current = pos;
classie.addClass( this.el, 'slideshow-open' );
/* position slideshow items */
// set viewport items (current, next and previous)
this._setViewportItems();
// add class "current" and "show" to currentItem
classie.addClass( this.currentItem, 'current' );
classie.addClass( this.currentItem, 'show' );
// add class show to next and previous items
// position previous item on the left side and the next item on the right side
if( this.prevItem ) {
classie.addClass( this.prevItem, 'show' );
var translateVal = Number( -1 * ( getViewportW() / 2 + this.prevItem.offsetWidth / 2 ) );
setTransform( this.prevItem, support.support3d ? 'translate3d(' + translateVal + 'px, 0, -150px)' : 'translate(' + translateVal + 'px)' );
}
if( this.nextItem ) {
classie.addClass( this.nextItem, 'show' );
var translateVal = Number( getViewportW() / 2 + this.nextItem.offsetWidth / 2 );
setTransform( this.nextItem, support.support3d ? 'translate3d(' + translateVal + 'px, 0, -150px)' : 'translate(' + translateVal + 'px)' );
}
};
CBPGridGallery.prototype._navigate = function( dir ) {
if( this.isAnimating ) return;
if( dir === 'next' && this.current === this.itemsCount - 1 || dir === 'prev' && this.current === 0 ) {
this._closeSlideshow();
return;
}
this.isAnimating = true;
// reset viewport items
this._setViewportItems();
var self = this,
itemWidth = this.currentItem.offsetWidth,
// positions for the centered/current item, both the side items and the incoming ones
transformLeftStr = support.support3d ? 'translate3d(-' + Number( getViewportW() / 2 + itemWidth / 2 ) + 'px, 0, -150px)' : 'translate(-' + Number( getViewportW() / 2 + itemWidth / 2 ) + 'px)',
transformRightStr = support.support3d ? 'translate3d(' + Number( getViewportW() / 2 + itemWidth / 2 ) + 'px, 0, -150px)' : 'translate(' + Number( getViewportW() / 2 + itemWidth / 2 ) + 'px)',
transformCenterStr = '', transformOutStr, transformIncomingStr,
// incoming item
incomingItem;
if( dir === 'next' ) {
transformOutStr = support.support3d ? 'translate3d( -' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px, 0, -150px )' : 'translate(-' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px)';
transformIncomingStr = support.support3d ? 'translate3d( ' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px, 0, -150px )' : 'translate(' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px)';
}
else {
transformOutStr = support.support3d ? 'translate3d( ' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px, 0, -150px )' : 'translate(' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px)';
transformIncomingStr = support.support3d ? 'translate3d( -' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px, 0, -150px )' : 'translate(-' + Number( (getViewportW() * 2) / 2 + itemWidth / 2 ) + 'px)';
}
// remove class animatable from the slideshow grid (if it has already)
classie.removeClass( self.slideshow, 'animatable' );
if( dir === 'next' && this.current < this.itemsCount - 2 || dir === 'prev' && this.current > 1 ) {
// we have an incoming item!
incomingItem = this.slideshowItems[ dir === 'next' ? this.current + 2 : this.current - 2 ];
setTransform( incomingItem, transformIncomingStr );
classie.addClass( incomingItem, 'show' );
}
var slide = function() {
// add class animatable to the slideshow grid
classie.addClass( self.slideshow, 'animatable' );
// overlays:
classie.removeClass( self.currentItem, 'current' );
var nextCurrent = dir === 'next' ? self.nextItem : self.prevItem;
classie.addClass( nextCurrent, 'current' );
setTransform( self.currentItem, dir === 'next' ? transformLeftStr : transformRightStr );
if( self.nextItem ) {
setTransform( self.nextItem, dir === 'next' ? transformCenterStr : transformOutStr );
}
if( self.prevItem ) {
setTransform( self.prevItem, dir === 'next' ? transformOutStr : transformCenterStr );
}
if( incomingItem ) {
setTransform( incomingItem, dir === 'next' ? transformRightStr : transformLeftStr );
}
var onEndTransitionFn = function( ev ) {
if( support.transitions ) {
if( ev.propertyName.indexOf( 'transform' ) === -1 ) return false;
this.removeEventListener( transEndEventName, onEndTransitionFn );
}
if( self.prevItem && dir === 'next' ) {
classie.removeClass( self.prevItem, 'show' );
}
else if( self.nextItem && dir === 'prev' ) {
classie.removeClass( self.nextItem, 'show' );
}
if( dir === 'next' ) {
self.prevItem = self.currentItem;
self.currentItem = self.nextItem;
if( incomingItem ) {
self.nextItem = incomingItem;
}
}
else {
self.nextItem = self.currentItem;
self.currentItem = self.prevItem;
if( incomingItem ) {
self.prevItem = incomingItem;
}
}
self.current = dir === 'next' ? self.current + 1 : self.current - 1;
self.isAnimating = false;
};
if( support.transitions ) {
self.currentItem.addEventListener( transEndEventName, onEndTransitionFn );
}
else {
onEndTransitionFn();
}
};
setTimeout( slide, 25 );
}
CBPGridGallery.prototype._closeSlideshow = function( pos ) {
// remove class slideshow-open from the grid gallery elem
classie.removeClass( this.el, 'slideshow-open' );
// remove class animatable from the slideshow grid
classie.removeClass( this.slideshow, 'animatable' );
var self = this,
onEndTransitionFn = function( ev ) {
if( support.transitions ) {
if( ev.target.tagName.toLowerCase() !== 'ul' ) return;
this.removeEventListener( transEndEventName, onEndTransitionFn );
}
// remove classes show and current from the slideshow items
classie.removeClass( self.currentItem, 'current' );
classie.removeClass( self.currentItem, 'show' );
if( self.prevItem ) {
classie.removeClass( self.prevItem, 'show' );
}
if( self.nextItem ) {
classie.removeClass( self.nextItem, 'show' );
}
// also reset any transforms for all the items
self.slideshowItems.forEach( function( item ) { setTransform( item, '' ); } );
self.isSlideshowVisible = false;
};
if( support.transitions ) {
this.el.addEventListener( transEndEventName, onEndTransitionFn );
}
else {
onEndTransitionFn();
}
};
CBPGridGallery.prototype._setViewportItems = function() {
this.currentItem = null;
this.prevItem = null;
this.nextItem = null;
if( this.current > 0 ) {
this.prevItem = this.slideshowItems[ this.current - 1 ];
}
if( this.current < this.itemsCount - 1 ) {
this.nextItem = this.slideshowItems[ this.current + 1 ];
}
this.currentItem = this.slideshowItems[ this.current ];
}
// taken from https://github.com/desandro/vanilla-masonry/blob/master/masonry.js by David DeSandro
// original debounce by John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
CBPGridGallery.prototype._resizeHandler = function() {
var self = this;
function delayed() {
self._resize();
self._resizeTimeout = null;
}
if ( this._resizeTimeout ) {
clearTimeout( this._resizeTimeout );
}
this._resizeTimeout = setTimeout( delayed, 50 );
}
CBPGridGallery.prototype._resize = function() {
if ( this.isSlideshowVisible ) {
// update width value
if( this.prevItem ) {
var translateVal = Number( -1 * ( getViewportW() / 2 + this.prevItem.offsetWidth / 2 ) );
setTransform( this.prevItem, support.support3d ? 'translate3d(' + translateVal + 'px, 0, -150px)' : 'translate(' + translateVal + 'px)' );
}
if( this.nextItem ) {
var translateVal = Number( getViewportW() / 2 + this.nextItem.offsetWidth / 2 );
setTransform( this.nextItem, support.support3d ? 'translate3d(' + translateVal + 'px, 0, -150px)' : 'translate(' + translateVal + 'px)' );
}
}
}
// add to global namespace
window.CBPGridGallery = CBPGridGallery;
})( window );
@@ -1,80 +0,0 @@
/*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
* classie.remove( elem, 'my-unwanted-class' )
* classie.toggle( elem, 'my-class' )
*/
/*jshint browser: true, strict: true, undef: true */
/*global define: false */
( function( window ) {
'use strict';
// class helper functions from bonzo https://github.com/ded/bonzo
function classReg( className ) {
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
}
// classList support for class management
// altho to be fair, the api sucks because it won't accept multiple classes at once
var hasClass, addClass, removeClass;
if ( 'classList' in document.documentElement ) {
hasClass = function( elem, c ) {
return elem.classList.contains( c );
};
addClass = function( elem, c ) {
elem.classList.add( c );
};
removeClass = function( elem, c ) {
elem.classList.remove( c );
};
}
else {
hasClass = function( elem, c ) {
return classReg( c ).test( elem.className );
};
addClass = function( elem, c ) {
if ( !hasClass( elem, c ) ) {
elem.className = elem.className + ' ' + c;
}
};
removeClass = function( elem, c ) {
elem.className = elem.className.replace( classReg( c ), ' ' );
};
}
function toggleClass( elem, c ) {
var fn = hasClass( elem, c ) ? removeClass : addClass;
fn( elem, c );
}
var classie = {
// full names
hasClass: hasClass,
addClass: addClass,
removeClass: removeClass,
toggleClass: toggleClass,
// short names
has: hasClass,
add: addClass,
remove: removeClass,
toggle: toggleClass
};
// transport
if ( typeof define === 'function' && define.amd ) {
// AMD
define( classie );
} else {
// browser global
window.classie = classie;
}
})( window );
File diff suppressed because one or more lines are too long

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