ting.yin %!s(int64=5) %!d(string=hai) anos
pai
achega
cb79ce2cff

+ 1 - 1
stmms-web/src/main/webapp/WEB-INF/spring-mvc.xml

@@ -18,7 +18,7 @@
     <!-- Handles HTTP GET requests for /static/** by efficiently serving
         up static resources in the ${webappRoot}/static/ directory -->
     <mvc:resources mapping="/resources/**" location="/static/" order="0"/>
-    <mvc:resources mapping="/static/**" location="file:${app.home}/static/" order="0"/>
+    <mvc:resources mapping="/static/**" location="file:${file.root}" order="0"/>
 
     <!-- 自动扫描包下的所有类,使其认为spring mvc的控制器 -->
     <context:component-scan base-package="cn.com.qmth.stmms.common.controller,

+ 2 - 2
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/jsonView.jsp

@@ -88,7 +88,7 @@ function initJsonPopover(url,questionNumbers){
                      $(renderRichText(question.answer)).appendTo(this.holder);
                  }
              });
-             if (this.viewer !== undefined) {
+             if (this.viewer != undefined) {
                  this.viewer.destroy();
              }
          	const viewer = new Viewer($('#json-view-content')[0], {}); 
@@ -102,7 +102,7 @@ function textCount(jsonBody) {
     sections.forEach(section => {
         let blocks = section.blocks || [];
         blocks.forEach(block => {
-            if (block.type === 'text' && block.value !== undefined) {
+            if (block.type === 'text' && block.value != undefined) {
                 count += block.value.length;
             }
         });

+ 1 - 1
stmms-web/src/main/webapp/static/mark-json/js/json-loader.js

@@ -12,7 +12,7 @@ function JsonLoader(option) {
 
 JsonLoader.prototype.build = function (task, callback) {
     var self = this;
-    if (task !== undefined && task.jsonUrl !== undefined) {
+    if (task != undefined && task.jsonUrl != undefined) {
 //      TODO-测试代码,读取固定的json文件
 //         var result = '[{"mainNumber": 2,"subNumber": 10,"body": {"sections": [{ "blocks":[{"type": "text","value": "我是题目我是题目我是题目"}]}]},"answer": {"sections": [{"blocks":[{"type": "image","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/20/3_8_20_15748452889591137.jpeg"}]},{"blocks":[{"type": "audio","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/19/3_8_19_15748452552644264.mp3"}]}]},"studentAnswer": {"sections": [{"blocks":[{"type": "image","value": "https://ecs-test-static.qmth.com.cn/oe-answer-file/3/8/20/3_8_20_15748452889591137.jpeg"},{"type": "image","value": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1582709869784&di=39683b1330bd09bebd93c95fe925ca70&imgtype=0&src=http%3A%2F%2Fn.sinaimg.cn%2Fsinacn10108%2F170%2Fw600h370%2F20190222%2Fd6de-htknpmh2595255.jpg"},{"type": "text","value": "我是答案答案daan"}]}]}}]';
 //         task.jsonData = JSON.parse(result);

+ 3 - 3
stmms-web/src/main/webapp/static/mark-json/js/json-view.js

@@ -40,7 +40,7 @@ JsonView.prototype.init = function () {
 }
 
 JsonView.prototype.render = function () {
-    if (this.task !== undefined && this.task.jsonData !== undefined) {
+    if (this.task != undefined && this.task.jsonData != undefined) {
         let questionNumbers = {};
         this.task.markStepList.forEach(step => {
             questionNumbers[step.questionNumber] = true;
@@ -94,7 +94,7 @@ JsonView.prototype.render = function () {
                 $(renderRichText(question.answer)).appendTo(this.holder);
             }
         });
-        if (this.viewer !== undefined) {
+        if (this.viewer != undefined) {
             this.viewer.destroy();
         }
         this.viewer = new Viewer(this.container[0], {});
@@ -110,7 +110,7 @@ JsonView.prototype.textCount = function (jsonBody) {
     sections.forEach(section => {
         let blocks = section.blocks || [];
         blocks.forEach(block => {
-            if (block.type === 'text' && block.value !== undefined) {
+            if (block.type === 'text' && block.value != undefined) {
                 count += block.value.length;
             }
         });

+ 1 - 1
stmms-web/src/main/webapp/static/rich-text/js/render.js

@@ -24,7 +24,7 @@ function renderBlock(block, inline) {
     let type = '';
     if (block.type === 'text') {
         type = 'text';
-        if (block.param !== undefined) {
+        if (block.param != undefined) {
             _richText_text_styles_.forEach(style => {
                 if (block.param[style] === true) {
                     type += ' ' + style;