Merge main into shccd159,保留 shccd159 配置(jjy/ccd 域名)
Made-with: Cursor
This commit is contained in:
@@ -5,11 +5,8 @@ ENV = 'production'
|
|||||||
# VUE_APP_BASE_API = '/prod-api'
|
# VUE_APP_BASE_API = '/prod-api'
|
||||||
# VUE_APP_BASE_API = 'http://127.0.0.1:8080'
|
# VUE_APP_BASE_API = 'http://127.0.0.1:8080'
|
||||||
# VUE_APP_BASE_API = 'https://jf.suzhouyuqi.com'
|
# VUE_APP_BASE_API = 'https://jf.suzhouyuqi.com'
|
||||||
# VUE_APP_BASE_API = 'http://jfadmin.xiashengjun.com'
|
|
||||||
# VUE_APP_BASE_API = 'http://jfadmin.wenjinhui.com'
|
|
||||||
# VUE_APP_BASE_API = 'http://jfanyueadmin.szxingming.com'
|
|
||||||
# VUE_APP_BASE_API = 'http://jfadmin-bsy.bosenyuan.com'
|
|
||||||
# miao33 项目
|
# miao33 项目
|
||||||
|
<<<<<<<< HEAD:backend-adminend/.env.production
|
||||||
# VUE_APP_BASE_API = 'http://jfadmin.xiashengjun.com'
|
# VUE_APP_BASE_API = 'http://jfadmin.xiashengjun.com'
|
||||||
|
|
||||||
# shjjy153 项目
|
# shjjy153 项目
|
||||||
@@ -17,3 +14,9 @@ ENV = 'production'
|
|||||||
|
|
||||||
# shccd159 项目
|
# shccd159 项目
|
||||||
VUE_APP_BASE_API = 'http://ccd-jfadmin.fwxgpt.com'
|
VUE_APP_BASE_API = 'http://ccd-jfadmin.fwxgpt.com'
|
||||||
|
========
|
||||||
|
VUE_APP_BASE_API = 'http://jfadmin.xiashengjun.com'
|
||||||
|
# VUE_APP_BASE_API = 'http://jfanyueadmin.szxingming.com'
|
||||||
|
# VUE_APP_BASE_API = 'http://jfadmin-bsy.bosenyuan.com'
|
||||||
|
|
||||||
|
>>>>>>>> origin/main:frontend/.env.production
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
## 二、前端打包
|
## 二、前端打包
|
||||||
|
|
||||||
|
**打包前请确认**:`frontend/.env.production` 中 **`VUE_APP_BASE_API`** 为本项目接口地址(例如本项目为 `http://jfadmin.xiashengjun.com`)。使用 backend 的部署脚本(`deploy-admin-miao33.sh` / `deploy-admin-by80.sh`)时,会在打包前自动检查该值与 `deploy.conf` 中当前环境的 `VUE_APP_BASE_API_EXPECTED` 是否一致,不一致将拒绝打包并提示修改。
|
||||||
|
|
||||||
在 **frontend 目录** 下执行:
|
在 **frontend 目录** 下执行:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -34,10 +36,15 @@ npm run build:prod
|
|||||||
|
|
||||||
前端与后端一起发布时,使用 **backend 的一键部署脚本**,会自动完成:前端打包 → 后端打包 → 远程备份 → 上传 jar 与 `dist` → 重启服务。
|
前端与后端一起发布时,使用 **backend 的一键部署脚本**,会自动完成:前端打包 → 后端打包 → 远程备份 → 上传 jar 与 `dist` → 重启服务。
|
||||||
|
|
||||||
在项目 **backend 目录** 下执行:
|
在项目 **backend 目录** 下执行(按环境二选一):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd backend
|
cd backend
|
||||||
|
|
||||||
|
# miao33 环境(profile=miao33,默认 8.152.170.46 / jfadmin.xiashengjun.com)
|
||||||
|
./shell/deploy-admin-miao33.sh
|
||||||
|
|
||||||
|
# by80 环境(profile=miao80,默认 123.56.214.80 / jfadmin.bosenyuan.com)
|
||||||
./shell/deploy-admin-by80.sh
|
./shell/deploy-admin-by80.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -47,7 +54,7 @@ cd backend
|
|||||||
2. **在 frontend 目录执行 `npm run build:prod`**,生成 `dist`
|
2. **在 frontend 目录执行 `npm run build:prod`**,生成 `dist`
|
||||||
3. 远程备份原有 jar 与后台静态
|
3. 远程备份原有 jar 与后台静态
|
||||||
4. 上传 jar 到 `REMOTE_DIR_JAR`,上传 **dist 到 REMOTE_DIR_ADMIN**
|
4. 上传 jar 到 `REMOTE_DIR_JAR`,上传 **dist 到 REMOTE_DIR_ADMIN**
|
||||||
5. 远程重启 admin 服务(Spring Profile miao80)
|
5. 远程重启 admin 服务(对应 Spring Profile)
|
||||||
|
|
||||||
即:**前端无需单独操作,一次执行即可完成前端打包 + 自动部署发布**。
|
即:**前端无需单独操作,一次执行即可完成前端打包 + 自动部署发布**。
|
||||||
SSH 配置、deploy.conf、故障排查见:**[backend/DEPLOY.md](../backend/DEPLOY.md)**。
|
SSH 配置、deploy.conf、故障排查见:**[backend/DEPLOY.md](../backend/DEPLOY.md)**。
|
||||||
@@ -56,11 +63,11 @@ SSH 配置、deploy.conf、故障排查见:**[backend/DEPLOY.md](../backend/DE
|
|||||||
|
|
||||||
## 四、部署配置(前端相关)
|
## 四、部署配置(前端相关)
|
||||||
|
|
||||||
配置在 **backend/deploy.conf**,by80 段示例:
|
配置在 **backend/deploy.conf**,按环境分段(miao33、by80、miao50):
|
||||||
|
|
||||||
| 配置项 | 说明 | 示例 |
|
| 配置项 | 说明 | miao33 示例 | by80 示例 |
|
||||||
|--------|------|------|
|
|--------|------|-------------|-----------|
|
||||||
| **REMOTE_DIR_ADMIN** | 前端 dist 发布目录(admin 后台站点根目录) | `/www/wwwroot/jfadmin.bosenyuan.com` |
|
| **REMOTE_DIR_ADMIN** | 前端 dist 发布目录(admin 后台站点根目录) | `/www/wwwroot/jfadmin.xiashengjun.com` | `/www/wwwroot/jfadmin.bosenyuan.com` |
|
||||||
|
|
||||||
脚本通过 **tar 管道** 将 `frontend/dist` 内容上传到该目录,不依赖远程安装 rsync。
|
脚本通过 **tar 管道** 将 `frontend/dist` 内容上传到该目录,不依赖远程安装 rsync。
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,23 @@ ADMIN_LOCAL_PORT=30032
|
|||||||
ADMIN_JAR_NAME=miao-admin-2.2.jar
|
ADMIN_JAR_NAME=miao-admin-2.2.jar
|
||||||
|
|
||||||
|
|
||||||
|
miao33:
|
||||||
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: miao33
|
||||||
|
SERVER_HOST=8.152.170.46
|
||||||
|
SERVER_USER=root
|
||||||
|
SERVER_PORT=22
|
||||||
|
REMOTE_DIR_JAR=/www/wwwroot/crmeb
|
||||||
|
REMOTE_DIR_ADMIN=/www/wwwroot/jfadmin.xiashengjun.com
|
||||||
|
FRONT_LOCAL_PORT=30031
|
||||||
|
FRONT_JAR_NAME=miao-front-2.2.jar
|
||||||
|
ADMIN_LOCAL_PORT=30032
|
||||||
|
ADMIN_JAR_NAME=miao-admin-2.2.jar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
miao50:
|
miao50:
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
|
|||||||
@@ -220,11 +220,13 @@ public class UserController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 积分记录
|
* 积分记录
|
||||||
|
* @param type 可选,记录类型:1=收入,2=支出,不传返回全部
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "积分记录")
|
@ApiOperation(value = "积分记录")
|
||||||
@RequestMapping(value = "/integral/list", method = RequestMethod.GET)
|
@RequestMapping(value = "/integral/list", method = RequestMethod.GET)
|
||||||
public CommonResult<CommonPage<UserIntegralRecord>> getIntegralList(@Validated PageParamRequest pageParamRequest) {
|
public CommonResult<CommonPage<UserIntegralRecord>> getIntegralList(@Validated PageParamRequest pageParamRequest,
|
||||||
return CommonResult.success(CommonPage.restPage(userCenterService.getUserIntegralRecordList(pageParamRequest)));
|
@RequestParam(required = false) Integer type) {
|
||||||
|
return CommonResult.success(CommonPage.restPage(userCenterService.getUserIntegralRecordList(pageParamRequest, type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -176,9 +176,10 @@ public interface UserCenterService extends IService<User> {
|
|||||||
/**
|
/**
|
||||||
* 用户积分记录列表
|
* 用户积分记录列表
|
||||||
* @param pageParamRequest 分页参数
|
* @param pageParamRequest 分页参数
|
||||||
|
* @param type 可选,记录类型:1=收入,2=支出,null=全部
|
||||||
* @return List<UserIntegralRecord>
|
* @return List<UserIntegralRecord>
|
||||||
*/
|
*/
|
||||||
List<UserIntegralRecord> getUserIntegralRecordList(PageParamRequest pageParamRequest);
|
List<UserIntegralRecord> getUserIntegralRecordList(PageParamRequest pageParamRequest, Integer type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信app登录
|
* 微信app登录
|
||||||
|
|||||||
@@ -912,12 +912,13 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|||||||
* 用户积分记录列表
|
* 用户积分记录列表
|
||||||
*
|
*
|
||||||
* @param pageParamRequest 分页参数
|
* @param pageParamRequest 分页参数
|
||||||
|
* @param type 可选,记录类型:1=收入,2=支出,null=全部
|
||||||
* @return List<UserIntegralRecord>
|
* @return List<UserIntegralRecord>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<UserIntegralRecord> getUserIntegralRecordList(PageParamRequest pageParamRequest) {
|
public List<UserIntegralRecord> getUserIntegralRecordList(PageParamRequest pageParamRequest, Integer type) {
|
||||||
Integer uid = userService.getUserIdException();
|
Integer uid = userService.getUserIdException();
|
||||||
return userIntegralRecordService.findUserIntegralRecordList(uid, pageParamRequest);
|
return userIntegralRecordService.findUserIntegralRecordList(uid, pageParamRequest, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -62,6 +62,15 @@ public interface UserIntegralRecordService extends IService<UserIntegralRecord>
|
|||||||
*/
|
*/
|
||||||
List<UserIntegralRecord> findUserIntegralRecordList(Integer uid, PageParamRequest pageParamRequest);
|
List<UserIntegralRecord> findUserIntegralRecordList(Integer uid, PageParamRequest pageParamRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* H5用户积分列表(按类型筛选)
|
||||||
|
* @param uid 用户uid
|
||||||
|
* @param pageParamRequest 分页参数
|
||||||
|
* @param type 可选,1=收入,2=支出,null=全部
|
||||||
|
* @return List
|
||||||
|
*/
|
||||||
|
List<UserIntegralRecord> findUserIntegralRecordList(Integer uid, PageParamRequest pageParamRequest, Integer type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户冻结的积分
|
* 获取用户冻结的积分
|
||||||
* @param uid 用户uid
|
* @param uid 用户uid
|
||||||
|
|||||||
@@ -217,11 +217,19 @@ public class UserIntegralRecordServiceImpl extends ServiceImpl<UserIntegralRecor
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<UserIntegralRecord> findUserIntegralRecordList(Integer uid, PageParamRequest pageParamRequest) {
|
public List<UserIntegralRecord> findUserIntegralRecordList(Integer uid, PageParamRequest pageParamRequest) {
|
||||||
|
return findUserIntegralRecordList(uid, pageParamRequest, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserIntegralRecord> findUserIntegralRecordList(Integer uid, PageParamRequest pageParamRequest, Integer type) {
|
||||||
PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
|
PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
|
||||||
LambdaQueryWrapper<UserIntegralRecord> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<UserIntegralRecord> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.select(UserIntegralRecord::getId, UserIntegralRecord::getTitle, UserIntegralRecord::getType, UserIntegralRecord::getIntegral, UserIntegralRecord::getUpdateTime);
|
lqw.select(UserIntegralRecord::getId, UserIntegralRecord::getTitle, UserIntegralRecord::getType, UserIntegralRecord::getIntegral, UserIntegralRecord::getUpdateTime);
|
||||||
lqw.eq(UserIntegralRecord::getUid, uid);
|
lqw.eq(UserIntegralRecord::getUid, uid);
|
||||||
lqw.eq(UserIntegralRecord::getStatus, IntegralRecordConstants.INTEGRAL_RECORD_STATUS_COMPLETE);
|
lqw.eq(UserIntegralRecord::getStatus, IntegralRecordConstants.INTEGRAL_RECORD_STATUS_COMPLETE);
|
||||||
|
if (type != null) {
|
||||||
|
lqw.eq(UserIntegralRecord::getType, type);
|
||||||
|
}
|
||||||
lqw.orderByDesc(UserIntegralRecord::getUpdateTime);
|
lqw.orderByDesc(UserIntegralRecord::getUpdateTime);
|
||||||
return dao.selectList(lqw);
|
return dao.selectList(lqw);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,23 @@ SERVER_USER=root
|
|||||||
SERVER_PORT=22
|
SERVER_PORT=22
|
||||||
REMOTE_DIR_JAR=/www/wwwroot/crmeb
|
REMOTE_DIR_JAR=/www/wwwroot/crmeb
|
||||||
REMOTE_DIR_ADMIN=/www/wwwroot/jfadmin.bosenyuan.com
|
REMOTE_DIR_ADMIN=/www/wwwroot/jfadmin.bosenyuan.com
|
||||||
|
VUE_APP_BASE_API_EXPECTED=http://jfadmin-bsy.bosenyuan.com
|
||||||
|
FRONT_LOCAL_PORT=30031
|
||||||
|
FRONT_JAR_NAME=miao-front-2.2.jar
|
||||||
|
ADMIN_LOCAL_PORT=30032
|
||||||
|
ADMIN_JAR_NAME=miao-admin-2.2.jar
|
||||||
|
|
||||||
|
|
||||||
|
miao33:
|
||||||
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: miao33
|
||||||
|
SERVER_HOST=39.106.63.33
|
||||||
|
SERVER_USER=root
|
||||||
|
SERVER_PORT=22
|
||||||
|
REMOTE_DIR_JAR=/www/wwwroot/crmeb
|
||||||
|
REMOTE_DIR_ADMIN=/www/wwwroot/jfadmin.xiashengjun.com
|
||||||
|
VUE_APP_BASE_API_EXPECTED=http://jfadmin.xiashengjun.com
|
||||||
FRONT_LOCAL_PORT=30031
|
FRONT_LOCAL_PORT=30031
|
||||||
FRONT_JAR_NAME=miao-front-2.2.jar
|
FRONT_JAR_NAME=miao-front-2.2.jar
|
||||||
ADMIN_LOCAL_PORT=30032
|
ADMIN_LOCAL_PORT=30032
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ ROOT_DIR="$(cd "$BACKEND_DIR/.." && pwd)"
|
|||||||
FRONTEND_DIR="$ROOT_DIR/frontend"
|
FRONTEND_DIR="$ROOT_DIR/frontend"
|
||||||
DEPLOY_CONF="$BACKEND_DIR/deploy.conf"
|
DEPLOY_CONF="$BACKEND_DIR/deploy.conf"
|
||||||
|
|
||||||
# 解析 by80 段配置(deploy.conf 中 by80 段到 miao50 段之间的 KEY=value)
|
# 解析 by80 段配置(deploy.conf 中 by80 段到 miao33 段之前的 KEY=value)
|
||||||
get_conf() {
|
get_conf() {
|
||||||
sed -n '1,/^miao50:/p' "$DEPLOY_CONF" | grep -E "^${1}=" | tail -1 | cut -d= -f2-
|
sed -n '1,/^miao33:/p' "$DEPLOY_CONF" | grep -E "^${1}=" | tail -1 | cut -d= -f2-
|
||||||
}
|
}
|
||||||
SERVER_HOST=$(get_conf SERVER_HOST)
|
SERVER_HOST=$(get_conf SERVER_HOST)
|
||||||
SERVER_USER=$(get_conf SERVER_USER)
|
SERVER_USER=$(get_conf SERVER_USER)
|
||||||
@@ -48,7 +48,23 @@ echo "已生成: $JAR_PATH"
|
|||||||
[[ ! -f "$JAR_PATH" ]] && { echo "错误: jar 未生成"; exit 1; }
|
[[ ! -f "$JAR_PATH" ]] && { echo "错误: jar 未生成"; exit 1; }
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== 2. 编译前端 (admin 后台) ==="
|
echo "=== 2. 检查前端 API 地址 (frontend/.env.production) ==="
|
||||||
|
VUE_APP_BASE_API_EXPECTED=$(get_conf VUE_APP_BASE_API_EXPECTED)
|
||||||
|
if [[ -n "$VUE_APP_BASE_API_EXPECTED" ]]; then
|
||||||
|
ENV_FILE="$FRONTEND_DIR/.env.production"
|
||||||
|
CURRENT_API=$(grep -E '^[[:space:]]*VUE_APP_BASE_API[[:space:]]*=' "$ENV_FILE" 2>/dev/null | head -1 | sed -E "s/^[^=]*=[[:space:]]*['\"]?([^'\"]*)['\"]?[[:space:]]*/\1/" | tr -d ' ')
|
||||||
|
if [[ "$CURRENT_API" != "$VUE_APP_BASE_API_EXPECTED" ]]; then
|
||||||
|
echo "错误: 打包前请确认 API 接口地址为本项目的。"
|
||||||
|
echo " 当前 frontend/.env.production: VUE_APP_BASE_API = '$CURRENT_API'"
|
||||||
|
echo " by80 期望: VUE_APP_BASE_API = '$VUE_APP_BASE_API_EXPECTED'"
|
||||||
|
echo "请修改 frontend/.env.production 后重新执行。"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "已确认 VUE_APP_BASE_API = '$CURRENT_API'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 3. 编译前端 (admin 后台) ==="
|
||||||
cd "$FRONTEND_DIR"
|
cd "$FRONTEND_DIR"
|
||||||
# Node.js 17+ OpenSSL 兼容
|
# Node.js 17+ OpenSSL 兼容
|
||||||
export NODE_OPTIONS="${NODE_OPTIONS:-} --openssl-legacy-provider"
|
export NODE_OPTIONS="${NODE_OPTIONS:-} --openssl-legacy-provider"
|
||||||
@@ -57,7 +73,7 @@ echo "已生成: $FRONTEND_DIR/dist"
|
|||||||
[[ ! -d "$FRONTEND_DIR/dist" ]] && { echo "错误: dist 未生成"; exit 1; }
|
[[ ! -d "$FRONTEND_DIR/dist" ]] && { echo "错误: dist 未生成"; exit 1; }
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== 3. 远程备份原有文件 ==="
|
echo "=== 4. 远程备份原有文件 ==="
|
||||||
"${SSH_CMD[@]}" "bash -s" << REMOTE_BACKUP
|
"${SSH_CMD[@]}" "bash -s" << REMOTE_BACKUP
|
||||||
set -e
|
set -e
|
||||||
mkdir -p "$REMOTE_DIR_JAR/backups"
|
mkdir -p "$REMOTE_DIR_JAR/backups"
|
||||||
@@ -73,19 +89,19 @@ fi
|
|||||||
REMOTE_BACKUP
|
REMOTE_BACKUP
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== 4. 上传 miao-admin-2.2.jar 到 $REMOTE_DIR_JAR ==="
|
echo "=== 5. 上传 miao-admin-2.2.jar 到 $REMOTE_DIR_JAR ==="
|
||||||
"${SCP_CMD[@]}" "$JAR_PATH" "$SERVER_USER@$SERVER_HOST:$REMOTE_DIR_JAR/"
|
"${SCP_CMD[@]}" "$JAR_PATH" "$SERVER_USER@$SERVER_HOST:$REMOTE_DIR_JAR/"
|
||||||
echo "jar 上传完成."
|
echo "jar 上传完成."
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== 5. 上传 admin 后台静态 (dist) 到 $REMOTE_DIR_ADMIN ==="
|
echo "=== 6. 上传 admin 后台静态 (dist) 到 $REMOTE_DIR_ADMIN ==="
|
||||||
# 先清空远程目录再上传,避免残留旧文件(远程可能无 rsync,统一用 tar 管道)
|
# 先清空远程目录再上传,避免残留旧文件(远程可能无 rsync,统一用 tar 管道)
|
||||||
"${SSH_CMD[@]}" "mkdir -p $REMOTE_DIR_ADMIN && (rm -rf ${REMOTE_DIR_ADMIN}/* ${REMOTE_DIR_ADMIN}/.??* 2>/dev/null; true)"
|
"${SSH_CMD[@]}" "mkdir -p $REMOTE_DIR_ADMIN && (rm -rf ${REMOTE_DIR_ADMIN}/* ${REMOTE_DIR_ADMIN}/.??* 2>/dev/null; true)"
|
||||||
(cd "$FRONTEND_DIR/dist" && tar cf - .) | "${SSH_CMD[@]}" "mkdir -p $REMOTE_DIR_ADMIN && cd $REMOTE_DIR_ADMIN && tar xf -"
|
(cd "$FRONTEND_DIR/dist" && tar cf - .) | "${SSH_CMD[@]}" "mkdir -p $REMOTE_DIR_ADMIN && cd $REMOTE_DIR_ADMIN && tar xf -"
|
||||||
echo "后台静态上传完成."
|
echo "后台静态上传完成."
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== 6. 远程重启 admin 服务 (profile=miao80, port=$ADMIN_LOCAL_PORT) ==="
|
echo "=== 7. 远程重启 admin 服务 (profile=miao80, port=$ADMIN_LOCAL_PORT) ==="
|
||||||
"${SSH_CMD[@]}" "cd $REMOTE_DIR_JAR && \
|
"${SSH_CMD[@]}" "cd $REMOTE_DIR_JAR && \
|
||||||
(pkill -f $ADMIN_JAR_NAME || true) && \
|
(pkill -f $ADMIN_JAR_NAME || true) && \
|
||||||
sleep 2 && \
|
sleep 2 && \
|
||||||
|
|||||||
120
backend/shell/deploy-admin-miao33.sh
Executable file
120
backend/shell/deploy-admin-miao33.sh
Executable file
@@ -0,0 +1,120 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 编译前后端,使用 spring profile miao33 打包 miao-admin-2.2.jar,
|
||||||
|
# 备份远程原有文件后通过 SSH 上传并重启(admin jar + admin 后台静态)
|
||||||
|
# 一次性配置免密: ssh-copy-id -i ~/.ssh/id_ed25519_crmeb_deploy.pub root@8.152.170.46
|
||||||
|
# 或指定密钥: SSH_IDENTITY=~/.ssh/your_key ./shell/deploy-admin-miao33.sh
|
||||||
|
# 使用: ./shell/deploy-admin-miao33.sh(在 backend 目录下)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
SSH_IDENTITY="${SSH_IDENTITY:-$HOME/.ssh/id_ed25519_crmeb_deploy}"
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
BACKEND_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
|
ROOT_DIR="$(cd "$BACKEND_DIR/.." && pwd)"
|
||||||
|
FRONTEND_DIR="$ROOT_DIR/frontend"
|
||||||
|
DEPLOY_CONF="$BACKEND_DIR/deploy.conf"
|
||||||
|
|
||||||
|
# 解析 miao33 段配置(deploy.conf 中 miao33 段到 miao50 段之间的 KEY=value)
|
||||||
|
get_conf() {
|
||||||
|
sed -n '/^miao33:/,/^miao50:/p' "$DEPLOY_CONF" | grep -E "^${1}=" | tail -1 | cut -d= -f2-
|
||||||
|
}
|
||||||
|
SERVER_HOST=$(get_conf SERVER_HOST)
|
||||||
|
SERVER_USER=$(get_conf SERVER_USER)
|
||||||
|
SERVER_PORT=$(get_conf SERVER_PORT)
|
||||||
|
REMOTE_DIR_JAR=$(get_conf REMOTE_DIR_JAR)
|
||||||
|
REMOTE_DIR_ADMIN=$(get_conf REMOTE_DIR_ADMIN)
|
||||||
|
ADMIN_JAR_NAME=$(get_conf ADMIN_JAR_NAME)
|
||||||
|
ADMIN_LOCAL_PORT=$(get_conf ADMIN_LOCAL_PORT)
|
||||||
|
|
||||||
|
[[ -z "$SERVER_HOST" ]] && SERVER_HOST=8.152.170.46
|
||||||
|
[[ -z "$REMOTE_DIR_JAR" ]] && REMOTE_DIR_JAR=/www/wwwroot/crmeb
|
||||||
|
[[ -z "$REMOTE_DIR_ADMIN" ]] && REMOTE_DIR_ADMIN=/www/wwwroot/jfadmin.xiashengjun.com
|
||||||
|
[[ -z "$ADMIN_JAR_NAME" ]] && ADMIN_JAR_NAME=miao-admin-2.2.jar
|
||||||
|
[[ -z "$ADMIN_LOCAL_PORT" ]] && ADMIN_LOCAL_PORT=30032
|
||||||
|
[[ -z "$SERVER_USER" ]] && SERVER_USER=root
|
||||||
|
[[ -z "$SERVER_PORT" ]] && SERVER_PORT=22
|
||||||
|
|
||||||
|
JAR_PATH="$BACKEND_DIR/crmeb-admin/target/$ADMIN_JAR_NAME"
|
||||||
|
REMOTE_JAR="$REMOTE_DIR_JAR/$ADMIN_JAR_NAME"
|
||||||
|
[[ -f "$SSH_IDENTITY" ]] && SSH_OPTS=(-o "IdentityFile=$SSH_IDENTITY") || SSH_OPTS=()
|
||||||
|
SSH_CMD=(ssh "${SSH_OPTS[@]}" -o StrictHostKeyChecking=accept-new -p "$SERVER_PORT" "$SERVER_USER@$SERVER_HOST")
|
||||||
|
SCP_CMD=(scp "${SSH_OPTS[@]}" -o StrictHostKeyChecking=accept-new -P "$SERVER_PORT")
|
||||||
|
|
||||||
|
BACKUP_SUFFIX="backup_$(date +%Y%m%d_%H%M%S)"
|
||||||
|
APP_YML="$BACKEND_DIR/crmeb-admin/src/main/resources/application.yml"
|
||||||
|
|
||||||
|
echo "=== 1. 设置 spring.profiles.active=miao33 后编译后端 ==="
|
||||||
|
cd "$BACKEND_DIR"
|
||||||
|
# 打包前临时改为 miao33,编译后恢复(兼容 Linux/macOS)
|
||||||
|
if [[ -f "$APP_YML" ]]; then
|
||||||
|
cp -a "$APP_YML" "${APP_YML}.bak"
|
||||||
|
sed 's/active: *miao[0-9]*/active: miao33/' "$APP_YML" > "${APP_YML}.new" && mv "${APP_YML}.new" "$APP_YML"
|
||||||
|
trap 'cp -a "${APP_YML}.bak" "$APP_YML"; rm -f "${APP_YML}.bak"; trap - EXIT' EXIT
|
||||||
|
fi
|
||||||
|
mvn clean package -pl crmeb-admin -am -DskipTests -q
|
||||||
|
echo "已生成: $JAR_PATH"
|
||||||
|
[[ ! -f "$JAR_PATH" ]] && { echo "错误: jar 未生成"; exit 1; }
|
||||||
|
# 恢复 application.yml
|
||||||
|
if [[ -f "${APP_YML}.bak" ]]; then cp -a "${APP_YML}.bak" "$APP_YML"; rm -f "${APP_YML}.bak"; trap - EXIT; fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 2. 检查前端 API 地址 (frontend/.env.production) ==="
|
||||||
|
VUE_APP_BASE_API_EXPECTED=$(get_conf VUE_APP_BASE_API_EXPECTED)
|
||||||
|
if [[ -n "$VUE_APP_BASE_API_EXPECTED" ]]; then
|
||||||
|
ENV_FILE="$FRONTEND_DIR/.env.production"
|
||||||
|
CURRENT_API=$(grep -E '^[[:space:]]*VUE_APP_BASE_API[[:space:]]*=' "$ENV_FILE" 2>/dev/null | head -1 | sed -E "s/^[^=]*=[[:space:]]*['\"]?([^'\"]*)['\"]?[[:space:]]*/\1/" | tr -d ' ')
|
||||||
|
if [[ "$CURRENT_API" != "$VUE_APP_BASE_API_EXPECTED" ]]; then
|
||||||
|
echo "错误: 打包前请确认 API 接口地址为本项目的。"
|
||||||
|
echo " 当前 frontend/.env.production: VUE_APP_BASE_API = '$CURRENT_API'"
|
||||||
|
echo " miao33 期望: VUE_APP_BASE_API = '$VUE_APP_BASE_API_EXPECTED'"
|
||||||
|
echo "请修改 frontend/.env.production 后重新执行。"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "已确认 VUE_APP_BASE_API = '$CURRENT_API'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 3. 编译前端 (admin 后台) ==="
|
||||||
|
cd "$FRONTEND_DIR"
|
||||||
|
export NODE_OPTIONS="${NODE_OPTIONS:-} --openssl-legacy-provider"
|
||||||
|
npm run build:prod
|
||||||
|
echo "已生成: $FRONTEND_DIR/dist"
|
||||||
|
[[ ! -d "$FRONTEND_DIR/dist" ]] && { echo "错误: dist 未生成"; exit 1; }
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 4. 远程备份原有文件 ==="
|
||||||
|
"${SSH_CMD[@]}" "bash -s" << REMOTE_BACKUP
|
||||||
|
set -e
|
||||||
|
mkdir -p "$REMOTE_DIR_JAR/backups"
|
||||||
|
if [ -f "$REMOTE_JAR" ]; then
|
||||||
|
cp -a "$REMOTE_JAR" "$REMOTE_DIR_JAR/backups/${ADMIN_JAR_NAME}.${BACKUP_SUFFIX}"
|
||||||
|
echo "已备份 jar: $REMOTE_DIR_JAR/backups/${ADMIN_JAR_NAME}.${BACKUP_SUFFIX}"
|
||||||
|
fi
|
||||||
|
if [ -d "$REMOTE_DIR_ADMIN" ] && [ "\$(ls -A $REMOTE_DIR_ADMIN 2>/dev/null)" ]; then
|
||||||
|
BACKUP_TAR="$REMOTE_DIR_ADMIN/../jfadmin_${BACKUP_SUFFIX}.tar.gz"
|
||||||
|
tar -czf "\$BACKUP_TAR" -C "$REMOTE_DIR_ADMIN" .
|
||||||
|
echo "已备份后台静态: \$BACKUP_TAR"
|
||||||
|
fi
|
||||||
|
REMOTE_BACKUP
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 5. 上传 $ADMIN_JAR_NAME 到 $REMOTE_DIR_JAR ==="
|
||||||
|
"${SCP_CMD[@]}" "$JAR_PATH" "$SERVER_USER@$SERVER_HOST:$REMOTE_DIR_JAR/"
|
||||||
|
echo "jar 上传完成."
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 6. 上传 admin 后台静态 (dist) 到 $REMOTE_DIR_ADMIN ==="
|
||||||
|
"${SSH_CMD[@]}" "mkdir -p $REMOTE_DIR_ADMIN && (rm -rf ${REMOTE_DIR_ADMIN}/* ${REMOTE_DIR_ADMIN}/.??* 2>/dev/null; true)"
|
||||||
|
(cd "$FRONTEND_DIR/dist" && tar cf - .) | "${SSH_CMD[@]}" "mkdir -p $REMOTE_DIR_ADMIN && cd $REMOTE_DIR_ADMIN && tar xf -"
|
||||||
|
echo "后台静态上传完成."
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 7. 远程重启 admin 服务 (profile=miao33, port=$ADMIN_LOCAL_PORT) ==="
|
||||||
|
"${SSH_CMD[@]}" "cd $REMOTE_DIR_JAR && \
|
||||||
|
(pkill -f $ADMIN_JAR_NAME || true) && \
|
||||||
|
sleep 2 && \
|
||||||
|
nohup java -jar $ADMIN_JAR_NAME --spring.profiles.active=miao33 --server.port=$ADMIN_LOCAL_PORT > admin.log 2>&1 & \
|
||||||
|
sleep 3 && \
|
||||||
|
(pgrep -f $ADMIN_JAR_NAME && echo 'Admin 进程已启动' || echo '请检查 admin.log 启动是否失败')"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== miao33 部署完成 ==="
|
||||||
19
backend/shell/start-front-miao33.sh
Executable file
19
backend/shell/start-front-miao33.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# 使用 miao33 配置启动 crmeb-front 服务(nohup 后台)
|
||||||
|
# 端口见 application-miao33.yml:30031
|
||||||
|
|
||||||
|
set -e
|
||||||
|
BACKEND_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
cd "$BACKEND_DIR"
|
||||||
|
JAR="$BACKEND_DIR/crmeb-front/target/miao-front-2.2.jar"
|
||||||
|
LOG="${LOG:-$BACKEND_DIR/front-miao33.log}"
|
||||||
|
|
||||||
|
if [ ! -f "$JAR" ]; then
|
||||||
|
echo "未找到 jar,请先执行: mvn clean package -pl crmeb-front -am -DskipTests"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "启动: nohup java -jar $JAR --spring.profiles.active=miao33 > $LOG 2>&1 &"
|
||||||
|
nohup java -jar "$JAR" --spring.profiles.active=miao33 >> "$LOG" 2>&1 &
|
||||||
|
echo "PID: $!"
|
||||||
|
echo "日志: $LOG"
|
||||||
53
backend/shell/test-integral-list.sh
Executable file
53
backend/shell/test-integral-list.sh
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# 测试 api/front/integral/list 是否返回支出明细(type=2)
|
||||||
|
# 用法: BASE_URL=http://localhost:8081 ./test-integral-list.sh
|
||||||
|
# 或: ./test-integral-list.sh (默认 BASE_URL=http://localhost:8081)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
BASE="${BASE_URL:-http://localhost:8081}"
|
||||||
|
USER="13739117991"
|
||||||
|
PASS="123456"
|
||||||
|
|
||||||
|
echo "=== 测试 integral/list 支出明细 (type=2) ==="
|
||||||
|
echo "BASE_URL=$BASE"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "1. 登录 ($USER / $PASS) ..."
|
||||||
|
LOGIN=$(curl -s -X POST "$BASE/api/front/loginV2" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"account\":\"$USER\",\"password\":\"$PASS\"}")
|
||||||
|
|
||||||
|
if echo "$LOGIN" | grep -qE '"code":\s*(0|200)'; then
|
||||||
|
echo " 登录成功"
|
||||||
|
else
|
||||||
|
echo " 登录失败 (若为「此账号未注册」请在本环境用已注册账号或本地起后端测试): $LOGIN"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TOKEN=$(echo "$LOGIN" | sed -n 's/.*"token":"\([^"]*\)".*/\1/p')
|
||||||
|
if [ -z "$TOKEN" ]; then
|
||||||
|
echo " 未获取到 token"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo " Token: ${TOKEN:0:24}..."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "2. GET api/front/integral/list?page=1&limit=20&type=2 (支出明细) ..."
|
||||||
|
RES=$(curl -s -X GET "$BASE/api/front/integral/list?page=1&limit=20&type=2" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Authori-zation: $TOKEN")
|
||||||
|
|
||||||
|
echo "$RES" | head -c 800
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if echo "$RES" | grep -qE '"code":\s*(0|200)'; then
|
||||||
|
echo "3. 结果: 接口返回成功 (code=0/200)"
|
||||||
|
if echo "$RES" | grep -q '"list":'; then
|
||||||
|
echo " data.list 已返回;带 type=2 时仅包含支出明细,见上方 JSON。"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "3. 结果: 接口未成功 (需登录或 code 非 0/200)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -132,8 +132,8 @@
|
|||||||
|
|
||||||
.pictrue {
|
.pictrue {
|
||||||
|
|
||||||
/deep/image,
|
::v-deepimage,
|
||||||
/deep/.easy-loadimage,
|
::v-deep.easy-loadimage,
|
||||||
uni-image {
|
uni-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
border-radius: 16rpx 16rpx 0 0;
|
border-radius: 16rpx 16rpx 0 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
/deep/.easy-loadimage,
|
::v-deep.easy-loadimage,
|
||||||
uni-image,
|
uni-image,
|
||||||
image {
|
image {
|
||||||
height: 330rpx;
|
height: 330rpx;
|
||||||
|
|||||||
@@ -471,8 +471,8 @@ import {
|
|||||||
grid-template-rows: auto;
|
grid-template-rows: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
/deep/.origin-img,
|
::v-deep.origin-img,
|
||||||
/deep/.easy-loadimage {
|
::v-deep.easy-loadimage {
|
||||||
border-bottom-left-radius: 0 !important;
|
border-bottom-left-radius: 0 !important;
|
||||||
border-bottom-right-radius: 0 !important;
|
border-bottom-right-radius: 0 !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -637,7 +637,7 @@
|
|||||||
height: 310rpx;
|
height: 310rpx;
|
||||||
|
|
||||||
&.scalex {
|
&.scalex {
|
||||||
/deep/.uni-swiper-slide-frame {
|
::v-deep.uni-swiper-slide-frame {
|
||||||
transform: translate(0, 0) !important;
|
transform: translate(0, 0) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -648,7 +648,7 @@
|
|||||||
transition: all 0.6s ease;
|
transition: all 0.6s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ swiper-item.active {
|
::v-deep swiper-item.active {
|
||||||
image {
|
image {
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -612,7 +612,7 @@
|
|||||||
height: 810rpx;
|
height: 810rpx;
|
||||||
|
|
||||||
&.scalex {
|
&.scalex {
|
||||||
/deep/.uni-swiper-slide-frame {
|
::v-deep.uni-swiper-slide-frame {
|
||||||
transform: translate(0, 0) !important;
|
transform: translate(0, 0) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -623,7 +623,7 @@
|
|||||||
transition: all 0.6s ease;
|
transition: all 0.6s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ swiper-item.active {
|
::v-deep swiper-item.active {
|
||||||
image {
|
image {
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -587,8 +587,8 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
|
|
||||||
/deep/.origin-img,
|
::v-deep.origin-img,
|
||||||
/deep/.easy-loadimage {
|
::v-deep.easy-loadimage {
|
||||||
border-bottom-left-radius: 0 !important;
|
border-bottom-left-radius: 0 !important;
|
||||||
border-bottom-right-radius: 0 !important;
|
border-bottom-right-radius: 0 !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
height: calc(98rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||||
height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
height: calc(98rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||||
height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-top: solid 1rpx #F3F3F3;
|
border-top: solid 1rpx #F3F3F3;
|
||||||
|
|||||||
@@ -245,7 +245,7 @@
|
|||||||
|
|
||||||
// 圆形指示点
|
// 圆形指示点
|
||||||
&.circular {
|
&.circular {
|
||||||
/deep/.uni-swiper-dot {
|
::v-deep.uni-swiper-dot {
|
||||||
width: 10rpx;
|
width: 10rpx;
|
||||||
height: 10rpx;
|
height: 10rpx;
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,7 @@
|
|||||||
|
|
||||||
// 方形指示点
|
// 方形指示点
|
||||||
&.square {
|
&.square {
|
||||||
/deep/.uni-swiper-dot {
|
::v-deep.uni-swiper-dot {
|
||||||
width: 20rpx;
|
width: 20rpx;
|
||||||
height: 5rpx;
|
height: 5rpx;
|
||||||
border-radius: 3rpx;
|
border-radius: 3rpx;
|
||||||
@@ -261,22 +261,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.nodoc {
|
&.nodoc {
|
||||||
/deep/.uni-swiper-dot {
|
::v-deep.uni-swiper-dot {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.dot0 .uni-swiper-dots-horizontal {
|
::v-deep.dot0 .uni-swiper-dots-horizontal {
|
||||||
left: 10%;
|
left: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.dot1 .uni-swiper-dots-horizontal {
|
::v-deep.dot1 .uni-swiper-dots-horizontal {
|
||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.dot2 .uni-swiper-dots-horizontal {
|
::v-deep.dot2 .uni-swiper-dots-horizontal {
|
||||||
left: 90%;
|
left: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
height: calc(98rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||||
height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-top: solid 1rpx #F3F3F3;
|
border-top: solid 1rpx #F3F3F3;
|
||||||
|
|||||||
@@ -2075,7 +2075,7 @@
|
|||||||
z-index: 277;
|
z-index: 277;
|
||||||
border-top: 1rpx solid #f0f0f0;
|
border-top: 1rpx solid #f0f0f0;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
height: calc(100rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||||
height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -692,11 +692,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goodCate1 {
|
.goodCate1 {
|
||||||
background-color: $crmeb-bg-color;
|
background-color: $crmeb-bg-color;
|
||||||
::v-deep.mask {
|
::v-deep.mask {
|
||||||
// z-index: 99;
|
// z-index: 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep.attrProduct {
|
::v-deep.attrProduct {
|
||||||
.mask {
|
.mask {
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|||||||
@@ -688,7 +688,7 @@
|
|||||||
.mask {
|
.mask {
|
||||||
// z-index: 99;
|
// z-index: 99;
|
||||||
}
|
}
|
||||||
/deep/.attrProduct{
|
::v-deep.attrProduct{
|
||||||
.mask {
|
.mask {
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.getUserPoints()
|
this.getUserPoints()
|
||||||
this.loadUserInfo()
|
await this.loadUserInfo()
|
||||||
this.loadPointsList()
|
this.loadPointsList()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -347,7 +347,7 @@ export default {
|
|||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/web-view/index?url=' + encodeURIComponent('https://xiashengjun.com/?#/pages/personal/index')
|
url: '/pages/web-view/index?url=' + encodeURIComponent('https://jjy.fwxgpt.com/?#/pages/personal/index')
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
@@ -449,7 +449,8 @@ export default {
|
|||||||
}),
|
}),
|
||||||
getIntegralList({
|
getIntegralList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit: this.limit
|
limit: this.limit,
|
||||||
|
type: 2
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -472,8 +473,8 @@ export default {
|
|||||||
|
|
||||||
// 处理积分明细(使用 getIntegralList,需要过滤出 type === 2 的支出记录)
|
// 处理积分明细(使用 getIntegralList,需要过滤出 type === 2 的支出记录)
|
||||||
if (pointsRes.code === 0 && pointsRes.data) {
|
if (pointsRes.code === 0 && pointsRes.data) {
|
||||||
// 过滤出支出记录(type === 2)
|
// 过滤出支出记录(type === 2),兼容后端返回数字或字符串
|
||||||
const expenseRecords = (pointsRes.data.list || []).filter(item => item.type === 2)
|
const expenseRecords = (pointsRes.data.list || []).filter(item => Number(item.type) === 2)
|
||||||
pointsList = expenseRecords.map(item => ({
|
pointsList = expenseRecords.map(item => ({
|
||||||
id: `points_${item.id}`,
|
id: `points_${item.id}`,
|
||||||
source: 'points', // 标记来源:积分(与模板中的判断保持一致)
|
source: 'points', // 标记来源:积分(与模板中的判断保持一致)
|
||||||
|
|||||||
@@ -157,14 +157,14 @@ export default {
|
|||||||
.rules-content {
|
.rules-content {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
|
|
||||||
/deep/ .rules-section {
|
::v-deep .rules-section {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .section-title {
|
::v-deep .section-title {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -173,7 +173,7 @@ export default {
|
|||||||
border-bottom: 2rpx solid #F0F0F0;
|
border-bottom: 2rpx solid #F0F0F0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .rule-item {
|
::v-deep .rule-item {
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
@@ -181,14 +181,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .item-title {
|
::v-deep .item-title {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .item-list {
|
::v-deep .item-list {
|
||||||
padding-left: 40rpx;
|
padding-left: 40rpx;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
@@ -204,7 +204,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .item-note {
|
::v-deep .item-note {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
@@ -213,7 +213,7 @@ export default {
|
|||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .rules-footer {
|
::v-deep .rules-footer {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 40rpx 30rpx;
|
padding: 40rpx 30rpx;
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ export default {
|
|||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
/deep/ span {
|
::v-deep span {
|
||||||
color: #FF4D4F;
|
color: #FF4D4F;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1306,7 +1306,7 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
height: calc(100rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||||
height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1325,13 +1325,13 @@
|
|||||||
opacity: 0
|
opacity: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ checkbox .uni-checkbox-input.uni-checkbox-input-checked {
|
::v-deep checkbox .uni-checkbox-input.uni-checkbox-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
border: none !important;
|
border: none !important;
|
||||||
color: #fff !important
|
color: #fff !important
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
border: none !important;
|
border: none !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
|||||||
@@ -1509,20 +1509,20 @@
|
|||||||
.uni-p-b-96 {
|
.uni-p-b-96 {
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
}
|
}
|
||||||
/deep/ checkbox .uni-checkbox-input.uni-checkbox-input-checked {
|
::v-deep checkbox .uni-checkbox-input.uni-checkbox-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
border: none !important;
|
border: none !important;
|
||||||
color: #fff!important
|
color: #fff!important
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
border: none !important;
|
border: none !important;
|
||||||
color: #fff!important;
|
color: #fff!important;
|
||||||
margin-right: 0 !important;
|
margin-right: 0 !important;
|
||||||
}
|
}
|
||||||
.bottom-custom{
|
.bottom-custom{
|
||||||
bottom: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
bottom: calc(98rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||||
bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -600,13 +600,13 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ checkbox .uni-checkbox-input.uni-checkbox-input-checked {
|
::v-deep checkbox .uni-checkbox-input.uni-checkbox-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
@include coupons_border_color(theme);
|
@include coupons_border_color(theme);
|
||||||
color: #fff !important
|
color: #fff !important
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
@include coupons_border_color(theme);
|
@include coupons_border_color(theme);
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
|||||||
@@ -497,12 +497,12 @@
|
|||||||
@include left_color(theme);
|
@include left_color(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ radio .wx-radio-input.wx-radio-input-checked {
|
::v-deep radio .wx-radio-input.wx-radio-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
@include coupons_border_color(theme);
|
@include coupons_border_color(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ radio .uni-radio-input.uni-radio-input-checked {
|
::v-deep radio .uni-radio-input.uni-radio-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -405,13 +405,13 @@
|
|||||||
.font_color{
|
.font_color{
|
||||||
@include main_color(theme);
|
@include main_color(theme);
|
||||||
}
|
}
|
||||||
/deep/ checkbox .uni-checkbox-input.uni-checkbox-input-checked {
|
::v-deep checkbox .uni-checkbox-input.uni-checkbox-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
@include coupons_border_color(theme);
|
@include coupons_border_color(theme);
|
||||||
color: #fff!important
|
color: #fff!important
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||||
@include main_bg_color(theme);
|
@include main_bg_color(theme);
|
||||||
@include coupons_border_color(theme);
|
@include coupons_border_color(theme);
|
||||||
color: #fff!important;
|
color: #fff!important;
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ checkbox .uni-checkbox-input.uni-checkbox-input-checked::before {
|
|||||||
.uni-p-b-98{
|
.uni-p-b-98{
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
/* 兼容 IOS<11.2 */
|
/* 兼容 IOS<11.2 */
|
||||||
height: calc(100rpx+ constant(safe-area-inset-bottom));
|
height: calc(100rpx + constant(safe-area-inset-bottom));
|
||||||
/* 兼容 IOS>11.2 */
|
/* 兼容 IOS>11.2 */
|
||||||
height: calc(100rpx + env(safe-area-inset-bottom));
|
height: calc(100rpx + env(safe-area-inset-bottom));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,11 +50,11 @@
|
|||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
border-radius: 4rpx 0 0 4rpx;
|
border-radius: 4rpx 0 0 4rpx;
|
||||||
}
|
}
|
||||||
/deep/.time {
|
::v-deep.time {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #e93323;
|
color: #e93323;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
/deep/.red {
|
::v-deep.red {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
width: 122rpx;
|
width: 122rpx;
|
||||||
height: 122rpx;
|
height: 122rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
/deep/image,/deep/.easy-loadimage,/deep/uni-image {
|
::v-deepimage,::v-deep.easy-loadimage,::v-deepuni-image {
|
||||||
width: 122rpx;
|
width: 122rpx;
|
||||||
height: 122rpx;
|
height: 122rpx;
|
||||||
}
|
}
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
height: 210rpx;
|
height: 210rpx;
|
||||||
right: 18rpx;
|
right: 18rpx;
|
||||||
bottom: 18rpx;
|
bottom: 18rpx;
|
||||||
/deep/image,/deep/.easy-loadimage,/deep/uni-image {
|
::v-deepimage,::v-deep.easy-loadimage,::v-deepuni-image {
|
||||||
width: 210rpx;
|
width: 210rpx;
|
||||||
height: 210rpx;
|
height: 210rpx;
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
.img-box {
|
.img-box {
|
||||||
right: 14rpx;
|
right: 14rpx;
|
||||||
bottom: 14rpx;
|
bottom: 14rpx;
|
||||||
/deep/image,/deep/.easy-loadimage,/deep/uni-image{
|
::v-deepimage,::v-deep.easy-loadimage,::v-deepuni-image{
|
||||||
width: 122rpx;
|
width: 122rpx;
|
||||||
height: 122rpx;
|
height: 122rpx;
|
||||||
}
|
}
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
width: 210rpx;
|
width: 210rpx;
|
||||||
.img-box {
|
.img-box {
|
||||||
height: 210rpx;
|
height: 210rpx;
|
||||||
/deep/image,/deep/.easy-loadimage,uni-image{
|
::v-deepimage,::v-deep.easy-loadimage,uni-image{
|
||||||
height: 210rpx;
|
height: 210rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
left: 10rpx;
|
left: 10rpx;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
}
|
}
|
||||||
/deep/image,/deep/.easy-loadimage,uni-image {
|
::v-deepimage,::v-deep.easy-loadimage,uni-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 222rpx;
|
height: 222rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
@@ -253,7 +253,7 @@
|
|||||||
color: $theme-color;
|
color: $theme-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/.img-box0 image,/deep/.img-box0 .easy-loadimage,/deep/.img-box0 uni-image {
|
::v-deep.img-box0 image,::v-deep.img-box0 .easy-loadimage,::v-deep.img-box0 uni-image {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
.info {
|
.info {
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ uni-checkbox:not([disabled]) .uni-checkbox-input:hover{
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
padding-bottom: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
padding-bottom: calc(100rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||||
padding-bottom: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
padding-bottom: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||||
}
|
}
|
||||||
//活动边框样式
|
//活动边框样式
|
||||||
|
|||||||
Reference in New Issue
Block a user