dev_auth
cxt 6 years ago
commit d8c8c25941

@ -83,7 +83,7 @@ namespace :poll_publish do
end
task :end => :environment do
puts "--------------------------------poll_publish end start"
#1.统一设置的截止
polls = Poll.includes(:poll_users).where("polls_status = 2 AND end_time <=?",Time.now + 900)
polls.each do |poll|

@ -42,5 +42,28 @@ export function formatDuring(mss){
var days = parseInt(mss / (1000 * 60 * 60 * 24));
var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
// console.log("formatDuringformatDuring");
// console.log(days);
// console.log(hours);
// console.log(minutes);
// console.log(Math.abs(days));
// console.log(Math.abs(hours));
// console.log(Math.abs(minutes));
try {
days = Math.abs(days);
} catch (e) {
}
try {
hours = Math.abs(hours);
} catch (e) {
}
try {
minutes = Math.abs(minutes);
} catch (e) {
}
return days + "天" + hours + "小时" + minutes + "分";
}

@ -91,13 +91,13 @@ class CompetitionContents extends Component{
title: 'username',
dataIndex: 'username',
key: 'username',
render: text => <a>{text}</a>,
render: text => <a title={text}>{text}</a>,
},
{
title: 'school',
dataIndex: 'school',
key: 'school',
render: text => <a>{text}</a>,
render: text => <a title={text}>{text}</a>,
},
{
title: 'spendtime',
@ -316,9 +316,23 @@ class CompetitionContents extends Component{
<style>
{
`
.ant-table-tbody > tr > td:nth-last-child(3) a{
.ant-table-tbody > tr > td:nth-last-child(4){
line-height: 63px;
width: 300px;
height: 96px;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-table-tbody > tr > td:nth-last-child(3){
line-height: 63px;
width: 305px;
height: 96px;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
`
}

@ -17,6 +17,21 @@ function formatDuring(mss){
var days = parseInt(mss / (1000 * 60 * 60 * 24));
var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
try {
days = Math.abs(days);
} catch (e) {
}
try {
hours = Math.abs(hours);
} catch (e) {
}
try {
minutes = Math.abs(minutes);
} catch (e) {
}
return days + "天" + hours + "小时" + minutes + "分";
}
class PollDetailTabFirst extends Component{

Loading…
Cancel
Save