dev_new_shixunsrepository
tangjiang 5 years ago
parent 4d818c8520
commit f7fc049d7e

@ -63,11 +63,11 @@ export function initAxiosInterceptors(props) {
const requestMap = {};
window.railsgettimes = function(proxy) {
$.ajax({url:`${proxy}/api/main/first_stamp.json`,async:false,success:function(data,status){
if(data.status===0){
return data.message;
}
}});
// $.ajax({url:`${proxy}/api/main/first_stamp.json`,async:false,success:function(data,status){
// if(data.status===0){
// return data.message;
// }
// }});
}
window.setfalseInRequestMap = function(keyName) {
@ -101,8 +101,9 @@ export function initAxiosInterceptors(props) {
}
}
if(`${config[0]}`!=`true`){
let timestamp = Date.parse(new Date())/1000;
if (window.location.port === "3007") {
let timestamp=railsgettimes(proxy);
// let timestamp=railsgettimes(proxy);
console.log(timestamp)
let newopens=md5(opens+timestamp)
config.url = `${proxy}${url}`;

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-30 13:51:19
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-30 18:02:20
* @LastEditTime : 2019-12-30 19:21:56
*/
import './index.scss';
import React, { useState } from 'react';
@ -23,6 +23,8 @@ function KnowLedge (props) {
const [selectOptions, setSelectOptions] = useState(options);
// 已选择的下拉项
const [selectValue, setSelectValue] = useState(values);
//
const [value] = useState([]);
// 渲染下拉选项
const renderOptions = (options = []) => {
@ -32,8 +34,9 @@ function KnowLedge (props) {
));
}
const handleSelectChange = (value) => {
console.log(value);
const _result = selectOptions.filter(item => item !== value);
console.log('过滤结果Start=====》》》》》', selectOptions, value);
const _result = selectOptions.filter(item => item !== value.join(''));
console.log('过滤结果=====》》》》》', _result, selectOptions);
setSelectOptions(_result);
}
@ -41,7 +44,8 @@ function KnowLedge (props) {
const renderSelect = (options, values) => {
return (
<Select
mode="multiple"
value={value}
mode="tags"
placeholder="请选择"
style={{ width: '100%' }}
onChange={handleSelectChange}

@ -2,4 +2,8 @@
.ant-select-selection__rendered{
margin-bottom: 0 !important;
}
.ant-select-search--inline{
margin-left: 5px;
margin-top: 2px;
}
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 10:35:40
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-30 17:53:18
* @LastEditTime : 2019-12-30 19:20:50
*/
import './index.scss';
// import 'katex/dist/katex.css';

Loading…
Cancel
Save