From 068d0c4ac203e942dded146ae14bebf2990fe594 Mon Sep 17 00:00:00 2001 From: luo Date: Thu, 17 Sep 2026 15:46:33 +0800 Subject: [PATCH] fix: git branch --- .gitea/workflows/deploy.yaml | 48 ++++--------------- .../business/CreateRefundDialog.vue | 20 ++++---- src/types/api/refund.ts | 8 ++-- src/views/finance/refund/detail.vue | 43 +++++++---------- src/views/finance/refund/index.vue | 16 ++----- 5 files changed, 47 insertions(+), 88 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index f9c5cd2..ed338ce 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -3,10 +3,12 @@ name: 构建并部署前端到测试环境 on: push: branches: - - main + - iteration/august - dev - test - - iteration/august + # 如果不再需要 main 分支触发构建,可以把下面这行删掉; + # 如果只是想保留构建(不部署),可以留着,反正部署条件已经只认 iteration/august + - main env: REGISTRY: registry.boss160.cn @@ -22,43 +24,37 @@ jobs: run: | export PATH="$HOME/.nix-profile/bin:/usr/local/bin:/usr/bin:/bin:$PATH" export GIT_SSL_NO_VERIFY=1 - git clone https://git.boss160.cn/luo/one-pipe-system.git . git checkout ${{ github.sha }} - name: 设置镜像标签 id: tag run: | - if [ "${{ github.ref }}" = "refs/heads/main" ]; then + if [ "${{ github.ref }}" = "refs/heads/iteration/august" ]; then echo "tag=latest" >> $GITHUB_OUTPUT elif [ "${{ github.ref }}" = "refs/heads/dev" ]; then echo "tag=dev" >> $GITHUB_OUTPUT elif [ "${{ github.ref }}" = "refs/heads/test" ]; then echo "tag=test" >> $GITHUB_OUTPUT - elif [ "${{ github.ref }}" = "refs/heads/iteration/august" ]; then - echo "tag=test" >> $GITHUB_OUTPUT else echo "tag=unknown" >> $GITHUB_OUTPUT fi - name: 登录 Docker Registry run: | - echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "${{ env.REGISTRY }}" \ - --username "${{ secrets.REGISTRY_USERNAME }}" \ - --password-stdin + echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "${{ env.REGISTRY }}" --username "${{ secrets.REGISTRY_USERNAME }}" --password-stdin - name: 构建前端镜像 run: | docker build -t ${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }} . - docker tag ${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }} \ - ${{ env.IMAGE_NAME }}:${{ github.sha }} + docker tag ${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }} ${{ env.IMAGE_NAME }}:${{ github.sha }} - name: 推送镜像到 Registry run: | docker push ${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }} docker push ${{ env.IMAGE_NAME }}:${{ github.sha }} - - name: 部署到测试环境(iteration/august) + - name: 部署到本地(仅 iteration/august 分支) if: github.ref == 'refs/heads/iteration/august' run: | # 确保部署目录存在 @@ -86,32 +82,6 @@ jobs: echo "部署完成!" docker compose -f docker-compose.prod.yml ps - - name: 部署到生产环境(main) - if: github.ref == 'refs/heads/main' - run: | - mkdir -p ${{ env.DEPLOY_DIR }} - - echo "当前工作目录: $(pwd)" - echo "当前目录内容:" - ls -la - - echo "更新部署配置文件..." - cp -v docker-compose.prod.yml ${{ env.DEPLOY_DIR }}/ - - cd ${{ env.DEPLOY_DIR }} - - echo "拉取最新镜像..." - docker compose -f docker-compose.prod.yml pull - - echo "重启服务..." - docker compose -f docker-compose.prod.yml up -d - - echo "等待服务启动..." - sleep 5 - - echo "部署完成!" - docker compose -f docker-compose.prod.yml ps - - name: 构建结果通知 if: always() run: | @@ -120,4 +90,4 @@ jobs: echo "镜像标签: ${{ github.sha }}" else echo "构建失败" - fi \ No newline at end of file + fi diff --git a/src/components/business/CreateRefundDialog.vue b/src/components/business/CreateRefundDialog.vue index 24b7de7..a681f27 100644 --- a/src/components/business/CreateRefundDialog.vue +++ b/src/components/business/CreateRefundDialog.vue @@ -55,10 +55,18 @@ @@ -111,11 +119,7 @@ /> - + @@ -125,8 +129,8 @@ :rows="3" maxlength="1000" show-word-limit - placeholder="请输入退款原因" - /> + placeholder="请输入退款原因" + /> @@ -393,8 +395,7 @@ const resubmitFormRef = ref() const requireResubmitCustomerAccount = - (message: string) => - (_rule: unknown, value: string, callback: (error?: Error) => void) => { + (message: string) => (_rule: unknown, value: string, callback: (error?: Error) => void) => { if (resubmitForm.method === RefundMethod.CUSTOMER_ACCOUNT && !value?.trim()) { callback(new Error(message)) } else { @@ -876,13 +877,7 @@ data.method = resubmitForm.method } if (resubmitForm.method === RefundMethod.CUSTOMER_ACCOUNT) { - data.customer_account_info = { - account_name: resubmitForm.customer_account_name.trim(), - account_number: resubmitForm.customer_account_number.trim(), - ...(resubmitForm.customer_bank_name.trim() - ? { bank_name: resubmitForm.customer_bank_name.trim() } - : {}) - } + data.customer_account_info = `${resubmitForm.customer_account_name.trim()} ${resubmitForm.customer_account_number.trim()}${resubmitForm.customer_bank_name.trim() ? ` ${resubmitForm.customer_bank_name.trim()}` : ''}` data.refund_voucher_key = resubmitForm.refund_voucher_key } else if (resubmitForm.refund_voucher_key.length) { data.refund_voucher_key = resubmitForm.refund_voucher_key @@ -1068,7 +1063,6 @@ refundVoucherFileKeys.value = voucherKeys } -