Commit 8f6debd4 authored by GuanHua's avatar GuanHua

fix: 收藏管理修改删除收藏接口

parent e9ffdf8b
......@@ -49,9 +49,11 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
const PDFList = ['application/pdf']
const isPDF = PDFList.includes(file.type)
if (!isLt50M) {
setFileLoading(true);
message.error('上传文件大小不超过 50M!');
}
if (!isPDF) {
setFileLoading(true);
message.error('请上传pdf格式文件');
}
return isLt50M && isPDF;
......
......@@ -49,9 +49,11 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
const PDFList = ['application/pdf']
const isPDF = PDFList.includes(file.type)
if (!isLt50M) {
setFileLoading(true);
message.error('上传文件大小不超过 50M!');
}
if (!isPDF) {
setFileLoading(true);
message.error('请上传pdf格式文件');
}
return isLt50M && isPDF;
......
......@@ -157,14 +157,17 @@ const Commodity: React.FC = () => {
onOk: () => {
return new Promise((resolve, reject) => {
const param: any = {
commodityId: detail.commodity.id,
type: detail.type
id: detail.id,
}
if ([3, 4, 5].includes(detail.type)) {
param.channelMemberId = detail.channelMemberId
let postFn
if (detail.isChannel) {
postFn = PublicApi.postSearchShopCommodityCollectChannelDeleteCommodityCollectById
} else {
postFn = PublicApi.postSearchShopCommodityCollectDeleteCommodityCollectById
}
PublicApi.postSearchShopCommodityCollectDeleteCommodityCollect(param).then(res => {
postFn && postFn (param).then(res => {
if (res.code === 1000) {
fetchCollectCommodityList()
resolve(true)
......
......@@ -6,6 +6,7 @@ import * as ProductApi from './ProductApi'
import * as TemplateApi from './TemplateApi'
import * as PayApi from './PayApi'
import * as SearchApi from './SearchApi'
import * as SearchV2Api from './SearchV2Api'
import * as OrderApi from './OrderApi'
import * as SettleApi from './SettleApi'
import * as AfterService from './AfterServiceApi'
......@@ -47,6 +48,7 @@ export const PublicApi = {
...TemplateApi,
...PayApi,
...SearchApi,
...SearchV2Api,
...OrderApi,
...SettleApi,
...AfterService,
......
......@@ -7,6 +7,7 @@ const tokenList = [
{ name: 'Template', token: '7ec923520215c7e2f771867cb4d29cafbf823daf0fb2d3d9fa70b57a523c8bfb', categoryIds: [0], }, // 店铺模板服务
{ name: 'Pay', token: '34608cd33222b1650795459d73b8eb0b260eb92cf5e8d1e646f85a4875e36f05', categoryIds: [0], }, // 支付服务
{ name: 'Search', token: 'ca19f532efba91f7773cbfbd526b798c6ac83df670071e97d72c50dca1d53a48', categoryIds: [0], }, // 搜索服务
{ name: 'SearchV2', token: 'f3e6ec26764f54d06ba33f487ff42d7debeaef397e51dc395040447737eb2e66', categoryIds: [9367, 9370], }, // 搜索服务V2
{ name: 'Order', token: 'fcebd7d4c6b6930790e844725f348280c2227b8044ae8a16bf56ead2720ec1b6', categoryIds: [0], }, //订单服务
{ name: 'Settle', token: 'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a', categoryIds: [0], }, //结算服务
{ name: 'AfterService', token: '39db719680bf1b3db21bc1deda933cde16d17559e9676bf848ec96c1320e68df', categoryIds: [0], }, // '售后服务'
......
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