Commit ec7c8596 authored by GuanHua's avatar GuanHua

feat:商品列表接口变成post,添加销毁message显示的方法

parent f49debc6
......@@ -147,6 +147,7 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
getFn && getFn(param, { headers }).then(res => {
setLoading(false)
if (res.code === 1000) {
message.destroy()
setCommodityList(res.data.data)
setTotalCount(res.data.totalCount)
}
......
......@@ -142,6 +142,7 @@ const CommodityDetail = (props) => {
}
getListFn && getListFn(param, { headers }).then(res => {
if (res.code === 1000) {
message.destroy()
setCommonCategoryCommodityList(res.data.data)
}
})
......
......@@ -6,7 +6,7 @@ import { Pagination } from 'antd'
import CommodityList from './list'
import SearchNoResult from '../components/SearchNoResult'
import isEmpty from 'lodash/isEmpty'
import { Spin } from 'antd'
import { Spin, message } from 'antd'
import { useLocalStore, observer } from 'mobx-react'
import { store } from '@/store'
import { PublicApi } from '@/services/api'
......@@ -102,6 +102,7 @@ const PointsMall: React.FC<CommodityPropsType> = (props) => {
getFn(param, { headers }).then(res => {
setLoading(false)
if (res.code === 1000) {
message.destroy()
setCommodityList(res.data.data)
setTotalCount(res.data.totalCount)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment