Commit 00b2b8ef authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev

parents 1885ff18 4dcc1be6
This diff is collapsed.
......@@ -24,11 +24,11 @@ const Commodity: React.FC = () => {
* 获取收藏的商品列表
*/
const fetchCollectCommodityList = () => {
let param = {
const param: any = {
current,
pageSize
}
//@ts-ignore
PublicApi.getSearchShopCommodityCollectGetCommodityCollectList(param).then(res => {
if (res.code === 1000) {
setList(res.data.data)
......@@ -38,16 +38,18 @@ const Commodity: React.FC = () => {
}
const linkToDetail = (detail) => {
let el = document.createElement('a')
const el = document.createElement('a')
switch (detail.type) {
case 1:
case 2:
el.href = `/shop/commodity/detail?id=${detail.commodity.id}&shopId=${btoa(JSON.stringify({ shopId: detail.storeId, memberId: detail.memberId }))}`;
el.href = `/shop/commodity/detail?id=${detail.commodity.id}&shopId=${btoa(JSON.stringify({ shopId: detail.commodity.storeId, memberId: detail.commodity.memberId, roleId: detail.commodity.memberRoleId }))}`;
break
case 3:
el.href = `${GlobalConfig.channelRootRoute}/commodity/detail?id=${detail.commodity.id}&channelId=${btoa(JSON.stringify({ memberId: detail.channelMemberId }))}`;
break
case 4:
el.href = `${GlobalConfig.ichannelRootRoute}/commodity/detail?id=${detail.commodity.id}&channelId=${btoa(JSON.stringify({ memberId: detail.channelMemberId }))}`;
break
case 5:
el.href = `${GlobalConfig.channelRootRoute}/commodity/detail?id=${detail.commodity.id}&channelId=${btoa(JSON.stringify({ memberId: detail.channelMemberId }))}`;
break
......@@ -104,7 +106,7 @@ const Commodity: React.FC = () => {
content: `是否要取消收藏?`,
onOk: () => {
return new Promise((resolve, reject) => {
let param: any = {
const param: any = {
commodityId: detail.commodity.id,
type: detail.type
}
......
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