Commit 0f749049 authored by 周宏民's avatar 周宏民

fix:演示功能入口 对http 链接拦截

parent d1653f67
Pipeline #86841 waiting for manual action with stages
...@@ -25,6 +25,7 @@ const BottomItem = props => { ...@@ -25,6 +25,7 @@ const BottomItem = props => {
}; };
const toPage = (url, col) => { const toPage = (url, col) => {
if (!isJump) return message.warning('该用户没有权限!'); if (!isJump) return message.warning('该用户没有权限!');
if (!url.includes('https')) return;
if (!url.includes('user/noscret') || projectConfig[col['平台名称']]) { if (!url.includes('user/noscret') || projectConfig[col['平台名称']]) {
return handToPage(url); return handToPage(url);
} }
...@@ -41,7 +42,7 @@ const BottomItem = props => { ...@@ -41,7 +42,7 @@ const BottomItem = props => {
{row.map((col, cIndex) => ( {row.map((col, cIndex) => (
<div <div
key={`${rindex}-${cIndex}`} key={`${rindex}-${cIndex}`}
type={col['项目环境'] && isJump ? 'jump' : 'none'} type={col['项目环境'] && col['项目环境'].includes('https') && isJump ? 'jump' : 'none'}
onClick={() => toPage(col['项目环境'], col)} onClick={() => toPage(col['项目环境'], col)}
alt="点击体验" alt="点击体验"
className={styles.list_item} className={styles.list_item}
......
...@@ -14,7 +14,7 @@ const RightItem = props => { ...@@ -14,7 +14,7 @@ const RightItem = props => {
if (row.site) { if (row.site) {
handToProduct(row); handToProduct(row);
} else if (row['产品地址']) { } else if (row['产品地址']) {
handToPage(row['产品地址']); row['产品地址'].includes('https') && handToPage(row['产品地址']);
} }
}; };
const renderRow = (row, index) => { const renderRow = (row, index) => {
...@@ -24,7 +24,7 @@ const RightItem = props => { ...@@ -24,7 +24,7 @@ const RightItem = props => {
className={styles.r_list_item} className={styles.r_list_item}
key={row['产品名称']} key={row['产品名称']}
rIndex={rIndex} rIndex={rIndex}
type={row['产品地址'] || row.site ? 'jump' : 'none'} type={(row['产品地址'] && row['产品地址'].includes('https')) || row.site ? 'jump' : 'none'}
onClick={() => toPage(row)} onClick={() => toPage(row)}
> >
<div className={styles.r_list_item_title}>{row['产品名称']}</div> <div className={styles.r_list_item_title}>{row['产品名称']}</div>
......
...@@ -206,7 +206,7 @@ const Demonstration = props => { ...@@ -206,7 +206,7 @@ const Demonstration = props => {
const handToPage = url => { const handToPage = url => {
if (!url) return message.warning('该环境未配置,请联系管理员'); if (!url) return message.warning('该环境未配置,请联系管理员');
if (!url.includes('https')) return;
setLinkUrl(url); setLinkUrl(url);
}; };
...@@ -231,10 +231,10 @@ const Demonstration = props => { ...@@ -231,10 +231,10 @@ const Demonstration = props => {
</div> </div>
); );
} }
const isJump = col.site || (col['数值'] && col['数值'].includes('http')); const isJump = col.site || (col['数值'] && col['数值'].includes('https'));
return ( return (
<div <div
onClick={() => handToPlatform(col)} onClick={() => isJump && handToPlatform(col)}
className={styles.center_col} className={styles.center_col}
style={{ flex: col.flex }} style={{ flex: col.flex }}
type={col.title} type={col.title}
......
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