diff --git a/src/AppConfig.js b/src/AppConfig.js index 68dd5439a..406f60226 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -39,7 +39,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : window.location.search.indexOf('debug=s') != -1 ? 'student' : - window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' + window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || '' } // 超管 // debugType="admin"; @@ -126,10 +126,11 @@ export function initAxiosInterceptors(props) { // https://github.com/axios/axios/issues/1497 // TODO 读取到package.json中的配置? - + + var //proxy = "http://localhost:3000" - proxy="https://testforgeplus.trustie.net" - // proxy="http://localhost:3000" + proxy="https://testforgeplus.trustie.net/" + // proxy="http://localhost:3000" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 @@ -225,7 +226,7 @@ export function initAxiosInterceptors(props) { // let timestamp=railsgettimes(proxy); // console.log(timestamp) // `https://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp` - // railsgettimes( `${proxy}/api/main/first_stamp.json`); + railsgettimes( `${proxy}/api/main/first_stamp.json`); let newopens=md5(opens+timestamp) config.url = `${proxy}${url}`; if (config.url.indexOf('?') == -1) { @@ -237,7 +238,7 @@ export function initAxiosInterceptors(props) { // 加api前缀 // railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`); - // railsgettimes( `/api/main/first_stamp.json`); + railsgettimes( `/api/main/first_stamp.json`); let newopens=md5(opens+timestamp) config.url = url; if (config.url.indexOf('?') == -1) { diff --git a/src/forge/Merge/merge.js b/src/forge/Merge/merge.js index 37ba70162..518048e13 100644 --- a/src/forge/Merge/merge.js +++ b/src/forge/Merge/merge.js @@ -166,7 +166,6 @@ class merge extends Component{ if(type===1){ this.setState({ status_type:'1', - openselect:current_user.user_id, closeselect:undefined, issue_tag_ids:'标签', fixed_version_ids:'里程碑', @@ -179,7 +178,6 @@ class merge extends Component{ this.setState({ status_type:'2', openselect:undefined, - closeselect:current_user.user_id, issue_tag_ids:'标签', fixed_version_ids:'里程碑', assigned_to_ids:'指派人', diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js index ed598c927..a985086af 100644 --- a/src/forge/Order/order.js +++ b/src/forge/Order/order.js @@ -222,7 +222,6 @@ class order extends Component{ if(type===1){ this.setState({ status_type:'1', - openselect:current_user.user_id, closeselect:undefined, issue_tag_ids:'标签', tracker_ids:'所有分类', @@ -238,7 +237,6 @@ class order extends Component{ this.setState({ status_type:'2', openselect:undefined, - closeselect:current_user.user_id, issue_tag_ids:'标签', tracker_ids:'所有分类', author_ids:'发布人', @@ -257,11 +255,19 @@ class order extends Component{ // 筛选:全部、指派给我、由我创建 ChangeAssign=(type)=>{ const { limit, search,status_type} = this.state; + const { current_user } = this.props; + this.setState({ isSpin:true }) if(type){ - const { current_user } = this.props; + if(current_user===undefined){ + this.setState({ + isSpin:false + }) + alert("请登录后查看") + return; + } if(type===1){ this.setState({ page:1, @@ -310,6 +316,8 @@ class order extends Component{ } render(){ + const { current_user } = this.props; + const { issue_chosen , issues , limit , page , search_count , data , assigned_to_id , author_id , isSpin,openselect,closeselect } = this.state; const { projectsId } = this.props.match.params; @@ -364,8 +372,9 @@ class order extends Component{