Commit 0809c991 authored by GuanHua's avatar GuanHua

fix:修改获取店铺详情接口参数

parent 1d2ad1e8
......@@ -178,7 +178,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
link = `${GlobalConfig.ichannelRootRoute}/commodity/detail?id=${item.id}&channelId=${btoa(JSON.stringify({ memberId }))}`
break
default:
link = `/shop/commodity/detail?id=${item.id}&shopId=${btoa(JSON.stringify({ memberId: item.memberId }))}`
link = `/shop/commodity/detail?id=${item.id}&shopId=${btoa(JSON.stringify({ shopId: item.storeId, memberId: item.memberId }))}`
break
}
return link
......
......@@ -157,7 +157,7 @@ const MallIndex: React.FC<MallIndexPropsType> = (props) => {
}
<FindMore />
<Information {...props} />
</div >
</div>
)
}
......
......@@ -57,12 +57,17 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
useEffect(() => {
if (query.memberId) {
fetchShopInfo(query.memberId)
fetchShopInfo(query.memberId, query.roleId, query.shopId)
}
}, [query])
const fetchShopInfo = (memberId) => {
PublicApi.getTemplateShopFindShop({ memberId }).then(res => {
const fetchShopInfo = (memberId, roleId, storeId) => {
const param: any = {
memberId,
roleId,
storeId
}
PublicApi.getTemplateShopFindShop(param).then(res => {
if (res.code === 1000) {
setShopInfo(res.data)
}
......@@ -86,7 +91,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
const menuData = basicInfo.menuData ? basicInfo.menuData.filter(item => !item.redirect) : []
const handleUpdate = () => {
fetchShopInfo(query.memberId)
fetchShopInfo(query.memberId, query.roleId, query.shopId)
}
return (
......
......@@ -231,7 +231,6 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
const getMallItemAndSetUrl = (mallId) => {
let result = ""
console.log(mallId, allMallList, "mallId")
const mallItem = allMallList.filter(item => item.id === mallId)[0]
if (!mallItem) {
return ""
......@@ -244,10 +243,10 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
switch (mallItem.type) {
case 1:
result = `${newSiteUrl}/shop?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/shop?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId, roleId: shopInfo.roleId }))}`
break
case 2:
result = `${newSiteUrl}/shop/pointsMall?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/shop/pointsMall?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId, roleId: shopInfo.roleId }))}`
break
default:
result = ""
......
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