From 26d0fa42ea8c63a87e8ef93d0915f75f46fb1f9c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 24 三月 2022 11:09:53 +0800
Subject: [PATCH] 2022-03-24

---
 src/menu/components/share/copycomponent/index.jsx |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/menu/components/share/copycomponent/index.jsx b/src/menu/components/share/copycomponent/index.jsx
index a4c90ed..74bacff 100644
--- a/src/menu/components/share/copycomponent/index.jsx
+++ b/src/menu/components/share/copycomponent/index.jsx
@@ -1,7 +1,8 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
-import { Icon, message } from 'antd'
+import { message } from 'antd'
+import { CopyOutlined } from '@ant-design/icons'
 import './index.scss'
 
 class CopyComponent extends Component {
@@ -12,14 +13,19 @@
 
   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)))
-    } catch {
+      delete _val.$srcId
+    
+      let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId')
+      if (srcid) {
+        _val.$srcId = srcid
+      }
+
+      _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val)))
+    } catch (e) {
       message.warning('澶嶅埗澶辫触锛岃閲嶈瘯锛�')
       _val = ''
     }
@@ -38,7 +44,7 @@
 
   render () {
     return (
-      <Icon type="copy" title="澶嶅埗" style={{color: '#26C281'}} onClick={this.trigger} />
+      <CopyOutlined title="澶嶅埗" style={{color: '#26C281'}} onClick={this.trigger} />
     )
   }
 }

--
Gitblit v1.8.0