From f6a141cfb26a87f8dcedc7d3a8ed7b41dd3b68ef Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Sat, 27 Jul 2019 14:50:17 +0800
Subject: [PATCH 1/2] =?UTF-8?q?IE=E9=97=AE=E5=8D=B7=E6=8F=90=E4=BA=A4?=
=?UTF-8?q?=E4=B8=BB=E8=A7=82=E9=A2=98-=E5=8F=82=E6=95=B0=E4=B9=B1?=
=?UTF-8?q?=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/courses/poll/PollDetailTabThird.js | 4 ++--
.../react/src/modules/courses/poll/PollInfo.js | 17 ++++++++++-------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/public/react/src/modules/courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js
index dd2f5dea5..c0d748974 100644
--- a/public/react/src/modules/courses/poll/PollDetailTabThird.js
+++ b/public/react/src/modules/courses/poll/PollDetailTabThird.js
@@ -89,7 +89,7 @@ class PollDetailTabThird extends Component{
item.question.answers.map((index,k)=>{
return(
-
+
{index.answer_text}
{
index.answer_text=="其他" ? :""
@@ -109,7 +109,7 @@ class PollDetailTabThird extends Component{
item.question.answers.map((index,k)=>{
return(
-
+
{index.answer_text}
{
index.answer_text=="其他" ? :""
diff --git a/public/react/src/modules/courses/poll/PollInfo.js b/public/react/src/modules/courses/poll/PollInfo.js
index 5d3bd36c3..8429595c9 100644
--- a/public/react/src/modules/courses/poll/PollInfo.js
+++ b/public/react/src/modules/courses/poll/PollInfo.js
@@ -135,7 +135,7 @@ class PollInfo extends Component{
postAnswer=(q_id,a_id,text,key)=>{
let url=`/poll_questions/${q_id}/poll_votes.json`;
-
+ console.log(text);
axios.post(url,{
poll_answer_id:a_id,
vote_text:text
@@ -207,8 +207,9 @@ class PollInfo extends Component{
})
if(text!=undefined){
- url+="vote_text="+text;
- axios.post(url).then((result)=>{
+ axios.post((url),{
+ vote_text:text
+ }).then((result)=>{
if(result.status==200){
const answer=Object.assign({}, this.state.question_answered[key]);
answer.ques_status=result.data.poll_vote.question_status;
@@ -400,8 +401,9 @@ class PollInfo extends Component{
{
item.question.answers && item.question.answers.map((i,k)=>{
return(
-
- {i.answer_text}
+
+
+ {i.answer_text}
{
i.answer_text=="其他" ?
@@ -442,8 +444,9 @@ class PollInfo extends Component{
{
item.question.answers && item.question.answers.map((i,k)=>{
return(
-
- {i.answer_text}
+
+
+ {i.answer_text}
{
i.answer_text=="其他"?
From 25d4279c1de5fbd31320ceea96241e917de8abc2 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Sat, 27 Jul 2019 14:53:56 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E9=A2=84=E8=A7=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/poll/PollDetailTabThird.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js
index c0d748974..b0bc95cea 100644
--- a/public/react/src/modules/courses/poll/PollDetailTabThird.js
+++ b/public/react/src/modules/courses/poll/PollDetailTabThird.js
@@ -90,7 +90,7 @@ class PollDetailTabThird extends Component{
return(
- {index.answer_text}
+ {index.answer_text}
{
index.answer_text=="其他" ? :""
}
@@ -110,7 +110,7 @@ class PollDetailTabThird extends Component{
return(
- {index.answer_text}
+ {index.answer_text}
{
index.answer_text=="其他" ? :""
}