From 92a9b175fda139d6608c53af62e4d8b7b1c926cf Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 09 四月 2021 18:08:51 +0800
Subject: [PATCH] 2021-04-09

---
 src/views/pcdesign/index.jsx |   52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 51 insertions(+), 1 deletions(-)

diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index 35afa95..ab58d77 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -127,6 +127,7 @@
     setTimeout(() => {
       this.updateCustomComponent()
       this.getAppPictures()
+      this.getSmStemp()
     }, 1000)
   }
 
@@ -249,6 +250,37 @@
     })
   }
 
+  getSmStemp = () => {
+    let _sql = `select ID,TemplateCode,SignName from bd_msn_sms_temp where deleted=0 and appkey='${window.GLOB.appkey}'`
+
+    _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))
+    })
+  }
+
   getAppPictures = () => {
     if (sessionStorage.getItem('app_videos') || sessionStorage.getItem('app_pictures')) return
 
@@ -261,6 +293,12 @@
     }).then(res => {
       if (res.status) {
         sessionStorage.setItem('app_pictures', JSON.stringify(res.data || []))
+      } else if (!res.status) {
+        notification.warning({
+          top: 92,
+          message: res.message,
+          duration: 5
+        })
       }
 
       Api.getSystemConfig({
@@ -272,6 +310,12 @@
       }).then(res => {
         if (res.status) {
           sessionStorage.setItem('app_videos', JSON.stringify(res.data || []))
+        } else if (!res.status) {
+          notification.warning({
+            top: 92,
+            message: res.message,
+            duration: 5
+          })
         }
       })
     })
@@ -283,7 +327,13 @@
       typecharone: ''
     }).then(res => {
       let coms = []
-      if (res.cus_list && res.cus_list.length > 0) {
+      if (!res.status) {
+        notification.warning({
+          top: 92,
+          message: res.message,
+          duration: 5
+        })
+      } else if (res.cus_list && res.cus_list.length > 0) {
         res.cus_list.forEach(item => {
           let config = ''
 

--
Gitblit v1.8.0