17 lines
438 B
Plaintext
17 lines
438 B
Plaintext
|
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 ''
|
||
|
}
|
||
|
}
|
||
|
}
|