From f300f2642ebd7fe46653f0fba6f0be76851829ff Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 6 Jul 2019 15:21:17 +0800 Subject: [PATCH 1/2] _path --- public/react/src/common/components/Cropper.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/public/react/src/common/components/Cropper.js b/public/react/src/common/components/Cropper.js index 94b47747f..7e8a5792e 100644 --- a/public/react/src/common/components/Cropper.js +++ b/public/react/src/common/components/Cropper.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import { getUrl2 } from 'educoder' +import { getUrl2, isDev } from 'educoder' const $ = window.$ let _url_origin = getUrl2() @@ -81,18 +81,19 @@ class Cropper extends Component { $.ajaxSetup({ cache: true }); - + const isDev = isDev() + let _path = isDev ? 'public' : 'build' $('head').append($('') - .attr('href', `${_url_origin}/react/public/js/cropper/cropper.min.css`)); + .attr('href', `${_url_origin}/react/${_path}/js/cropper/cropper.min.css`)); $.getScript( - `${_url_origin}/react/public/js/cropper/cropper.js`, + `${_url_origin}/react/${_path}/js/cropper/cropper.js`, (data, textStatus, jqxhr) => { }); $.getScript( - `${_url_origin}/react/public/js/cropper/html2canvas.min.js`, + `${_url_origin}/react/${_path}/js/cropper/html2canvas.min.js`, (data, textStatus, jqxhr) => { }); From 49b3c40e2453b7b0902964f6bc906ed63be055df Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 6 Jul 2019 15:25:48 +0800 Subject: [PATCH 2/2] application_list.leng --- public/react/src/modules/courses/members/teacherList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index b741d6b12..70944fab8 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -37,7 +37,8 @@ function buildColumns(that) { dataIndex: 'name', key: 'index', render: (content, item, index) => { - return item.isApply == true ? '' : {(that.state.page - 1) * 20 + index + 1 - that.application_list.length}  + return item.isApply == true ? '' : {(that.state.page - 1) * 20 + index + 1 + - (that.application_list ? that.application_list.length : 0)}  } } // ,{