Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ip2region.xdb
/.env
/.env.local
/tmp
/scripts/*.zip
/projects/*.zip
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ docker compose config

### 4. 下载前端文件

部署distar等项目的前端:
[说明文件](projects/README.md)

下载并提取最新的`bus`前端:

```sh
cd /data/nginx/html
/home/docker/scripts/teamcity-download-artifact.sh --build=CityBusVueAdmin_Release
/home/docker/projects/teamcity-download-artifact.sh --build=CityBusVueAdmin_Release
unzip CityBusVueAdmin_Release-latest.zip
unzip bus.zip -d bus
```
Expand All @@ -45,7 +48,7 @@ unzip bus.zip -d bus

```sh
cd /data/nginx/html
/home/docker/scripts/teamcity-download-artifact.sh --build=MaintainVbenAdmin_Release
/home/docker/projects/teamcity-download-artifact.sh --build=MaintainVbenAdmin_Release
unzip MaintainVbenAdmin_Release-latest.zip
unzip maintain.zip -d track
```
Expand Down
11 changes: 11 additions & 0 deletions projects/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 项目特定的配置

## distar前端

```sh
# 确认https://github.com/TranscodeGroup/maintain-vben-admin仓库存在对应的版本tag
# 确认 https://xn.transcodegroup.cn:8590/buildConfiguration/MaintainVbenAdmin_Release?mode=builds 已经打包出附件

# 下载tag版本到本地, 并解压到版本对应的文件夹
/home/docker/projects/distar-beta-depoly.sh --tag=v1.15.1
```
125 changes: 125 additions & 0 deletions projects/distar-beta-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
#!/bin/bash
set -e
__dirname__=$(dirname "$0")

BUILD_NAME="MaintainVbenAdmin_Release"
CONFIG_DIR="$__dirname__/distar"
WORK_DIR="/data/nginx/html/track/beta"

# 创建并切换到工作目录
[ -d "$WORK_DIR" ] || mkdir -p "$WORK_DIR" || (echo "创建工作目录失败" && exit 1)
cd "$WORK_DIR"

# 检查参数是否提供
if [ -z "$1" ]; then
echo "使用方式: $0 --tag=版本号"
exit 1
fi

# 解析参数
for arg in "$@"
do
case $arg in
--tag=*)
version="${arg#*=}"
shift # 移除已处理的参数
;;
*)
echo "未知参数: $arg"
exit 1
;;
esac
done

# 检查版本号是否为空
if [ -z "$version" ]; then
echo "版本号不能为空"
exit 1
fi

# 替换点号并生成目标目录
target_dir="${version//./}"

# 定义文件名
zip_file="$BUILD_NAME-${version}.zip"

# 检查压缩文件是否存在,如果不存在则执行下载
if [ -f "$zip_file" ]; then
read -p "压缩文件 $zip_file 已存在,是否重新下载?(y/n): " confirm
else
confirm=y
fi

if [ "$confirm" == "y" ]; then
echo "开始下载压缩文件 $zip_file ..."
if [ "$version" == "latest" ]; then
"$__dirname__"/teamcity-download-artifact.sh --build=$BUILD_NAME
else
"$__dirname__"/teamcity-download-artifact.sh --build=$BUILD_NAME --tag="$version"
fi

# 再次检查压缩文件是否存在
if [ ! -f "$zip_file" ]; then
echo "下载失败或文件仍然不存在!"
exit 1
fi
fi

# 如果目标目录存在则询问是否删除
if [ -d "$target_dir" ]; then
read -p "目标目录 $target_dir 已存在,是否删除?(y/n): " confirm
if [ "$confirm" != "y" ]; then
echo "操作取消。"
exit 1
fi
rm -rf "$target_dir"
echo "删除文件夹 -> " "$target_dir"
fi

# 创建目标目录
mkdir -p "$target_dir"
echo "创建文件夹 -> " "$target_dir"

# 解压第一个zip文件
unzip -o -q "$zip_file" -d "$target_dir"

# 进入目标目录
cd "$target_dir"

# 定义临时zip文件名
temp_zip="maintain.zip"

# 检查第二个zip文件是否存在
if [ ! -f "$temp_zip" ]; then
echo "临时压缩文件 $temp_zip 不存在!"
exit 1
fi

# 解压第二个zip文件
unzip -o -q "$temp_zip"

# 删除临时zip文件
rm "$temp_zip"

cd ..
# 复制配置文件
cp -Rfv "$CONFIG_DIR"/* "$target_dir"

# 指定要处理的HTML文件
cd "$target_dir"
html_file="index.html"

# 使用sed命令进行文本替换, 网站微缩图
OLD_TITLE='中车在线'
NEW_TITLE='DiStarGPS'
OLD_DIV='数字交通云平台'
NEW_DIV='ดูแลการเดินรถของคุ'

# 使用sed命令进行文本替换
sed -i "s|$OLD_TITLE|$NEW_TITLE|g" "$html_file"
sed -i "s|$OLD_DIV|$NEW_DIV|g" "$html_file"

echo "替换完成:$html_file 中的 '工物员' 已被替换为 'DiStarGPS ดูแลการเดินรถของคุณ'"

echo "解压完成,目录 -> " "$target_dir"
echo "beta路径,复制到浏览器可预览 -> " https://tripsdd.com/beta/"$target_dir"
27 changes: 27 additions & 0 deletions projects/distar/Privacy-Policy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
TripsDD Privacy Policy

DISTAR MANUFACTURING CO., LTD. ("TripsDD", "we", "our" or "us") respects the privacy of its users ("User" or "you"). This Privacy Policy contains the following: This This informs you of what information we collect when you visit our mobile applications (the "Services").

Capitalized terms not defined herein shall have the meanings given to them in our Terms of Use. This Privacy Policy is incorporated by reference. (collectively the "Terms")

By accessing the website and/or services. and/or use of the Site and/or Services. You agree to the terms and conditions set out in this Privacy Policy. This ("Privacy Policy") covers the collection and processing of your personal data. (as defined below) if you do not accept any of the terms provided herein; You will not be able to use the service.

Information we may collect:

We may collect two types of information and data from our users. The first type of information is anonymous information that cannot be personally identified. ("Non-Personal Information") We do not know the identities of the users for whom we collect Non-Personal Information. Non-Personal Information is anonymous information that we may receive when users use the Services. Non-Personal Information collected includes technical and behavioral information. Perhaps the most important thing Activities of service users Identity Operating system and browser Mobile device type and operating system version User screen resolution Terms of Service, User "Click Stream" on the website, Keyboard Language, etc.

The second type of information is personally identifiable information. ("Personal Information") This information may be personally identifiable or may be personal and/or sensitive information. By itself or together with other information provided to TripsDD, the personal information we collect includes: username, email address, telephone number. Your geographic location Your travel habits (e.g. route, travel time from one place to another), your home address Office address or other destinations you like, save or search public transit directions, routes, stations and/or routes. Search history of service users Users' most frequently used routes and stops. All user generated data User reports and opinions about the service Settings in your application, your level and user profile. Including nickname and avatar. In-app usage credits ("Credits") that you earn from using the Services, advertising IDs, user IP addresses, and other information that users choose to provide.

The geolocation data we collect includes detailed location and route information, including GPS signals and other information sent by mobile devices currently installed and enabled for the Service. TripsDD uses this location and route information to create location history. Details of all public transport journeys

We collect this information through your use of the Service and information that you voluntarily provide and/or upload to the Service. As described further in our Privacy Policy below. To provide services with the aim of improving user experience and personalizing services and security. The objectives are detailed below.

We will never collect any personal information from or about you without your approval. above all else It is obtained by accepting positive conditions.

How do we collect information about our users?

We mainly use two methods:

1. Use of the Service We collect non-personal and personal information when you access or use the Service. In other words, we understand your use of the Services and may collect, compile, and record information related to such use.

2. We also collect non-personal information and personal information obtained from information we receive from the Services and third-party service providers we work with.
10 changes: 10 additions & 0 deletions projects/distar/_app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
window.__PRODUCTION__APP__CONF__ = {
VITE_GLOB_APP_TITLE: 'Distar GPS',
VITE_GLOB_APP_SHORT_NAME: 'tracker-distar',
VITE_GLOB_API_URL: 'http://58.82.168.197:9080',
VITE_GLOB_API_URL_PREFIX: '/api',
VITE_GLOB_UPLOAD_URL: '/upload',
}
Object.freeze(window.__PRODUCTION__APP__CONF__)
Object.defineProperty(window, '__PRODUCTION__APP__CONF__', { configurable: false, writable: false })

Binary file added projects/distar/favicon.ico
Binary file not shown.
Binary file added projects/distar/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions projects/distar/google183c314c7b974b78.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-site-verification: google183c314c7b974b78.html
Binary file added projects/distar/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.