Commit d03ebaf4 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

Merge branch 'dev' into test

parents a1b76f0e 380d1018
This diff is collapsed.
This diff is collapsed.
import React from 'react'
import React, { useEffect, useState } from 'react'
import styles from '../index.less'
import logo from '@/asserts/logo.svg'
import logoSmall from '@/asserts/logo-small.svg'
export default () => (
<div className={styles.lxLogoWrap}>
<span>平台后台</span>
import { observer } from 'mobx-react'
import { store } from '@/store'
const { indexStore } = store
const logoEle: React.FC<{}> = () => {
const { globalCollapsed } = indexStore
const [showSmall, setShowSmall] = useState<boolean>(false)
useEffect(() => {
setShowSmall(globalCollapsed)
}, [globalCollapsed])
return <div className={styles.lxLogoWrap}>
<p>
{
showSmall ?
<img src={logoSmall} alt="瓴犀"/>
:
<>
<img src={logo} alt="瓴犀"/>
<span>平台后台</span>
</>
}
</p>
</div>
)
\ No newline at end of file
}
export default observer(logoEle);
......@@ -66,6 +66,32 @@
background: @header-global-nav-bg;
font-size: 16px;
color: #fff;
p {
color: #fff;
padding: 0;
margin: 0;
span {
position: relative;
margin-left: 16px;
padding-left: 16px;
&:before{
position: absolute;
top:0.1em;
height: 20px;
left:0;
content: '';
width:0;
border-left: solid #fff 1px;
opacity: .3;
}
}
img {
height: 32px;
object-fit: contain;
}
}
}
.lx-slider {
......
......@@ -17,6 +17,10 @@ import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
import { MenuDataItem } from '@/utils/typing';
import { getMatchMenu } from '@umijs/route-utils';
import { observer } from 'mobx-react'
import { store } from '@/store'
const { indexStore } = store
const defaultFooterDom = (
<DefaultFooter
links={[]}
......@@ -60,6 +64,10 @@ const Layout = props => {
defaultOpenKeysRef.current = keys;
useEffect(() => {
indexStore.setGlobalCollapsed(collapseState)
}, [collapseState])
useEffect(() => {
// if pathname can't match, use the nearest parent's key
const keys = getSelectedMenuKeys(
location.pathname || '/',
......@@ -121,4 +129,4 @@ const Layout = props => {
);
};
export default Layout;
export default observer(Layout);
export interface GlobalModule {
globalCollapsed: boolean;
setGlobalCollapsed(data: boolean): void;
}
......@@ -7,6 +7,7 @@ import StatusColors from '../../../components/StatusColors'
import { PublicApi } from '@/services/api'
import { PayOutWorkState } from '@/constants'
import { Link } from 'umi'
import moment from 'moment'
export interface OrderPayTabsProps {}
......@@ -48,6 +49,9 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
const { data } = useContext(OrderDetailContext)
const [payList, setPaylist] = useState<any[]>([])
// 简单流程为24
const processEnum = data.processEnum
useEffect(() => {
PublicApi.getPayPayWayList({memberId: data.supplyMembersId, memberRoleId: data.supplyMembersRoleId}).then(res => {
const { code, data } = res
......@@ -56,25 +60,55 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
}
})
}, [])
return (
<MellowCard style={{marginTop: 24}} bordered={false}>
<Tabs defaultActiveKey='1'>
{ data.paymentInformationResponses && data.paymentInformationResponses.map(v => <TabPane key={v.id} tab={<TabHeader dataSource={v}/>}>
<Row>
<Col className={style.fontGray} span={4}>支付环节: </Col>
<Col>{v.payNode}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{payTextList[v.payWay]}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{payList.find(j => j.id === v.channel)?.way}</Col>
</Row>
</TabPane>) }
</Tabs>
</MellowCard>
<Row gutter={24} style={{marginTop: 24}}>
<Col span={processEnum === 24 ? 12 : 24}>
<MellowCard bordered={false} fullHeight>
{/* <Row gutter={24}> */}
<Tabs defaultActiveKey='1'>
{ data.paymentInformationResponses && data.paymentInformationResponses.map(v => <TabPane key={v.id} tab={<TabHeader dataSource={v}/>}>
<Row>
<Col className={style.fontGray} span={4}>支付环节: </Col>
<Col>{v.payNode}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{payTextList[v.payWay]}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{payList.find(j => j.id === v.channel)?.way || (v.channel === 0 && '积分支付')}</Col>
</Row>
</TabPane>) }
</Tabs>
{/* </Row> */}
</MellowCard>
</Col>
{
processEnum === 24 && data &&
<Col span={12}>
<MellowCard title="发货信息" fullHeight>
{data.name && <Row className={style['card-list']}>
<Col span={6}><p>发货地址: </p></Col>
<Col><p>{data.name}</p></Col>
</Row>}
{data?.deliverTime && <Row className={style['card-list']}>
<Col span={6}><p>发货时间: </p></Col>
<Col><p>{data?.deliverTime && moment(data.deliverTime).format('YYYY-MM-DD')}</p></Col>
</Row>}
{data.deliverNo && <Row className={style['card-list']}>
<Col span={6}><p>物流单号: </p></Col>
<Col><p><a href={`https://www.kuaidi100.com/chaxun?nu=${data.deliverNo}`} target="_blank">{data.deliverNo}</a></p></Col>
</Row>}
{data.logisticsCompany && <Row className={style['card-list']}>
<Col span={6}><p>物流公司: </p></Col>
<Col><p>{data.logisticsCompany}</p></Col>
</Row>}
</MellowCard>
</Col>
}
</Row>
)
}
......
import {action, observable} from 'mobx'
import { GlobalModule } from '@/module/globalModule'
/**
* 存储页面通用的一些状态
*/
class GlobalStore implements GlobalModule {
@observable public globalCollapsed: boolean = false; // 菜单是否折叠
@action.bound
public setGlobalCollapsed(data: boolean) {
this.globalCollapsed = data;
}
}
export default GlobalStore;
......@@ -6,6 +6,7 @@ import SiteStore from './site'
import MemberStore from './member'
import { ITestModule } from '@/module/testModule';
import { IMemberModule } from '@/module/memberModule';
import GlobalStore from './global';
/**
*
......@@ -30,8 +31,9 @@ export interface IStore {
export const store = {
testStore: new TestStore,
globalStore: new GlobalSelectStore,
SiteStore: new SiteStore,
MemberStore: new MemberStore,
SiteStore: new SiteStore,
MemberStore: new MemberStore,
indexStore: new GlobalStore,
}
const MobxProvider: React.FC = (props) => {
......
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