Commit 8f1de0a6 authored by jiaorz's avatar jiaorz

Merge branch 'master-captcha-branch' into dev

parents 203cd15b bf5d5741
...@@ -2,29 +2,20 @@ package com.xxfc.platform.universal.utils; ...@@ -2,29 +2,20 @@ package com.xxfc.platform.universal.utils;
import java.io.File; import java.io.File;
/**
* @author stx
* @date 2018/11/5 15:01
* @desc
*/
public class ImageUtils { public class ImageUtils {
public static String getClickWordBgPath (){ public static String getClickWordBgPath (){
String imagePath = "/data/www/resources/images/pic-click";
String imagePath = "D:\\Downloads\\light_yan-captcha-master\\captcha\\images\\pic-click";
File file = new File(imagePath); File file = new File(imagePath);
String[] files = file.list(); String[] files = file.list();
int randomNum = RandomUtils.getRandomInt(1 , files.length); int randomNum = RandomUtils.getRandomInt(1 , files.length);
String path = files[randomNum]; String path = files[randomNum];
return imagePath+"/" + path;
return imagePath+"\\" + path;
} }
public static String getBlockPuzzleBgPath (){ public static String getBlockPuzzleBgPath (){
String imagePath = "/data/www/resources/images/jigsaw/original";
String imagePath = "D:\\Downloads\\light_yan-captcha-master\\captcha\\images\\jigsaw\\original";
File file = new File(imagePath); File file = new File(imagePath);
String[] files = file.list(); String[] files = file.list();
int randomNum = RandomUtils.getRandomInt(1 , files.length); int randomNum = RandomUtils.getRandomInt(1 , files.length);
...@@ -36,8 +27,7 @@ public class ImageUtils { ...@@ -36,8 +27,7 @@ public class ImageUtils {
public static String getBlockPuzzleJigsawPath (){ public static String getBlockPuzzleJigsawPath (){
String imagePath = "/data/www/resources/images/jigsaw/slidingBlock";
String imagePath = "D:\\Downloads\\light_yan-captcha-master\\captcha\\images\\jigsaw\\slidingBlock";
File file = new File(imagePath); File file = new File(imagePath);
String[] files = file.list(); String[] files = file.list();
int randomNum = RandomUtils.getRandomInt(1 , files.length); int randomNum = RandomUtils.getRandomInt(1 , files.length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment