Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
e0bc6424
提交
e0bc6424
authored
6月 03, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:跨域代理,商品页面
上级
746a63de
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
548 行增加
和
78 行删除
+548
-78
.env.development
env/.env.development
+1
-1
produceManageAPI.ts
src/api/modules/produceManageAPI.ts
+14
-0
index.tsx
src/common/hook/optionHook/index.tsx
+0
-10
index.tsx
src/components/goods/commonGoodsList/index.tsx
+98
-0
index.tsx
src/pages/mallManage/industryManage/industryDetail/index.tsx
+0
-0
index.tsx
src/pages/mallManage/industryManage/industryList/index.tsx
+16
-28
index.tsx
src/pages/mallManage/mallGoods/goodsList/index.tsx
+9
-0
index.tsx
src/pages/mallManage/produceManage/produceDetail/index.tsx
+322
-0
index.tsx
src/pages/mallManage/produceManage/produceList/index.tsx
+17
-29
index.tsx
src/pages/mallManage/rentGoods/rentList/index.tsx
+9
-0
router.tsx
src/router/router.tsx
+55
-10
vite.config.ts
vite.config.ts
+7
-0
没有找到文件。
env/.env.development
浏览文件 @
e0bc6424
#请求接口地址
#请求接口地址
#VITE_REQUEST_BASE_URL='https://www.iuav.shop'
#VITE_REQUEST_BASE_URL='https://www.iuav.shop'
VITE_REQUEST_BASE_URL='
https://test.iuav.shop
'
VITE_REQUEST_BASE_URL='
/api
'
#旧版接口地址
#旧版接口地址
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='https://test.iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='https://test.iuav.mmcuav.cn'
...
...
src/api/modules/produceManageAPI.ts
浏览文件 @
e0bc6424
...
@@ -30,4 +30,18 @@ export class ProduceManageAPI {
...
@@ -30,4 +30,18 @@ export class ProduceManageAPI {
static
editProductSku
=
(
data
:
unknown
)
=>
{
static
editProductSku
=
(
data
:
unknown
)
=>
{
return
axios
.
post
(
'uavgoods/product/spec/editProductSku'
,
data
);
return
axios
.
post
(
'uavgoods/product/spec/editProductSku'
,
data
);
};
};
// 产品规格管理---删除规格
static
removeProductSpec
=
(
params
:
unknown
)
=>
{
return
axios
.
get
(
'uavgoods/product/spec/removeProductSpec'
,
{
params
});
};
// 产品sku管理-编辑单个产品sku时的信息回显
static
getProductSkuDetail
=
(
params
:
unknown
)
=>
{
return
axios
.
get
(
'uavgoods/product/spec/getProductSkuDetail'
,
{
params
});
};
// 产品sku管理-产品规格管理-分页列表
static
listPageProductSpec
=
(
params
:
unknown
)
=>
{
return
axios
.
get
(
'uavgoods/product/spec/listPageProductSpec'
,
{
params
});
};
}
}
src/common/hook/optionHook/index.tsx
浏览文件 @
e0bc6424
import
{
useEffect
,
useState
}
from
'react'
;
import
{
RoleAPI
}
from
'@/api'
;
import
{
limitEntity
}
from
'@/api/modules/role'
;
import
{
limitEntity
}
from
'@/api/modules/role'
;
function
useOptionShow
(
id
:
number
)
{
function
useOptionShow
(
id
:
number
)
{
// const [show, setShow] = useState<boolean>(false);
return
(
JSON
.
parse
(
localStorage
.
getItem
(
'routeList'
)
as
string
)
||
[]).
some
(
return
(
JSON
.
parse
(
localStorage
.
getItem
(
'routeList'
)
as
string
)
||
[]).
some
(
(
v
:
limitEntity
)
=>
v
.
id
===
id
,
(
v
:
limitEntity
)
=>
v
.
id
===
id
,
);
);
// useEffect(() => {
// RoleAPI.getListCuserMenuInfo().then((res: any) => {
// const bol: boolean = res.result.some((v: limitEntity) => v.id === id);
// setShow(bol);
// });
// }, []);
// return show;
}
}
export
default
useOptionShow
;
export
default
useOptionShow
;
src/components/goods/commonGoodsList/index.tsx
0 → 100644
浏览文件 @
e0bc6424
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
{
useState
}
from
'react'
;
import
{
Button
,
Card
,
Table
}
from
'antd'
;
import
{
ArrowDownOutlined
,
ArrowUpOutlined
,
DeleteOutlined
,
PlusOutlined
,
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
const
GoodsList
=
()
=>
{
const
tabList
=
[
{
key
:
'1'
,
tab
:
'全部'
,
},
{
key
:
'2'
,
tab
:
'上架中'
,
},
{
key
:
'3'
,
tab
:
'仓库中'
,
},
];
const
[
activeTabKey
,
setActiveTabKey
]
=
useState
<
string
>
(
'1'
);
const
[
searchColumns
]
=
useState
<
searchColumns
[]
>
([
{
label
:
'商品名称'
,
placeholder
:
'请输入商品名称'
,
name
:
''
,
type
:
'input'
,
},
{
label
:
'所属目录'
,
placeholder
:
'请选择所属目录'
,
name
:
''
,
type
:
'select'
,
options
:
[],
},
{
label
:
'创建时间'
,
placeholder
:
'请输入选择创建时间'
,
name
:
''
,
type
:
'rangePicker'
,
},
]);
const
tableColumns
:
ColumnsType
<
any
>
=
[
{
title
:
'序号'
,
align
:
'center'
},
{
title
:
'图片'
,
align
:
'center'
},
{
title
:
'商品名称'
,
align
:
'center'
},
{
title
:
'所属目录'
,
align
:
'center'
},
{
title
:
'创建时间'
,
align
:
'center'
},
{
title
:
'状态'
,
align
:
'center'
},
{
title
:
'操作'
,
align
:
'center'
,
render
:
()
=>
(
<>
<
Button
type=
'link'
>
编辑
</
Button
>
<
Button
type=
'link'
>
详情
</
Button
>
</>
),
},
];
const
[
tableData
]
=
useState
<
{
id
:
number
}[]
>
([{
id
:
1
}]);
const
onTabChange
=
(
key
:
string
)
=>
{
setActiveTabKey
(
key
);
};
return
(
<
div
className=
'goods-list'
>
<
SearchBox
search=
{
searchColumns
}
child=
{
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
>
新增商品
</
Button
>
}
/>
<
Card
tabList=
{
tabList
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
onTabChange
}
>
<
div
className=
'header-operate'
style=
{
{
marginBottom
:
'10px'
}
}
>
<
Button
type=
'primary'
style=
{
{
marginRight
:
'10px'
}
}
icon=
{
<
ArrowUpOutlined
/>
}
>
上架
</
Button
>
<
Button
type=
'primary'
style=
{
{
marginRight
:
'10px'
}
}
icon=
{
<
ArrowDownOutlined
/>
}
>
下架
</
Button
>
<
Button
danger
icon=
{
<
DeleteOutlined
/>
}
>
删除
</
Button
>
</
div
>
<
Table
columns=
{
tableColumns
}
bordered
dataSource=
{
tableData
}
/>
</
Card
>
</
div
>
);
};
export
default
GoodsList
;
src/pages/mallManage/industryManage/industryDetail/index.tsx
0 → 100644
浏览文件 @
e0bc6424
差异被折叠。
点击展开。
src/pages/mallManage/industryManage/industryList/index.tsx
浏览文件 @
e0bc6424
...
@@ -23,7 +23,7 @@ function IndustryList() {
...
@@ -23,7 +23,7 @@ function IndustryList() {
// 路由操作
// 路由操作
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
// 表格数据
// 表格数据
const
[
tableData
,
setTableData
]
=
useState
<
IndustrySkuType
[]
>
([
]);
const
[
tableData
,
setTableData
]
=
useState
<
any
>
([{
id
:
1
}
]);
// 加载中
// 加载中
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
// 行业列表
// 行业列表
...
@@ -33,7 +33,7 @@ function IndustryList() {
...
@@ -33,7 +33,7 @@ function IndustryList() {
// 跳转详情
// 跳转详情
const
handleDetail
=
(
record
:
{
id
:
number
})
=>
{
const
handleDetail
=
(
record
:
{
id
:
number
})
=>
{
navigate
({
navigate
({
pathname
:
'/
goodsManage/industryManage/d
etail'
,
pathname
:
'/
mallManage/industryD
etail'
,
search
:
`id=
${
record
.
id
}
`
,
search
:
`id=
${
record
.
id
}
`
,
});
});
// console.log(record);
// console.log(record);
...
@@ -69,27 +69,15 @@ function IndustryList() {
...
@@ -69,27 +69,15 @@ function IndustryList() {
render
:
(
text
:
string
,
record
)
=>
{
render
:
(
text
:
string
,
record
)
=>
{
return
(
return
(
<
div
>
<
div
>
{
btnDetail
?
(
<
Button
type=
'link'
onClick=
{
()
=>
handleDetail
(
record
)
}
>
<
Button
type=
'link'
onClick=
{
()
=>
handleDetail
(
record
)
}
>
详情
详情
</
Button
>
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
)
}
>
)
:
(
编辑
''
</
Button
>
)
}
<
Button
type=
'link'
onClick=
{
()
=>
openDeleteModal
(
record
)
}
>
{
btnEdit
?
(
删除
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
)
}
>
</
Button
>
编辑
</
Button
>
)
:
(
''
)
}
{
btnDelete
?
(
<
Button
type=
'link'
onClick=
{
()
=>
openDeleteModal
(
record
)
}
>
删除
</
Button
>
)
:
(
''
)
}
</
div
>
</
div
>
);
);
},
},
...
@@ -234,11 +222,11 @@ function IndustryList() {
...
@@ -234,11 +222,11 @@ function IndustryList() {
// componentDidMount
// componentDidMount
useEffect
(()
=>
{
useEffect
(()
=>
{
query
=
{};
//
query = {};
(
async
()
=>
{
//
(async () => {
await
getFirstIndustryTypeInfo
();
//
await getFirstIndustryTypeInfo();
await
getTableList
();
//
await getTableList();
})();
//
})();
},
[]);
},
[]);
return
(
return
(
...
...
src/pages/mallManage/mallGoods/goodsList/index.tsx
0 → 100644
浏览文件 @
e0bc6424
import
CommonGoodsList
from
'~/components/goods/commonGoodsList'
;
const
GoodsList
=
()
=>
{
return
(
<
div
className=
'goods-list'
>
<
CommonGoodsList
/>
</
div
>
);
};
export
default
GoodsList
;
src/pages/mallManage/produceManage/produceDetail/index.tsx
0 → 100644
浏览文件 @
e0bc6424
差异被折叠。
点击展开。
src/pages/mallManage/produceManage/produceList/index.tsx
浏览文件 @
e0bc6424
...
@@ -24,7 +24,7 @@ function ProduceManage() {
...
@@ -24,7 +24,7 @@ function ProduceManage() {
// 路由操作
// 路由操作
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
// 表格数据
// 表格数据
const
[
tableData
,
setTableData
]
=
useState
<
ProductSkuType
[]
>
([
]);
const
[
tableData
,
setTableData
]
=
useState
<
any
>
([{
id
:
1
}
]);
// 加载中
// 加载中
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
// 产品类型下拉列表
// 产品类型下拉列表
...
@@ -42,7 +42,7 @@ function ProduceManage() {
...
@@ -42,7 +42,7 @@ function ProduceManage() {
// 跳转详情
// 跳转详情
const
handleDetail
=
(
record
:
ProductSkuType
)
=>
{
const
handleDetail
=
(
record
:
ProductSkuType
)
=>
{
navigate
({
navigate
({
pathname
:
'/
goodsManage/productManage/d
etail'
,
pathname
:
'/
mallManage/produceD
etail'
,
search
:
`id=
${
record
.
id
}
`
,
search
:
`id=
${
record
.
id
}
`
,
});
});
};
};
...
@@ -104,27 +104,15 @@ function ProduceManage() {
...
@@ -104,27 +104,15 @@ function ProduceManage() {
render
:
(
text
:
string
,
record
)
=>
{
render
:
(
text
:
string
,
record
)
=>
{
return
(
return
(
<
div
>
<
div
>
{
btnDetail
?
(
<
Button
type=
'link'
onClick=
{
()
=>
handleDetail
(
record
)
}
>
<
Button
type=
'link'
onClick=
{
()
=>
handleDetail
(
record
)
}
>
详情
详情
</
Button
>
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
)
}
>
)
:
(
编辑
''
</
Button
>
)
}
<
Button
type=
'link'
onClick=
{
()
=>
handleDelete
(
record
)
}
>
{
btnEdit
?
(
删除
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
)
}
>
</
Button
>
编辑
</
Button
>
)
:
(
''
)
}
{
btnDelete
?
(
<
Button
type=
'link'
onClick=
{
()
=>
handleDelete
(
record
)
}
>
删除
</
Button
>
)
:
(
''
)
}
</
div
>
</
div
>
);
);
},
},
...
@@ -220,12 +208,12 @@ function ProduceManage() {
...
@@ -220,12 +208,12 @@ function ProduceManage() {
};
};
// componentDidMount
// componentDidMount
useEffect
(()
=>
{
useEffect
(()
=>
{
query
=
{};
//
query = {};
getMakeList
();
//
getMakeList();
getDescList
();
//
getDescList();
(
async
()
=>
{
//
(async () => {
await
getTableList
();
//
await getTableList();
})();
//
})();
},
[]);
},
[]);
return
(
return
(
...
...
src/pages/mallManage/rentGoods/rentList/index.tsx
0 → 100644
浏览文件 @
e0bc6424
import
CommonGoodsList
from
'~/components/goods/commonGoodsList'
;
const
RentList
=
()
=>
{
return
(
<
div
className=
'rent-list'
>
<
CommonGoodsList
/>
</
div
>
);
};
export
default
RentList
;
src/router/router.tsx
浏览文件 @
e0bc6424
...
@@ -36,18 +36,25 @@ import CustomMoneyView from '~/pages/customManage/customMoney';
...
@@ -36,18 +36,25 @@ import CustomMoneyView from '~/pages/customManage/customMoney';
import
CustomMoneyDetail
from
'~/pages/customManage/customMoney/detail'
;
import
CustomMoneyDetail
from
'~/pages/customManage/customMoney/detail'
;
// 活动
// 活动
const
ActivityList
=
React
.
lazy
(()
=>
import
(
'src/pages/activityManage/activityList'
));
//活动管理
const
ActivityList
=
React
.
lazy
(()
=>
import
(
'src/pages/activityManage/activityList'
));
//活动管理
// 服务
const
ServiceListView
=
React
.
lazy
(()
=>
import
(
'~/pages/mallManage/serviceManage/serviceList'
));
//商品管理
const
ServiceListView
=
React
.
lazy
(()
=>
import
(
'~/pages/mallManage/serviceManage/serviceList'
));
//服务列表
const
ServiceDetailView
=
React
.
lazy
(
const
ServiceDetailView
=
React
.
lazy
(
()
=>
import
(
'~/pages/mallManage/serviceManage/serviceDetail'
),
()
=>
import
(
'~/pages/mallManage/serviceManage/serviceDetail'
),
);
);
//服务详情
const
ServiceIntroduceView
=
React
.
lazy
(
const
ServiceIntroduceView
=
React
.
lazy
(
()
=>
import
(
'~/pages/mallManage/serviceManage/serviceIntroduce'
),
()
=>
import
(
'~/pages/mallManage/serviceManage/serviceIntroduce'
),
);
);
//服务介绍
// 产品
const
RentListView
=
React
.
lazy
(()
=>
import
(
'~/pages/mallManage/rentGoods/rentList'
));
//租赁列表
const
ProduceListView
=
React
.
lazy
(()
=>
import
(
'~/pages/mallManage/produceManage/produceList'
));
const
MallGoodsView
=
React
.
lazy
(()
=>
import
(
'~/pages/mallManage/mallGoods/goodsList'
));
//商城商品
// 行业
const
ProduceListView
=
React
.
lazy
(()
=>
import
(
'~/pages/mallManage/produceManage/produceList'
));
//产品列表
const
IndustryListView
=
React
.
lazy
(()
=>
import
(
'~/pages/mallManage/industryManage/industryList'
));
const
ProduceDetailView
=
React
.
lazy
(
()
=>
import
(
'~/pages/mallManage/produceManage/produceDetail'
),
);
//产品详情
const
IndustryListView
=
React
.
lazy
(()
=>
import
(
'~/pages/mallManage/industryManage/industryList'
));
//行业列表
const
IndustryDetailView
=
React
.
lazy
(
()
=>
import
(
'~/pages/mallManage/industryManage/industryDetail'
),
);
//行业详情
// 订单
// 订单
const
ProductOrderView
=
React
.
lazy
(()
=>
import
(
'src/pages/orderManage/productOrder'
));
//销售订单
const
ProductOrderView
=
React
.
lazy
(()
=>
import
(
'src/pages/orderManage/productOrder'
));
//销售订单
...
@@ -202,23 +209,61 @@ export const routerList: Array<RouteObjectType> = [
...
@@ -202,23 +209,61 @@ export const routerList: Array<RouteObjectType> = [
},
},
},
},
{
{
path
:
'/mallManage/rentList'
,
element
:
withLoadingComponent
(<
RentListView
/>),
meta
:
{
id
:
10130
,
icon
:
<
SmileOutlined
/>,
title
:
'租赁商品'
,
},
},
{
path
:
'/mallManage/mallGoods'
,
element
:
withLoadingComponent
(<
MallGoodsView
/>),
meta
:
{
id
:
10140
,
icon
:
<
SmileOutlined
/>,
title
:
'商城商品'
,
},
},
{
path
:
'/mallManage/produceList'
,
path
:
'/mallManage/produceList'
,
element
:
withLoadingComponent
(<
ProduceListView
/>),
element
:
withLoadingComponent
(<
ProduceListView
/>),
meta
:
{
meta
:
{
id
:
101
3
0
,
id
:
101
5
0
,
icon
:
<
SmileOutlined
/>,
icon
:
<
SmileOutlined
/>,
title
:
'产品管理'
,
title
:
'产品管理'
,
},
},
},
},
{
{
path
:
'/mallManage/produceDetail'
,
element
:
withLoadingComponent
(<
ProduceDetailView
/>),
meta
:
{
id
:
10160
,
icon
:
<
SmileOutlined
/>,
title
:
'产品详情'
,
hidden
:
true
,
},
},
{
path
:
'/mallManage/industryList'
,
path
:
'/mallManage/industryList'
,
element
:
withLoadingComponent
(<
IndustryListView
/>),
element
:
withLoadingComponent
(<
IndustryListView
/>),
meta
:
{
meta
:
{
id
:
101
4
0
,
id
:
101
7
0
,
icon
:
<
SmileOutlined
/>,
icon
:
<
SmileOutlined
/>,
title
:
'行业方案'
,
title
:
'行业方案'
,
},
},
},
},
{
path
:
'/mallManage/industryDetail'
,
element
:
withLoadingComponent
(<
IndustryDetailView
/>),
meta
:
{
id
:
10180
,
icon
:
<
SmileOutlined
/>,
title
:
'行业详情'
,
hidden
:
true
,
},
},
],
],
},
},
{
{
...
...
vite.config.ts
浏览文件 @
e0bc6424
...
@@ -9,6 +9,13 @@ export default defineConfig({
...
@@ -9,6 +9,13 @@ export default defineConfig({
plugins
:
[
react
(),
tsconfigPaths
()],
plugins
:
[
react
(),
tsconfigPaths
()],
server
:
{
server
:
{
host
:
'0.0.0.0'
,
host
:
'0.0.0.0'
,
proxy
:
{
'/api'
:
{
target
:
'https://test.iuav.shop'
,
changeOrigin
:
true
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
''
),
},
},
},
},
envDir
:
resolve
(
__dirname
,
'env'
),
envDir
:
resolve
(
__dirname
,
'env'
),
resolve
:
{
resolve
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论