Commit 6a69427a by yuananting

fix:灰度调试

parent 2d180589
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-25 13:46:35 * @Date: 2021-02-25 13:46:35
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-03-25 16:47:32 * @LastEditTime: 2021-03-25 16:56:40
* @Description: 助学工具-题库-题目管理-新增题目 * @Description: 助学工具-题库-题目管理-新增题目
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -95,6 +95,7 @@ class AddNewQuestion extends Component { ...@@ -95,6 +95,7 @@ class AddNewQuestion extends Component {
return item; return item;
}) })
.join(""); .join("");
console.log("1.接口返回:", result)
this.setState({ gapFillingContent: result }); this.setState({ gapFillingContent: result });
break; break;
case "INDEFINITE_CHOICE": case "INDEFINITE_CHOICE":
...@@ -283,6 +284,7 @@ class AddNewQuestion extends Component { ...@@ -283,6 +284,7 @@ class AddNewQuestion extends Component {
gapFillingContent, gapFillingContent,
indefiniteChoiceContent, indefiniteChoiceContent,
} = this.state; } = this.state;
console.log("2.主页面渲染:", gapFillingContent)
const categoryId = getParameterByName("categoryId"); const categoryId = getParameterByName("categoryId");
return ( return (
<div className="page add-new-question"> <div className="page add-new-question">
...@@ -391,7 +393,6 @@ class AddNewQuestion extends Component { ...@@ -391,7 +393,6 @@ class AddNewQuestion extends Component {
}} }}
questionInfo={gapFillingContent} questionInfo={gapFillingContent}
onSetState={(newContent) => { onSetState={(newContent) => {
console.log("newContent填空", newContent)
Object.assign(gapFillingContent, newContent); Object.assign(gapFillingContent, newContent);
}} }}
/> />
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-25 14:34:29 * @Date: 2021-02-25 14:34:29
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-03-25 16:46:35 * @LastEditTime: 2021-03-25 17:00:04
* @Description: 助学工具-题库-题目管理-新建题目Tab * @Description: 助学工具-题库-题目管理-新建题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -33,6 +33,7 @@ class NewQuestionTab extends Component { ...@@ -33,6 +33,7 @@ class NewQuestionTab extends Component {
questionAnswerDescList, questionAnswerDescList,
showBox, showBox,
} = questionInfo; } = questionInfo;
console.log("3. 子组件接收:", gapFillingAnswerList)
this.state = { this.state = {
stemContent: JSON.parse(JSON.stringify(questionStemList)), // 题干内容 stemContent: JSON.parse(JSON.stringify(questionStemList)), // 题干内容
gapFillingAnswer: JSON.parse(JSON.stringify(gapFillingAnswerList)), // 填空题-选项列表 gapFillingAnswer: JSON.parse(JSON.stringify(gapFillingAnswerList)), // 填空题-选项列表
...@@ -97,7 +98,7 @@ class NewQuestionTab extends Component { ...@@ -97,7 +98,7 @@ class NewQuestionTab extends Component {
const { questionInfo } = nextProps; const { questionInfo } = nextProps;
if (this.props.questionInfo !== questionInfo) { if (this.props.questionInfo !== questionInfo) {
if (questionInfo.gapFillingAnswerList !== this.state.gapFillingAnswer) { if (questionInfo.gapFillingAnswerList !== this.state.gapFillingAnswer) {
console.log("shouldComponentUpdate", questionInfo.gapFillingAnswerList) console.log("4. 组件更新:", questionInfo.gapFillingAnswerList)
this.setState({ this.setState({
gapFillingAnswer: questionInfo.gapFillingAnswerList, gapFillingAnswer: questionInfo.gapFillingAnswerList,
}); });
...@@ -573,7 +574,7 @@ class NewQuestionTab extends Component { ...@@ -573,7 +574,7 @@ class NewQuestionTab extends Component {
} }
changeBlankCount = (data, idx) => { changeBlankCount = (data, idx) => {
console.log("___data___", data) console.log("__changeBlankCount_data___", data)
const { gapFillingAnswer } = this.state; const { gapFillingAnswer } = this.state;
let _gap = [...gapFillingAnswer]; let _gap = [...gapFillingAnswer];
console.log("___changeBlankCount__gapFillingAnswer____", gapFillingAnswer) console.log("___changeBlankCount__gapFillingAnswer____", gapFillingAnswer)
...@@ -690,6 +691,7 @@ class NewQuestionTab extends Component { ...@@ -690,6 +691,7 @@ class NewQuestionTab extends Component {
renderGapFillingAnswer = (optionItem, optionIndex) => { renderGapFillingAnswer = (optionItem, optionIndex) => {
const { gapFillingAnswer } = this.state; const { gapFillingAnswer } = this.state;
console.log("5. 答案渲染:", gapFillingAnswer)
const list = const list =
gapFillingAnswer[optionIndex] && gapFillingAnswer[optionIndex] &&
gapFillingAnswer[optionIndex].correctAnswerList; gapFillingAnswer[optionIndex].correctAnswerList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment