| | |
| | | externalDatabase -- 外联库,不使用时默认为false |
| | | lineColor -- 登录页分割线颜色 |
| | | filter -- 页面滤镜,值为'true'时,页面显示为黑白色 |
| | | defaultApp -- 默认应用,系统需默认打开某个子应用时需填写应用编码,空值时跳转到管理后台 |
| | | defaultLang -- 默认打开的子应用语言类型,填入defaultApp时有效 |
| | |
| | | "lineColor": "", |
| | | "filter": "false", |
| | | "defaultApp": "", |
| | | "defaultLang": "zh-CN" |
| | | "defaultLang": "zh-CN", |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "mkwms/" |
| | | } |
| | |
| | | |
| | | axios.defaults.crossDomain = true |
| | | axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' |
| | | axios.defaults.withCredentials = true |
| | | axios.defaults.withCredentials = false |
| | | |
| | | axios.interceptors.request.use((config) => { |
| | | if (config.url.includes('LoginAndRedirect') || config.url.includes('getjsonresult') || config.url.includes('wxNativePay')) { |
| | |
| | | if (process.env.NODE_ENV === 'production') { |
| | | axios.defaults.baseURL = document.location.origin + '/' + window.GLOB.service |
| | | } else { |
| | | // axios.defaults.baseURL = 'http://127.0.0.1:8888' |
| | | axios.defaults.baseURL = window.GLOB.location + '/' + window.GLOB.service |
| | | } |
| | | } |
| | | |
| | |
| | | * @description 直接请求 |
| | | * @param {Object} param 查询及提交参数 |
| | | */ |
| | | directRequest (url, method = 'post', param) { |
| | | directRequest (url, method = 'post', param, cross) { |
| | | if (cross === 'true') { |
| | | return axios({ |
| | | url, |
| | | method, |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | let params = { method: 'post' } |
| | | let _url = url |
| | | |
| | |
| | | } |
| | | |
| | | _url = _url.replace(/&/ig, '%26') |
| | | // _url = window.btoa(_url) |
| | | params.url = '/trans/redirect?rd=' + _url + '&method=' + method |
| | | |
| | | return axios(params) |
| | | } |
| | | |
| | | /** |
| | | * @description 使用dostar接口,跳转至dostars |
| | | * @param {Object} param 查询及提交参数 |
| | | */ |
| | | dostarToDostars (param) { |
| | | param.userid = param.userid || sessionStorage.getItem('UserID') || '' |
| | | param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || '' |
| | | |
| | | param = this.encryptParam(param) |
| | | |
| | | return axios({ |
| | | url: '/webapi/dostar', |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | let url = '/webapi/dologon/s_visitor_login' |
| | | if (window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | url = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon/s_visitor_login') |
| | | } |
| | | |
| | | return axios({ |
| | | url: '/webapi/dologon', |
| | | url: url, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | |
| | | |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | let url = '/webapi/dologon' |
| | | if (isCloud) { |
| | | param.debug = 'Y' |
| | | if (options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | url = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | } |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | param.linkurl = window.GLOB.linkurl |
| | | } |
| | | param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | url = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | } |
| | | |
| | | return axios({ |
| | | url: '/webapi/dologon', |
| | | url, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | |
| | | * @description 登录系统, 获取用户信息 |
| | | */ |
| | | getusermsg (username, password, isCloud = false) { |
| | | |
| | | let param = { |
| | | // func: 'webapi_login', |
| | | UserName: username, |
| | |
| | | // Type: 'X' 时 |
| | | // param.Password = Utils.formatOptions(password) |
| | | param.appkey = window.GLOB.appkey || '' |
| | | let url = '/webapi/dologon' |
| | | |
| | | if (isCloud) { |
| | | param.debug = 'Y' |
| | | if (options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | url = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | } |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { |
| | | param.linkurl = window.GLOB.linkurl |
| | | } |
| | | param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | url = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | } |
| | | |
| | | return axios({ |
| | | url: '/webapi/dologon', |
| | | url, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | |
| | | param.lang = param.lang || sessionStorage.getItem('lang') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.rduri = options.cloudServiceApi || '' |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | |
| | | param = this.encryptParam(param) |
| | | |
| | | let url = options.cloudServiceApi ? options.cloudServiceApi : '/webapi/dostars' |
| | | if (param.func) { |
| | | url = url + '/' + param.func |
| | | } |
| | | |
| | | return axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | url, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取云端配置,并缓存信息 |
| | | */ |
| | | getCloudCacheConfig (param) { |
| | | param.lang = param.lang || sessionStorage.getItem('lang') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | |
| | | if (options.cloudServiceApi) { // 非云端请求 |
| | | param.rduri = options.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else { // 云端请求 |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | } |
| | | |
| | | let _param = JSON.parse(JSON.stringify(param)) // 缓存校验,去除时间和加密字符 |
| | | delete _param.timestamp |
| | | delete _param.secretkey |
| | | delete _param.open_key |
| | | _param = JSON.stringify(_param) |
| | | _param = md5(_param) |
| | | |
| | | if (window.GLOB.CacheMap.has(_param)) { |
| | | return Promise.resolve(window.GLOB.CacheMap.get(_param)) |
| | | } else { |
| | | param = this.encryptParam(param) |
| | | |
| | | return new Promise(resolve => { |
| | | axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }).then(res => { |
| | | if (res.status) { |
| | | window.GLOB.CacheMap.set(_param, res) |
| | | } |
| | | resolve(res) |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | let url = '/webapi/dostars' |
| | | if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) { // 编辑状态,且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | url = options.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | | url = window.GLOB.mainSystemApi |
| | | } |
| | | |
| | | param = this.encryptParam(param) |
| | | |
| | | return axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | url: `${url}${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | let url = '/webapi/dostars' |
| | | if (param.rduri) { |
| | | url = param.rduri |
| | | delete param.rduri |
| | | } |
| | | |
| | | param = this.encryptParam(param) |
| | | |
| | | return axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | url: `${url}${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | let url = '/webapi/dostars' |
| | | if (sessionStorage.getItem('isEditState') === 'true') { // 编辑状态,单点登录服务器为云端 |
| | | if (options.cloudServiceApi) { // 存在云端地址时,使用云端系统参数 |
| | | param.rduri = options.cloudServiceApi |
| | | url = options.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | | url = window.GLOB.mainSystemApi |
| | | } |
| | | |
| | | let _param = JSON.parse(JSON.stringify(param)) // 缓存校验,去除时间和加密字符 |
| | |
| | | }, () => { |
| | | param = this.encryptParam(param) |
| | | axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | url: `${url}${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }).then(res => { |
| | |
| | | }, () => { |
| | | param = this.encryptParam(param) |
| | | axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | url: `${url}${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }).then(res => { |
| | |
| | | |
| | | return new Promise(resolve => { |
| | | axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | url: `${url}${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }).then(res => { |
| | |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | if (window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | | } |
| | | |
| | | let _param = md5(JSON.stringify(param)) |
| | | |
| | |
| | | param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | let url = '/webapi/dostars' |
| | | if (param.rduri) { |
| | | url = param.rduri |
| | | delete param.rduri |
| | | } |
| | | |
| | | let _param = JSON.parse(JSON.stringify(param)) // 缓存校验,去除时间和加密字符 |
| | | delete _param.timestamp |
| | | delete _param.secretkey |
| | |
| | | |
| | | return new Promise(resolve => { |
| | | axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | url: `${url}${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }).then(res => { |
| | |
| | | param.userid = sessionStorage.getItem('CloudUserID') || param.userid || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || param.LoginUID || '' |
| | | } |
| | | let url = '/webapi/dostars' |
| | | if (param.rduri) { |
| | | url = param.rduri |
| | | delete param.rduri |
| | | } |
| | | |
| | | param = this.encryptParam(param) |
| | | |
| | | return axios({ |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | url: `${url}${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | |
| | | param = this.encryptParam(param) |
| | | |
| | | if (param.rduri) { |
| | | param.rduri = param.rduri.replace(/webapi(.*)$/, 'webapi/SaveBase64Image') |
| | | let url = param.rduri.replace(/webapi(.*)$/, 'webapi/SaveBase64Image') |
| | | delete param.rduri |
| | | |
| | | return axios({ |
| | | url: '/webapi/dostars', |
| | | url, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | |
| | | GLOB.service = _service ? _service + '/' : '' |
| | | } else { |
| | | GLOB.linkurl = '' |
| | | GLOB.location = 'http://qingqiumarket.cn' |
| | | GLOB.service = 'mkwms/' |
| | | GLOB.location = config.host |
| | | GLOB.service = config.service |
| | | } |
| | | |
| | | Object.defineProperty(GLOB, 'appId', { |
| | |
| | | } |
| | | } else if (_opentype !== 'popview' && _opentype !== 'tab') { |
| | | if (_intertype === 'custom') { |
| | | _options.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method') |
| | | _options.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method', 'cross') |
| | | if (_procMode === 'system') { |
| | | _options.push('sql', 'sqlType') |
| | | } else { |
| | |
| | | } else if (item.type === 'radio') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |
| | | <Form.Item label={item.tooltip ? |
| | | <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> |
| | | <Icon type="question-circle" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [ |
| | |
| | | }, |
| | | { |
| | | 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', |
| | | tooltip: '使用默认方式执行时,需要配合计划任务。', |
| | | tooltip: '使用后台脚本执行时,需要配合计划任务。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'default', |
| | | text: '默认脚本' |
| | | }, { |
| | | value: 'script', |
| | | text: '自定义脚本' |
| | | }, { |
| | | value: 'default', |
| | | text: '后台脚本' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'如果自定义接口不支持跨域请求,会通过当前系统转发。'}> |
| | | <Icon type="question-circle" /> |
| | | 跨域请求 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('cross', { |
| | | initialValue: setting.cross || 'true' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">支持</Radio> |
| | | <Radio value="false">不支持</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="回调方式"> |
| | | {getFieldDecorator('callbackType', { |
| | | initialValue: setting.callbackType || 'script' |
| | |
| | | const proxy = require('http-proxy-middleware') |
| | | const host = 'http://qingqiumarket.cn' |
| | | const service = 'mkwms/' |
| | | // const proxy = require('http-proxy-middleware') |
| | | // const host = 'http://qingqiumarket.cn' |
| | | // const service = 'mkwms/' |
| | | |
| | | module.exports = function(app) { |
| | | app.use(proxy('/webapi', { |
| | | target: `${host}/${service}webapi`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/webapi': '/' |
| | | } |
| | | // cookieDomainRewrite: "http://localhost:3000" |
| | | })) |
| | | module.exports = function() {} |
| | | // module.exports = function(app) { |
| | | // app.use(proxy('/webapi', { |
| | | // target: `${host}/${service}webapi`, |
| | | // secure: false, |
| | | // changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/webapi': '/' |
| | | // } |
| | | // // cookieDomainRewrite: "http://localhost:3000" |
| | | // })) |
| | | |
| | | app.use(proxy('/zh-CN', { // 登录接口 |
| | | target: `${host}/${service}zh-CN`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/zh-CN': '/' |
| | | } |
| | | })) |
| | | // app.use(proxy('/zh-CN', { // 登录接口 |
| | | // target: `${host}/${service}zh-CN`, |
| | | // secure: false, |
| | | // changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/zh-CN': '/' |
| | | // } |
| | | // })) |
| | | |
| | | app.use(proxy('/Upload', { |
| | | target: `${host}/${service}zh-CN/Home/Upload`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/Upload': '/' |
| | | } |
| | | })) |
| | | // app.use(proxy('/Upload', { |
| | | // target: `${host}/${service}zh-CN/Home/Upload`, |
| | | // secure: false, |
| | | // changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/Upload': '/' |
| | | // } |
| | | // })) |
| | | |
| | | app.use(proxy('/wxpay', { |
| | | target: `${host}/${service}wxpay`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/wxpay': '/' |
| | | } |
| | | })) |
| | | // app.use(proxy('/wxpay', { |
| | | // target: `${host}/${service}wxpay`, |
| | | // secure: false, |
| | | // changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/wxpay': '/' |
| | | // } |
| | | // })) |
| | | |
| | | app.use(proxy('/trans', { |
| | | target: `${host}/${service}trans`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/trans': '/' |
| | | } |
| | | })) |
| | | } |
| | | // app.use(proxy('/trans', { |
| | | // target: `${host}/${service}trans`, |
| | | // secure: false, |
| | | // changeOrigin: true, |
| | | // pathRewrite: { |
| | | // '^/trans': '/' |
| | | // } |
| | | // })) |
| | | // } |
| | |
| | | param[key] = result[key] |
| | | }) |
| | | |
| | | Api.directRequest(url, setting.method, param).then(res => { |
| | | Api.directRequest(url, setting.method, param, setting.cross).then(res => { |
| | | if (typeof(res) !== 'object' || Array.isArray(res)) { |
| | | let error = '未知的返回结果!' |
| | | |
| | |
| | | param[key] = result[key] |
| | | }) |
| | | |
| | | Api.directRequest(url, setting.method, param).then(res => { |
| | | Api.directRequest(url, setting.method, param, setting.cross).then(res => { |
| | | if (typeof(res) !== 'object' || Array.isArray(res)) { |
| | | let error = '未知的返回结果!' |
| | | |
| | |
| | | param[key] = result[key] |
| | | }) |
| | | |
| | | Api.directRequest(url, setting.method, param).then(res => { |
| | | Api.directRequest(url, setting.method, param, setting.cross).then(res => { |
| | | if (typeof(res) !== 'object' || Array.isArray(res)) { |
| | | let error = '未知的返回结果!' |
| | | |
| | |
| | | param[key] = result[key] |
| | | }) |
| | | |
| | | Api.directRequest(url, setting.method, param).then(res => { |
| | | Api.directRequest(url, setting.method, param, setting.cross).then(res => { |
| | | if (typeof(res) !== 'object' || Array.isArray(res)) { |
| | | let error = '未知的返回结果!' |
| | | |
| | |
| | | param[key] = result[key] |
| | | }) |
| | | |
| | | Api.directRequest(url, btn.method, param).then(res => { |
| | | Api.directRequest(url, btn.method, param, btn.cross).then(res => { |
| | | if (typeof(res) !== 'object' || Array.isArray(res)) { |
| | | let error = '未知的返回结果!' |
| | | |
| | |
| | | } |
| | | } else if (_opentype !== 'popview') { // 打开方式不是弹窗页面时 |
| | | if (_intertype === 'custom') { |
| | | _options.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method') |
| | | _options.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method', 'cross') |
| | | if (_procMode === 'system') { |
| | | _options.push('sql', 'sqlType') |
| | | } else { |
| | |
| | | } else if (item.type === 'radio') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |
| | | <Form.Item label={item.tooltip ? |
| | | <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> |
| | | <Icon type="question-circle" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [ |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType === 'custom' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'如果自定义接口不支持跨域请求,会通过当前系统转发。'}> |
| | | <Icon type="question-circle" /> |
| | | 跨域请求 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('cross', { |
| | | initialValue: setting.cross || 'true' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">支持</Radio> |
| | | <Radio value="false">不支持</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType === 'custom' ? <Col span={12}> |
| | | <Form.Item label="执行次数"> |
| | | {getFieldDecorator('execTime', { |
| | | initialValue: setting.execTime || 'once' |
| | |
| | | }, |
| | | { |
| | | 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', |
| | | tooltip: '使用默认方式执行时,需要配合计划任务。', |
| | | tooltip: '使用后台脚本执行时,需要配合计划任务。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'script', |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | |
| | | import options from '@/store/options.js' |
| | | import UniqueForm from './uniqueform' |
| | | import ContrastForm from './contrastform' |
| | | import CustomForm from './customform' |
| | |
| | | mutilparam.secretkey = Utils.encrypt(mutilparam.LText, mutilparam.timestamp) |
| | | mutilparam.open_key = Utils.encryptOpenKey(mutilparam.secretkey, mutilparam.timestamp) |
| | | |
| | | Api.getCloudCacheConfig(mutilparam).then(res => { |
| | | if (options.cloudServiceApi) { // 云端请求 |
| | | mutilparam.rduri = options.cloudServiceApi |
| | | mutilparam.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | mutilparam.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | | |
| | | Api.getSystemCacheConfig(mutilparam).then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | | orderModular: res.modular, |
| | |
| | | let _id = window.atob('YmgwYmFwYWJ0ZDQ1ZXBz$mkZ3JhNzlzZWdiY2g2YzFpYms='.replace(/\$mk/ig, '')) |
| | | |
| | | let param = { |
| | | rduri: _rduri, |
| | | func: _func, |
| | | AppID: _appId, |
| | | TimeStamp: timeStamp, |
| | | appkey: window.GLOB.appkey, |
| | | userid: _id, |
| | | LoginUID: _id |
| | | LoginUID: _id, |
| | | nonc: Utils.getuuid() |
| | | } |
| | | |
| | | Api.dostarToDostars(param).then(res => { |
| | | let keys = Object.keys(param).sort() |
| | | let values = '' |
| | | keys.forEach(key => { |
| | | values += key + param[key] |
| | | }) |
| | | param.sign = md5(values) |
| | | param.t = new Date().getTime() |
| | | |
| | | Api.directRequest(_rduri + '/sEmpowerCloud_Get_LinkUrl', 'post', param, 'true').then(res => { |
| | | if (res.status) { |
| | | if (res.EPC === str) { |
| | | let box = [] |