Skip to content

Commit

Permalink
hide rpa (#167)
Browse files Browse the repository at this point in the history
Co-authored-by: hanyachao <[email protected]>
  • Loading branch information
iseei and hanyachao authored Oct 7, 2024
1 parent 8288b3a commit 3f8458b
Show file tree
Hide file tree
Showing 20 changed files with 196 additions and 173 deletions.
5 changes: 5 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ module.exports = {
destination: '/',
permanent: true,
},
{
source: '/features/rpa',
destination: '/404',
permanent: true,
},
];
},
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 12 additions & 9 deletions src/components/FooterBarWithButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useMediaQuery } from '@react-hookz/web';
import ContactUsModal from '../ContactUsModal';
import { pick } from 'lodash';
import { useTranslation } from 'react-i18next';
import { HIDE_CONTACT_US } from '@src/config';

type Props = {
// title?: string
Expand Down Expand Up @@ -41,13 +42,13 @@ const FooterBarWithButton = (props: Props = {}) => {

const { t, i18n } = useTranslation('common');
const pcTitle = (
<div className={cls('title')}>
<div className={cls('title', HIDE_CONTACT_US && '!mb-0')}>
<span>{t('title-1')}</span>
<span className="text-[#EF3BFB] ml-2">{t('title-2')}</span>
</div>
);
const mobileTitle = (
<div className={cls('title')}>
<div className={cls('title', HIDE_CONTACT_US && '!mb-0')}>
<div className='text-center text-[28px]' style={{marginLeft: i18n.language === 'en' ? 0 : '2vw' }}>{t('mobile-title-1')}</div>
<div style={{ fontSize: i18n.language === 'en' ? "60%" : 20 }}>
<span>{t('mobile-title-2')}</span>
Expand All @@ -59,13 +60,15 @@ const FooterBarWithButton = (props: Props = {}) => {
return (
<div className="content" onClick={onClick}>
{isMobile ? mobileTitle : pcTitle}
<span
style={{ background: 'linear-gradient(96deg, #EF3BFB 0.67%, #6721FF 98.48%)' }}
className="rounded-full px-10 py-4 text-white cursor-pointer text-[18px]"
onClick={handleClick}
>
{t('contact')}
</span>
{ !HIDE_CONTACT_US && (
<span
style={{ background: 'linear-gradient(96deg, #EF3BFB 0.67%, #6721FF 98.48%)' }}
className="rounded-full px-10 py-4 text-white cursor-pointer text-[18px]"
onClick={handleClick}
>
{t('contact')}
</span>
) }
<ContactUsModal
{...pick(props.contactUsOption, ['type', 'qrCode'])}
open={showMobileModal}
Expand Down
11 changes: 7 additions & 4 deletions src/components/FooterMobile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useSessionStorageValue } from '@react-hookz/web';
import ContactForm from '../ContactForm';
import { ContactUsModalWithButton } from '../ContactUsModal';
import cls from 'classnames';
import { HIDE_CONTACT_US } from '@src/config';

const { Panel } = Collapse;
const FooterMobile: NextPage = () => {
Expand Down Expand Up @@ -256,11 +257,13 @@ const FooterMobile: NextPage = () => {
</div>

<div className={cx('fixed bottom-0 bg-transparent w-full z-50')}>
{ !isCloseFixed && fixedNode }
{!HIDE_CONTACT_US && !isCloseFixed && fixedNode }
<div className="px-4 flex h-[64px] items-center bg-white">
<ContactUsModalWithButton>
<Button block size="large" className="mx-2 h-[44px] !rounded-3xl !border-[#0555FF] !text-[#0555FF] ">{t('bullet-button-1')}</Button>
</ContactUsModalWithButton>
{!HIDE_CONTACT_US && (
<ContactUsModalWithButton>
<Button block size="large" className="mx-2 h-[44px] !rounded-3xl !border-[#0555FF] !text-[#0555FF] ">{t('bullet-button-1')}</Button>
</ContactUsModalWithButton>
)}
<Button
block
size="large"
Expand Down
2 changes: 1 addition & 1 deletion src/components/FooterNew/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Footer: NextPage = () => {
title: t('products-1'),
url: t('products-1-url'),
},
{ title: t('products-2'), url: t('products-2-url') },
// { title: t('products-2'), url: t('products-2-url') },
]
},
// i18n.language === 'zh'
Expand Down
64 changes: 39 additions & 25 deletions src/components/HeaderBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Image from 'next/image';
import Link from 'next/link';
import { IMenuItemProps } from '@src/interfaces';
import { useState, useEffect } from 'react';
import { host } from '@src/config';
import { HIDE_CONTACT_US, host } from '@src/config';
import { useTranslation } from 'react-i18next';
import { useRouter } from 'next/router';
import { isBrowserChrome } from '@src/utils/isBrowserChrome';
Expand Down Expand Up @@ -161,6 +161,17 @@ const SolutionsMenu: NextPage = () => {

const ProductMenu: NextPage = () => {
const { t, i18n } = useTranslation('common');
return (
<div className="dropdown-menu product !h-[100px] !w-[400px]" style={{ transform: "translate(-135px, -6px)"}}>
<div className="box">
<MenuItem
href="/features/ai"
>
{t('products-1')}
</MenuItem>
</div>
</div>
);
return (
<div className="dropdown-menu product !h-[150px] !w-[400px]" style={{ transform: "translate(-135px, -6px)"}}>
<div className="box">
Expand Down Expand Up @@ -558,7 +569,7 @@ const HeaderBar: NextPage = () => {
</menu>
}

<menu className={`header-right ${!isZh ? 'en' : 'zh'}`}>
<menu className={`header-right ${!isZh ? 'en' : 'zh'} ${HIDE_CONTACT_US ? 'header-right-no-contact' : ''}`}>
<HeaderMenu
linkTarget="_blank"
onClick={() => {
Expand All @@ -568,43 +579,46 @@ const HeaderBar: NextPage = () => {
>
{isZh ? 'EN' : '中文'}
</HeaderMenu>
{!HIDE_CONTACT_US && (
<Link href="#">
<a
className={`menu-item primary-link ${isMainPageDefault ? 'no-bg' : 'has-bg'}`}
draggable="false"
onClick={() => {
let qrCode: ContactUsOption['qrCode'] = 'sf-01';
if (pathname === '/about-us') {
if (pathname === '/about-us') {
qrCode = 'juzibot-01';
} else if (pathname === '/culture') {
} else if (pathname === '/culture') {
qrCode = 'juzibot-02';
}
}
showModal({ qrCode });
}}
>
{t('lets-talk')}
</a>
</Link>

<div
className={`menu-item primary-link round ${isMainPageDefault ? 'no-bg' : 'has-bg'}`}
draggable="false"
onClick={() => {
let qrCode: ContactUsOption['qrCode'] = 'sf-01';
if (pathname === '/about-us') {
qrCode = 'juzibot-01';
} else if (pathname === '/culture') {
qrCode = 'juzibot-02';
}
showModal({ qrCode });
}}
style={{
userSelect: 'none',
cursor: 'pointer',
}}
>
{t('login')}
</div>
)}
{!HIDE_CONTACT_US && (
<div
className={`menu-item primary-link round ${isMainPageDefault ? 'no-bg' : 'has-bg'}`}
draggable="false"
onClick={() => {
let qrCode: ContactUsOption['qrCode'] = 'sf-01';
if (pathname === '/about-us') {
qrCode = 'juzibot-01';
} else if (pathname === '/culture') {
qrCode = 'juzibot-02';
}
showModal({ qrCode });
}}
style={{
userSelect: 'none',
cursor: 'pointer',
}}
>
{t('login')}
</div>
)}
</menu>
</div>
</header>
Expand Down
30 changes: 17 additions & 13 deletions src/components/HeaderBarMobile/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextPage } from 'next';
import Image from 'next/image';
import { useState } from 'react';
import { host } from '@src/config';
import { HIDE_CONTACT_US, host } from '@src/config';
import { useTranslation } from 'react-i18next';
import cx from '@src/utils/cx';
import ContactUsModal from '../ContactUsModal';
Expand Down Expand Up @@ -54,18 +54,22 @@ const HeaderBarMobile: NextPage = () => {
/>
</span>
<>
<img
className='ml-4 w-[20px] h-[20px]'
src='https://s3.cn-north-1.amazonaws.com.cn/xiaoju-material/public/39e58645-fdf7-46a0-94c2-9cb4537734d1/%E5%AE%A2%E6%9C%8D.png'
alt=''
onClick={() => setShowContactUsModal(true)}
/>
<img
className='ml-4 w-[20px] h-[20px]'
src='https://s3.cn-north-1.amazonaws.com.cn/xiaoju-material/public/51873a1e-18e9-4c10-bf64-adfb67909d55/%E7%99%BB%E5%BD%95.png'
alt=''
onClick={() => setShowContactUsModal(true)}
/>
{!HIDE_CONTACT_US && (
<>
<img
className='ml-4 w-[20px] h-[20px]'
src='https://s3.cn-north-1.amazonaws.com.cn/xiaoju-material/public/39e58645-fdf7-46a0-94c2-9cb4537734d1/%E5%AE%A2%E6%9C%8D.png'
alt=''
onClick={() => setShowContactUsModal(true)}
/>
<img
className='ml-4 w-[20px] h-[20px]'
src='https://s3.cn-north-1.amazonaws.com.cn/xiaoju-material/public/51873a1e-18e9-4c10-bf64-adfb67909d55/%E7%99%BB%E5%BD%95.png'
alt=''
onClick={() => setShowContactUsModal(true)}
/>
</>
)}
<MobileMenu />
</>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/components/HeaderBarMobile/mobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const MobileMenu = () => {
<div className='relative'>
<img onClick={() => setShowMenu(false)} className="absolute w-[24px] right-[28px] top-[-12px] cursor-pointer" src="https://s3.cn-north-1.amazonaws.com.cn/xiaoju-material/public/141abebc-9772-4a56-8c38-fe84f8f9c841/close.png" alt="close" />
<div
className='mt-[16px] h-[188px] px-[28px]'
// className='mt-[16px] h-[188px] px-[28px]'
className='mt-[16px] h-[108px] px-[28px]'
style={{ borderBottom: '1px solid rgba(221, 227, 234, 0.5)' }}
>
<div className='text-[17px] leading-[24px] mt-[24px] font-bold text-[#364256]'>
Expand All @@ -53,11 +54,11 @@ const MobileMenu = () => {
{t('products-1')}
</div>
</Link>
<Link href="/features/rpa" passHref>
{/* <Link href="/features/rpa" passHref>
<div onClick={() => setShowMenu(false)} className='text-[#364256] w-full text-[16px] mt-[32px] inline-block'>
{t('products-2')}
</div>
</Link>
</Link> */}
</div>
{isZh ? (
<div
Expand Down
66 changes: 0 additions & 66 deletions src/components/common/Contact.tsx

This file was deleted.

20 changes: 12 additions & 8 deletions src/components/index/AppealBarNew/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ContactUsPureModalWithButton } from '@src/components/ContactUsPureModal';
import ContactUsSimpleModal from '@src/components/ContactUsSimpleModal';
import { HIDE_CONTACT_US } from '@src/config';
import { NextPage } from 'next';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
Expand All @@ -10,17 +11,20 @@ const AppealBar: NextPage<{ isRed?: boolean; useSimpleModal?: boolean; imageNode
return (
<div className="content">
<div className="title text-center">{isRed ? '即日起,建立安全·高效的数字化服务体系' : 'RPA + AI,打造下一代基于 IM 跨平台,对话式营销云'}</div>
{useSimpleModal ? (
<button className="white-button start-button !shadow-none" onClick={() => setShowContactUs(true)}>
{t('appeal-start-free')}
</button>
) : (
<ContactUsPureModalWithButton>
<button className="white-button start-button !shadow-none">
{!HIDE_CONTACT_US && (
useSimpleModal ? (
<button className="white-button start-button !shadow-none" onClick={() => setShowContactUs(true)}>
{t('appeal-start-free')}
</button>
</ContactUsPureModalWithButton>
) : (
<ContactUsPureModalWithButton>
<button className="white-button start-button !shadow-none">
{t('appeal-start-free')}
</button>
</ContactUsPureModalWithButton>
)
)}

<ContactUsSimpleModal
open={showContactUs}
onCancel={() => setShowContactUs(false)}
Expand Down
4 changes: 3 additions & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export const feishuBotUrl = process.env.FEISHU_BOT_URL || '';
export const juziApiUrl = process.env.JUZI_API_URL || '';

export const indexLogos = [2, 3, 45, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]
.map(v => `https://cdn-official-website.juzibot.com/images/index-logos/${v}.png`);
.map(v => `https://cdn-official-website.juzibot.com/images/index-logos/${v}.png`);

export const HIDE_CONTACT_US = true;
3 changes: 2 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import FooterNew from '@src/components/FooterNew';
import { useRouter } from 'next/router';
// import { setMobileStatusBarColor } from '@src/utils/mobileStatusBar';
import HeaderBar from '@src/components/HeaderBar';
import { HIDE_CONTACT_US } from '@src/config';
// import { juziAnalysis } from '@src/utils/analysis';


Expand Down Expand Up @@ -70,7 +71,7 @@ const JuziApp: NextPage<AppProps> = ({ Component, pageProps }) => {
})();
`}
</Script>
{!isSmallDevice && <ContactButtonNew />}
{!isSmallDevice && !HIDE_CONTACT_US && <ContactButtonNew />}
</>
);
};
Expand Down
Loading

0 comments on commit 3f8458b

Please sign in to comment.