|
@@ -66,16 +66,15 @@ common={
|
|
|
// $("#avatar").html('<img src="' + responsedata.info.user.avatar + '" class="layui-circle">');
|
|
|
// }
|
|
|
|
|
|
- if(data.info.user.user_id){
|
|
|
- $("#py1_avatar").html('<img src="' + data.info.user.avatar+ '" class="layui-circle">');
|
|
|
+ // if(data.info.user.user_id){
|
|
|
+ // $("#py1_avatar").html('<img src="' + data.info.user.avatar+ '" class="layui-circle">');
|
|
|
+ // $("#py1_username").html(data.info.user.name + '(我)');
|
|
|
+ // }
|
|
|
+ if(data.info.user.user_id){
|
|
|
+ $("#py1_avatar").html('<img src="' + data.info.user.avatar+ '" class="layui-circle">');
|
|
|
$("#py1_username").html(data.info.user.name + '(我)');
|
|
|
- }
|
|
|
- if(data.info.players.user_id){
|
|
|
- $("#py2_avatar").html('<img src="' + data.info.players.avatar + '" class="layui-circle">');
|
|
|
- $("#py2_username").html(data.info.players.name);
|
|
|
- $(".welcome").hide();
|
|
|
- $(".gstart").show();
|
|
|
- $(".g-doc .g-inner").addClass("doing");
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},onSocket:function(e){
|
|
@@ -123,6 +122,7 @@ common={
|
|
|
|
|
|
},loadQuestion(responsedata) {
|
|
|
console.log(responsedata);
|
|
|
+
|
|
|
_this.data.question_id= responsedata.info.question.question_id;
|
|
|
$("#Jqtitle").html(responsedata.info.question.title );
|
|
|
var question="";
|
|
@@ -131,7 +131,10 @@ common={
|
|
|
question += '<li class="btn-2 item item'+i+' answer layui-btn layui-btn-primary" data-option_id="'+answers[i].option_id+'">'+answers[i].title+'</li>';
|
|
|
}
|
|
|
$("#question").html(question);
|
|
|
- $("#Jpage").html(responsedata.info.questions_count+"/5")
|
|
|
+ $("#Jpage").html(responsedata.info.questions_count+"/5");
|
|
|
+ $(".welcome").hide();
|
|
|
+ $(".gstart").show();
|
|
|
+ $(".g-doc .g-inner").addClass("doing");
|
|
|
// is_end = responsedata.info.question.is_end;
|
|
|
this.daoshu();
|
|
|
|