Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
杨树明 5 years ago
commit 229be8fda5

@ -89,8 +89,8 @@ class PollDetailTabThird extends Component{
item.question.answers.map((index,k)=>{ item.question.answers.map((index,k)=>{
return( return(
<li className="df"> <li className="df">
<Radio value={index.answer_id}></Radio> <Radio className="fl" value={index.answer_id}></Radio>
<span className={index.answer_text=="其他"?"break_word":"break_word flex1"}>{index.answer_text}</span> <span className={index.answer_text=="其他"?"break-word":"break-word flex1"}>{index.answer_text}</span>
{ {
index.answer_text=="其他" ? <p className="textLine"></p>:"" index.answer_text=="其他" ? <p className="textLine"></p>:""
} }
@ -109,8 +109,8 @@ class PollDetailTabThird extends Component{
item.question.answers.map((index,k)=>{ item.question.answers.map((index,k)=>{
return( return(
<li className="df"> <li className="df">
<Checkbox value={index.answer_id}></Checkbox> <Checkbox className="fl mr8" value={index.answer_id}></Checkbox>
<span className={index.answer_text=="其他"?"break_word":"break_word flex1"}>{index.answer_text}</span> <span className={index.answer_text=="其他"?"break-word":"break-word flex1"}>{index.answer_text}</span>
{ {
index.answer_text=="其他" ? <p className="textLine"></p>:"" index.answer_text=="其他" ? <p className="textLine"></p>:""
} }

@ -135,7 +135,7 @@ class PollInfo extends Component{
postAnswer=(q_id,a_id,text,key)=>{ postAnswer=(q_id,a_id,text,key)=>{
let url=`/poll_questions/${q_id}/poll_votes.json`; let url=`/poll_questions/${q_id}/poll_votes.json`;
console.log(text);
axios.post(url,{ axios.post(url,{
poll_answer_id:a_id, poll_answer_id:a_id,
vote_text:text vote_text:text
@ -207,8 +207,9 @@ class PollInfo extends Component{
}) })
if(text!=undefined){ if(text!=undefined){
url+="vote_text="+text; axios.post((url),{
axios.post(url).then((result)=>{ vote_text:text
}).then((result)=>{
if(result.status==200){ if(result.status==200){
const answer=Object.assign({}, this.state.question_answered[key]); const answer=Object.assign({}, this.state.question_answered[key]);
answer.ques_status=result.data.poll_vote.question_status; 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)=>{ item.question.answers && item.question.answers.map((i,k)=>{
return( return(
<li className={i.answer_text=="其他"?"df":""}> <li className={i.answer_text=="其他"?"df clearfix":"clearfix"}>
<Radio name={[item.question.id,key]} className="break-word" value={i.answer_id} >{i.answer_text}</Radio> <Radio name={[item.question.id,key]} className="fl" value={i.answer_id} ></Radio>
<span className="break-word fl" style={{maxWidth:"1116px"}}>{i.answer_text}</span>
{ {
i.answer_text=="其他" ? i.answer_text=="其他" ?
<React.Fragment> <React.Fragment>
@ -442,8 +444,9 @@ class PollInfo extends Component{
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
return( return(
<li className={i.answer_text=="其他"?"df":""}> <li className={i.answer_text=="其他"?"df clearfix":"clearfix"}>
<Checkbox className="break-word" value={i.answer_id}>{i.answer_text}</Checkbox> <Checkbox className="fl mr8" value={i.answer_id}></Checkbox>
<span className="break-word fl" style={{maxWidth:"1116px"}}>{i.answer_text}</span>
{ {
i.answer_text=="其他"? i.answer_text=="其他"?
<React.Fragment> <React.Fragment>

Loading…
Cancel
Save