修改home

This commit is contained in:
JACKYMYPERSON
2025-10-09 19:40:19 +08:00
parent 5801dd825f
commit 3e023ed937
7 changed files with 44 additions and 2 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -105,7 +105,6 @@
import { ref, onMounted, watch, nextTick } from 'vue';
import { ElMessage, ElMessageBox, ElDialog, ElConfigProvider, ElDrawer, ElInput, ElUpload } from 'element-plus';
import { Edit, Delete, Plus } from '@element-plus/icons-vue';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
import Quill from 'quill';
import 'quill/dist/quill.snow.css';
import type { UploadProps } from 'element-plus';

Binary file not shown.

BIN
server/opt/ttk/ttk-linux-amd64 Executable file

Binary file not shown.

43
server/package.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/bash
# 设置目标文件夹和项目名称
target_dir="./opt/ttk"
project_name="ttk"
# 创建目标文件夹(若不存在)
mkdir -p "$target_dir"
# 定义目标平台列表格式GOOS/GOARCH
platforms=(
"linux/amd64" # Linux 64位
"darwin/amd64" # MacIntel芯片64位
# 如需支持Mac Apple Silicon可添加darwin/arm64
)
# 遍历每个平台进行打包
for platform in "${platforms[@]}"; do
# 解析平台信息
IFS='/' read -r goos goarch <<< "$platform"
# 设置平台相关的环境变量
export CGO_ENABLED=0 # 禁用CGO确保纯静态编译跨平台兼容
export GOOS="$goos"
export GOARCH="$goarch"
# 生成输出文件名Mac需加.dmg后缀Linux用可执行文件
if [ "$goos" = "darwin" ]; then
output_file="${project_name}-${goos}-${goarch}.dmg"
else
output_file="${project_name}-${goos}-${goarch}"
fi
# 执行打包命令
echo "正在打包 $platform 平台..."
env GOOS="$goos" GOARCH="$goarch" CGO_ENABLED=0 go build -o "$target_dir/$output_file" .
# 检查打包结果
if [ $? -eq 0 ]; then
echo "$platform 平台打包成功,文件路径:$target_dir/$output_file"
else
echo "$platform 平台打包失败"
fi
done

View File

@@ -211,7 +211,7 @@ function stripHtml(htmlStr: string): string {
*/
const fetchArticlesByTopic = async (topic: string): Promise<NewsItem[]> => {
try {
const response = await fetch('http://localhost:8080/api/articles/getarticle', {
const response = await fetch('http://8.155.160.224:8080/api/articles/getarticle', {
method: 'POST',
headers: {
'Content-Type': 'application/json',

View File