forked from gxwebsoft/mp-10550
refactor(request): 移除旧版请求工具并优化错误处理- 删除了 request-legacy.ts及相关文件
- 更新了所有 API 文件的导入路径 -优化了请求工具的错误处理逻辑 - 移除了冗余的调试信息 - 保留了关键的错误信息
This commit is contained in:
@@ -7,9 +7,9 @@ import {getUserInfo, getWxOpenId} from "@/api/layout";
|
||||
import {TenantId} from "@/config/app";
|
||||
import {getOrganization} from "@/api/system/organization";
|
||||
import {myUserVerify} from "@/api/system/userVerify";
|
||||
import {useShopInfo} from '@/hooks/useShopInfo';
|
||||
import { useShopInfo } from '@/hooks/useShopInfo';
|
||||
import {handleInviteRelation} from "@/utils/invite";
|
||||
import {View, Text} from '@tarojs/components'
|
||||
import {View,Text} from '@tarojs/components'
|
||||
import MySearch from "./MySearch";
|
||||
import './Header.scss';
|
||||
|
||||
@@ -86,7 +86,7 @@ const Header = (props: any) => {
|
||||
}
|
||||
|
||||
/* 获取用户手机号 */
|
||||
const handleGetPhoneNumber = ({detail}: { detail: { code?: string, encryptedData?: string, iv?: string } }) => {
|
||||
const handleGetPhoneNumber = ({detail}: {detail: {code?: string, encryptedData?: string, iv?: string}}) => {
|
||||
const {code, encryptedData, iv} = detail
|
||||
Taro.login({
|
||||
success: function () {
|
||||
@@ -168,7 +168,7 @@ const Header = (props: any) => {
|
||||
}}
|
||||
left={
|
||||
!IsLogin ? (
|
||||
<Space style={{display: 'flex', alignItems: 'center'}}>
|
||||
<View style={{display: 'flex', alignItems: 'center'}}>
|
||||
<Button style={{color: '#ffffff'}} open-type="getPhoneNumber" onGetPhoneNumber={handleGetPhoneNumber}>
|
||||
<Space>
|
||||
<Avatar
|
||||
@@ -176,10 +176,10 @@ const Header = (props: any) => {
|
||||
src={getWebsiteLogo()}
|
||||
/>
|
||||
<Text style={{color: '#ffffff'}}>{getWebsiteName()}</Text>
|
||||
<TriangleDown size={9} className={'text-white'}/>
|
||||
</Space>
|
||||
</Button>
|
||||
<TriangleDown size={9} className={'text-white'}/>
|
||||
</Space>
|
||||
</View>
|
||||
) : (
|
||||
<View style={{display: 'flex', alignItems: 'center', gap: '8px'}}>
|
||||
<Avatar
|
||||
|
||||
Reference in New Issue
Block a user