From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 09 十二月 2022 15:53:32 +0800 Subject: [PATCH] 2022-12-09 --- src/tabviews/custom/components/module/voucher/index.jsx | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/tabviews/custom/components/module/voucher/index.jsx b/src/tabviews/custom/components/module/voucher/index.jsx index b36187e..bd053ab 100644 --- a/src/tabviews/custom/components/module/voucher/index.jsx +++ b/src/tabviews/custom/components/module/voucher/index.jsx @@ -12,7 +12,6 @@ class VoucherModule extends Component { static propTpyes = { - BID: PropTypes.any, // 鐖剁骇Id config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 } @@ -29,7 +28,19 @@ } UNSAFE_componentWillMount () { - const { config, BID } = this.props + const { config } = this.props + + let BID = '' + let BData = '' + + if (config.setting.supModule) { + BData = window.GLOB.CacheData.get(config.setting.supModule) + } else { + BData = window.GLOB.CacheData.get(config.$pageId) + } + if (BData) { + BID = BData.$BID || '' + } this.setState({ config: fromJS(config).toJS(), -- Gitblit v1.8.0