From 699ff9c01e6a8ce60b89fc3cb0eebe0dd729420e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sat, 11 Apr 2026 18:57:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(invite):=20=E4=BF=AE=E5=A4=8D=E9=82=80?= =?UTF-8?q?=E8=AF=B7=E5=8A=A0=E5=85=A5=E8=AF=B7=E6=B1=82=E5=A4=B4TenantId?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 从配置中引入TenantId常量 - 将请求header中的TenantId字段由硬编码改为动态变量 - 确保GET请求和加密数据请求均正确带上TenantId头信息 - 提升接口调用的一致性和维护性 --- src/passport/invite/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/passport/invite/index.tsx b/src/passport/invite/index.tsx index 0c00cc1..c382e54 100644 --- a/src/passport/invite/index.tsx +++ b/src/passport/invite/index.tsx @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'; import { View, Text, Button, Image } from '@tarojs/components'; import Taro, { useRouter } from '@tarojs/taro'; import { SERVER_API_URL } from "@/utils/server"; +import { TenantId } from "@/config/app"; /** * 邀请加入确认页面 @@ -79,7 +80,7 @@ const InvitePage: React.FC = () => { method: 'GET', header: { 'content-type': 'application/json', - 'TenantId': 5 + TenantId } }); @@ -138,7 +139,10 @@ const InvitePage: React.FC = () => { encryptedData, iv }, - header: { 'content-type': 'application/json' } + header: { + 'content-type': 'application/json', + TenantId + } }); if (res.data.code === 200 || res.data.code === 0) {