+ * Created by raodeming on 2019/12/25.
+ */
+@Slf4j
+public class BlockPuzzleCaptchaServiceImpl extends AbstractCaptchaService {
+
+ @Override
+ public void init(Properties config) {
+ super.init(config);
+ }
+
+ @Override
+ public void destroy(Properties config) {
+ log.info("start-clear-history-data-", captchaType());
+ }
+
+ @Override
+ public String captchaType() {
+ return CaptchaTypeEnum.BLOCKPUZZLE.getCodeValue();
+ }
+
+ @Override
+ public ResponseModel get(CaptchaVO captchaVO) {
+ ResponseModel r = super.get(captchaVO);
+ if (!validatedReq(r)) {
+ return r;
+ }
+ //原生图片
+ BufferedImage originalImage = ImageUtils.getOriginal();
+ if (null == originalImage) {
+ log.error("滑动底图未初始化成功,请检查路径");
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_BASEMAP_NULL);
+ }
+ //设置水印
+ Graphics backgroundGraphics = originalImage.getGraphics();
+ int width = originalImage.getWidth();
+ int height = originalImage.getHeight();
+ backgroundGraphics.setFont(waterMarkFont);
+ backgroundGraphics.setColor(Color.white);
+ backgroundGraphics.drawString(waterMark, width - getEnOrChLength(waterMark), height - (HAN_ZI_SIZE / 2) + 7);
+
+ //抠图图片
+ String jigsawImageBase64 = ImageUtils.getslidingBlock();
+ BufferedImage jigsawImage = ImageUtils.getBase64StrToImage(jigsawImageBase64);
+ if (null == jigsawImage) {
+ log.error("滑动底图未初始化成功,请检查路径");
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_BASEMAP_NULL);
+ }
+ CaptchaVO captcha = pictureTemplatesCut(originalImage, jigsawImage, jigsawImageBase64);
+ if (captcha == null
+ || StrUtil.isBlank(captcha.getJigsawImageBase64())
+ || StrUtil.isBlank(captcha.getOriginalImageBase64())) {
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_ERROR);
+ }
+ return ResponseModel.successData(captcha);
+ }
+
+ @Override
+ public ResponseModel check(CaptchaVO captchaVO) {
+ ResponseModel r = super.check(captchaVO);
+ if (!validatedReq(r)) {
+ return r;
+ }
+ //取坐标信息
+ String codeKey = String.format(REDIS_CAPTCHA_KEY, captchaVO.getToken());
+ if (!CaptchaServiceFactory.getCache(cacheType).exists(codeKey)) {
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_INVALID);
+ }
+ String s = CaptchaServiceFactory.getCache(cacheType).get(codeKey);
+ //验证码只用一次,即刻失效
+ CaptchaServiceFactory.getCache(cacheType).delete(codeKey);
+ PointVO point = null;
+ PointVO point1 = null;
+ String pointJson = null;
+ try {
+ point = JsonUtil.parseObject(s, PointVO.class);
+ //aes解密
+ pointJson = decrypt(captchaVO.getPointJson(), point.getSecretKey());
+ point1 = JsonUtil.parseObject(pointJson, PointVO.class);
+ } catch (Exception e) {
+ log.error("验证码坐标解析失败", e);
+ afterValidateFail(captchaVO);
+ return ResponseModel.errorMsg(e.getMessage());
+ }
+ if (point.x - Integer.parseInt(slipOffset) > point1.x
+ || point1.x > point.x + Integer.parseInt(slipOffset)
+ || point.y != point1.y) {
+ afterValidateFail(captchaVO);
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_COORDINATE_ERROR);
+ }
+ //校验成功,将信息存入缓存
+ String secretKey = point.getSecretKey();
+ String value = null;
+ try {
+ value = AESUtil.aesEncrypt(captchaVO.getToken().concat("---").concat(pointJson), secretKey);
+ } catch (Exception e) {
+ log.error("AES加密失败", e);
+ afterValidateFail(captchaVO);
+ return ResponseModel.errorMsg(e.getMessage());
+ }
+ String secondKey = String.format(REDIS_SECOND_CAPTCHA_KEY, value);
+ CaptchaServiceFactory.getCache(cacheType).set(secondKey, captchaVO.getToken(), EXPIRESIN_THREE);
+ captchaVO.setResult(true);
+ captchaVO.resetClientFlag();
+ return ResponseModel.successData(captchaVO);
+ }
+
+ @Override
+ public ResponseModel verification(CaptchaVO captchaVO) {
+ ResponseModel r = super.verification(captchaVO);
+ if (!validatedReq(r)) {
+ return r;
+ }
+ try {
+ String codeKey = String.format(REDIS_SECOND_CAPTCHA_KEY, captchaVO.getCaptchaVerification());
+ if (!CaptchaServiceFactory.getCache(cacheType).exists(codeKey)) {
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_INVALID);
+ }
+ //二次校验取值后,即刻失效
+ CaptchaServiceFactory.getCache(cacheType).delete(codeKey);
+ } catch (Exception e) {
+ log.error("验证码坐标解析失败", e);
+ return ResponseModel.errorMsg(e.getMessage());
+ }
+ return ResponseModel.success();
+ }
+
+ /**
+ * 根据模板切图
+ *
+ * @throws Exception
+ */
+ public CaptchaVO pictureTemplatesCut(BufferedImage originalImage, BufferedImage jigsawImage, String jigsawImageBase64) {
+ try {
+ CaptchaVO dataVO = new CaptchaVO();
+
+ int originalWidth = originalImage.getWidth();
+ int originalHeight = originalImage.getHeight();
+ int jigsawWidth = jigsawImage.getWidth();
+ int jigsawHeight = jigsawImage.getHeight();
+
+ //随机生成拼图坐标
+ PointVO point = generateJigsawPoint(originalWidth, originalHeight, jigsawWidth, jigsawHeight);
+ int x = point.getX();
+ int y = point.getY();
+
+ //生成新的拼图图像
+ BufferedImage newJigsawImage = new BufferedImage(jigsawWidth, jigsawHeight, jigsawImage.getType());
+ Graphics2D graphics = newJigsawImage.createGraphics();
+
+ int bold = 5;
+ //如果需要生成RGB格式,需要做如下配置,Transparency 设置透明
+ newJigsawImage = graphics.getDeviceConfiguration().createCompatibleImage(jigsawWidth, jigsawHeight, Transparency.TRANSLUCENT);
+ // 新建的图像根据模板颜色赋值,源图生成遮罩
+ cutByTemplate(originalImage, jigsawImage, newJigsawImage, x, 0);
+ if (captchaInterferenceOptions > 0) {
+ int position = 0;
+ if (originalWidth - x - 5 > jigsawWidth * 2) {
+ //在原扣图右边插入干扰图
+ position = RandomUtils.getRandomInt(x + jigsawWidth + 5, originalWidth - jigsawWidth);
+ } else {
+ //在原扣图左边插入干扰图
+ position = RandomUtils.getRandomInt(100, x - jigsawWidth - 5);
+ }
+ while (true) {
+ String s = ImageUtils.getslidingBlock();
+ if (!jigsawImageBase64.equals(s)) {
+ interferenceByTemplate(originalImage, Objects.requireNonNull(ImageUtils.getBase64StrToImage(s)), position, 0);
+ break;
+ }
+ }
+ }
+ if (captchaInterferenceOptions > 1) {
+ while (true) {
+ String s = ImageUtils.getslidingBlock();
+ if (!jigsawImageBase64.equals(s)) {
+ Integer randomInt = RandomUtils.getRandomInt(jigsawWidth, 100 - jigsawWidth);
+ interferenceByTemplate(originalImage, Objects.requireNonNull(ImageUtils.getBase64StrToImage(s)),
+ randomInt, 0);
+ break;
+ }
+ }
+ }
+
+
+ // 设置“抗锯齿”的属性
+ graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ graphics.setStroke(new BasicStroke(bold, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
+ graphics.drawImage(newJigsawImage, 0, 0, null);
+ graphics.dispose();
+
+ ByteArrayOutputStream os = new ByteArrayOutputStream();//新建流。
+ ImageIO.write(newJigsawImage, IMAGE_TYPE_PNG, os);//利用ImageIO类提供的write方法,将bi以png图片的数据模式写入流。
+ byte[] jigsawImages = os.toByteArray();
+
+ ByteArrayOutputStream oriImagesOs = new ByteArrayOutputStream();//新建流。
+ ImageIO.write(originalImage, IMAGE_TYPE_PNG, oriImagesOs);//利用ImageIO类提供的write方法,将bi以jpg图片的数据模式写入流。
+ byte[] oriCopyImages = oriImagesOs.toByteArray();
+ Base64.Encoder encoder = Base64.getEncoder();
+ dataVO.setOriginalImageBase64(encoder.encodeToString(oriCopyImages).replaceAll("\r|\n", ""));
+ //point信息不传到前端,只做后端check校验
+// dataVO.setPoint(point);
+ dataVO.setJigsawImageBase64(encoder.encodeToString(jigsawImages).replaceAll("\r|\n", ""));
+ dataVO.setToken(RandomUtils.getUUID());
+ dataVO.setSecretKey(point.getSecretKey());
+// base64StrToImage(encoder.encodeToString(oriCopyImages), "D:\\原图.png");
+// base64StrToImage(encoder.encodeToString(jigsawImages), "D:\\滑动.png");
+
+ //将坐标信息存入redis中
+ String codeKey = String.format(REDIS_CAPTCHA_KEY, dataVO.getToken());
+ CaptchaServiceFactory.getCache(cacheType).set(codeKey, JsonUtil.toJSONString(point), EXPIRESIN_SECONDS);
+ log.debug("token:{},point:{}", dataVO.getToken(), JsonUtil.toJSONString(point));
+ return dataVO;
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+
+ /**
+ * 随机生成拼图坐标
+ *
+ * @param originalWidth
+ * @param originalHeight
+ * @param jigsawWidth
+ * @param jigsawHeight
+ * @return
+ */
+ private static PointVO generateJigsawPoint(int originalWidth, int originalHeight, int jigsawWidth, int jigsawHeight) {
+ Random random = new Random();
+ int widthDifference = originalWidth - jigsawWidth;
+ int heightDifference = originalHeight - jigsawHeight;
+ int x, y = 0;
+ if (widthDifference <= 0) {
+ x = 5;
+ } else {
+ x = random.nextInt(originalWidth - jigsawWidth - 100) + 100;
+ }
+ if (heightDifference <= 0) {
+ y = 5;
+ } else {
+ y = random.nextInt(originalHeight - jigsawHeight) + 5;
+ }
+ String key = null;
+ if (captchaAesStatus) {
+ key = AESUtil.getKey();
+ }
+ return new PointVO(x, y, key);
+ }
+
+ /**
+ * @param oriImage 原图
+ * @param templateImage 模板图
+ * @param newImage 新抠出的小图
+ * @param x 随机扣取坐标X
+ * @param y 随机扣取坐标y
+ * @throws Exception
+ */
+ private static void cutByTemplate(BufferedImage oriImage, BufferedImage templateImage, BufferedImage newImage, int x, int y) {
+ //临时数组遍历用于高斯模糊存周边像素值
+ int[][] martrix = new int[3][3];
+ int[] values = new int[9];
+
+ int xLength = templateImage.getWidth();
+ int yLength = templateImage.getHeight();
+ // 模板图像宽度
+ for (int i = 0; i < xLength; i++) {
+ // 模板图片高度
+ for (int j = 0; j < yLength; j++) {
+ // 如果模板图像当前像素点不是透明色 copy源文件信息到目标图片中
+ int rgb = templateImage.getRGB(i, j);
+ if (rgb < 0) {
+ newImage.setRGB(i, j, oriImage.getRGB(x + i, y + j));
+
+ //抠图区域高斯模糊
+ readPixel(oriImage, x + i, y + j, values);
+ fillMatrix(martrix, values);
+ oriImage.setRGB(x + i, y + j, avgMatrix(martrix));
+ }
+
+ //防止数组越界判断
+ if (i == (xLength - 1) || j == (yLength - 1)) {
+ continue;
+ }
+ int rightRgb = templateImage.getRGB(i + 1, j);
+ int downRgb = templateImage.getRGB(i, j + 1);
+ //描边处理,,取带像素和无像素的界点,判断该点是不是临界轮廓点,如果是设置该坐标像素是白色
+ if ((rgb >= 0 && rightRgb < 0) || (rgb < 0 && rightRgb >= 0) || (rgb >= 0 && downRgb < 0) || (rgb < 0 && downRgb >= 0)) {
+ newImage.setRGB(i, j, Color.white.getRGB());
+ oriImage.setRGB(x + i, y + j, Color.white.getRGB());
+ }
+ }
+ }
+
+ }
+
+
+ /**
+ * 干扰抠图处理
+ *
+ * @param oriImage 原图
+ * @param templateImage 模板图
+ * @param x 随机扣取坐标X
+ * @param y 随机扣取坐标y
+ * @throws Exception
+ */
+ private static void interferenceByTemplate(BufferedImage oriImage, BufferedImage templateImage, int x, int y) {
+ //临时数组遍历用于高斯模糊存周边像素值
+ int[][] martrix = new int[3][3];
+ int[] values = new int[9];
+
+ int xLength = templateImage.getWidth();
+ int yLength = templateImage.getHeight();
+ // 模板图像宽度
+ for (int i = 0; i < xLength; i++) {
+ // 模板图片高度
+ for (int j = 0; j < yLength; j++) {
+ // 如果模板图像当前像素点不是透明色 copy源文件信息到目标图片中
+ int rgb = templateImage.getRGB(i, j);
+ if (rgb < 0) {
+ //抠图区域高斯模糊
+ readPixel(oriImage, x + i, y + j, values);
+ fillMatrix(martrix, values);
+ oriImage.setRGB(x + i, y + j, avgMatrix(martrix));
+ }
+ //防止数组越界判断
+ if (i == (xLength - 1) || j == (yLength - 1)) {
+ continue;
+ }
+ int rightRgb = templateImage.getRGB(i + 1, j);
+ int downRgb = templateImage.getRGB(i, j + 1);
+ //描边处理,,取带像素和无像素的界点,判断该点是不是临界轮廓点,如果是设置该坐标像素是白色
+ if ((rgb >= 0 && rightRgb < 0) || (rgb < 0 && rightRgb >= 0) || (rgb >= 0 && downRgb < 0) || (rgb < 0 && downRgb >= 0)) {
+ oriImage.setRGB(x + i, y + j, Color.white.getRGB());
+ }
+ }
+ }
+
+ }
+
+ private static void readPixel(BufferedImage img, int x, int y, int[] pixels) {
+ int xStart = x - 1;
+ int yStart = y - 1;
+ int current = 0;
+ for (int i = xStart; i < 3 + xStart; i++) {
+ for (int j = yStart; j < 3 + yStart; j++) {
+ int tx = i;
+ if (tx < 0) {
+ tx = -tx;
+
+ } else if (tx >= img.getWidth()) {
+ tx = x;
+ }
+ int ty = j;
+ if (ty < 0) {
+ ty = -ty;
+ } else if (ty >= img.getHeight()) {
+ ty = y;
+ }
+ pixels[current++] = img.getRGB(tx, ty);
+
+ }
+ }
+ }
+
+ private static void fillMatrix(int[][] matrix, int[] values) {
+ int filled = 0;
+ for (int i = 0; i < matrix.length; i++) {
+ int[] x = matrix[i];
+ for (int j = 0; j < x.length; j++) {
+ x[j] = values[filled++];
+ }
+ }
+ }
+
+ private static int avgMatrix(int[][] matrix) {
+ int r = 0;
+ int g = 0;
+ int b = 0;
+ for (int i = 0; i < matrix.length; i++) {
+ int[] x = matrix[i];
+ for (int j = 0; j < x.length; j++) {
+ if (j == 1) {
+ continue;
+ }
+ Color c = new Color(x[j]);
+ r += c.getRed();
+ g += c.getGreen();
+ b += c.getBlue();
+ }
+ }
+ return new Color(r / 8, g / 8, b / 8).getRGB();
+ }
+
+
+}
diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/com/anji/captcha/service/impl/CaptchaCacheServiceMemImpl.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/com/anji/captcha/service/impl/CaptchaCacheServiceMemImpl.java
new file mode 100644
index 000000000..7739b1a4b
--- /dev/null
+++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/com/anji/captcha/service/impl/CaptchaCacheServiceMemImpl.java
@@ -0,0 +1,50 @@
+package com.anji.captcha.service.impl;
+
+import com.anji.captcha.service.CaptchaCacheService;
+import com.anji.captcha.util.CacheUtil;
+
+import java.util.Objects;
+
+/**
+ * 对于分布式部署的应用,我们建议应用自己实现CaptchaCacheService,比如用Redis,参考service/spring-boot代码示例。
+ * 如果应用是单点的,也没有使用redis,那默认使用内存。
+ * 内存缓存只适合单节点部署的应用,否则验证码生产与验证在节点之间信息不同步,导致失败。
+ *
+ * @author lide1202@hotmail.com
+ * @Title: 默认使用内存当缓存
+ * @date 2020-05-12
+ */
+public class CaptchaCacheServiceMemImpl implements CaptchaCacheService {
+ @Override
+ public void set(String key, String value, long expiresInSeconds) {
+
+ CacheUtil.set(key, value, expiresInSeconds);
+ }
+
+ @Override
+ public boolean exists(String key) {
+ return CacheUtil.exists(key);
+ }
+
+ @Override
+ public void delete(String key) {
+ CacheUtil.delete(key);
+ }
+
+ @Override
+ public String get(String key) {
+ return CacheUtil.get(key);
+ }
+
+ @Override
+ public Long increment(String key, long val) {
+ Long ret = Long.parseLong(Objects.requireNonNull(CacheUtil.get(key))) + val;
+ CacheUtil.set(key, ret + "", 0);
+ return ret;
+ }
+
+ @Override
+ public String type() {
+ return "local";
+ }
+}
diff --git a/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/com/anji/captcha/service/impl/CaptchaServiceFactory.java b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/com/anji/captcha/service/impl/CaptchaServiceFactory.java
new file mode 100644
index 000000000..ceb91391a
--- /dev/null
+++ b/yudao-framework/yudao-spring-boot-starter-captcha/src/main/java/com/anji/captcha/service/impl/CaptchaServiceFactory.java
@@ -0,0 +1,58 @@
+package com.anji.captcha.service.impl;
+
+import com.anji.captcha.model.common.Const;
+import com.anji.captcha.service.CaptchaCacheService;
+import com.anji.captcha.service.CaptchaService;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.ServiceLoader;
+
+/**
+ * Created by raodeming on 2020/5/26.
+ */
+@Slf4j
+public class CaptchaServiceFactory {
+
+ public static CaptchaService getInstance(Properties config) {
+ //先把所有CaptchaService初始化,通过init方法,实例字体等,add by lide1202@hotmail.com
+ /*try{
+ for(CaptchaService item: instances.values()){
+ item.init(config);
+ }
+ }catch (Exception e){
+ logger.warn("init captchaService fail:{}", e);
+ }*/
+
+ String captchaType = config.getProperty(Const.CAPTCHA_TYPE, "default");
+ CaptchaService ret = instances.get(captchaType);
+ if (ret == null) {
+ throw new RuntimeException("unsupported-[captcha.type]=" + captchaType);
+ }
+ ret.init(config);
+ return ret;
+ }
+
+ public static CaptchaCacheService getCache(String cacheType) {
+ return cacheService.get(cacheType);
+ }
+
+ public volatile static Map
+ * Created by raodeming on 2019/12/25.
+ */
+@Slf4j
+public class ClickWordCaptchaServiceImpl extends AbstractCaptchaService {
+
+ public static String HAN_ZI = "\u7684\u4e00\u4e86\u662f\u6211\u4e0d\u5728\u4eba\u4eec\u6709\u6765\u4ed6\u8fd9\u4e0a\u7740\u4e2a\u5730\u5230\u5927\u91cc\u8bf4\u5c31\u53bb\u5b50\u5f97\u4e5f\u548c\u90a3\u8981\u4e0b\u770b\u5929\u65f6\u8fc7\u51fa\u5c0f\u4e48\u8d77\u4f60\u90fd\u628a\u597d\u8fd8\u591a\u6ca1\u4e3a\u53c8\u53ef\u5bb6\u5b66\u53ea\u4ee5\u4e3b\u4f1a\u6837\u5e74\u60f3\u751f\u540c\u8001\u4e2d\u5341\u4ece\u81ea\u9762\u524d\u5934\u9053\u5b83\u540e\u7136\u8d70\u5f88\u50cf\u89c1\u4e24\u7528\u5979\u56fd\u52a8\u8fdb\u6210\u56de\u4ec0\u8fb9\u4f5c\u5bf9\u5f00\u800c\u5df1\u4e9b\u73b0\u5c71\u6c11\u5019\u7ecf\u53d1\u5de5\u5411\u4e8b\u547d\u7ed9\u957f\u6c34\u51e0\u4e49\u4e09\u58f0\u4e8e\u9ad8\u624b\u77e5\u7406\u773c\u5fd7\u70b9\u5fc3\u6218\u4e8c\u95ee\u4f46\u8eab\u65b9\u5b9e\u5403\u505a\u53eb\u5f53\u4f4f\u542c\u9769\u6253\u5462\u771f\u5168\u624d\u56db\u5df2\u6240\u654c\u4e4b\u6700\u5149\u4ea7\u60c5\u8def\u5206\u603b\u6761\u767d\u8bdd\u4e1c\u5e2d\u6b21\u4eb2\u5982\u88ab\u82b1\u53e3\u653e\u513f\u5e38\u6c14\u4e94\u7b2c\u4f7f\u5199\u519b\u5427\u6587\u8fd0\u518d\u679c\u600e\u5b9a\u8bb8\u5feb\u660e\u884c\u56e0\u522b\u98de\u5916\u6811\u7269\u6d3b\u90e8\u95e8\u65e0\u5f80\u8239\u671b\u65b0\u5e26\u961f\u5148\u529b\u5b8c\u5374\u7ad9\u4ee3\u5458\u673a\u66f4\u4e5d\u60a8\u6bcf\u98ce\u7ea7\u8ddf\u7b11\u554a\u5b69\u4e07\u5c11\u76f4\u610f\u591c\u6bd4\u9636\u8fde\u8f66\u91cd\u4fbf\u6597\u9a6c\u54ea\u5316\u592a\u6307\u53d8\u793e\u4f3c\u58eb\u8005\u5e72\u77f3\u6ee1\u65e5\u51b3\u767e\u539f\u62ff\u7fa4\u7a76\u5404\u516d\u672c\u601d\u89e3\u7acb\u6cb3\u6751\u516b\u96be\u65e9\u8bba\u5417\u6839\u5171\u8ba9\u76f8\u7814\u4eca\u5176\u4e66\u5750\u63a5\u5e94\u5173\u4fe1\u89c9\u6b65\u53cd\u5904\u8bb0\u5c06\u5343\u627e\u4e89\u9886\u6216\u5e08\u7ed3\u5757\u8dd1\u8c01\u8349\u8d8a\u5b57\u52a0\u811a\u7d27\u7231\u7b49\u4e60\u9635\u6015\u6708\u9752\u534a\u706b\u6cd5\u9898\u5efa\u8d76\u4f4d\u5531\u6d77\u4e03\u5973\u4efb\u4ef6\u611f\u51c6\u5f20\u56e2\u5c4b\u79bb\u8272\u8138\u7247\u79d1\u5012\u775b\u5229\u4e16\u521a\u4e14\u7531\u9001\u5207\u661f\u5bfc\u665a\u8868\u591f\u6574\u8ba4\u54cd\u96ea\u6d41\u672a\u573a\u8be5\u5e76\u5e95\u6df1\u523b\u5e73\u4f1f\u5fd9\u63d0\u786e\u8fd1\u4eae\u8f7b\u8bb2\u519c\u53e4\u9ed1\u544a\u754c\u62c9\u540d\u5440\u571f\u6e05\u9633\u7167\u529e\u53f2\u6539\u5386\u8f6c\u753b\u9020\u5634\u6b64\u6cbb\u5317\u5fc5\u670d\u96e8\u7a7f\u5185\u8bc6\u9a8c\u4f20\u4e1a\u83dc\u722c\u7761\u5174\u5f62\u91cf\u54b1\u89c2\u82e6\u4f53\u4f17\u901a\u51b2\u5408\u7834\u53cb\u5ea6\u672f\u996d\u516c\u65c1\u623f\u6781\u5357\u67aa\u8bfb\u6c99\u5c81\u7ebf\u91ce\u575a\u7a7a\u6536\u7b97\u81f3\u653f\u57ce\u52b3\u843d\u94b1\u7279\u56f4\u5f1f\u80dc\u6559\u70ed\u5c55\u5305\u6b4c\u7c7b\u6e10\u5f3a\u6570\u4e61\u547c\u6027\u97f3\u7b54\u54e5\u9645\u65e7\u795e\u5ea7\u7ae0\u5e2e\u5566\u53d7\u7cfb\u4ee4\u8df3\u975e\u4f55\u725b\u53d6\u5165\u5cb8\u6562\u6389\u5ffd\u79cd\u88c5\u9876\u6025\u6797\u505c\u606f\u53e5\u533a\u8863\u822c\u62a5\u53f6\u538b\u6162\u53d4\u80cc\u7ec6";
+
+ protected static String clickWordFontStr = "NotoSerif-Light.ttf";
+
+ protected Font clickWordFont;//点选文字字体
+
+ @Override
+ public String captchaType() {
+ return CaptchaTypeEnum.CLICKWORD.getCodeValue();
+ }
+
+ @Override
+ public void init(Properties config) {
+ super.init(config);
+ clickWordFontStr = config.getProperty(Const.CAPTCHA_FONT_TYPE, "SourceHanSansCN-Normal.otf");
+ try {
+ int size = Integer.parseInt(config.getProperty(Const.CAPTCHA_FONT_SIZE,HAN_ZI_SIZE+""));
+
+ if (clickWordFontStr.toLowerCase().endsWith(".ttf")
+ || clickWordFontStr.toLowerCase().endsWith(".ttc")
+ || clickWordFontStr.toLowerCase().endsWith(".otf")) {
+ this.clickWordFont = Font.createFont(Font.TRUETYPE_FONT,
+ Objects.requireNonNull(getClass().getResourceAsStream("/fonts/" + clickWordFontStr)))
+ .deriveFont(Font.BOLD, size);
+ } else {
+ int style = Integer.parseInt(config.getProperty(Const.CAPTCHA_FONT_STYLE,Font.BOLD+""));
+ this.clickWordFont = new Font(clickWordFontStr, style, size);
+ }
+ } catch (Exception ex) {
+ log.error("load font error:{}", ex);
+ }
+ this.wordTotalCount = Integer.parseInt(config.getProperty(Const.CAPTCHA_WORD_COUNT,"4"));
+ }
+
+ @Override
+ public void destroy(Properties config) {
+ log.info("start-clear-history-data-", captchaType());
+ }
+
+ @Override
+ public ResponseModel get(CaptchaVO captchaVO) {
+ ResponseModel r = super.get(captchaVO);
+ if (!validatedReq(r)) {
+ return r;
+ }
+ BufferedImage bufferedImage = ImageUtils.getPicClick();
+ if (null == bufferedImage) {
+ log.error("滑动底图未初始化成功,请检查路径");
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_BASEMAP_NULL);
+ }
+ CaptchaVO imageData = getImageData(bufferedImage);
+ if (imageData == null
+ || StrUtil.isBlank(imageData.getOriginalImageBase64())) {
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_ERROR);
+ }
+ return ResponseModel.successData(imageData);
+ }
+
+ @Override
+ public ResponseModel check(CaptchaVO captchaVO) {
+ ResponseModel r = super.check(captchaVO);
+ if (!validatedReq(r)) {
+ return r;
+ }
+ //取坐标信息
+ String codeKey = String.format(REDIS_CAPTCHA_KEY, captchaVO.getToken());
+ if (!CaptchaServiceFactory.getCache(cacheType).exists(codeKey)) {
+ return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_INVALID);
+ }
+ String s = CaptchaServiceFactory.getCache(cacheType).get(codeKey);
+ //验证码只用一次,即刻失效
+ CaptchaServiceFactory.getCache(cacheType).delete(codeKey);
+ List
* 对 Xss 不了解的胖友,可以看看 http://www.iocoder.cn/Fight/The-new-girl-asked-me-why-AJAX-requests-are-not-secure-I-did-not-answer/
*
* @author 芋道源码
@@ -30,10 +31,12 @@ public class XssFilter extends OncePerRequestFilter {
*/
private final PathMatcher pathMatcher;
+ private final XssCleaner xssCleaner;
+
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws IOException, ServletException {
- filterChain.doFilter(new XssRequestWrapper(request), response);
+ filterChain.doFilter(new XssRequestWrapper(request, xssCleaner), response);
}
@Override
diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssRequestWrapper.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssRequestWrapper.java
index 25bd20978..7beed46cc 100644
--- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssRequestWrapper.java
+++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/XssRequestWrapper.java
@@ -1,21 +1,10 @@
package cn.iocoder.yudao.framework.web.core.filter;
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.io.IoUtil;
-import cn.hutool.core.util.ArrayUtil;
-import cn.hutool.core.util.ReflectUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.http.HTMLFilter;
-import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
+import cn.iocoder.yudao.framework.web.core.clean.XssCleaner;
-import javax.servlet.ReadListener;
-import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
+import java.util.LinkedHashMap;
import java.util.Map;
/**
@@ -24,113 +13,79 @@ import java.util.Map;
* @author 芋道源码
*/
public class XssRequestWrapper extends HttpServletRequestWrapper {
+ private final XssCleaner xssCleaner;
- /**
- * 基于线程级别的 HTMLFilter 对象,因为它线程非安全
- */
- private static final ThreadLocal
* 关联 {@link CodegenTableDO#getId()}
*/
private Long tableId;
@@ -41,7 +42,8 @@ public class CodegenColumnDO extends BaseDO {
*/
private String columnName;
/**
- * 字段类型
+ * 数据库字段类型
+ * 关联 {@link TableField.MetaInfo#getJdbcType()}
*/
private String dataType;
/**
@@ -69,7 +71,7 @@ public class CodegenColumnDO extends BaseDO {
/**
* Java 属性类型
- *
+ *
* 例如说 String、Boolean 等等
*/
private String javaType;
@@ -79,7 +81,7 @@ public class CodegenColumnDO extends BaseDO {
private String javaField;
/**
* 字典类型
- *
+ *
* 关联 DictTypeDO 的 type 属性
*/
private String dictType;
@@ -104,7 +106,7 @@ public class CodegenColumnDO extends BaseDO {
private Boolean listOperation;
/**
* List 查询操作的条件类型
- *
+ *
* 枚举 {@link CodegenColumnListConditionEnum}
*/
private String listOperationCondition;
@@ -117,7 +119,7 @@ public class CodegenColumnDO extends BaseDO {
/**
* 显示类型
- *
+ *
* 枚举 {@link CodegenColumnHtmlTypeEnum}
*/
private String htmlType;
diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/DefaultDatabaseQueryTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/DefaultDatabaseQueryTest.java
index 1a8b3c14b..a6de8d9ee 100644
--- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/DefaultDatabaseQueryTest.java
+++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/DefaultDatabaseQueryTest.java
@@ -1,10 +1,10 @@
package cn.iocoder.yudao.module.infra.service;
import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.generator.query.DefaultQuery;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
-import com.baomidou.mybatisplus.generator.query.DefaultQuery;
import java.util.List;
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java
index fbdd665e8..c10e602a7 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java
@@ -1,8 +1,10 @@
package cn.iocoder.yudao.module.system.controller.admin.captcha;
+import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import com.anji.captcha.model.common.ResponseModel;
import com.anji.captcha.model.vo.CaptchaVO;
+import com.anji.captcha.service.CaptchaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
@@ -10,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletRequest;
@@ -24,24 +27,46 @@ import javax.servlet.http.HttpServletRequest;
@Api(tags = "管理后台 - 验证码")
@RestController("adminCaptchaController")
@RequestMapping("/system/captcha")
-public class CaptchaController extends com.anji.captcha.controller.CaptchaController {
+public class CaptchaController {
+
+ @Resource
+ private CaptchaService captchaService;
@PostMapping({"/get"})
@ApiOperation("获得验证码")
@PermitAll
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
- @Override
public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) {
- return super.get(data, request);
+ assert request.getRemoteHost() != null;
+ data.setBrowserInfo(getRemoteId(request));
+ return captchaService.get(data);
}
@PostMapping("/check")
@ApiOperation("校验验证码")
@PermitAll
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
- @Override
public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) {
- return super.check(data, request);
+ data.setBrowserInfo(getRemoteId(request));
+ return captchaService.check(data);
+ }
+
+ public static String getRemoteId(HttpServletRequest request) {
+ String xfwd = request.getHeader("X-Forwarded-For");
+ String ip = getRemoteIpFromXfwd(xfwd);
+ String ua = request.getHeader("user-agent");
+ if (StrUtil.isNotBlank(ip)) {
+ return ip + ua;
+ }
+ return request.getRemoteAddr() + ua;
+ }
+
+ private static String getRemoteIpFromXfwd(String xfwd) {
+ if (StrUtil.isNotBlank(xfwd)) {
+ String[] ipList = xfwd.split(",");
+ return StrUtil.trim(ipList[0]);
+ }
+ return null;
}
}
diff --git a/yudao-ui-admin-vue3/README.md b/yudao-ui-admin-vue3/README.md
index 73561ec9b..79a9505ac 100644
--- a/yudao-ui-admin-vue3/README.md
+++ b/yudao-ui-admin-vue3/README.md
@@ -34,7 +34,7 @@
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 4.9.4 |
| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.28 |
| [vueuse](https://vueuse.org/) | 常用工具集 | 9.10.0 |
-| [vxe-table](https://vxetable.cn/) | vue 最强表单 | 4.3.7 |
+| [vxe-table](https://vxetable.cn/) | vue 最强表单 | 4.3.9 |
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.2.2 |
| [vue-router](https://router.vuejs.org/) | vue 路由 | 4.1.6 |
| [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 |
diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json
index ac2e72ded..9d6ed136b 100644
--- a/yudao-ui-admin-vue3/package.json
+++ b/yudao-ui-admin-vue3/package.json
@@ -1,6 +1,6 @@
{
"name": "yudao-ui-admin-vue3",
- "version": "1.6.6-snapshot.1901",
+ "version": "1.6.6-snapshot.1912",
"description": "基于vue3、vite4、element-plus、typesScript",
"author": "xingyu",
"private": false,
@@ -50,14 +50,14 @@
"vue-i18n": "9.2.2",
"vue-router": "^4.1.6",
"vue-types": "^5.0.2",
- "vxe-table": "^4.3.7",
+ "vxe-table": "^4.3.9",
"web-storage-cache": "^1.1.1",
"xe-utils": "^3.5.7"
},
"devDependencies": {
- "@commitlint/cli": "^17.4.0",
- "@commitlint/config-conventional": "^17.4.0",
- "@iconify/json": "^2.2.2",
+ "@commitlint/cli": "^17.4.2",
+ "@commitlint/config-conventional": "^17.4.2",
+ "@iconify/json": "^2.2.6",
"@intlify/unplugin-vue-i18n": "^0.8.1",
"@purge-icons/generated": "^0.9.0",
"@types/intro.js": "^5.1.0",
@@ -66,8 +66,8 @@
"@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0",
"@types/qs": "^6.9.7",
- "@typescript-eslint/eslint-plugin": "^5.48.0",
- "@typescript-eslint/parser": "^5.48.0",
+ "@typescript-eslint/eslint-plugin": "^5.48.1",
+ "@typescript-eslint/parser": "^5.48.1",
"@vitejs/plugin-legacy": "^3.0.1",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
@@ -75,23 +75,23 @@
"consola": "^2.15.3",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
- "eslint-define-config": "^1.13.0",
+ "eslint-define-config": "^1.14.0",
"eslint-plugin-prettier": "^4.2.1",
- "eslint-plugin-vue": "^9.8.0",
+ "eslint-plugin-vue": "^9.9.0",
"lint-staged": "^13.1.0",
- "postcss": "^8.4.20",
+ "postcss": "^8.4.21",
"postcss-html": "^1.5.0",
"postcss-scss": "^4.0.6",
- "prettier": "^2.8.1",
- "rimraf": "^3.0.2",
- "rollup": "^3.9.1",
+ "prettier": "^2.8.2",
+ "rimraf": "^4.0.4",
+ "rollup": "^3.10.0",
"sass": "^1.57.1",
"stylelint": "^14.16.1",
"stylelint-config-html": "^1.1.0",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-recommended": "^9.0.0",
"stylelint-config-standard": "^29.0.0",
- "stylelint-order": "^5.0.0",
+ "stylelint-order": "^6.0.1",
"terser": "^5.16.1",
"typescript": "4.9.4",
"vite": "4.0.4",
@@ -104,7 +104,7 @@
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-vue-setup-extend": "^0.4.0",
"vite-plugin-windicss": "^1.8.10",
- "vue-tsc": "^1.0.22",
+ "vue-tsc": "^1.0.24",
"windicss": "^3.5.6"
},
"engines": {
diff --git a/yudao-ui-admin-vue3/pnpm-lock.yaml b/yudao-ui-admin-vue3/pnpm-lock.yaml
index cb31c2c89..4bf227df5 100644
--- a/yudao-ui-admin-vue3/pnpm-lock.yaml
+++ b/yudao-ui-admin-vue3/pnpm-lock.yaml
@@ -1,10 +1,10 @@
lockfileVersion: 5.4
specifiers:
- '@commitlint/cli': ^17.4.0
- '@commitlint/config-conventional': ^17.4.0
+ '@commitlint/cli': ^17.4.2
+ '@commitlint/config-conventional': ^17.4.2
'@iconify/iconify': ^3.0.1
- '@iconify/json': ^2.2.2
+ '@iconify/json': ^2.2.6
'@intlify/unplugin-vue-i18n': ^0.8.1
'@purge-icons/generated': ^0.9.0
'@types/intro.js': ^5.1.0
@@ -13,8 +13,8 @@ specifiers:
'@types/nprogress': ^0.2.0
'@types/qrcode': ^1.5.0
'@types/qs': ^6.9.7
- '@typescript-eslint/eslint-plugin': ^5.48.0
- '@typescript-eslint/parser': ^5.48.0
+ '@typescript-eslint/eslint-plugin': ^5.48.1
+ '@typescript-eslint/parser': ^5.48.1
'@vitejs/plugin-legacy': ^3.0.1
'@vitejs/plugin-vue': ^4.0.0
'@vitejs/plugin-vue-jsx': ^3.0.0
@@ -34,9 +34,9 @@ specifiers:
element-plus: 2.2.28
eslint: ^8.31.0
eslint-config-prettier: ^8.6.0
- eslint-define-config: ^1.13.0
+ eslint-define-config: ^1.14.0
eslint-plugin-prettier: ^4.2.1
- eslint-plugin-vue: ^9.8.0
+ eslint-plugin-vue: ^9.9.0
intro.js: ^6.0.0
jsencrypt: ^3.3.1
lint-staged: ^13.1.0
@@ -44,21 +44,21 @@ specifiers:
mitt: ^3.0.0
nprogress: ^0.2.0
pinia: ^2.0.28
- postcss: ^8.4.20
+ postcss: ^8.4.21
postcss-html: ^1.5.0
postcss-scss: ^4.0.6
- prettier: ^2.8.1
+ prettier: ^2.8.2
qrcode: ^1.5.1
qs: ^6.11.0
- rimraf: ^3.0.2
- rollup: ^3.9.1
+ rimraf: ^4.0.4
+ rollup: ^3.10.0
sass: ^1.57.1
stylelint: ^14.16.1
stylelint-config-html: ^1.1.0
stylelint-config-prettier: ^9.0.4
stylelint-config-recommended: ^9.0.0
stylelint-config-standard: ^29.0.0
- stylelint-order: ^5.0.0
+ stylelint-order: ^6.0.1
terser: ^5.16.1
typescript: 4.9.4
url: ^0.11.0
@@ -75,9 +75,9 @@ specifiers:
vue: 3.2.45
vue-i18n: 9.2.2
vue-router: ^4.1.6
- vue-tsc: ^1.0.22
+ vue-tsc: ^1.0.24
vue-types: ^5.0.2
- vxe-table: ^4.3.7
+ vxe-table: ^4.3.9
web-storage-cache: ^1.1.1
windicss: ^3.5.6
xe-utils: ^3.5.7
@@ -109,14 +109,14 @@ dependencies:
vue-i18n: 9.2.2_vue@3.2.45
vue-router: 4.1.6_vue@3.2.45
vue-types: 5.0.2_vue@3.2.45
- vxe-table: 4.3.7_vue@3.2.45+xe-utils@3.5.7
+ vxe-table: 4.3.9_vue@3.2.45+xe-utils@3.5.7
web-storage-cache: 1.1.1
xe-utils: 3.5.7
devDependencies:
- '@commitlint/cli': 17.4.0_@types+node@18.11.18
- '@commitlint/config-conventional': 17.4.0
- '@iconify/json': 2.2.2
+ '@commitlint/cli': 17.4.2
+ '@commitlint/config-conventional': 17.4.2
+ '@iconify/json': 2.2.6
'@intlify/unplugin-vue-i18n': 0.8.1_vue-i18n@9.2.2
'@purge-icons/generated': 0.9.0
'@types/intro.js': 5.1.0
@@ -125,32 +125,32 @@ devDependencies:
'@types/nprogress': 0.2.0
'@types/qrcode': 1.5.0
'@types/qs': 6.9.7
- '@typescript-eslint/eslint-plugin': 5.48.0_k73wpmdolxikpyqun3p36akaaq
- '@typescript-eslint/parser': 5.48.0_iukboom6ndih5an6iafl45j2fe
+ '@typescript-eslint/eslint-plugin': 5.48.1_3jon24igvnqaqexgwtxk6nkpse
+ '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe
'@vitejs/plugin-legacy': 3.0.1_terser@5.16.1+vite@4.0.4
'@vitejs/plugin-vue': 4.0.0_vite@4.0.4+vue@3.2.45
'@vitejs/plugin-vue-jsx': 3.0.0_vite@4.0.4+vue@3.2.45
- autoprefixer: 10.4.13_postcss@8.4.20
+ autoprefixer: 10.4.13_postcss@8.4.21
consola: 2.15.3
eslint: 8.31.0
eslint-config-prettier: 8.6.0_eslint@8.31.0
- eslint-define-config: 1.13.0
- eslint-plugin-prettier: 4.2.1_32m5uc2milwdw3tnkcq5del26y
- eslint-plugin-vue: 9.8.0_eslint@8.31.0
+ eslint-define-config: 1.14.0
+ eslint-plugin-prettier: 4.2.1_iu5s7nk6dw7o3tajefwfiqfmge
+ eslint-plugin-vue: 9.9.0_eslint@8.31.0
lint-staged: 13.1.0
- postcss: 8.4.20
+ postcss: 8.4.21
postcss-html: 1.5.0
- postcss-scss: 4.0.6_postcss@8.4.20
- prettier: 2.8.1
- rimraf: 3.0.2
- rollup: 3.9.1
+ postcss-scss: 4.0.6_postcss@8.4.21
+ prettier: 2.8.2
+ rimraf: 4.0.4
+ rollup: 3.10.0
sass: 1.57.1
stylelint: 14.16.1
stylelint-config-html: 1.1.0_kbto3rg3njmczth2rrsgfnlsqa
stylelint-config-prettier: 9.0.4_stylelint@14.16.1
stylelint-config-recommended: 9.0.0_stylelint@14.16.1
stylelint-config-standard: 29.0.0_stylelint@14.16.1
- stylelint-order: 5.0.0_stylelint@14.16.1
+ stylelint-order: 6.0.1_stylelint@14.16.1
terser: 5.16.1
typescript: 4.9.4
vite: 4.0.4_zxbrnrc4iyldik6mikh3pswz4i
@@ -163,7 +163,7 @@ devDependencies:
vite-plugin-svg-icons: 2.0.1_vite@4.0.4
vite-plugin-vue-setup-extend: 0.4.0_vite@4.0.4
vite-plugin-windicss: 1.8.10_vite@4.0.4
- vue-tsc: 1.0.22_typescript@4.9.4
+ vue-tsc: 1.0.24_typescript@4.9.4
windicss: 3.5.6
packages:
@@ -506,15 +506,15 @@ packages:
'@babel/helper-validator-identifier': 7.19.1
to-fast-properties: 2.0.0
- /@commitlint/cli/17.4.0_@types+node@18.11.18:
- resolution: {integrity: sha512-SEY4sYe8yVlgxPP7X0wJb96DBAGBPsCsy6QbqJt/UECbIAjDeDV5xXBV4jnS7T/qMC10sk6Ub9kDhEX0VWvblw==}
+ /@commitlint/cli/17.4.2:
+ resolution: {integrity: sha512-0rPGJ2O1owhpxMIXL9YJ2CgPkdrFLKZElIZHXDN8L8+qWK1DGH7Q7IelBT1pchXTYTuDlqkOTdh//aTvT3bSUA==}
engines: {node: '>=v14'}
hasBin: true
dependencies:
'@commitlint/format': 17.4.0
- '@commitlint/lint': 17.4.0
- '@commitlint/load': 17.4.0_@types+node@18.11.18
- '@commitlint/read': 17.4.0
+ '@commitlint/lint': 17.4.2
+ '@commitlint/load': 17.4.2
+ '@commitlint/read': 17.4.2
'@commitlint/types': 17.4.0
execa: 5.1.1
lodash.isfunction: 3.0.9
@@ -524,11 +524,10 @@ packages:
transitivePeerDependencies:
- '@swc/core'
- '@swc/wasm'
- - '@types/node'
dev: true
- /@commitlint/config-conventional/17.4.0:
- resolution: {integrity: sha512-G4XBf45J4ZMspO4NwBFzY3g/1Kb+B42BcIxeikF8wucQxcyxcmhRdjeQpRpS1XEcBq5pdtEEQFipuB9IuiNFhw==}
+ /@commitlint/config-conventional/17.4.2:
+ resolution: {integrity: sha512-JVo1moSj5eDMoql159q8zKCU8lkOhQ+b23Vl3LVVrS6PXDLQIELnJ34ChQmFVbBdSSRNAbbXnRDhosFU+wnuHw==}
engines: {node: '>=v14'}
dependencies:
conventional-changelog-conventionalcommits: 5.0.0
@@ -567,32 +566,33 @@ packages:
chalk: 4.1.2
dev: true
- /@commitlint/is-ignored/17.4.0:
- resolution: {integrity: sha512-mkRuBlPUaBimvSvJyIHEHEW1/jP1SqEI7NOoaO9/eyJkMbsaiv5b1QgDYL4ZXlHdS64RMV7Y21MVVzuIceImDA==}
+ /@commitlint/is-ignored/17.4.2:
+ resolution: {integrity: sha512-1b2Y2qJ6n7bHG9K6h8S4lBGUl6kc7mMhJN9gy1SQfUZqe92ToDjUTtgNWb6LbzR1X8Cq4SEus4VU8Z/riEa94Q==}
engines: {node: '>=v14'}
dependencies:
'@commitlint/types': 17.4.0
semver: 7.3.8
dev: true
- /@commitlint/lint/17.4.0:
- resolution: {integrity: sha512-HG2YT4TUbQKs9v8QvpQjJ6OK+fhflsDB8M+D5tLrY79hbQOWA9mDKdRkABsW/AAhpNI9+zeGUWF3jj245jSHKw==}
+ /@commitlint/lint/17.4.2:
+ resolution: {integrity: sha512-HcymabrdBhsDMNzIv146+ZPNBPBK5gMNsVH+el2lCagnYgCi/4ixrHooeVyS64Fgce2K26+MC7OQ4vVH8wQWVw==}
engines: {node: '>=v14'}
dependencies:
- '@commitlint/is-ignored': 17.4.0
- '@commitlint/parse': 17.4.0
- '@commitlint/rules': 17.4.0
+ '@commitlint/is-ignored': 17.4.2
+ '@commitlint/parse': 17.4.2
+ '@commitlint/rules': 17.4.2
'@commitlint/types': 17.4.0
dev: true
- /@commitlint/load/17.4.0_@types+node@18.11.18:
- resolution: {integrity: sha512-wDKNvAJqukqZqKmhRlf3KNo/12QGo1AQcd80EbV01SxtGvyHOsJ/g+/IbrZpopZv8rvzmEVktcpfDYH6ITepFA==}
+ /@commitlint/load/17.4.2:
+ resolution: {integrity: sha512-Si++F85rJ9t4hw6JcOw1i2h0fdpdFQt0YKwjuK4bk9KhFjyFkRxvR3SB2dPaMs+EwWlDrDBGL+ygip1QD6gmPw==}
engines: {node: '>=v14'}
dependencies:
'@commitlint/config-validator': 17.4.0
'@commitlint/execute-rule': 17.4.0
'@commitlint/resolve-extends': 17.4.0
'@commitlint/types': 17.4.0
+ '@types/node': 18.11.18
chalk: 4.1.2
cosmiconfig: 8.0.0
cosmiconfig-typescript-loader: 4.2.0_bxtyj3et3xbsdyxhh3oblnfbj4
@@ -605,16 +605,15 @@ packages:
transitivePeerDependencies:
- '@swc/core'
- '@swc/wasm'
- - '@types/node'
dev: true
- /@commitlint/message/17.4.0:
- resolution: {integrity: sha512-USGJDU9PPxcgQjKXCzvPUal65KAhxWq3hp+MrU1pNCN2itWM654CLIoY2LMIQ7rScTli9B5dTLH3vXhzbItmzA==}
+ /@commitlint/message/17.4.2:
+ resolution: {integrity: sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q==}
engines: {node: '>=v14'}
dev: true
- /@commitlint/parse/17.4.0:
- resolution: {integrity: sha512-x8opKc5p+Hgs+CrMbq3VAnW2L2foPAX6arW8u9c8nTzksldGgFsENT+XVyPmpSMLlVBswZ1tndcz1xyKiY9TJA==}
+ /@commitlint/parse/17.4.2:
+ resolution: {integrity: sha512-DK4EwqhxfXpyCA+UH8TBRIAXAfmmX4q9QRBz/2h9F9sI91yt6mltTrL6TKURMcjUVmgaB80wgS9QybNIyVBIJA==}
engines: {node: '>=v14'}
dependencies:
'@commitlint/types': 17.4.0
@@ -622,8 +621,8 @@ packages:
conventional-commits-parser: 3.2.4
dev: true
- /@commitlint/read/17.4.0:
- resolution: {integrity: sha512-pGDeZpbkyvhxK8ZoCDUacPPRpauKPWF3n2XpDBEnuGreqUF2clq2PVJpwMMaNN5cHW8iFKCbcoOjXhD01sln0A==}
+ /@commitlint/read/17.4.2:
+ resolution: {integrity: sha512-hasYOdbhEg+W4hi0InmXHxtD/1favB4WdwyFxs1eOy/DvMw6+2IZBmATgGOlqhahsypk4kChhxjAFJAZ2F+JBg==}
engines: {node: '>=v14'}
dependencies:
'@commitlint/top-level': 17.4.0
@@ -645,12 +644,12 @@ packages:
resolve-global: 1.0.0
dev: true
- /@commitlint/rules/17.4.0:
- resolution: {integrity: sha512-lz3i1jet2NNjTWpAMwjjQjMZCPWBIHK1Kkja9o09UmUtMjRdALTb8uMLe8gCyeq3DiiZ5lLYOhbsoPK56xGQKA==}
+ /@commitlint/rules/17.4.2:
+ resolution: {integrity: sha512-OGrPsMb9Fx3/bZ64/EzJehY9YDSGWzp81Pj+zJiY+r/NSgJI3nUYdlS37jykNIugzazdEXfMtQ10kmA+Kx2pZQ==}
engines: {node: '>=v14'}
dependencies:
'@commitlint/ensure': 17.4.0
- '@commitlint/message': 17.4.0
+ '@commitlint/message': 17.4.2
'@commitlint/to-lines': 17.4.0
'@commitlint/types': 17.4.0
execa: 5.1.1
@@ -682,14 +681,14 @@ packages:
'@jridgewell/trace-mapping': 0.3.9
dev: true
- /@csstools/selector-specificity/2.0.2_2xshye3abirqjlplmebvmaxyna:
+ /@csstools/selector-specificity/2.0.2_wajs5nedgkikc5pcuwett7legi:
resolution: {integrity: sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg==}
engines: {node: ^12 || ^14 || >=16}
peerDependencies:
postcss: ^8.2
postcss-selector-parser: ^6.0.10
dependencies:
- postcss: 8.4.20
+ postcss: 8.4.21
postcss-selector-parser: 6.0.11
dev: true
@@ -964,8 +963,8 @@ packages:
dependencies:
'@iconify/types': 2.0.0
- /@iconify/json/2.2.2:
- resolution: {integrity: sha512-G9HVJz3uvQGNEirk9oI7xYnWb7ygEfTUZ+PVp81qgNp8bu5UOtXaxjTGw78NyNAC2OlryH5tSEp95Dqbt4LLQQ==}
+ /@iconify/json/2.2.6:
+ resolution: {integrity: sha512-fRP5PwXvX0PAGne1/xHvd6zVYiHq9dQzdvhhxamwJuNjoIVRWNNP5y465NkxybzEX94kn2JnoULkA9kbZkXoqA==}
dependencies:
'@iconify/types': 2.0.0
pathe: 1.0.0
@@ -986,8 +985,8 @@ packages:
vue-i18n:
optional: true
dependencies:
- '@intlify/message-compiler': 9.3.0-beta.12
- '@intlify/shared': 9.3.0-beta.12
+ '@intlify/message-compiler': 9.3.0-beta.14
+ '@intlify/shared': 9.3.0-beta.14
jsonc-eslint-parser: 1.4.1
source-map: 0.6.1
vue-i18n: 9.2.2_vue@3.2.45
@@ -1016,11 +1015,11 @@ packages:
'@intlify/shared': 9.2.2
source-map: 0.6.1
- /@intlify/message-compiler/9.3.0-beta.12:
- resolution: {integrity: sha512-A8/s7pb3v8nf6HG77qFPJntxgQKI9GXxGnkn7aO+b03/X/GkF/4WceDSAIk3i+yLeIgszeBn9GZ23tSg4sTEHA==}
+ /@intlify/message-compiler/9.3.0-beta.14:
+ resolution: {integrity: sha512-PlZ3pl+YYuql54Nq+26wv6ohIa8Ig6ALrvQI+f2zZKUtkupb49M4wyVN3bDQbFlgYVE7/u3n19BJSY8lEuX5Eg==}
engines: {node: '>= 14'}
dependencies:
- '@intlify/shared': 9.3.0-beta.11
+ '@intlify/shared': 9.3.0-beta.14
source-map: 0.6.1
dev: true
@@ -1028,13 +1027,8 @@ packages:
resolution: {integrity: sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==}
engines: {node: '>= 14'}
- /@intlify/shared/9.3.0-beta.11:
- resolution: {integrity: sha512-CtbotesxTRiC3bRyXyv1NG39fkqJ790f8z8xFaeIXSZpOdiyxoh5BIyypCzSFQZDGLwz0Q9gyWbW1XpxQJm68Q==}
- engines: {node: '>= 14'}
- dev: true
-
- /@intlify/shared/9.3.0-beta.12:
- resolution: {integrity: sha512-WsmaS54sA8xuwezPKpa/OMoaX1v2VF2fCgAmYS6prDr2ir0CkUFWPm9A8ilmxzv4nkS61/v8+vf4lGGkn5uBdA==}
+ /@intlify/shared/9.3.0-beta.14:
+ resolution: {integrity: sha512-mJ/rFan+4uVsBAQSCAJnpQaPvSjQ49mJMNmGelTUbTDAmgf0oexYxwqtKOlFFyY3hmQ8lUDYaGQKuYrFgRuHnA==}
engines: {node: '>= 14'}
dev: true
@@ -1054,7 +1048,7 @@ packages:
optional: true
dependencies:
'@intlify/bundle-utils': 3.4.0_vue-i18n@9.2.2
- '@intlify/shared': 9.3.0-beta.12
+ '@intlify/shared': 9.3.0-beta.14
'@rollup/pluginutils': 4.2.1
'@vue/compiler-sfc': 3.2.45
debug: 4.3.4
@@ -1285,8 +1279,8 @@ packages:
resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
dev: false
- /@typescript-eslint/eslint-plugin/5.48.0_k73wpmdolxikpyqun3p36akaaq:
- resolution: {integrity: sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ==}
+ /@typescript-eslint/eslint-plugin/5.48.1_3jon24igvnqaqexgwtxk6nkpse:
+ resolution: {integrity: sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
@@ -1296,10 +1290,10 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.48.0_iukboom6ndih5an6iafl45j2fe
- '@typescript-eslint/scope-manager': 5.48.0
- '@typescript-eslint/type-utils': 5.48.0_iukboom6ndih5an6iafl45j2fe
- '@typescript-eslint/utils': 5.48.0_iukboom6ndih5an6iafl45j2fe
+ '@typescript-eslint/parser': 5.48.1_iukboom6ndih5an6iafl45j2fe
+ '@typescript-eslint/scope-manager': 5.48.1
+ '@typescript-eslint/type-utils': 5.48.1_iukboom6ndih5an6iafl45j2fe
+ '@typescript-eslint/utils': 5.48.1_iukboom6ndih5an6iafl45j2fe
debug: 4.3.4
eslint: 8.31.0
ignore: 5.2.1
@@ -1312,8 +1306,8 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/parser/5.48.0_iukboom6ndih5an6iafl45j2fe:
- resolution: {integrity: sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg==}
+ /@typescript-eslint/parser/5.48.1_iukboom6ndih5an6iafl45j2fe:
+ resolution: {integrity: sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@@ -1322,9 +1316,9 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/scope-manager': 5.48.0
- '@typescript-eslint/types': 5.48.0
- '@typescript-eslint/typescript-estree': 5.48.0_typescript@4.9.4
+ '@typescript-eslint/scope-manager': 5.48.1
+ '@typescript-eslint/types': 5.48.1
+ '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4
debug: 4.3.4
eslint: 8.31.0
typescript: 4.9.4
@@ -1332,16 +1326,16 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/scope-manager/5.48.0:
- resolution: {integrity: sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow==}
+ /@typescript-eslint/scope-manager/5.48.1:
+ resolution: {integrity: sha512-S035ueRrbxRMKvSTv9vJKIWgr86BD8s3RqoRZmsSh/s8HhIs90g6UlK8ZabUSjUZQkhVxt7nmZ63VJ9dcZhtDQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
- '@typescript-eslint/types': 5.48.0
- '@typescript-eslint/visitor-keys': 5.48.0
+ '@typescript-eslint/types': 5.48.1
+ '@typescript-eslint/visitor-keys': 5.48.1
dev: true
- /@typescript-eslint/type-utils/5.48.0_iukboom6ndih5an6iafl45j2fe:
- resolution: {integrity: sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g==}
+ /@typescript-eslint/type-utils/5.48.1_iukboom6ndih5an6iafl45j2fe:
+ resolution: {integrity: sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
@@ -1350,8 +1344,8 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/typescript-estree': 5.48.0_typescript@4.9.4
- '@typescript-eslint/utils': 5.48.0_iukboom6ndih5an6iafl45j2fe
+ '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4
+ '@typescript-eslint/utils': 5.48.1_iukboom6ndih5an6iafl45j2fe
debug: 4.3.4
eslint: 8.31.0
tsutils: 3.21.0_typescript@4.9.4
@@ -1360,13 +1354,13 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/types/5.48.0:
- resolution: {integrity: sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw==}
+ /@typescript-eslint/types/5.48.1:
+ resolution: {integrity: sha512-xHyDLU6MSuEEdIlzrrAerCGS3T7AA/L8Hggd0RCYBi0w3JMvGYxlLlXHeg50JI9Tfg5MrtsfuNxbS/3zF1/ATg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
- /@typescript-eslint/typescript-estree/5.48.0_typescript@4.9.4:
- resolution: {integrity: sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw==}
+ /@typescript-eslint/typescript-estree/5.48.1_typescript@4.9.4:
+ resolution: {integrity: sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
@@ -1374,8 +1368,8 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/types': 5.48.0
- '@typescript-eslint/visitor-keys': 5.48.0
+ '@typescript-eslint/types': 5.48.1
+ '@typescript-eslint/visitor-keys': 5.48.1
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
@@ -1386,17 +1380,17 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/utils/5.48.0_iukboom6ndih5an6iafl45j2fe:
- resolution: {integrity: sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ==}
+ /@typescript-eslint/utils/5.48.1_iukboom6ndih5an6iafl45j2fe:
+ resolution: {integrity: sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@types/json-schema': 7.0.11
'@types/semver': 7.3.13
- '@typescript-eslint/scope-manager': 5.48.0
- '@typescript-eslint/types': 5.48.0
- '@typescript-eslint/typescript-estree': 5.48.0_typescript@4.9.4
+ '@typescript-eslint/scope-manager': 5.48.1
+ '@typescript-eslint/types': 5.48.1
+ '@typescript-eslint/typescript-estree': 5.48.1_typescript@4.9.4
eslint: 8.31.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.31.0
@@ -1406,11 +1400,11 @@ packages:
- typescript
dev: true
- /@typescript-eslint/visitor-keys/5.48.0:
- resolution: {integrity: sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q==}
+ /@typescript-eslint/visitor-keys/5.48.1:
+ resolution: {integrity: sha512-Ns0XBwmfuX7ZknznfXozgnydyR8F6ev/KEGePP4i74uL3ArsKbEhJ7raeKr1JSa997DBDwol/4a0Y+At82c9dA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
- '@typescript-eslint/types': 5.48.0
+ '@typescript-eslint/types': 5.48.1
eslint-visitor-keys: 3.3.0
dev: true
@@ -1498,30 +1492,30 @@ packages:
vue: 3.2.45
dev: true
- /@volar/language-core/1.0.22:
- resolution: {integrity: sha512-hiJeCOqxNdtG/04FRGLGI9H9DVz2l6cTqPDBzwqplHXAWfMxjzUaGUrn9sfTG7YMFNZUgK4EYxJnRfhqdtbSFQ==}
+ /@volar/language-core/1.0.24:
+ resolution: {integrity: sha512-vTN+alJiWwK0Pax6POqrmevbtFW2dXhjwWiW/MW4f48eDYPLdyURWcr8TixO7EN/nHsUBj2udT7igFKPtjyAKg==}
dependencies:
- '@volar/source-map': 1.0.22
+ '@volar/source-map': 1.0.24
muggle-string: 0.1.0
dev: true
- /@volar/source-map/1.0.22:
- resolution: {integrity: sha512-cv4gypHSP4MWVR82ed/+1IpI6794qAl0Q0+KJ+VGMVF8rVugsiF9QbyMCgjel9wNRsssQsazzsf6txOR9vHQiw==}
+ /@volar/source-map/1.0.24:
+ resolution: {integrity: sha512-Qsv/tkplx18pgBr8lKAbM1vcDqgkGKQzbChg6NW+v0CZc3G7FLmK+WrqEPzKlN7Cwdc6XVL559Nod8WKAfKr4A==}
dependencies:
muggle-string: 0.1.0
dev: true
- /@volar/typescript/1.0.22:
- resolution: {integrity: sha512-VPyEicealSD4gqlE5/UQ1j3ietsO6Hfat40KtUEh/K+XEZ7h02b1KgFV64YEuBkBOaZ5hgvRW/WXKtQgXCl7Iw==}
+ /@volar/typescript/1.0.24:
+ resolution: {integrity: sha512-f8hCSk+PfKR1/RQHxZ79V1NpDImHoivqoizK+mstphm25tn/YJ/JnKNjZHB+o21fuW0yKlI26NV3jkVb2Cc/7A==}
dependencies:
- '@volar/language-core': 1.0.22
+ '@volar/language-core': 1.0.24
dev: true
- /@volar/vue-language-core/1.0.22:
- resolution: {integrity: sha512-Ki0G/ZdBj2/GLw+/VVH3n9XR/JL6krMIth02EekFn6JV4PGN3mNxbvoh6lOPSDZLR6biOU5nJPnnjpKy8nuXhw==}
+ /@volar/vue-language-core/1.0.24:
+ resolution: {integrity: sha512-2NTJzSgrwKu6uYwPqLiTMuAzi7fAY3yFy5PJ255bGJc82If0Xr+cW8pC80vpjG0D/aVLmlwAdO4+Ya2BI8GdDg==}
dependencies:
- '@volar/language-core': 1.0.22
- '@volar/source-map': 1.0.22
+ '@volar/language-core': 1.0.24
+ '@volar/source-map': 1.0.24
'@vue/compiler-dom': 3.2.45
'@vue/compiler-sfc': 3.2.45
'@vue/reactivity': 3.2.45
@@ -1530,11 +1524,11 @@ packages:
vue-template-compiler: 2.7.14
dev: true
- /@volar/vue-typescript/1.0.22:
- resolution: {integrity: sha512-2T1o5z86PAev31OMtVOv/qp4P3ZVl9ln/2KTmykQE8Fh4A5F+868MW4nf5J7XQ6RNyx7RH9LhzgjvbqJpAfiYw==}
+ /@volar/vue-typescript/1.0.24:
+ resolution: {integrity: sha512-9a25oHDvGaNC0okRS47uqJI6FxY4hUQZUsxeOUFHcqVxZEv8s17LPuP/pMMXyz7jPygrZubB/qXqHY5jEu/akA==}
dependencies:
- '@volar/typescript': 1.0.22
- '@volar/vue-language-core': 1.0.22
+ '@volar/typescript': 1.0.24
+ '@volar/vue-language-core': 1.0.24
dev: true
/@vue/babel-helper-vue-transform-on/1.0.2:
@@ -1583,7 +1577,7 @@ packages:
'@vue/shared': 3.2.45
estree-walker: 2.0.2
magic-string: 0.25.9
- postcss: 8.4.20
+ postcss: 8.4.21
source-map: 0.6.1
/@vue/compiler-ssr/3.2.45:
@@ -2066,7 +2060,7 @@ packages:
hasBin: true
dev: true
- /autoprefixer/10.4.13_postcss@8.4.20:
+ /autoprefixer/10.4.13_postcss@8.4.21:
resolution: {integrity: sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==}
engines: {node: ^10 || ^12 || >=14}
hasBin: true
@@ -2078,7 +2072,7 @@ packages:
fraction.js: 4.2.0
normalize-range: 0.1.2
picocolors: 1.0.0
- postcss: 8.4.20
+ postcss: 8.4.21
postcss-value-parser: 4.2.0
dev: true
@@ -3013,12 +3007,12 @@ packages:
eslint: 8.31.0
dev: true
- /eslint-define-config/1.13.0:
- resolution: {integrity: sha512-d0BfmPGBcMusfiz6QY/piAhWaEyJriJtvk9SHfuJzI7am9k4ce07SfmPkpcR0ckXNyu4FBons10akOO2Tx+X+Q==}
+ /eslint-define-config/1.14.0:
+ resolution: {integrity: sha512-NREt5SzMwKmLAY28YdaqIiTSJxfPpuZ+1ZLJxY2Wbj02dYF4QX81z0q9MPMjZB8C+SlCu66qAhcPpFJyhXOiuA==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13', pnpm: '>= 7.0.0'}
dev: true
- /eslint-plugin-prettier/4.2.1_32m5uc2milwdw3tnkcq5del26y:
+ /eslint-plugin-prettier/4.2.1_iu5s7nk6dw7o3tajefwfiqfmge:
resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==}
engines: {node: '>=12.0.0'}
peerDependencies:
@@ -3031,12 +3025,12 @@ packages:
dependencies:
eslint: 8.31.0
eslint-config-prettier: 8.6.0_eslint@8.31.0
- prettier: 2.8.1
+ prettier: 2.8.2
prettier-linter-helpers: 1.0.0
dev: true
- /eslint-plugin-vue/9.8.0_eslint@8.31.0:
- resolution: {integrity: sha512-E/AXwcTzunyzM83C2QqDHxepMzvI2y6x+mmeYHbVDQlKFqmKYvRrhaVixEeeG27uI44p9oKDFiyCRw4XxgtfHA==}
+ /eslint-plugin-vue/9.9.0_eslint@8.31.0:
+ resolution: {integrity: sha512-YbubS7eK0J7DCf0U2LxvVP7LMfs6rC6UltihIgval3azO3gyDwEGVgsCMe1TmDiEkl6GdMKfRpaME6QxIYtzDQ==}
engines: {node: ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.2.0 || ^7.0.0 || ^8.0.0
@@ -3045,7 +3039,7 @@ packages:
eslint-utils: 3.0.0_eslint@8.31.0
natural-compare: 1.4.0
nth-check: 2.1.1
- postcss-selector-parser: 6.0.10
+ postcss-selector-parser: 6.0.11
semver: 7.3.8
vue-eslint-parser: 9.1.0_eslint@8.31.0
xml-name-validator: 4.0.0
@@ -4506,7 +4500,7 @@ packages:
dev: false
/nanoid/3.3.4:
- resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/nanoid/-/nanoid-3.3.4.tgz}
+ resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
@@ -4848,8 +4842,8 @@ packages:
dependencies:
htmlparser2: 8.0.1
js-tokens: 8.0.0
- postcss: 8.4.20
- postcss-safe-parser: 6.0.0_postcss@8.4.20
+ postcss: 8.4.21
+ postcss-safe-parser: 6.0.0_postcss@8.4.21
dev: true
/postcss-media-query-parser/0.2.3:
@@ -4868,30 +4862,22 @@ packages:
resolution: {integrity: sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==}
dev: true
- /postcss-safe-parser/6.0.0_postcss@8.4.20:
+ /postcss-safe-parser/6.0.0_postcss@8.4.21:
resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==}
engines: {node: '>=12.0'}
peerDependencies:
postcss: ^8.3.3
dependencies:
- postcss: 8.4.20
+ postcss: 8.4.21
dev: true
- /postcss-scss/4.0.6_postcss@8.4.20:
+ /postcss-scss/4.0.6_postcss@8.4.21:
resolution: {integrity: sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==}
engines: {node: '>=12.0'}
peerDependencies:
postcss: ^8.4.19
dependencies:
- postcss: 8.4.20
- dev: true
-
- /postcss-selector-parser/6.0.10:
- resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==}
- engines: {node: '>=4'}
- dependencies:
- cssesc: 3.0.0
- util-deprecate: 1.0.2
+ postcss: 8.4.21
dev: true
/postcss-selector-parser/6.0.11:
@@ -4902,12 +4888,12 @@ packages:
util-deprecate: 1.0.2
dev: true
- /postcss-sorting/7.0.1_postcss@8.4.20:
- resolution: {integrity: sha512-iLBFYz6VRYyLJEJsBJ8M3TCqNcckVzz4wFounSc5Oez35ogE/X+aoC5fFu103Ot7NyvjU3/xqIXn93Gp3kJk4g==}
+ /postcss-sorting/8.0.1_postcss@8.4.21:
+ resolution: {integrity: sha512-go9Zoxx7KQH+uLrJ9xa5wRErFeXu01ydA6O8m7koPXkmAN7Ts//eRcIqjo0stBR4+Nir2gMYDOWAOx7O5EPUZA==}
peerDependencies:
- postcss: ^8.3.9
+ postcss: ^8.4.20
dependencies:
- postcss: 8.4.20
+ postcss: 8.4.21
dev: true
/postcss-value-parser/4.2.0:
@@ -4924,8 +4910,8 @@ packages:
supports-color: 3.2.3
dev: true
- /postcss/8.4.20:
- resolution: {integrity: sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/postcss/-/postcss-8.4.20.tgz}
+ /postcss/8.4.21:
+ resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==}
engines: {node: ^10 || ^12 || >=14}
dependencies:
nanoid: 3.3.4
@@ -4983,8 +4969,8 @@ packages:
fast-diff: 1.2.0
dev: true
- /prettier/2.8.1:
- resolution: {integrity: sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==}
+ /prettier/2.8.2:
+ resolution: {integrity: sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==}
engines: {node: '>=10.13.0'}
hasBin: true
dev: true
@@ -5206,6 +5192,12 @@ packages:
glob: 7.2.3
dev: true
+ /rimraf/4.0.4:
+ resolution: {integrity: sha512-R0hoVr9xTwemarQjoWlNt/nb5dEGVTBhVdkRmEX2zEkT8T6onH0XKiGjuaC7rNNj/gYzY2p4NVRJ3sjO1ascHQ==}
+ engines: {node: '>=14'}
+ hasBin: true
+ dev: true
+
/rollup-plugin-purge-icons/0.9.1:
resolution: {integrity: sha512-hRDKBsPUz47UMdBufki2feTmBF2ClEJlYqL7N6vpVAHSLd7V2BJUaNKOF7YYbLMofVVF+9hm44YSkYO6k9hUgg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/rollup-plugin-purge-icons/-/rollup-plugin-purge-icons-0.9.1.tgz}
engines: {node: '>= 12'}
@@ -5225,8 +5217,8 @@ packages:
fsevents: 2.3.2
dev: true
- /rollup/3.9.1:
- resolution: {integrity: sha512-GswCYHXftN8ZKGVgQhTFUJB/NBXxrRGgO2NCy6E8s1rwEJ4Q9/VttNqcYfEvx4dTo4j58YqdC3OVztPzlKSX8w==}
+ /rollup/3.10.0:
+ resolution: {integrity: sha512-JmRYz44NjC1MjVF2VKxc0M1a97vn+cDxeqWmnwyAF4FvpjK8YFdHpaqvQB+3IxCvX05vJxKZkoMDU8TShhmJVA==}
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
hasBin: true
optionalDependencies:
@@ -5428,7 +5420,7 @@ packages:
dev: true
/source-map-js/1.0.2:
- resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/source-map-js/-/source-map-js-1.0.2.tgz}
+ resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
/source-map-resolve/0.5.3:
@@ -5636,13 +5628,13 @@ packages:
stylelint-config-recommended: 9.0.0_stylelint@14.16.1
dev: true
- /stylelint-order/5.0.0_stylelint@14.16.1:
- resolution: {integrity: sha512-OWQ7pmicXufDw5BlRqzdz3fkGKJPgLyDwD1rFY3AIEfIH/LQY38Vu/85v8/up0I+VPiuGRwbc2Hg3zLAsJaiyw==}
+ /stylelint-order/6.0.1_stylelint@14.16.1:
+ resolution: {integrity: sha512-C9gJDZArRBZvn+4MPgggwYTp7dK49WPnYa5+6tBEkZnW/YWj4xBVNJdQjIik14w5orlF9RqFpYDHN0FPWIFOSQ==}
peerDependencies:
stylelint: ^14.0.0
dependencies:
- postcss: 8.4.20
- postcss-sorting: 7.0.1_postcss@8.4.20
+ postcss: 8.4.21
+ postcss-sorting: 8.0.1_postcss@8.4.21
stylelint: 14.16.1
dev: true
@@ -5651,7 +5643,7 @@ packages:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
hasBin: true
dependencies:
- '@csstools/selector-specificity': 2.0.2_2xshye3abirqjlplmebvmaxyna
+ '@csstools/selector-specificity': 2.0.2_wajs5nedgkikc5pcuwett7legi
balanced-match: 2.0.0
colord: 2.9.3
cosmiconfig: 7.1.0
@@ -5674,10 +5666,10 @@ packages:
micromatch: 4.0.5
normalize-path: 3.0.0
picocolors: 1.0.0
- postcss: 8.4.20
+ postcss: 8.4.21
postcss-media-query-parser: 0.2.3
postcss-resolve-nested-selector: 0.1.1
- postcss-safe-parser: 6.0.0_postcss@8.4.20
+ postcss-safe-parser: 6.0.0_postcss@8.4.21
postcss-selector-parser: 6.0.11
postcss-value-parser: 4.2.0
resolve-from: 5.0.0
@@ -6211,9 +6203,9 @@ packages:
dependencies:
'@types/node': 18.11.18
esbuild: 0.16.5
- postcss: 8.4.20
+ postcss: 8.4.21
resolve: 1.22.1
- rollup: 3.9.1
+ rollup: 3.10.0
sass: 1.57.1
terser: 5.16.1
optionalDependencies:
@@ -6281,14 +6273,14 @@ packages:
he: 1.2.0
dev: true
- /vue-tsc/1.0.22_typescript@4.9.4:
- resolution: {integrity: sha512-xSxwgWR3czhv7sLKHWu6lzj9Xq6AtsCURVL45AY4TLGFszv2L2YlMgygXvqslyCM5bz9cyoIKSaZnzHqHTHjzA==}
+ /vue-tsc/1.0.24_typescript@4.9.4:
+ resolution: {integrity: sha512-mmU1s5SAqE1nByQAiQnao9oU4vX+mSdsgI8H57SfKH6UVzq/jP9+Dbi2GaV+0b4Cn361d2ln8m6xeU60ApiEXg==}
hasBin: true
peerDependencies:
typescript: '*'
dependencies:
- '@volar/vue-language-core': 1.0.22
- '@volar/vue-typescript': 1.0.22
+ '@volar/vue-language-core': 1.0.24
+ '@volar/vue-typescript': 1.0.24
typescript: 4.9.4
dev: true
@@ -6314,8 +6306,8 @@ packages:
'@vue/server-renderer': 3.2.45_vue@3.2.45
'@vue/shared': 3.2.45
- /vxe-table/4.3.7_vue@3.2.45+xe-utils@3.5.7:
- resolution: {integrity: sha512-v+d7eEQ5uqtVTQCts4xkW0S15LZcIuEukYHGXI53SdoUj2gLFggPYAxQr1y659CM/ESRWPz9LNVHpd97KkjGHw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npm.taobao.org/vxe-table/-/vxe-table-4.3.7.tgz}
+ /vxe-table/4.3.9_vue@3.2.45+xe-utils@3.5.7:
+ resolution: {integrity: sha512-Ns7Ooa7lOHBpks90i0k0BMNyxfMpUo39ryxTgKE41X3xVnI9tGQs2U6+klfDlsuqYfmG3ibyzHN3OCrWbbKo4Q==}
peerDependencies:
vue: ^3.2.28
xe-utils: ^3.5.0
diff --git a/yudao-ui-admin-vue3/src/components/XTable/src/style/dark.scss b/yudao-ui-admin-vue3/src/components/XTable/src/style/dark.scss
index 4e87c4b39..d981b0418 100644
--- a/yudao-ui-admin-vue3/src/components/XTable/src/style/dark.scss
+++ b/yudao-ui-admin-vue3/src/components/XTable/src/style/dark.scss
@@ -78,4 +78,4 @@ $vxe-modal-border-color: #3b3b3b;
/*pulldown*/
$vxe-pulldown-panel-background-color: #262626 !default;
-@import 'vxe-table/styles/index';
+@import 'vxe-table/styles/index.scss';
diff --git a/yudao-ui-admin-vue3/src/components/XTable/src/style/index.scss b/yudao-ui-admin-vue3/src/components/XTable/src/style/index.scss
index 350ce0c09..e37af37a8 100644
--- a/yudao-ui-admin-vue3/src/components/XTable/src/style/index.scss
+++ b/yudao-ui-admin-vue3/src/components/XTable/src/style/index.scss
@@ -1,5 +1,5 @@
-@import 'vxe-table/styles/variable.scss';
-@import 'vxe-table/styles/modules.scss';
+// @import 'vxe-table/styles/variable.scss';
+// @import 'vxe-table/styles/modules.scss';
// @import './theme/light.scss';
i {
border-color: initial;
diff --git a/yudao-ui-admin-vue3/src/components/XTable/src/style/light.scss b/yudao-ui-admin-vue3/src/components/XTable/src/style/light.scss
index f979155ef..f2f1309f4 100644
--- a/yudao-ui-admin-vue3/src/components/XTable/src/style/light.scss
+++ b/yudao-ui-admin-vue3/src/components/XTable/src/style/light.scss
@@ -13,4 +13,4 @@ $vxe-danger-color: #f56c6c !default;
$vxe-disabled-color: #bfbfbf !default;
$vxe-primary-disabled-color: #c0c4cc !default;
-@import 'vxe-table/styles/index';
+@import 'vxe-table/styles/index.scss';
diff --git a/yudao-ui-admin-vue3/src/main.ts b/yudao-ui-admin-vue3/src/main.ts
index e7c935a28..e4511d9b1 100644
--- a/yudao-ui-admin-vue3/src/main.ts
+++ b/yudao-ui-admin-vue3/src/main.ts
@@ -35,6 +35,8 @@ import { createApp } from 'vue'
import App from './App.vue'
+import './permission'
+
// 创建实例
const setupAll = async () => {
const app = createApp(App)
diff --git a/yudao-ui-admin-vue3/src/permission.ts b/yudao-ui-admin-vue3/src/permission.ts
new file mode 100644
index 000000000..bcba0119d
--- /dev/null
+++ b/yudao-ui-admin-vue3/src/permission.ts
@@ -0,0 +1,70 @@
+import router from './router'
+import type { RouteRecordRaw } from 'vue-router'
+import { isRelogin } from '@/config/axios/service'
+import { getAccessToken } from '@/utils/auth'
+import { useTitle } from '@/hooks/web/useTitle'
+import { useNProgress } from '@/hooks/web/useNProgress'
+import { usePageLoading } from '@/hooks/web/usePageLoading'
+import { useDictStoreWithOut } from '@/store/modules/dict'
+import { useUserStoreWithOut } from '@/store/modules/user'
+import { usePermissionStoreWithOut } from '@/store/modules/permission'
+
+const { start, done } = useNProgress()
+
+const { loadStart, loadDone } = usePageLoading()
+// 路由不重定向白名单
+const whiteList = [
+ '/login',
+ '/social-login',
+ '/auth-redirect',
+ '/bind',
+ '/register',
+ '/oauthLogin/gitee'
+]
+
+// 路由加载前
+router.beforeEach(async (to, from, next) => {
+ start()
+ loadStart()
+ if (getAccessToken()) {
+ if (to.path === '/login') {
+ next({ path: '/' })
+ } else {
+ // 获取所有字典
+ const dictStore = useDictStoreWithOut()
+ const userStore = useUserStoreWithOut()
+ const permissionStore = usePermissionStoreWithOut()
+ if (!dictStore.getIsSetDict) {
+ dictStore.setDictMap()
+ }
+ if (!userStore.getIsSetUser) {
+ isRelogin.show = true
+ await userStore.setUserInfoAction()
+ isRelogin.show = false
+ // 后端过滤菜单
+ await permissionStore.generateRoutes()
+ permissionStore.getAddRouters.forEach((route) => {
+ router.addRoute(route as unknown as RouteRecordRaw) // 动态添加可访问路由表
+ })
+ const redirectPath = from.query.redirect || to.path
+ const redirect = decodeURIComponent(redirectPath as string)
+ const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect }
+ next(nextData)
+ } else {
+ next()
+ }
+ }
+ } else {
+ if (whiteList.indexOf(to.path) !== -1) {
+ next()
+ } else {
+ next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+ }
+ }
+})
+
+router.afterEach((to) => {
+ useTitle(to?.meta?.title as string)
+ done() // 结束Progress
+ loadDone()
+})
diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/index.scss b/yudao-ui-admin-vue3/src/plugins/vxeTable/index.scss
deleted file mode 100644
index 350ce0c09..000000000
--- a/yudao-ui-admin-vue3/src/plugins/vxeTable/index.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-@import 'vxe-table/styles/variable.scss';
-@import 'vxe-table/styles/modules.scss';
-// @import './theme/light.scss';
-i {
- border-color: initial;
-}
diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/theme/dark.scss b/yudao-ui-admin-vue3/src/plugins/vxeTable/theme/dark.scss
deleted file mode 100644
index 4e87c4b39..000000000
--- a/yudao-ui-admin-vue3/src/plugins/vxeTable/theme/dark.scss
+++ /dev/null
@@ -1,81 +0,0 @@
-// 修改样式变量
-//@import 'vxe-table/styles/variable.scss';
-
-/*font*/
-$vxe-font-color: #e5e7eb;
-// $vxe-font-size: 14px !default;
-// $vxe-font-size-medium: 16px !default;
-// $vxe-font-size-small: 14px !default;
-// $vxe-font-size-mini: 12px !default;
-
-/*color*/
-$vxe-primary-color: #409eff !default;
-$vxe-success-color: #67c23a !default;
-$vxe-info-color: #909399 !default;
-$vxe-warning-color: #e6a23c !default;
-$vxe-danger-color: #f56c6c !default;
-$vxe-disabled-color: #bfbfbf !default;
-$vxe-primary-disabled-color: #c0c4cc !default;
-
-/*loading*/
-$vxe-loading-color: $vxe-primary-color !default;
-$vxe-loading-background-color: #1d1e1f !default;
-$vxe-loading-z-index: 999 !default;
-
-/*icon*/
-$vxe-icon-font-family: Verdana, Arial, Tahoma !default;
-$vxe-icon-background-color: #e5e7eb !default;
-
-/*toolbar*/
-$vxe-toolbar-background-color: #1d1e1f !default;
-$vxe-toolbar-button-border: #dcdfe6 !default;
-$vxe-toolbar-custom-active-background-color: #d9dadb !default;
-$vxe-toolbar-panel-background-color: #e5e7eb !default;
-
-$vxe-table-font-color: #e5e7eb;
-$vxe-table-header-background-color: #1d1e1f;
-$vxe-table-body-background-color: #141414;
-$vxe-table-row-striped-background-color: #1d1d1d;
-$vxe-table-row-hover-background-color: #1d1e1f;
-$vxe-table-row-hover-striped-background-color: #1e1e1e;
-$vxe-table-footer-background-color: #1d1e1f;
-$vxe-table-row-current-background-color: #302d2d;
-$vxe-table-column-current-background-color: #302d2d;
-$vxe-table-column-hover-background-color: #302d2d;
-$vxe-table-row-hover-current-background-color: #302d2d;
-$vxe-table-row-checkbox-checked-background-color: #3e3c37 !default;
-$vxe-table-row-hover-checkbox-checked-background-color: #615a4a !default;
-$vxe-table-menu-background-color: #1d1e1f;
-$vxe-table-border-width: 1px !default;
-$vxe-table-border-color: #4c4d4f !default;
-$vxe-table-fixed-left-scrolling-box-shadow: 8px 0px 10px -5px rgba(0, 0, 0, 0.12) !default;
-$vxe-table-fixed-right-scrolling-box-shadow: -8px 0px 10px -5px rgba(0, 0, 0, 0.12) !default;
-
-$vxe-form-background-color: #141414;
-
-/*pager*/
-$vxe-pager-background-color: #1d1e1f !default;
-$vxe-pager-perfect-background-color: #262727 !default;
-$vxe-pager-perfect-button-background-color: #a7a3a3 !default;
-
-$vxe-input-background-color: #141414;
-$vxe-input-border-color: #4c4d4f !default;
-
-$vxe-select-option-hover-background-color: #262626 !default;
-$vxe-select-panel-background-color: #141414 !default;
-$vxe-select-empty-color: #262626 !default;
-$vxe-optgroup-title-color: #909399 !default;
-
-/*button*/
-$vxe-button-default-background-color: #262626;
-$vxe-button-dropdown-panel-background-color: #141414;
-
-/*modal*/
-$vxe-modal-header-background-color: #141414;
-$vxe-modal-body-background-color: #141414;
-$vxe-modal-border-color: #3b3b3b;
-
-/*pulldown*/
-$vxe-pulldown-panel-background-color: #262626 !default;
-
-@import 'vxe-table/styles/index';
diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/theme/light.scss b/yudao-ui-admin-vue3/src/plugins/vxeTable/theme/light.scss
deleted file mode 100644
index f2f1309f4..000000000
--- a/yudao-ui-admin-vue3/src/plugins/vxeTable/theme/light.scss
+++ /dev/null
@@ -1,16 +0,0 @@
-// 修改样式变量
-// /*font*/
-// $vxe-font-size: 12px !default;
-// $vxe-font-size-medium: 16px !default;
-// $vxe-font-size-small: 14px !default;
-// $vxe-font-size-mini: 12px !default;
-/*color*/
-$vxe-primary-color: #409eff !default;
-$vxe-success-color: #67c23a !default;
-$vxe-info-color: #909399 !default;
-$vxe-warning-color: #e6a23c !default;
-$vxe-danger-color: #f56c6c !default;
-$vxe-disabled-color: #bfbfbf !default;
-$vxe-primary-disabled-color: #c0c4cc !default;
-
-@import 'vxe-table/styles/index.scss';
diff --git a/yudao-ui-admin-vue3/src/router/index.ts b/yudao-ui-admin-vue3/src/router/index.ts
index f5fb53dd6..02d913f86 100644
--- a/yudao-ui-admin-vue3/src/router/index.ts
+++ b/yudao-ui-admin-vue3/src/router/index.ts
@@ -2,19 +2,6 @@ import type { App } from 'vue'
import type { RouteRecordRaw } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
import remainingRouter from './modules/remaining'
-import { isRelogin } from '@/config/axios/service'
-import { getAccessToken } from '@/utils/auth'
-import { useTitle } from '@/hooks/web/useTitle'
-import { useNProgress } from '@/hooks/web/useNProgress'
-import { usePageLoading } from '@/hooks/web/usePageLoading'
-import { useDictStoreWithOut } from '@/store/modules/dict'
-import { useUserStoreWithOut } from '@/store/modules/user'
-import { usePermissionStoreWithOut } from '@/store/modules/permission'
-import { getInfoApi } from '@/api/login'
-
-const { start, done } = useNProgress()
-
-const { loadStart, loadDone } = usePageLoading()
// 创建路由实例
const router = createRouter({
@@ -24,64 +11,6 @@ const router = createRouter({
scrollBehavior: () => ({ left: 0, top: 0 })
})
-// 路由不重定向白名单
-const whiteList = [
- '/login',
- '/social-login',
- '/auth-redirect',
- '/bind',
- '/register',
- '/oauthLogin/gitee'
-]
-
-// 路由加载前
-router.beforeEach(async (to, from, next) => {
- start()
- loadStart()
- if (getAccessToken()) {
- if (to.path === '/login') {
- next({ path: '/' })
- } else {
- // 获取所有字典
- const dictStore = useDictStoreWithOut()
- const userStore = useUserStoreWithOut()
- const permissionStore = usePermissionStoreWithOut()
- if (!dictStore.getIsSetDict) {
- dictStore.setDictMap()
- }
- if (!userStore.getIsSetUser) {
- isRelogin.show = true
- const res = await getInfoApi()
- await userStore.setUserInfoAction(res)
- isRelogin.show = false
- // 后端过滤菜单
- await permissionStore.generateRoutes()
- permissionStore.getAddRouters.forEach((route) => {
- router.addRoute(route as unknown as RouteRecordRaw) // 动态添加可访问路由表
- })
- const redirectPath = from.query.redirect || to.path
- const redirect = decodeURIComponent(redirectPath as string)
- const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect }
- next(nextData)
- } else {
- next()
- }
- }
- } else {
- if (whiteList.indexOf(to.path) !== -1) {
- next()
- } else {
- next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
- }
- }
-})
-
-router.afterEach((to) => {
- useTitle(to?.meta?.title as string)
- done() // 结束Progress
- loadDone()
-})
-
export const resetRouter = (): void => {
const resetWhiteNameList = ['Redirect', 'Login', 'NoFind', 'Root']
router.getRoutes().forEach((route) => {
diff --git a/yudao-ui-admin-vue3/src/store/modules/user.ts b/yudao-ui-admin-vue3/src/store/modules/user.ts
index d4f4df55e..2621e2dff 100644
--- a/yudao-ui-admin-vue3/src/store/modules/user.ts
+++ b/yudao-ui-admin-vue3/src/store/modules/user.ts
@@ -2,6 +2,7 @@ import { store } from '../index'
import { defineStore } from 'pinia'
import { getAccessToken, removeToken } from '@/utils/auth'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
+import { getInfoApi } from '@/api/login'
const { wsCache } = useCache()
@@ -43,11 +44,15 @@ export const useUserStore = defineStore('admin-user', {
}
},
actions: {
- async setUserInfoAction(userInfo: UserInfoVO) {
+ async setUserInfoAction() {
if (!getAccessToken()) {
this.resetState()
return null
}
+ let userInfo = wsCache.get(CACHE_KEY.USER)
+ if (!userInfo) {
+ userInfo = await getInfoApi()
+ }
this.permissions = userInfo.permissions
this.roles = userInfo.roles
this.user = userInfo.user
diff --git a/yudao-ui-admin-vue3/src/styles/variables.scss b/yudao-ui-admin-vue3/src/styles/variables.scss
index 00b66f1fc..ffa78c9fc 100644
--- a/yudao-ui-admin-vue3/src/styles/variables.scss
+++ b/yudao-ui-admin-vue3/src/styles/variables.scss
@@ -2,3 +2,5 @@
$namespace: v;
// el命名空间
$elNamespace: el;
+// vxe命名空间
+$vxeNamespace: vxe;
diff --git a/yudao-ui-admin-vue3/src/utils/propTypes.ts b/yudao-ui-admin-vue3/src/utils/propTypes.ts
index 5d685f318..fb8f84e70 100644
--- a/yudao-ui-admin-vue3/src/utils/propTypes.ts
+++ b/yudao-ui-admin-vue3/src/utils/propTypes.ts
@@ -17,13 +17,12 @@ const propTypes = createTypes({
// 需要自定义扩展的类型
// see: https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method
-propTypes.extend([
- {
- name: 'style',
- getter: true,
- type: [String, Object],
- default: undefined
- }
-])
-
+// propTypes.extend([
+// {
+// name: 'style',
+// getter: true,
+// type: [String, Object],
+// default: undefined
+// }
+// ])
export { propTypes }
diff --git a/yudao-ui-admin-vue3/src/views/Profile/Index.vue b/yudao-ui-admin-vue3/src/views/Profile/Index.vue
index 46a218563..7c8b49dc3 100644
--- a/yudao-ui-admin-vue3/src/views/Profile/Index.vue
+++ b/yudao-ui-admin-vue3/src/views/Profile/Index.vue
@@ -8,7 +8,7 @@