Commit 0809c991 authored by GuanHua's avatar GuanHua

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

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