feat(REQ-5965) - 增加ctx

This commit is contained in:
wangli 2025-11-19 14:51:56 +08:00
parent 25ef7e9f58
commit 9f05c76d32

View File

@ -30,7 +30,11 @@
}
}
</script>
<!-- 其他现有代码 -->
<script th:inline="javascript">
// 全局存储上下文路径(自动包含 servlet.context.path
const ctx = [[@{/}]];
</script>
<style type="text/tailwindcss">
@layer utilities {
.form-input-focus {
@ -535,7 +539,7 @@
try {
// 构造带查询参数的URLPOST方式但参数通过URL传递
const url = `/web/process/get-auth-code?password=${encodeURIComponent(password)}`;
const url = `${ctx}web/process/get-auth-code?password=${encodeURIComponent(password)}`;
// 保持POST请求方式参数通过URL查询参数传递
const response = await fetch(url, {