From 0472ec32cadb4f9bca6dbab82ac33a42e76f37ed Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 28 六月 2022 16:24:15 +0800 Subject: [PATCH] 菜单栏&时间轴 --- src/menu/components/share/copycomponent/index.jsx | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/menu/components/share/copycomponent/index.jsx b/src/menu/components/share/copycomponent/index.jsx index 2ed4914..62c57e2 100644 --- a/src/menu/components/share/copycomponent/index.jsx +++ b/src/menu/components/share/copycomponent/index.jsx @@ -7,19 +7,30 @@ class CopyComponent extends Component { static propTpyes = { - btnlog: PropTypes.array, - handlelog: PropTypes.func + type: PropTypes.string, + card: PropTypes.object } trigger = () => { const { card, type } = this.props - let copycard = fromJS(card).toJS() - copycard.copyType = type - - let _val = '' + let _val = fromJS(card).toJS() + _val.copyType = type try { - _val = window.btoa(window.encodeURIComponent(JSON.stringify(copycard))) + delete _val.$srcId + + let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId') + if (srcid) { + _val.$srcId = srcid + } + + if (type === 'menucell') { + _val.setting.type = 'linkmenu' + _val.setting.linkMenuId = '' + _val.setting.copyMenuId = '' + } + + _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) } catch (e) { message.warning('澶嶅埗澶辫触锛岃閲嶈瘯锛�') _val = '' -- Gitblit v1.8.0