فهرست منبع

修复 wxconfig display 不会切换

xy 7 سال پیش
والد
کامیت
fa85b76809
1فایلهای تغییر یافته به همراه18 افزوده شده و 0 حذف شده
  1. 18 0
      src/app/wechatService/wxConfig/WxConfig.jsx

+ 18 - 0
src/app/wechatService/wxConfig/WxConfig.jsx

@@ -78,6 +78,24 @@ class Display extends Component {
         }
     }
 
+    componentWillReceiveProps(next) {
+        this.setState({
+            configID: next.configID,
+            appName: next.appName,
+            mch_id: next.data === null ? '' : next.data.mch_id,
+            notify_url: next.data === null ? '' : next.data.notify_url,
+            appSecret: next.data === null ? '' : next.data.appSecret,
+            appID: next.data === null ? '' : next.data.appID,
+            token: next.data === null ? '' : next.data.token,
+            spbill_create_ip: next.data === null ? '' : next.data.spbill_create_ip,
+            enter_url: next.data === null ? '' : next.data.enter_url,
+            pay_api_key: next.data === null ? '' : next.data.pay_api_key,
+            body: next.data === null ? '' : next.data.body,
+            welcome_words: next.data === null ? '' : next.data.welcome_words,
+            attach: next.data === null ? '' : next.data.attach,
+        });
+    }
+
 
     switchConfig = (label) => {
         return (e) => {