mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-31 02:28:03 +08:00 
			
		
		
		
	修复滑块验证码,存在失败的情况
This commit is contained in:
		| @ -1,5 +1,6 @@ | |||||||
| package cn.iocoder.yudao.module.system.controller.admin.captcha; | package cn.iocoder.yudao.module.system.controller.admin.captcha; | ||||||
|  |  | ||||||
|  | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; | ||||||
| import com.anji.captcha.model.common.ResponseModel; | import com.anji.captcha.model.common.ResponseModel; | ||||||
| import com.anji.captcha.model.vo.CaptchaVO; | import com.anji.captcha.model.vo.CaptchaVO; | ||||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||||
| @ -22,19 +23,21 @@ import javax.servlet.http.HttpServletRequest; | |||||||
|  */ |  */ | ||||||
| @Api(tags = "管理后台 - 验证码") | @Api(tags = "管理后台 - 验证码") | ||||||
| @RestController("adminCaptchaController") | @RestController("adminCaptchaController") | ||||||
| @RequestMapping("/captcha") | @RequestMapping("/system/captcha") | ||||||
| public class CaptchaController extends com.anji.captcha.controller.CaptchaController { | public class CaptchaController extends com.anji.captcha.controller.CaptchaController { | ||||||
|  |  | ||||||
|     @PostMapping({"/get"}) |     @PostMapping({"/get"}) | ||||||
|     @ApiOperation("获得验证码") |     @ApiOperation("获得验证码") | ||||||
|     @PermitAll |     @PermitAll | ||||||
|  |     @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | ||||||
|     public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) { |     public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) { | ||||||
|         return super.get(data, request); |         return super.get(data, request); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @PostMapping({"/check"}) |     @PostMapping("/check") | ||||||
|     @ApiOperation("校验验证码") |     @ApiOperation("校验验证码") | ||||||
|     @PermitAll |     @PermitAll | ||||||
|  |     @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 | ||||||
|     public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) { |     public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) { | ||||||
|         return super.check(data, request); |         return super.check(data, request); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -673,7 +673,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod | |||||||
| /***/ (function(module, exports, __webpack_require__) { | /***/ (function(module, exports, __webpack_require__) { | ||||||
|  |  | ||||||
| "use strict"; | "use strict"; | ||||||
| eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.reqCheck = reqCheck;\nexports.reqGet = reqGet;\nvar _axios = _interopRequireDefault(__webpack_require__(/*! ./../utils/axios */ \"./src/components/Verifition/utils/axios.js\"));\n/**\n * 此处可直接引用自己项目封装好的 axios 配合后端联调\n */\n\n// 组件内部封装的axios\n// import request from \"@/api/axios.js\"       //调用项目封装的axios\n\n// 获取验证图片  以及token\nfunction reqGet(data) {\n  return (0, _axios.default)({\n    // url: '/captcha/get',\n    url: '/admin-api/captcha/get',\n    // 使用项目自定义的 /admin-api/ 前缀\n    method: 'post',\n    data: data\n  });\n}\n\n// 滑动或者点选验证\nfunction reqCheck(data) {\n  return (0, _axios.default)({\n    // url: '/captcha/check',\n    url: '/admin-api/captcha/check',\n    // 使用项目自定义的 /admin-api/ 前缀\n    method: 'post',\n    data: data\n  });\n}\n\n//# sourceURL=webpack:///./src/components/Verifition/api/index.js?"); | eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault.js */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.reqCheck = reqCheck;\nexports.reqGet = reqGet;\nvar _axios = _interopRequireDefault(__webpack_require__(/*! ./../utils/axios */ \"./src/components/Verifition/utils/axios.js\"));\n/**\n * 此处可直接引用自己项目封装好的 axios 配合后端联调\n */\n\n// 组件内部封装的axios\n// import request from \"@/api/axios.js\"       //调用项目封装的axios\n\n// 获取验证图片  以及token\nfunction reqGet(data) {\n  return (0, _axios.default)({\n    // url: '/captcha/get',\n    url: '/admin-api/system/captcha/get',\n    // 使用项目自定义的 /admin-api/ 前缀\n    method: 'post',\n    data: data\n  });\n}\n\n// 滑动或者点选验证\nfunction reqCheck(data) {\n  return (0, _axios.default)({\n    // url: '/captcha/check',\n    url: '/admin-api/system/captcha/check',\n    // 使用项目自定义的 /admin-api/ 前缀\n    method: 'post',\n    data: data\n  });\n}\n\n//# sourceURL=webpack:///./src/components/Verifition/api/index.js?"); | ||||||
|  |  | ||||||
| /***/ }), | /***/ }), | ||||||
|  |  | ||||||
|  | |||||||
										
											Binary file not shown.
										
									
								
							| @ -109,8 +109,8 @@ yudao: | |||||||
|     enable: true |     enable: true | ||||||
|     ignore-urls: |     ignore-urls: | ||||||
|       - /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号 |       - /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号 | ||||||
|       - /admin-api/captcha/get # 获取图片验证码,和租户无关 |       - /admin-api/system/captcha/get # 获取图片验证码,和租户无关 | ||||||
|       - /admin-api/captcha/check # 校验图片验证码,和租户无关 |       - /admin-api/system/captcha/check # 校验图片验证码,和租户无关 | ||||||
|       - /admin-api/infra/file/*/get/** # 获取图片,和租户无关 |       - /admin-api/infra/file/*/get/** # 获取图片,和租户无关 | ||||||
|       - /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号 |       - /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号 | ||||||
|       - /app-api/pay/order/notify/* # 支付回调通知,不携带租户编号 |       - /app-api/pay/order/notify/* # 支付回调通知,不携带租户编号 | ||||||
|  | |||||||
| @ -142,7 +142,7 @@ | |||||||
|                             } |                             } | ||||||
|                             myRequest({ |                             myRequest({ | ||||||
|                                 // url: `/captcha/check`, |                                 // url: `/captcha/check`, | ||||||
|                                 url: '/admin-api/captcha/check', // 使用项目自定义的 /admin-api/ 前缀 |                                 url: '/admin-api/system/captcha/check', // 使用项目自定义的 /admin-api/ 前缀 | ||||||
|                                 data, |                                 data, | ||||||
|                                 method:"POST", |                                 method:"POST", | ||||||
|                             }).then(result => { |                             }).then(result => { | ||||||
| @ -213,7 +213,7 @@ | |||||||
|                 } |                 } | ||||||
|                 myRequest({ |                 myRequest({ | ||||||
|                     // url: "/captcha/get", //仅为示例,并非真实接口地址。 |                     // url: "/captcha/get", //仅为示例,并非真实接口地址。 | ||||||
|                     url: '/admin-api/captcha/get', // 使用项目自定义的 /admin-api/ 前缀 |                     url: '/admin-api/system/captcha/get', // 使用项目自定义的 /admin-api/ 前缀 | ||||||
|                     data, |                     data, | ||||||
|                     method:"POST", |                     method:"POST", | ||||||
|                 }).then((result) => { |                 }).then((result) => { | ||||||
|  | |||||||
| @ -231,7 +231,7 @@ | |||||||
| 						} | 						} | ||||||
| 						myRequest({ | 						myRequest({ | ||||||
| 							// url: `/captcha/check`, | 							// url: `/captcha/check`, | ||||||
|               url: '/admin-api/captcha/check', // 使用项目自定义的 /admin-api/ 前缀 |               url: '/admin-api/system/captcha/check', // 使用项目自定义的 /admin-api/ 前缀 | ||||||
|               data, |               data, | ||||||
| 							method: "POST", | 							method: "POST", | ||||||
| 						}).then((result) => { | 						}).then((result) => { | ||||||
| @ -319,7 +319,7 @@ | |||||||
| 				} | 				} | ||||||
| 				myRequest({ | 				myRequest({ | ||||||
| 					// url: '/captcha/get', //仅为示例,并非真实接口地址。 | 					// url: '/captcha/get', //仅为示例,并非真实接口地址。 | ||||||
| 					url: '/admin-api/captcha/get', // 使用项目自定义的 /admin-api/ 前缀 | 					url: '/admin-api/system/captcha/get', // 使用项目自定义的 /admin-api/ 前缀 | ||||||
| 					data, | 					data, | ||||||
| 					method: "POST", | 					method: "POST", | ||||||
| 				}).then((result) => { | 				}).then((result) => { | ||||||
|  | |||||||
| @ -9,7 +9,7 @@ import request from './../utils/axios' //组件内部封装的axios | |||||||
| export function reqGet(data) { | export function reqGet(data) { | ||||||
|   return request({ |   return request({ | ||||||
|     // url: '/captcha/get', |     // url: '/captcha/get', | ||||||
|     url: '/admin-api/captcha/get', // 使用项目自定义的 /admin-api/ 前缀 |     url: '/admin-api/system/captcha/get', // 使用项目自定义的 /admin-api/ 前缀 | ||||||
|     method: 'post', |     method: 'post', | ||||||
|     data |     data | ||||||
|   }) |   }) | ||||||
| @ -19,7 +19,7 @@ export function reqGet(data) { | |||||||
| export function reqCheck(data) { | export function reqCheck(data) { | ||||||
|   return request({ |   return request({ | ||||||
|     // url: '/captcha/check', |     // url: '/captcha/check', | ||||||
|     url: '/admin-api/captcha/check', // 使用项目自定义的 /admin-api/ 前缀 |     url: '/admin-api/system/captcha/check', // 使用项目自定义的 /admin-api/ 前缀 | ||||||
|     method: 'post', |     method: 'post', | ||||||
|     data |     data | ||||||
|   }) |   }) | ||||||
|  | |||||||
| @ -9,7 +9,7 @@ import request from './../utils/axios' // 组件内部封装的axios | |||||||
| export function reqGet(data) { | export function reqGet(data) { | ||||||
|   return request({ |   return request({ | ||||||
|     // url: '/captcha/get', |     // url: '/captcha/get', | ||||||
|     url: '/admin-api/captcha/get', // 使用项目自定义的 /admin-api/ 前缀 |     url: '/admin-api/system/captcha/get', // 使用项目自定义的 /admin-api/ 前缀 | ||||||
|     method: 'post', |     method: 'post', | ||||||
|     data |     data | ||||||
|   }) |   }) | ||||||
| @ -19,7 +19,7 @@ export function reqGet(data) { | |||||||
| export function reqCheck(data) { | export function reqCheck(data) { | ||||||
|   return request({ |   return request({ | ||||||
|     // url: '/captcha/check', |     // url: '/captcha/check', | ||||||
|     url: '/admin-api/captcha/check', // 使用项目自定义的 /admin-api/ 前缀 |     url: '/admin-api/system/captcha/check', // 使用项目自定义的 /admin-api/ 前缀 | ||||||
|     method: 'post', |     method: 'post', | ||||||
|     data |     data | ||||||
|   }) |   }) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV