Commit e51684da authored by GuanHua's avatar GuanHua

feat: 添加移动端资讯详情和app介绍页的路由权限

parent 040ae495
......@@ -38,14 +38,6 @@ const router = [
]
},
{
// 移动端资讯详情
path: '/information/mobile/detail/:id',
name: 'infomationMobileDetail',
key: 'infomationMobileDetail',
hide: true,
component: '@/pages/lxMall/information/mobileDetail',
},
{
// app介绍页
path: '/app/introduce',
name: 'appIntroduce',
......@@ -53,6 +45,14 @@ const router = [
hide: true,
component: '@/pages/appIntroduce',
},
{
// 移动端资讯详情
path: '/information/mobile/detail',
name: 'infomationMobileDetail',
key: 'infomationMobileDetail',
hide: true,
component: '@/pages/lxMall/information/mobileDetail',
},
memberCenterRoute,
...mallRoute,
{
......
......@@ -34,6 +34,7 @@ const ichannelRootRoute = GlobalConfig.ichannelRootRoute // 渠道自有商城
// 商城相关路由
const mallLists = [
'/',
'/app/introduce',
'/commodity',
'/commodity/search',
'/commodity/detail',
......@@ -42,6 +43,7 @@ const mallLists = [
'/shops',
'/infomation',
'/infomation/detail',
'/information/mobile/detail',
'/infomation/search',
'/purchaseOrder',
'/order',
......@@ -131,6 +133,7 @@ export function patchRoutes({ routes }: IRoutes) {
*/
export function render(oldRender: Function) {
const { pathname } = history.location
// 白名单页面不进行权限校验
if (whiteLists.includes(pathname)) {
oldRender()
......
......@@ -2,13 +2,13 @@ import React, { useEffect, useState } from 'react'
import { Helmet } from 'umi'
import moment from 'moment'
import { PublicApi } from '@/services/api'
import { RouteChildrenProps } from 'react-router'
// import { RouteChildrenProps, RouteProps } from 'react-router'
import { GetManageContentInformationFindByIdResponse } from '@/services/PassApi'
import { numFormat } from '@/utils/numberFomat'
import styles from './mobileDetail.less'
const MobileDetail: React.FC<RouteChildrenProps<{ id: string }>> = (props) => {
const { id } = props.match.params
const MobileDetail = (props) => {
const { query: { id } } = props.location
const [newsDetail, setNewsDetail] = useState<GetManageContentInformationFindByIdResponse>()
const [title, setTitle] = useState<string>('资讯详情')
......
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