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