Commit 817e257e authored by GuanHua's avatar GuanHua

fix: 恢复app介绍页和app下载页

parent e3511408
import memberCenterRoute from './routes'
import mallRoute from './mallRoutes'
/**
* @description 路由配置页, 更多配置可查看 https://umijs.org/zh-CN/docs/routing#routes
......@@ -56,16 +55,16 @@ const router = [
name: 'appDownload',
key: 'appDownload',
hide: true,
component: '@/pages/lxMall/appDownload',
},
{
// 移动端资讯详情
path: '/information/mobile/detail',
name: 'infomationMobileDetail',
key: 'infomationMobileDetail',
hide: true,
component: '@/pages/lxMall/information/mobileDetail',
component: '@/pages/appDownload',
},
// {
// // 移动端资讯详情
// path: '/information/mobile/detail',
// name: 'infomationMobileDetail',
// key: 'infomationMobileDetail',
// hide: true,
// component: '@/pages/lxMall/information/mobileDetail',
// },
memberCenterRoute,
// ...mallRoute,
{
......
import React, { useEffect, useState } from 'react'
import { Button } from 'antd'
import { Helmet } from 'umi'
import { GlobalConfig } from '@/global/config'
import styles from './styles.less'
import { getManageAppDownloadLinkFind } from '@/services/ManageV2Api'
const AppDownload = () => {
const shopInfo = GlobalConfig.web.shopInfo.filter((item) => item.type === 1 && item.environment === 4)
const appInfo: any = shopInfo ? shopInfo[0] : {}
const [appLink, setAppLink] = useState<{ ios: string, android: string}>()
const [maskVisble, setMaskVisible] = useState<boolean>(false)
const getDownLoadUrl = () => {
getManageAppDownloadLinkFind({ status: "1" }).then((res) => {
if (res.code === 1000 && res.data) {
const temp: any = {}
res.data.forEach((item) => {
switch(item.title) {
case 1:
temp.ios = item.link
break
case 2:
temp.android = item.link
break
default:
break
}
})
setAppLink(temp)
}
})
}
useEffect(() => {
getDownLoadUrl()
}, [])
const judegeIsWeiXin = (): boolean => {
const ua = navigator.userAgent.toLowerCase();
if (String(ua.match(/MicroMessenger/i)) === "micromessenger") {
return true
}
return false
}
const handleDownload = () => {
// 如果是在微信
if (judegeIsWeiXin()) {
console.log("isweixin")
setMaskVisible(true)
} else {
if (navigator.userAgent.match(/android/i)) {
if (appLink.android) {
window.location.href = appLink.android
}
}
if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
if (appLink.ios) {
window.location.href = appLink.ios
}
}
}
}
return (
<>
<Helmet>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
<title>{appInfo.name}</title>
</Helmet>
<div className={styles.downloadContaiern}>
<div className={styles.logoWrap}>
<img className={styles.appLogo} src={appInfo.logoUrl} />
</div>
<div className={styles.appName}>{appInfo.name}</div>
<div className={styles.descrip}>商业数字化有瓴犀</div>
<Button className={styles.downloadBtn} type="primary" onClick={() => handleDownload()}>点击下载手机客户端</Button>
</div>
{
maskVisble && (
<div className={styles.mask}>
<div className={styles.maskBody}>
<span>点击右上角选择浏览器打开</span>
</div>
</div>
)
}
</>
)
}
export default AppDownload
.downloadContaiern {
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
.logoWrap {
padding-top: 170px;
padding-bottom: 16px;
.appLogo {
width: 88px;
height: 88px;
border-radius: 8px;
}
}
.appName {
font-size: 18px;
font-size: 500;
}
.descrip {
margin-top: 8px;
font-size: 12px;
}
.downloadBtn {
height: 36px;
margin-top: 36px;
}
}
.mask {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, .6);
z-index: 9;
.maskBody {
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
font-weight: bold;
color: #FFF;
padding-top: 120px;
}
}
.footer {
width: 100%;
background-color: #FAFAFA;
// margin-top: 52px;
&_container {
width: 1200px;
margin: 0 auto;
display: flex;
justify-content: space-between;
padding: 0 88px 50px 88px;
.footer_nav_item {
padding: 0;
margin: 0;
padding-top: 52px;
&>li {
list-style: none;
font-size: 12px;
color: #909399;
margin-bottom: 10px;
&>a {
color: #909399;
}
&.title {
font-size: 14px;
color: #606266;
margin-bottom: 15px;
}
}
}
}
.copyright {
background-color: #F4F5F7;
height: 50px;
line-height: 50px;
text-align: center;
font-size: 12px;
color: #909399;
}
}
\ No newline at end of file
import React from 'react'
import './index.less'
const Footer: React.FC = () => {
const baseUrl = 'https://www.yuque.com/xsnnko/kh076h'
const footerNavList = [
{
title: '会员服务',
children: [
{
path: `${baseUrl}/bzci9x`,
title: '会员注册'
},
{
path: `${baseUrl}/pz44gw`,
title: '会员登录'
},
{
path: `${baseUrl}/ia27ef`,
title: '会员服务'
},
{
path: `${baseUrl}/xupg3d`,
title: '忘记密码'
}
]
},
{
title: '采购&供应',
children: [
{
path: `${baseUrl}/il6eqw`,
title: '发布供应'
},
{
path: `${baseUrl}/aeob5u`,
title: '发布需求'
},
{
path: `${baseUrl}/eh909i`,
title: '购买现货'
},
{
path: `${baseUrl}/yks6bd`,
title: '询价报价'
}
]
},
{
title: '账户&安全',
children: [
{
path: `${baseUrl}/gxx84r`,
title: '账户查询'
},
{
path: `${baseUrl}/bufen8`,
title: '账户管理'
},
{
path: `${baseUrl}/qsmohg`,
title: '安全中心'
},
{
path: `${baseUrl}/arsh01`,
title: '密码服务'
}
]
},
{
title: '信用评价',
children: [
{
path: `${baseUrl}/klpeox`,
title: '发布评价'
},
{
path: `${baseUrl}/tkp309`,
title: '查看评价'
},
{
path: `${baseUrl}/svdz9o`,
title: '投诉举报'
},
{
path: `${baseUrl}/ngkh0k`,
title: '评价规则'
}
]
},
{
title: '关于我们',
children: [
{
path: `${baseUrl}/eoegc4`,
title: '平台介绍'
},
{
path: `${baseUrl}/yttpx7`,
title: '联系我们'
},
{
path: `${baseUrl}/cyd7rb`,
title: '服务条款'
},
{
path: `${baseUrl}/uht4qm`,
title: '免责声明'
}
]
}
]
return (
<div className="footer">
<div className="footer_container">
{
footerNavList.map((item, index) => (
<ul className="footer_nav_item" key={`footer_nav_item_${index}`}>
<li className="title">{item.title}</li>
{
item.children.map((item, index) => (
<li key={`footer_nav_item_${index}`}><a href={item.path} target="_blank" rel="noreferrer">{item.title}</a></li>
))
}
</ul>
))
}
</div>
<div className="copyright">
Copy Right©广州市数商云网络科技有限公司 粤ICP备13044797号-5
</div>
</div>
)
}
export default Footer
import React from 'react'
import { Helmet } from 'umi'
import Footer from '@/pages/lxMall/components/Footer'
import Footer from './Footer'
import styles from './index.less'
const AppIntroduct = () => {
......
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