Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
web
Commits
be857981
提交
be857981
authored
1月 08, 2024
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:问题修复
上级
0b148919
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
30 行增加
和
4 行删除
+30
-4
index.tsx
src/components/layout/index.tsx
+1
-1
index.tsx
src/components/loginModal/index.tsx
+7
-0
_index.tsx
src/pages/order/comp/mallOrderLsit/_index.tsx
+20
-3
globalData.ts
src/store/module/globalData.ts
+2
-0
没有找到文件。
src/components/layout/index.tsx
浏览文件 @
be857981
import
React
from
'react'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
AgreeModalView
from
'@/components/agreeModal'
;
import
AgreeModalView
from
'@/components/agreeModal
/index
'
;
import
ContentView
from
'@/components/layout/content'
;
import
FooterView
from
'@/components/layout/footer'
;
import
HeaderView
from
'@/components/layout/header'
;
...
...
src/components/loginModal/index.tsx
浏览文件 @
be857981
...
...
@@ -120,6 +120,13 @@ const LoginModalView = ({
onCancel
?.();
// 关闭定时器
if
(
timer
)
clearInterval
(
timer
);
// 如果需要返回上一页
if
(
globalData
?.
loginModalBack
)
{
// 返回上一页
router
.
back
();
// 复原状态
dispatch
(
setGlobalData
({
loginModalBack
:
false
}));
}
};
// 提交数据
const
handleSubmit
=
async
()
=>
{
...
...
src/pages/order/comp/mallOrderLsit/_index.tsx
浏览文件 @
be857981
...
...
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
import
{
Button
,
Table
}
from
'antd'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
{
InterDataType
,
InterListType
,
PaginationProps
}
from
'@/api/interface'
;
import
{
MallOrderListType
,
...
...
@@ -9,6 +10,9 @@ import {
}
from
'@/api/interface/order'
;
import
{
OrderAPI
}
from
'@/api/modules/order'
;
import
TableItem
from
'@/components/orderTableItem'
;
import
{
RootState
}
from
'@/store'
;
import
{
setGlobalData
}
from
'@/store/module/globalData'
;
import
{
SystemState
}
from
'@/store/module/system'
;
// 列表类型
type
ListType
=
InterListType
<
MallOrderListType
>
;
...
...
@@ -16,6 +20,10 @@ type ListType = InterListType<MallOrderListType>;
type
StatusType
=
InterDataType
<
UavOrderStatusListType
>
;
const
MallOrderListTable
:
React
.
FC
=
()
=>
{
// store
const
dispatch
=
useDispatch
();
// system
const
system
=
useSelector
((
state
:
RootState
)
=>
state
.
system
)
as
SystemState
;
// 路由钩子
const
router
=
useRouter
();
// 订单状态列表
...
...
@@ -80,9 +88,18 @@ const MallOrderListTable: React.FC = () => {
};
// 页面挂载
useEffect(() => {
getMallOrderStatusList().then();
getGoodsOrderList().then();
}, []);
if (!system?.token) {
dispatch(
setGlobalData({
loginModalVisible: true,
loginModalBack: true,
}),
);
} else {
getMallOrderStatusList().then();
getGoodsOrderList().then();
}
}, [system]);
const tableColumns: ColumnsType<ListType[0]> = [
{
title: '商品',
...
...
src/store/module/globalData.ts
浏览文件 @
be857981
...
...
@@ -9,6 +9,7 @@ export type GlobalDataState = {
loadingSpinnerVisible
:
boolean
;
loginModalVisible
:
boolean
;
loginModalTitle
?:
string
;
loginModalBack
:
boolean
;
qrcodeModalVisible
:
boolean
;
qrcodeModalPath
?:
string
;
qrcodeModalScene
?:
string
;
...
...
@@ -25,6 +26,7 @@ export type GlobalDataState = {
const
initialState
:
GlobalDataState
=
{
loadingSpinnerVisible
:
false
,
loginModalVisible
:
false
,
loginModalBack
:
false
,
qrcodeModalVisible
:
false
,
toastModalVisible
:
false
,
toastModalBack
:
false
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论