Commit 96675f1e authored by GuanHua's avatar GuanHua

feat:渠道商城链接

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