From 8701e6928b20cc3c4af763f8e72be5396c2be99d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 09 十月 2020 18:57:15 +0800
Subject: [PATCH] 2020-10-09

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 109 insertions(+), 0 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 027b704..17b83ea 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -735,9 +735,118 @@
       _unclose = true
     }
 
+    if (btn.verify && btn.verify.noteEnable === 'true') {
+      this.sendMessage()
+    }
+
     this.props.updateStatus('refresh', btn.execSuccess, _unclose)
   }
 
+  sendMessage = () => {
+    const { btn : { verify } } = this.props
+
+    let param = {
+      func: 's_get_sms_local',
+      TypeCharOne: verify.noteTemp, // N涓嶅悓鍐呭锛孻鐩稿悓鍐呭
+      TypeCharTwo: verify.noteType  // N瀹氭椂锛孻瀹炴椂
+    }
+
+    param.LText = Utils.formatOptions(Utils.getuuid())
+    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
+
+    Api.genericInterface(param).then(res => {
+      if (!res.status) {
+        notification.warning({
+          top: 92,
+          message: res.message,
+          duration: 5
+        })
+        return
+      }
+
+      let _param = {
+        templatecode: verify.noteCode, // 妯℃澘缂栫爜
+        TypeCharOne: verify.noteTemp,  // N涓嶅悓鍐呭锛孻鐩稿悓鍐呭
+      }
+
+      _param.submitdate = res.submitdate
+
+      let limit = 5 // 瀹炴椂鏈�澶т负5鏉★紝瀹氭椂鏈�澶т负100鏉�
+      let mobMap = new Map()
+
+      if (verify.noteType === 'N') {
+        _param.func = 's_get_sms_sso_timer'
+        limit = 100
+      } else if (verify.noteType === 'Y') {
+        _param.func = 's_get_sms_sso_realtime'
+      }
+
+      let Ltext = []
+      let error = false
+
+      if (verify.noteTemp === 'Y') {
+        _param.p1 = res.p1 || ''
+        _param.p2 = res.p2 || ''
+        _param.p3 = res.p3 || ''
+        _param.p4 = res.p4 || ''
+        _param.p5 = res.p5 || ''
+
+        let _p = _param.p1 + _param.p2 + _param.p3 + _param.p4 + _param.p5
+
+        if (/\/|\.|.*鍏�.*浜.*涔�.*杩憒闈㈣瘯|閭�璇穦涓嬭浇|绾㈠寘|鎷涜仒|濂借瘎|璇勪环|鏀垮姟閫氱煡|缂磋垂|淇濋櫓|鑲$エ|閲戣瀺|鎴垮湴浜鏁欒偛|娓告垙|寰俊|Q/.test(_p)) {
+          error = true
+        }
+      }
+
+      res.send_data && res.send_data.forEach(item => {
+        if (item.mob && !mobMap.has(item.mob) && Ltext.length < limit) {
+          if (verify.noteTemp === 'Y') {
+            Ltext.push(`'${item.mob}'`)
+          } else {
+            let _p = `'${item.p1 || ''}','${item.p2 || ''}','${item.p3 || ''}','${item.p4 || ''}','${item.p5 || ''}','${item.mob}'`
+
+            if (/\/|\.|.*鍏�.*浜.*涔�.*杩憒闈㈣瘯|閭�璇穦涓嬭浇|绾㈠寘|鎷涜仒|濂借瘎|璇勪环|鏀垮姟閫氱煡|缂磋垂|淇濋櫓|鑲$エ|閲戣瀺|鎴垮湴浜鏁欒偛|娓告垙|寰俊|Q/.test(_p)) {
+              error = true
+            }
+
+            Ltext.push(_p)
+          }
+          mobMap.set(item.mob, true)
+        }
+      })
+
+      if (error) {
+        notification.warning({
+          top: 92,
+          message: '娑堟伅涓惈鏈夐潪娉曞瓧绗�',
+          duration: 5
+        })
+        return
+      }
+
+      if (Ltext.length === 0) return
+      Ltext = Ltext.join(';')
+
+      _param.LText = window.btoa(window.encodeURIComponent(Ltext))
+      _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
+
+      _param.rduri = 'http://sso.mk9h.cn/webapi/dostar'
+      _param.appkey = window.GLOB.appkey || ''
+
+      Api.dostarInterface(_param).then(result => {
+        if (!result.status) {
+          notification.warning({
+            top: 92,
+            message: result.message,
+            duration: 5
+          })
+        }
+      })
+    })
+  }
+
   /**
    * @description 鎿嶄綔澶辫触鍚庡鐞�
    * 1銆佺姸鎬佺爜涓� E銆丯銆丗銆丯M 鏃讹紝鏄剧ず鐩稿簲鎻愮ず淇℃伅

--
Gitblit v1.8.0