king
2023-06-15 b2891947d13e83363cccf0cbaaaa81f2487b0c35
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) !== '{}') {
        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) !== '{}') {
      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 || ''