king
2025-04-13 4d30a5f9748b4523fe2e1d582b1e34a8e433ffc2
2025-04-13
2个文件已修改
25 ■■■■■ 已修改文件
src/setupProxy.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/transystem/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/setupProxy.js
@@ -47,4 +47,10 @@
//     secure: false,
//     changeOrigin: true
//   }))
  app.use(proxy('/star', {
    target: `http://dms.worx.cn/webapi`,
    secure: false,
    changeOrigin: true
  }))
}
src/views/transystem/index.jsx
@@ -1,6 +1,7 @@
import React, { Component } from 'react'
import { Input, Button, message } from 'antd'
import Api from '@/api'
import sqlFormatter from '@/utils/sqlFormatter.js'
import Utils from '@/utils/utils.js'
@@ -20,6 +21,24 @@
  }
  changeType = (type) => {
    if (type === 'mk_func' && this.state.textInput) {
      if (this.state.textInput) {
        let params = {
          url: window.location.origin + '/star',
          method: 'post',
          data: JSON.stringify({
            FUNC: 's_get_userproc',
            LText: this.state.textInput.replace(/(\s|\t|\v)*/ig, ''),
            UserID: '',
            USERNAME: ''
          })
        }
        Api.directRequest(params).then(result => {
          this.setState({textInput: JSON.stringify(result)})
        })
      }
    }
    if (!this.state.type) {
      this.setState({type: type, value: null})
    } else {