From 54bb10fd468d14b72520ace36ab440891b0d6c81 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 15 六月 2023 17:38:24 +0800
Subject: [PATCH] Merge branch 'develop'

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

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index dad5061..8b9b3ea 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1,6 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import moment from 'moment'
+import qs from 'qs'
 import { is, fromJS } from 'immutable'
 import { Button, Modal, notification, message, Drawer, Switch, Checkbox, Progress } from 'antd'
 
@@ -1367,15 +1368,29 @@
 
     if (btn.cross === 'true') {
       if (JSON.stringify(param) !== '{}') {
-        _params.data = param
+        if (btn.stringify === 'qs') {
+          _params.data = qs.stringify(param)
+        } else if (btn.stringify === 'JSON') {
+          _params.data = param
+        } else {
+          _params.data = JSON.stringify(param)
+        }
       }
     } else {
       let _url = url
-      if (_params.method === 'get' && JSON.stringify(param) !== '{}') {
-        let keys = Object.keys(param).map(key => `${key}=${param[key]}`)
-        _url = _url + '?' + keys.join('&')
-      } else if (_params.method === 'post') {
-        _params.data = param
+      if (JSON.stringify(param) !== '{}') {
+        if (_params.method === 'get') {
+          let keys = Object.keys(param).map(key => `${key}=${param[key]}`)
+          _url = _url + '?' + keys.join('&')
+        } else if (_params.method === 'post') {
+          if (btn.stringify === 'qs') {
+            _params.data = qs.stringify(param)
+          } else if (btn.stringify === 'JSON') {
+            _params.data = param
+          } else {
+            _params.data = JSON.stringify(param)
+          }
+        }
       }
   
       _url = _url.replace(/&/ig, '%26')
@@ -2338,7 +2353,7 @@
         if (!res.oa_access_token) return
   
         params.forEach(n => {
-          Api.wxNginxRequest(`${domain2}cgi-bin/message/template/send?access_token=${res.oa_access_token}`, 'post', n).then(re => {
+          Api.wxNginxRequest(`${domain2}cgi-bin/message/template/send?access_token=${res.oa_access_token}`, 'post', JSON.stringify(n)).then(re => {
             if (verify.wxNoteCallback === 'true') {
               let msg = re.errmsg || ''
 

--
Gitblit v1.8.0