fix(invite): 修复邀请加入请求头TenantId传递问题
- 从配置中引入TenantId常量 - 将请求header中的TenantId字段由硬编码改为动态变量 - 确保GET请求和加密数据请求均正确带上TenantId头信息 - 提升接口调用的一致性和维护性
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user