Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weixin build #4

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions dinting-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 使用官方的 Java 17 JDK 镜像
FROM openjdk:17-jdk-slim

# 安装 Maven
RUN apt-get update && \
apt-get install -y maven && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# 设置工作目录
WORKDIR /app

# 复制 Maven 项目文件
COPY pom.xml .
COPY src ./src

# 构建项目
RUN mvn install -DskipTests

# 暴露应用程序运行的端口
EXPOSE 8888

# 运行应用程序
ENTRYPOINT ["java", "-jar", "target/dinting-test-0.0.1.jar"]
1 change: 1 addition & 0 deletions diting-doc/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL=/api
1 change: 1 addition & 0 deletions diting-doc/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL=https://diting-server-97557-9-1325155828.sh.run.tcloudbase.com
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,19 @@ export default {
alert("请输入文本");
return;
}

this.loading = true;

try {
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
let response;
if (this.selectedAction === "find") {
// 调用发现敏感词的接口
response = await axios.post("/api/sensitive-words/find", {
response = await axios.post(`${apiBaseUrl}/sensitive-words/find`, {
text: this.inputText,
});
this.highlightSensitiveWords(response.data.matchedWords);
} else if (this.selectedAction === "find-and-desensitize") {
// 调用发现并脱敏的接口
response = await axios.post("/api/sensitive-words/find-and-desensitize", {
response = await axios.post(`${apiBaseUrl}/sensitive-words/find-and-desensitize`, {
text: this.inputText,
desensitizationType: this.desensitizationType,
});
Expand Down