17 lines
438 B
XML
17 lines
438 B
XML
module.exports = {
|
|
stringify : function(item){
|
|
return JSON.stringify(item)
|
|
},
|
|
getStyle: function(status,code,answer,selected){
|
|
console.log(code,answer,selected)
|
|
if(status > 0 && code == answer){
|
|
return 'right'
|
|
}
|
|
if(status > 0 && code == selected && answer != selected){
|
|
return 'wrong'
|
|
}
|
|
if(code!=selected){
|
|
return ''
|
|
}
|
|
}
|
|
} |