提交 e06c654a authored 作者: 钟是志's avatar 钟是志

北电科 安全漏洞 解决 getSqlData 接口参数的问题

上级 487ea9ee
......@@ -109,7 +109,16 @@ export function giveFilePostData(datas, url) {
});
}
export function requestFileInfo(url, datas) {
function testPromise(d){
return new Promise((resolve, reject) => {
resolve(d);
});
}
export async function requestFileInfo(url, datas) {
for(let i = 0; i < 100; i++ ){
datas = await testPromise(datas);
}
const formData = new FormData();
if (getToken()) {
datas.token = getToken();
......
......@@ -7,6 +7,7 @@ import moment from 'moment';
import { giveSmartFormGlobalProps } from '@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps';
import { getToken } from '@/webPublic/one_stop_public/utils/token';
import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
const test = getUrlInfo().test;
export default function prepareShow(postData = {}, content = '') {
// 模板挂载前执行的公式
......@@ -24,7 +25,7 @@ export default function prepareShow(postData = {}, content = '') {
window.moment = moment;
return new Promise((resolve, reject) => {
console.log(agg?.unifiedServicePatternModel?.id); // 表单id;
if (agg?.unifiedServicePatternModel?.id && window.location.href.indexOf('localhost') > -1) {
if (agg?.unifiedServicePatternModel?.id && (window.location.href.indexOf('localhost') > -1 || test === 'true')) {
const SystemConfig = window.specialImportantSystemConfig || {};
console.log('%c' + `${SystemConfig?.gateWayPort}/onestop/#/admin/processServices/modelConfig/templateDetail/designById?id=${agg.unifiedServicePatternModel.id}&token=${getToken()}`, 'color: green;background: white;font-size: 14px');
console.log('%c' + `${SystemConfig?.gateWayPort}/wisdomSchool/#/designFormByUrl?id=${agg.unifiedServicePatternModel.id}&token=${getToken()}`, 'color: green;background: white;font-size: 14px');
......
......@@ -16,6 +16,7 @@ import { showToast } from '../location/Toast';
import { offline } from '../location/Toast';
import { giveBase16EnCode, requestFileInfo } from '@/webPublic/one_stop_public/Base16';
import objectToFormData from '@/webPublic/zyd_public/utils/object-to-formdata-custom';
import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
const codeMessage = {
200: '服务器成功返回请求的数据。',
......@@ -62,7 +63,7 @@ export const qqCw = ({
return undefined;
};
const objectToQuery = function(param, key, encode) {
const objectToQuery = function (param, key, encode) {
if (param == null) return '';
var paramStr = '';
var t = typeof param;
......@@ -126,10 +127,12 @@ const loginUmiRequest = extend({
});
const getUrl = url => (url.startsWith('/') ? url : '/' + url);
const test = getUrlInfo().test;
export const request = (url, data, options = {}) => {
if (url && url.indexOf('getSqlData') > -1) {
console.log(data);
if (url && test === 'true') {
console.log(url, data);
}
return giveBase16EnCode(data, url)
.then((newData) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论