From 8969147207be7ef066051da3525b473043ecff2a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 08 三月 2023 17:07:30 +0800
Subject: [PATCH] 2023-03-08

---
 src/views/design/header/index.jsx |   38 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 37 insertions(+), 1 deletions(-)

diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx
index eb9e26a..39078cd 100644
--- a/src/views/design/header/index.jsx
+++ b/src/views/design/header/index.jsx
@@ -335,6 +335,41 @@
       }
     })
   }
+
+  getSmStemp = () => {
+    if (!sessionStorage.getItem('msgTemplate')) {
+      let _sql = `select聽ID,TemplateCode,SignName+'_'+describe as SignName from (select * from bd_msn_sms_temp where deleted=0 and status=20 ) a 
+        inner join (select openid from sapp where id='${window.GLOB.appkey}') b 
+        on a.openid=b.openid`
+  
+      _sql = Utils.formatOptions(_sql)
+  
+      let param = {
+        func: 'sPC_Get_SelectedList',
+        LText: _sql,
+        obj_name: 'data',
+        arr_field: 'ID,TemplateCode,SignName'
+      }
+      
+      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      param.secretkey = Utils.encrypt(param.LText, param.timestamp)
+      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉
+      
+      Api.getSystemConfig(param).then(res => {
+        let msgs = []
+        if (!res.status) {
+          notification.warning({
+            top: 92,
+            message: res.message,
+            duration: 5
+          })
+        } else if (res.data) {
+          msgs = res.data
+        }
+        sessionStorage.setItem('msgTemplate', JSON.stringify(msgs))
+      })
+    }
+  }
   
   UNSAFE_componentWillMount () {
     sessionStorage.setItem('isEditState', 'true')
@@ -390,7 +425,8 @@
 
       setTimeout(() => {
         this.setSystemFuncs()
-      }, 200)
+        this.getSmStemp()
+      }, 500)
     }
   }
 

--
Gitblit v1.8.0