king
2023-06-15 54bb10fd468d14b72520ace36ab440891b0d6c81
Merge branch 'develop'
9个文件已修改
2个文件已删除
940 ■■■■ 已修改文件
src/api/index.js 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/formconfig.jsx 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/fileupload-pice/index.jsx 491 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/fileupload-pice/index.scss 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -23,19 +23,11 @@
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.withCredentials = false
axios.interceptors.request.use((config) => {
  if (/LoginAndRedirect|getjsonresult|wxNativePay|postek/ig.test(config.url)) {
    config.data = qs.stringify(config.data)
  } else if (/\/doupload|\/dopreload|\/upload/.test(config.url)) {
    config.headers = { 'Content-Type': 'multipart/form-data' }
  } else if (config.method === 'post' && config.data) {
    config.data = JSON.stringify(config.data)
  }
  return config
}, (error) => {
  return Promise.reject(error)
})
// axios.interceptors.request.use((config) => {
//   return config
// }, (error) => {
//   return Promise.reject(error)
// })
const setCurrentUrl = (res) => {
  if (!!(window.history && window.history.pushState)) {
@@ -95,7 +87,7 @@
    return axios({
      url: `/webapi/dostar${param.func ? '/' + param.func : ''}`,
      method: 'post',
      data: param
      data: JSON.stringify(param)
    })
  }
@@ -228,7 +220,7 @@
    return axios({
      url: url,
      method: 'post',
      data: param
      data: JSON.stringify(param)
    })
  }
@@ -267,7 +259,7 @@
    return axios({
      url,
      method: 'post',
      data: param
      data: JSON.stringify(param)
    })
  }
@@ -322,7 +314,7 @@
    return axios({
      url,
      method: 'post',
      data: param
      data: JSON.stringify(param)
    })
  }
@@ -478,7 +470,7 @@
    return axios({
      url,
      method: 'post',
      data: param
      data: JSON.stringify(param)
    })
  }
@@ -502,7 +494,7 @@
    return axios({
      url: `${url}/${param.func}`,
      method: 'post',
      data: param
      data: JSON.stringify(param)
    })
  }
@@ -534,7 +526,7 @@
    return axios({
      url: `${url}${param.func ? '/' + param.func : ''}`,
      method: 'post',
      data: param
      data: JSON.stringify(param)
    })
  }
@@ -574,7 +566,7 @@
          axios({
            url: `${url}${param.func ? '/' + param.func : ''}`,
            method: 'post',
            data: param
            data: JSON.stringify(param)
          }).then(res => {
            if (res.status && window.GLOB.IndexDB) {
              let msg = {
@@ -600,7 +592,7 @@
        axios({
          url: `${url}${param.func ? '/' + param.func : ''}`,
          method: 'post',
          data: param
          data: JSON.stringify(param)
        }).then(res => {
          if (res.status) {
            window.GLOB.CacheMap.set(key, res)
@@ -699,7 +691,7 @@
        axios({
          url: `${url}${param.func ? '/' + param.func : ''}`,
          method: 'post',
          data: param
          data: JSON.stringify(param)
        }).then(res => {
          if (res.status) {
            window.GLOB.CacheMap.set(_param, res)
@@ -763,7 +755,7 @@
      axios({
        url: token.interface,
        method: 'post',
        data: param
        data: JSON.stringify(param)
      }).then(res => {
        _resolve(res)
      })
@@ -792,7 +784,7 @@
      axios({
        url,
        method: 'post',
        data: _param
        data: JSON.stringify(_param)
      }).then(result => {
        if (result.status) {
          window.GLOB.OuterToken[token.interface] = {
@@ -810,7 +802,7 @@
          axios({
            url: token.interface,
            method: 'post',
            data: param
            data: JSON.stringify(param)
          }).then(res => {
            _resolve(res)
          })
@@ -882,7 +874,7 @@
        return axios({
          url: `${url}${param.func ? '/' + param.func : ''}`,
          method: 'post',
          data: param
          data: JSON.stringify(param)
        })
      }
@@ -893,7 +885,7 @@
            axios({
              url: `${url}${param.func ? '/' + param.func : ''}`,
              method: 'post',
              data: param
              data: JSON.stringify(param)
            }).then(result => {
              resolve(result)
            })
@@ -906,7 +898,7 @@
      return axios({
        url: `${url}${param.func ? '/' + param.func : ''}`,
        method: 'post',
        data: param
        data: JSON.stringify(param)
      })
    }
  }
@@ -947,7 +939,7 @@
    return axios({
      url,
      method: 'post',
      data: param
      data: JSON.stringify(param)
    })
  }
@@ -958,6 +950,7 @@
    return axios({
      url: '/webapi/doupload',
      method: 'post',
      headers: { 'Content-Type': 'multipart/form-data' },
      data: param
    })
  }
@@ -969,6 +962,7 @@
    return axios({
      url: '/webapi/dopreload',
      method: 'post',
      headers: { 'Content-Type': 'multipart/form-data' },
      data: param
    })
  }
@@ -996,6 +990,7 @@
    return axios({
      url: _url,
      method: 'post',
      headers: { 'Content-Type': 'multipart/form-data' },
      data: param
    })
  }
@@ -1009,7 +1004,7 @@
    return axios({
      url: _url,
      method: 'post',
      data: param
      data: qs.stringify(param)
    })
  }
@@ -1017,7 +1012,7 @@
    return axios({
      url: 'http://127.0.0.1:888/postek/print',
      method: 'post',
      data: data
      data: qs.stringify(data)
    })
  }
}
src/menu/components/form/formaction/actionform/index.jsx
@@ -65,7 +65,7 @@
    
    if (_intertype === 'custom') {
      _options.pop()
      _options.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross')
      _options.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross', 'stringify')
      if (_procMode === 'system') {
        _options.push('sql', 'sqlType')
      } else {
src/menu/components/form/formaction/formconfig.jsx
@@ -201,35 +201,6 @@
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '跨域请求',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'callbackType',
      label: '回调方式',
      initVal: card.callbackType || 'script',
@@ -266,6 +237,52 @@
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '接口跨域',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'stringify',
      label: '序列化',
      initVal: card.stringify || 'text',
      required: false,
      options: [{
        value: 'text',
        text: 'Text'
      }, {
        value: 'JSON',
        text: 'JSON'
      }, {
        value: 'qs',
        text: 'qs'
      }]
    },
    {
      type: 'radio',
      key: 'Ot',
      label: '行设置',
      initVal: card.Ot,
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -166,7 +166,7 @@
      reOptions.intertype = this.state.interTypeOptions
      if (intertype === 'custom') {
        shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross')
        shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross', 'stringify')
        if (this.record.procMode === 'system') {
          shows.push('sql', 'sqlType')
        } else if (this.record.procMode === 'inner') {
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -481,35 +481,6 @@
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '跨域请求',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'callbackType',
      label: '回调方式',
      initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'),
@@ -542,6 +513,52 @@
      label: '回调函数',
      initVal: card.callbackFunc || '',
      required: true
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '接口跨域',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'stringify',
      label: '序列化',
      initVal: card.stringify || 'text',
      required: false,
      options: [{
        value: 'text',
        text: 'Text'
      }, {
        value: 'JSON',
        text: 'JSON'
      }, {
        value: 'qs',
        text: 'qs'
      }]
    },
    {
      type: 'select',
@@ -1507,35 +1524,6 @@
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '跨域请求',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'callbackType',
      label: '回调方式',
      initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'),
@@ -1570,6 +1558,52 @@
      required: true
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '接口跨域',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'stringify',
      label: '序列化',
      initVal: card.stringify || 'text',
      required: false,
      options: [{
        value: 'text',
        text: 'Text'
      }, {
        value: 'JSON',
        text: 'JSON'
      }, {
        value: 'qs',
        text: 'qs'
      }]
    },
    {
      type: 'select',
      key: 'Ot',
      label: '行设置',
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 || ''
src/tabviews/zshare/fileupload-pice/index.jsx
File was deleted
src/tabviews/zshare/fileupload-pice/index.scss
File was deleted
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -148,7 +148,7 @@
      reOptions.intertype = this.state.interTypeOptions
      if (intertype === 'custom') {
        shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross')
        shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross', 'stringify')
        if (this.record.procMode === 'system') {
          shows.push('sql', 'sqlType')
        } else if (this.record.procMode === 'inner') {
src/templates/zshare/formconfig.jsx
@@ -1218,35 +1218,6 @@
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '跨域请求',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'callbackType',
      label: '回调方式',
      initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'),
@@ -1283,6 +1254,52 @@
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '接口跨域',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'stringify',
      label: '序列化',
      initVal: card.stringify || 'text',
      required: false,
      options: [{
        value: 'text',
        text: 'Text'
      }, {
        value: 'JSON',
        text: 'JSON'
      }, {
        value: 'qs',
        text: 'qs'
      }]
    },
    {
      type: 'radio',
      key: 'position',
      label: '显示位置',
      initVal: card.position || 'toolbar',
src/views/login/index.jsx
@@ -449,7 +449,7 @@
      Api.directRequest({
        url: _rduri + '/' + _func,
        method: 'post',
        data: param
        data: JSON.stringify(param)
      }).then(res => {
        if (res.status) {
          if (res.EPC === str) {