Bläddra i källkod

阅卷端接口修改5

weiwenhai 7 år sedan
förälder
incheckning
87d769e0ec

+ 7 - 0
cqb-paper/src/main/java/com/qmth/cqb/paper/service/impl/ExtractConfigServiceImpl.java

@@ -1048,6 +1048,13 @@ public class ExtractConfigServiceImpl implements ExtractConfigService {
 	}
 	
 	public String startWithP(String s,Integer number,boolean option){
+		if(number == -2){
+			if(s.startsWith("<p>")){
+				s = s.replaceAll("<p>","<p style=\"margin-left:40px;\">").replaceFirst("<p style=\"margin-left:40px;\">", "<p style=\"margin-left:20px;\">");
+			}else{
+				s = "<p style=\"margin-left:20px;color:red;\">" + s + "</p>";
+			}
+		}
 		if(number == -1){
 			if(s.startsWith("<p>")){
 				s = s.replaceAll("<p>","<p style=\"margin-left:40px;\">").replaceFirst("<p style=\"margin-left:40px;\">", "<p style=\"margin-left:20px;\">" + "答案:");