Commit 96675f1e authored by GuanHua's avatar GuanHua

feat:渠道商城链接

parent 1233eb07
......@@ -228,13 +228,18 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
if (!mallItem) {
return ""
}
let newSiteUrl = siteUrl
if (newSiteUrl.indexOf('http') < 0) {
newSiteUrl = `http://` + newSiteUrl
}
if (mallItem.environment === 1) {
switch (mallItem.type) {
case 3:
result = `${siteUrl}/channelmall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/channelmall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
break
case 4:
result = `${siteUrl}/ichannelmall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/ichannelmall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
break
// case 5:
// result = `${siteUrl}/channelmall/pointsMall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
......
......@@ -228,12 +228,17 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
return ""
}
if (mallItem.environment === 1) {
let newSiteUrl = siteUrl
if (newSiteUrl.indexOf('http') < 0) {
newSiteUrl = `http://` + newSiteUrl
}
switch (mallItem.type) {
case 1:
result = `${siteUrl}/shop?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/shop?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId }))}`
break
case 2:
result = `${siteUrl}/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 }))}`
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