Browse Source

脚本结构调整

lujianhong 5 years ago
parent
commit
f973463d29

+ 986 - 0
EBook.Web/AnsText/21255.json

@@ -0,0 +1,986 @@
+[
+  {
+    "AudioLength": 8,
+    "AudioUrl": "http://172.16.41.241:10103/http_TBookEditor51/exerciseAnswerAudio/2020-12-04_04-52-14.wav",
+    "Id": "0",
+    "Score": 5.0,
+    "Text": "learning learning learning learning learning learning nineteen ninety nine",
+    "Type": 3
+  },
+  {
+    "AudioLength": 10,
+    "AudioUrl": "http://172.16.41.241:10103/http_TBookEditor51/exerciseAnswerAudio/2020-12-04_04-52-14.wav",
+    "Id": "1",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 3
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "2",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "3",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 8,
+    "AudioUrl": "http://172.16.41.241:10103/http_TBookEditor51/exerciseAnswerAudio/2020-12-04_04-52-34.wav",
+    "Id": "4",
+    "Score": 0.0,
+    "Text": "learning english learning a new ninety nine",
+    "Type": 3
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "5",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "6",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "7",
+    "Score": 0.0,
+    "Text": "dasjdljkaskl  asjk as dl",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "8",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "9",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "10",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "11",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "12",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "13",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "14",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "15",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "16",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "17",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "18",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "19",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "20",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "21",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "22",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "23",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "24",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "25",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "26",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "27",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "28",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "29",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "30",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "31",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "32",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "33",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "34",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "35",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "36",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "37",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "38",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "39",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "40",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "41",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "42",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "43",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "44",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "45",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "46",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "47",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "48",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "49",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "50",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "51",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "52",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "53",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "54",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "55",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "56",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "57",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "58",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "59",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "60",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "61",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "62",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "63",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "64",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "65",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "66",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "67",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "68",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "69",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "70",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "71",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "72",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "73",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "74",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "75",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "76",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "77",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "78",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "79",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "80",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "81",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "82",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "83",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "84",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "85",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "86",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "87",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "88",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "89",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "90",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "91",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "92",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "93",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "94",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "95",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "96",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "97",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "98",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "99",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "100",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "101",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "102",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "103",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "104",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "105",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "106",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "107",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "108",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "109",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "110",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "111",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "112",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "113",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "114",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "115",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "116",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "117",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "118",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "119",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "120",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "121",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  },
+  {
+    "AudioLength": 0,
+    "AudioUrl": "",
+    "Id": "122",
+    "Score": 0.0,
+    "Text": "",
+    "Type": 1
+  }
+]

File diff suppressed because it is too large
+ 0 - 0
EBook.Web/AnsText/21255.txt


+ 15 - 12
EBook.Web/Common/tasklib_book.css

@@ -1,18 +1,17 @@
 body {text-align:left;}
-.btn-play {height:30px;background-color:#eaf6ff;color:#66b6ff;border-radius: 5px; border:solid #66b6ff 1px;display:inline-block;margin-bottom:-5px;}
-.btn-play img {float:left;margin-left:3px;margin-top:5px;width:20px;height:20px;}
-.btn-play span {float:left;margin-left:5px;line-height:30px;font-size:16px;}
+.answer-range {height:30px;background-color:#eaf6ff;border-radius: 5px; display:inline-block;margin-bottom:-5px;}
+.answer-range img {float:left;margin-left:3px;margin-top:5px;width:20px;height:20px;}
 
-.answertext {border:0px; border-bottom:solid #6ab7ff 1px; padding-left:5px; color:#6ab7ff;word-break:keep-all;text-align:left;}
-.my-answer { color:#6ab7ff;}
-.my-answer span { color:#6ab7ff; }
-.text-answer { color:#93c396;}
-.no-answer { color:#989898;border-bottom:solid #989898 1px;text-decoration:none;}
+.answertext { float:left;margin-left:5px; margin-right:8px;color:#6ab7ff;word-break:keep-all;line-height:30px;font-size:16px;}
+.answertext:focus { border: 0 none;outline: none;border-bottom:solid #6ab7ff 1px;}
+.answer-img {margin-left:3px;margin-top:5px;width:20px;height:20px;top:5px;}
+
+.no-answer { color:#989898;text-decoration:none;}
 .bad-answer { color:red; }
 .good-answer { color:green; }
-.select-answer {background:#f6f809;}
-.btn-bgimg { background:url(../Images/update-answer.png) no-repeat;background-position: left 3px;background-size:16px 16px;padding-left:18px;font-size:16px;}
-.break-word {word-wrap:break-word!important;white-space: normal;word-break:break-all;}
+.select-answer {background:#ffefe4;}
+.select-answer span {color:#ff6600;}
+.break-word {word-break:break-all;word-wrap:break-word;}
 
 /*.docxParagraphs {border:solid red 1px;}*/
 
@@ -46,4 +45,8 @@
     *z-index: 100;
     _position: absolute;
     _top: expression(eval(document.documentElement.scrollTop));
-}
+}
+.topImg{
+    width: 100%!important;
+    height: auto;
+}

+ 129 - 170
EBook.Web/Common/tasklib_book.js

@@ -1,5 +1,6 @@
 //播放音频图片地址
 var PicInfo = {
+    answerPointImgUrl: "file:///android_asset/js/update-answer.png", //../Images/update-answer.png
     yaoshiShowImgUrl: "file:///android_asset/js/yaoshi-show.png",
     yaoshiHideImgUrl: "file:///android_asset/js/yaoshi-hide.png",
     recordPlayImgUrl: "file:///android_asset/js/play.png",
@@ -80,6 +81,7 @@ function bindEventTeaOrignalYS() {
             //$(this).nextUntil(".yaoshi").find(".underlineContent").hide();
             $(this).nextUntil(".yaoshi").find(".underlineContent").css("color", "#ffffff");
             //添加回调
+            onClickKeyHide();
         }
     });
     //处理答题点
@@ -138,8 +140,6 @@ function bindEventTeaOrignalYS() {
     });
     //处理表格样式
     $("td").attr("style", "");
-    //处理文章标题的样式(目前资料源已处理)
-    //$("p").eq(2).addClass("p-title-top");
 }
 
 //页面加载完,课件 绑定事件
@@ -206,6 +206,7 @@ function bindEventYS() {
             $(this).attr("src", PicInfo.yaoshiHideImgUrl);
             $(this).nextUntil(".yaoshi").filter(".underlineContent").css("color", "#ffffff");
             //添加回调
+            onClickKeyHide();
         }
     });
     //点击喇叭事件,音频播放
@@ -264,9 +265,6 @@ function handleAnswerRange() {
         }
 
         info.AnsText = $(item).text();
-        if (info.AnsText == "") {
-
-        }
         tempJson.push(info);
 
         var prev = $(item).prev();
@@ -345,7 +343,7 @@ function handleAnswerRange() {
     if (answerData.length > 0) {
         //Num = Number.parseInt(answerData[answerData.length - 1].Id);
         Num = Number.parseInt($(".yaoshi:last").attr('answer-id'));
-        for (var i = 0; i < Num+1; i++) {
+        for (var i = 0; i < Num + 1; i++) {
             if (i < answerData.length) {
                 var index = Number(answerData[i].Id) - i;
                 for (var j = 0; j < index; j++) {
@@ -376,7 +374,7 @@ function handleAnswerRange() {
                 break;
             }
         }
-        $(item).prop("outerHTML", "<buttom answer-id='" + answerid + "' answer-anstext='" + answerText + "' answer-isky='" + isky + "' class='answertext btn-bgimg'>点击作答</buttom>");
+        $(item).prop("outerHTML", "<div class='answer-range' answer-id='" + answerid + "' answer-anstext='" + answerText + "' answer-isky='" + isky + "'><img src='" + PicInfo.answerPointImgUrl + "'/><span class='answertext'>答题点</span></div>");
         //删除钥匙节点
         var prev = $("img[answer-id='" + answerid + "']");
         if (prev.length > 0) {
@@ -385,7 +383,7 @@ function handleAnswerRange() {
     });
 
     //添加点击事件
-    $(".answertext").on("click", function () {
+    $(".answer-range").on("click", function () {
         var curObj = new Object();
         curObj.Id = $(this).attr("answer-id");//答题点ID
         curObj.IsKY = $(this).attr("answer-isky");//是否是口语试题,0-不是口语题,1-是口语题
@@ -394,7 +392,7 @@ function handleAnswerRange() {
         curObj.AnsText = $(this).attr("answer-anstext");//参考答案
         curObj.Comment = $(this).attr("answer-comment");//评语
 
-        $(".answertext").removeClass("select-answer");
+        $(".answer-range").removeClass("select-answer");
         $(this).addClass("select-answer");
 
         //已作答,弹出作答答案
@@ -422,16 +420,12 @@ function handleAnswerRange() {
 
 //接收学生的作答
 function reviewAnswer(answerJson) {
-    //测试数据
-    //answerJson = "{\"AudioLength\":0,\"Id\":\"2\",\"Text\":\"i am how i know\",\"Type\":1}";
-    //answerJson = "{\"AudioLength\":3,\"AudioUrl\":\"http://172.16.41.241:10103/http_TBookEditor51/exerciseAnswerAudio/2020-11-06_09-31-19.wav\",\"Id\":\"4\",\"Text\":\"i know how i know \",\"Type\":3}";
-
     if (answerJson != "" && answerJson) {
         var answerObj = JSON.parse(answerJson);
-        var selectElement = $(".answertext[answer-id='" + answerObj.Id + "']");
-        var audioElement = $(".btn-play[answer-id='" + answerObj.Id + "']>span");
+        var selectElement = $(".answer-range[answer-id='" + answerObj.Id + "']");
+        var audioElement = $(selectElement).children("img").eq(0);
         answerObj.IsKY = $(selectElement).attr("answer-isky");//是否是口语试题,0-不是口语题,1-是口语题
-        
+
         //有内容时,要动态处理单词长度
         if (answerObj.Text != "") {
             $(selectElement).addClass("break-word");
@@ -442,52 +436,41 @@ function reviewAnswer(answerJson) {
 
         //是否是音频作答
         if ((answerObj.Type == 3 || answerObj.Type == 4) && answerObj.AudioUrl != "") {
-            answerObj.Text = answerObj.Text == "" ? answerObj.Text : "(" + answerObj.Text + ")";
-            $(selectElement).text(answerObj.Text);
             $(selectElement).attr("answer-text", answerObj.Text);//填充作答内容
-            //移除作答样式
-            if ($(selectElement).hasClass("btn-bgimg")) {
-                $(selectElement).removeClass("btn-bgimg");
-            }
+            answerObj.Text = answerObj.Text == "" ? "作答音频[" + answerObj.AudioLength + "s]" : "作答音频[" + answerObj.AudioLength + "s]" + "(" + answerObj.Text + ")";
+            $(selectElement).children("span").text(answerObj.Text);
 
             //是否之前存在作答音频
-            if (audioElement.length > 0) {
-                $(audioElement).text("作答音频(" + answerObj.AudioLength + "s)");
-                $(audioElement).parent().attr("answer-url", answerObj.AudioUrl);
-            }
-            else {
-                var divHtml = document.createElement("div");
-                divHtml.className = "btn-play";
-                divHtml.innerHTML = "<img src='file:///android_asset/js/play.png'/><span>作答音频(" + answerObj.AudioLength + "s)</span>";
-                divHtml.setAttribute("answer-id", answerObj.Id);
-                divHtml.setAttribute("answer-url", answerObj.AudioUrl);
-                divHtml.setAttribute("play-status", "0");
-
-                //增加节点
-                $(selectElement).before(divHtml);
-                //独立绑定事件
-                $(selectElement).prev().children("img").on("click", function () {
-                    recordAudioClick(this, answerObj.Id, answerObj.AudioUrl);
-                });
-                $(selectElement).prev().children("span").on("click", function () {
-                    //移动端的修改
-                    onClickAnswerPoint(JSON.stringify(answerObj));
-                });
+            $(selectElement).attr("play-status", "0");
+            $(audioElement).attr("src", PicInfo.recordPlayImgUrl);
+            var curDisplay = $(audioElement).css("display");
+            if (curDisplay == "none") {
+                $(audioElement).show();
             }
+            
+            $(selectElement).attr("answer-url", answerObj.AudioUrl);
+            //独立绑定事件
+            $(audioElement).on("click", function () {
+                recordAudioClick(this, answerObj.Id, answerObj.AudioUrl);
+            });
+            $(selectElement).children("span").on("click", function () {
+                $(".answer-range").removeClass("select-answer");
+                $(item).addClass("select-answer");
+                onClickAnswerPoint(JSON.stringify(answerObj));
+            });
         }
         else {
-            answerObj.Text = answerObj.Text == "" ? "点击作答" : answerObj.Text;
-            $(selectElement).text(answerObj.Text);
             $(selectElement).attr("answer-text", answerObj.Text);//填充作答内容
-            //之前作答存在音频,但是现在没有音频传入,要删除音频节点
-            if (audioElement.length > 0) {
-                $(".btn-play[answer-id='" + answerObj.Id + "']").unbind('click');
-                $(".btn-play[answer-id='" + answerObj.Id + "']").remove();
+            if (answerObj.Text == "") {
+                answerObj.Text = "答题点";
+                $(audioElement).show();
+                $(audioElement).attr("src", PicInfo.answerPointImgUrl);
             }
-            //增加作答样式
-            if (!$(selectElement).hasClass("btn-bgimg")) {
-                $(selectElement).addClass("btn-bgimg");
+            else {
+                //之前作答存在音频,但是现在没有音频传入,要隐藏音频节点
+                $(audioElement).hide();
             }
+            $(selectElement).children("span").text(answerObj.Text);
         }
     }
 }
@@ -495,20 +478,17 @@ function reviewAnswer(answerJson) {
 //提交,获取所有作答答案及参考答案
 function getAllAnswer() {
     //处理作答
-    $.each($(".answertext"), function (index, item) {
-        var mytext = $(item).text();
-        if (mytext == "点击作答") {
+    $.each($(".answer-range"), function (index, item) {
+        var mytext = $(item).children("span").text();
+        if (mytext == "答题点") {
             mytext = "未作答";
-            $(item).text(mytext);
             $(item).addClass("no-answer");
-        }
-        //移除作答样式
-        if ($(item).hasClass("btn-bgimg")) {
-            $(item).removeClass("btn-bgimg");
+            $(item).children("img").hide();
+            $(item).children("span").text(mytext);
         }
     });
-    $(".answertext").unbind('click');//取消点击绑定事件
-    $(".btn-play>span").unbind('click');//取消点击绑定事件
+    $(".answer-range").unbind('click');//取消点击绑定事件
+    $(".answer-range>span").unbind('click');//取消点击绑定事件
 
     return answerData;
 }
@@ -519,7 +499,7 @@ function backupAllAnswer(answerJson, statusType) {
         var answerList = JSON.parse(answerJson);
         //answerList = JSON.parse(answerList);
         //获取Dom一个个回填
-        $.each($(".answertext"), function (index, item) {
+        $.each($(".answer-range"), function (index, item) {
             //提交直接还原作答现场
             var mytext = answerList[index].Text;//我的答案
             answerList[index].IsKY = $(item).attr("answer-isky");//是否是口语试题,0-不是口语题,1-是口语题
@@ -528,126 +508,95 @@ function backupAllAnswer(answerJson, statusType) {
                 $(item).addClass("break-word");
             }
 
+            //添加音频控制
+            var audioElement = $(item).children("img").eq(0);
+            if ((answerList[index].Type == 3 || answerList[index].Type == 4) && answerList[index].AudioUrl != "") {
+                $(item).attr("answer-text", mytext);//填充作答内容
+                mytext = mytext == "" ? "作答音频[" + answerList[index].AudioLength + "s]" : "作答音频[" + answerList[index].AudioLength + "s]" + "(" + mytext + ")";
+                $(item).children("span").text(mytext);
+                
+                $(item).attr("play-status", "0");
+                $(item).attr("answer-url", answerList[index].AudioUrl);
+                $(audioElement).attr("src", PicInfo.recordPlayImgUrl);
+            }
+            
             //可作答状态,作答还原
             if (statusType == 0) {
                 //已作答过,还原作答,增加作答后的UI节点
                 if ((answerList[index].Type == 3 || answerList[index].Type == 4) && answerList[index].AudioUrl != "") {
-                    mytext = mytext == "" ? mytext : "(" + mytext + ")";
-                    $(item).text(mytext);
-                    $(item).attr("answer-text", mytext);//填充作答内容
-                    //移除作答样式
-                    if ($(item).hasClass("btn-bgimg")) {
-                        $(item).removeClass("btn-bgimg");
-                    }
-
-                    //添加音频节点
-                    var divHtml = document.createElement("div");
-                    divHtml.className = "btn-play";
-                    divHtml.innerHTML = "<img src='" + PicInfo.recordPlayImgUrl + "'/><span>作答音频(" + answerList[index].AudioLength + "s)</span>";
-                    divHtml.setAttribute("answer-id", answerList[index].Id);
-                    divHtml.setAttribute("answer-url", answerList[index].AudioUrl);
-                    divHtml.setAttribute("play-status", "0");
-                    //增加节点
-                    $(item).before(divHtml);
                     //独立绑定事件
-                    $(item).prev().children("img").on("click", function () {
+                    $(item).children("img").on("click", function () {
                         recordAudioClick(this, answerList[index].Id, answerList[index].AudioUrl);
                     });
-                    $(item).prev().children("span").on("click", function () {
+                    $(item).children("span").on("click", function () {
+                        $(".answer-range").removeClass("select-answer");
+                        $(item).addClass("select-answer");
                         onClickAnswerPoint(JSON.stringify(answerList[index]));
                     });
                 }
                 else {
-                    //文本作答
-                    mytext = mytext == "" ? "点击作答" : mytext;//我的答案
-                    $(item).text(mytext);
                     $(item).attr("answer-text", mytext);//填充作答内容
+                    if (mytext == "") {
+                        mytext = "答题点";
+                        $(audioElement).attr("src", PicInfo.answerPointImgUrl);
+                    }
+                    else {
+                        //之前作答存在音频,但是现在没有音频传入,要隐藏音频节点
+                        $(audioElement).hide();
+                    }
+                    $(item).children("span").text(mytext);
                 }
             }
             //已提交,作答还原
             if (statusType == 1) {
-                $(item).unbind('click');//取消点击绑定事件
+                //取消点击绑定事件
+                $(item).unbind('click');
                 //添加音频控制
                 if ((answerList[index].Type == 3 || answerList[index].Type == 4) && answerList[index].AudioUrl != "") {
-                    mytext = mytext == "" ? mytext : "(" + mytext + ")";
-                    $(item).text(mytext);
-                    $(item).attr("answer-text", mytext);//填充作答内容
-                    //移除作答样式
-                    if ($(item).hasClass("btn-bgimg")) {
-                        $(item).removeClass("btn-bgimg");
-                    }
-
-                    //添加音频节点
-                    var divHtml = document.createElement("div");
-                    divHtml.className = "btn-play";
-                    divHtml.innerHTML = "<img src='" + PicInfo.recordPlayImgUrl + "'/><span>作答音频(" + answerList[index].AudioLength + "s)</span>";
-                    divHtml.setAttribute("answer-id", answerList[index].Id);
-                    divHtml.setAttribute("answer-url", answerList[index].AudioUrl);
-                    divHtml.setAttribute("play-status", "0");
-                    //增加节点
-                    $(item).before(divHtml);
                     //独立绑定事件
-                    $(item).prev().children("img").on("click", function () {
+                    $(item).children("img").on("click", function () {
                         recordAudioClick(this, answerList[index].Id, answerList[index].AudioUrl);
                     });
                 }
                 else {
+                    $(item).attr("answer-text", mytext);//填充作答内容
                     if (mytext == "") {
                         mytext = "未作答";
-                        $(item).addClass("no-answer");
+                        $(item).children("span").addClass("no-answer");
                     }
-                    //移除作答样式
-                    if ($(item).hasClass("btn-bgimg")) {
-                        $(item).removeClass("btn-bgimg");
-                    }
-                    $(item).text(mytext);
-                    $(item).attr("answer-text", mytext);//填充作答内容
+                    $(audioElement).hide();
+                    $(item).children("span").text(mytext);
                 }
             }
             //已评阅,查看评阅详情
             if (statusType == 2) {
                 //添加音频控制
                 if ((answerList[index].Type == 3 || answerList[index].Type == 4) && answerList[index].AudioUrl != "") {
-                    mytext = mytext == "" ? mytext : "(" + mytext + ")";
-                    $(item).text(mytext);
-                    $(item).attr("answer-text", mytext);//填充作答内容
-
-                    //添加音频节点
-                    var divHtml = document.createElement("div");
-                    divHtml.className = "btn-play";
-                    divHtml.innerHTML = "<img src='" + PicInfo.recordPlayImgUrl + "'/><span>作答音频(" + answerList[index].AudioLength + "s)</span>";
-                    divHtml.setAttribute("answer-id", answerList[index].Id);
-                    divHtml.setAttribute("answer-url", answerList[index].AudioUrl);
-                    divHtml.setAttribute("play-status", "0");
-                    //增加节点
-                    $(item).before(divHtml);
                     //独立绑定事件
-                    $(item).prev().children("img").on("click", function () {
+                    $(item).children("img").on("click", function () {
                         recordAudioClick(this, answerList[index].Id, answerList[index].AudioUrl);
                     });
-                    $(item).prev().children("span").on("click", function () {
+                    $(item).children("span").on("click", function () {
+                        $(".answer-range").removeClass("select-answer");
+                        $(item).addClass("select-answer");
                         onClickAnswerPoint(JSON.stringify(answerList[index]));
                     });
                 }
                 else {
+                    $(item).attr("answer-text", mytext);//填充作答内容
                     if (mytext == "") {
                         mytext = "未作答";
-                        $(item).addClass("no-answer");
+                        $(item).children("span").addClass("no-answer");
                     }
-                    $(item).text(mytext);
-                    $(item).attr("answer-text", mytext);//填充作答内容
+                    $(audioElement).hide();
+                    $(item).children("span").text(mytext);
                 }
-
                 //评阅样式
                 if (answerList[index].Score == 0 && answerList[index].Text != "") {
-                    $(item).addClass("bad-answer");
+                    $(item).children("span").addClass("bad-answer");
                 }
                 if (answerList[index].Score > 0) {
-                    $(item).addClass("good-answer");
-                }
-                //移除作答样式
-                if ($(item).hasClass("btn-bgimg")) {
-                    $(item).removeClass("btn-bgimg");
+                    $(item).children("span").addClass("good-answer");
                 }
             }
         });
@@ -658,7 +607,7 @@ function backupAllAnswer(answerJson, statusType) {
 function reviewStuAnswer(answerJson) {
     if (answerJson != "" && answerJson) {
         var answerObj = JSON.parse(answerJson);
-        var selectElement = $(".answertext[answer-id='" + answerObj.Id + "']");
+        var selectElement = $(".answer-range[answer-id='" + answerObj.Id + "']");
 
         //$(selectElement).attr("answer-text", answerObj.Text);//用户作答内容
         $(selectElement).attr("answer-score", answerObj.Score);//作答评分
@@ -678,14 +627,9 @@ function reviewStuAnswer(answerJson) {
 
 //回填所有评阅信息,answerJson:所有作答及参考答案评阅信息List
 function backupAllReview(answerJson) {
-    //测试数据
-    //answerJson = "[{\"AudioLength\":11,\"AudioUrl\":\"http://172.16.41.241:10103/http_TBookEditor51/exerciseAnswerAudio/2020-11-10_11-18-54.mp3\",\"Id\":\"2\",\"Text\":\"\",\"Type\":3}]";
-
     if (answerJson != "" && answerJson) {
         var answerList = JSON.parse(answerJson);
-        //answerList = JSON.parse(answerList);
-        //获取Dom一个个回填
-        $.each($(".answertext"), function (index, item) {
+        $.each($(".answer-range"), function (index, item) {
             //$(item).attr("answer-id", answerList[index].Id);//答题点ID
             //$(item).attr("answer-text", answerList[index].Text);//用户作答内容
             $(item).attr("answer-score", answerList[index].Score);//作答评分
@@ -694,34 +638,35 @@ function backupAllReview(answerJson) {
 
             //提交直接还原作答现场
             var mytext = answerList[index].Text;//我的答案
+            var audioElement = $(item).children("img").eq(0);
             if ((answerList[index].Type == 3 || answerList[index].Type == 4) && answerList[index].AudioUrl != "") {
-                mytext = mytext == "" ? mytext : "(" + mytext + ")";
-                $(item).text(mytext);
-
-                //添加音频节点
-                var divHtml = document.createElement("div");
-                divHtml.className = "btn-play";
-                divHtml.innerHTML = "<img src='" + PicInfo.recordPlayImgUrl + "'/><span>作答音频(" + answerList[index].AudioLength + "s)</span>";
-                divHtml.setAttribute("answer-id", answerList[index].Id);
-                divHtml.setAttribute("answer-url", answerList[index].AudioUrl);
-                divHtml.setAttribute("play-status", "0");
-                //增加节点
-                $(item).before(divHtml);
+                $(item).attr("answer-text", mytext);//填充作答内容
+                mytext = mytext == "" ? "作答音频[" + answerList[index].AudioLength + "s]" : "作答音频[" + answerList[index].AudioLength + "s]" + "(" + mytext + ")";
+                $(item).children("span").text(mytext);
+
+                $(item).attr("play-status", "0");
+                $(item).attr("answer-url", answerList[index].AudioUrl);
+                $(audioElement).attr("src", PicInfo.recordPlayImgUrl);
                 //独立绑定事件
-                $(item).prev().children("img").on("click", function () {
+                $(item).children("img").on("click", function () {
                     recordAudioClick(this, answerList[index].Id, answerList[index].AudioUrl);
                 });
-                $(item).prev().children("span").on("click", function () {
+                $(item).children("span").on("click", function () {
+                    $(".answer-range").removeClass("select-answer");
+                    $(item).addClass("select-answer");
                     onClickAnswerPoint(JSON.stringify(answerList[index]));//移动端的修改
                 });
             }
             else {
+                $(item).attr("answer-text", mytext);//填充作答内容
                 if (mytext == "") {
                     mytext = "未作答";
-                    $(item).addClass("no-answer");
+                    $(item).children("span").addClass("no-answer");
                 }
-                $(item).text(mytext);
+                $(audioElement).hide();
+                $(item).children("span").text(mytext);
             }
+
             //评阅样式
             if (answerList[index].Score == 0) {
                 $(item).addClass("bad-answer");
@@ -729,10 +674,6 @@ function backupAllReview(answerJson) {
             if (answerList[index].Score > 0) {
                 $(item).addClass("good-answer");
             }
-            //移除作答样式
-            if ($(item).hasClass("btn-bgimg")) {
-                $(item).removeClass("btn-bgimg");
-            }
         });
     }
 }
@@ -740,7 +681,7 @@ function backupAllReview(answerJson) {
 //处理播放录音,answerid:答题点ID,isPlay:是否播放(0-暂停,1-播放)
 function playRecordAudio(answerid, isPlay) {
     //获取其他正在播放的音频
-    var playing = $(".btn-play[answer-id='" + answerid + "']");
+    var playing = $(".answer-range[answer-id='" + answerid + "']");
     if (playing.length > 0) {
         if (isPlay == "1") {
             $(playing).attr("play-status", "1");
@@ -755,8 +696,8 @@ function playRecordAudio(answerid, isPlay) {
 
 //滚动到相应DIV
 function scrollAnswer(answerid) {
-    $(".answertext").removeClass("select-answer");
-    var ansDom = $(".answertext[answer-id='" + answerid + "']");
+    $(".answer-range").removeClass("select-answer");
+    var ansDom = $(".answer-range[answer-id='" + answerid + "']");
     $(ansDom).addClass("select-answer");
     var scroll_offset = $(ansDom).offset(); //得到box这个div层的offset,包含两个值,top和left
 
@@ -786,7 +727,7 @@ function audioPlayClick(myobj) {
     }
     else {
         //停止其他作答音频播放
-        var isRecordPlaying = $(".btn-play[play-status='1']");
+        var isRecordPlaying = $(".answer-range[play-status='1']");
         if (isRecordPlaying.length > 0) {
             $(isRecordPlaying).attr("play-status", "0");
             $(isRecordPlaying).find("img").attr("src", PicInfo.recordPlayImgUrl);//移动端要根据本地路径替换
@@ -814,7 +755,7 @@ function recordAudioClick(myobj, id, url) {
     //处理当前按钮的状态
     if ($(myobj).parent().attr("play-status") == "0") {
         //停止其他作答音频播放
-        var isRecordPlaying = $(".btn-play[play-status='1']");
+        var isRecordPlaying = $(".answer-range[play-status='1']");
         if (isRecordPlaying.length > 0) {
             $(isRecordPlaying).attr("play-status", "0");
             $(isRecordPlaying).find("img").attr("src", PicInfo.recordPlayImgUrl);//移动端要根据本地路径替换
@@ -854,11 +795,29 @@ function onClickAnswerPoint(data) {
     //plugin.onClickAnswerPoint(data);
 }
 
+function onClickKeyHide() {
+    //alert(JSON.stringify(data));
+    cancelBubble();
+    plugin.onClickKeyHide();
+}
+
 function cancelBubble(e) {
     var evt = e ? e : window.event;
-    if(evt.stopPropagation) { //W3C
+    if (evt.stopPropagation) { //W3C
         evt.stopPropagation();
     } else { //IE
         evt.cancelBubble = true;
     }
+}
+
+function getSelectedText(title) {
+    var txt;
+    if (window.getSelection) {
+        txt = window.getSelection().toString();
+    } else if (window.document.getSelection) {
+        txt = window.document.getSelection().toString();
+    } else if (window.document.selection) {
+        txt = window.document.selection.createRange().text;
+    }
+    JSInterface.callback(txt, title);
 }

+ 1 - 1
EBook.Web/EBook.Web.csproj

@@ -55,7 +55,7 @@
   <ItemGroup>
     <Content Include="AnsText\20578.txt" />
     <Content Include="AnsText\20799.txt" />
-    <Content Include="AnsText\21255.txt" />
+    <None Include="AnsText\21255.json" />
     <Content Include="AnsText\ansdata.txt" />
     <Content Include="AnsText\anstext.txt" />
     <Content Include="AnsText\answer.txt" />

+ 4 - 1
EBook.Web/Test.html

@@ -39,7 +39,7 @@
         //加载数据
         window.onload = function () {
             //加载听说课文
-            answerjson = $.ajax({ url: "AnsText/21255.txt", async: false }).responseText;
+            answerjson = $.ajax({ url: "AnsText/21255.json", async: false }).responseText;
             reviewjson = $.ajax({ url: "AnsText/anstext.txt", async: false }).responseText;
         }
         //加载听说课文
@@ -108,6 +108,9 @@
             //backupAllAnswer(answerjson, false);
             //var answerJson = "{\"AudioLength\":0,\"AudioUrl\":\"\",\"Id\":\"1\",\"Text\":\"sdasd\",\"Type\":1}";
             //var answerJson = "{\"AudioLength\":5,\"AudioUrl\":\"http://172.16.41.241:10103/Web_AITeachCloudV10/Files/UpLoad/zxstu155/2020/11/25/8a5d785d626748bbaa027895568d1bc3.wav\",\"Comment\":\"\",\"Id\":\"10\",\"PicUrl\":\"\",\"Score\":\"\",\"Text\":\"Good .\",\"Type\":3}";
+            //测试数据
+            //answerJson = "{\"AudioLength\":0,\"Id\":\"2\",\"Text\":\"i am how i know\",\"Type\":1}";
+            //answerJson = "{\"AudioLength\":3,\"AudioUrl\":\"http://172.16.41.241:10103/http_TBookEditor51/exerciseAnswerAudio/2020-11-06_09-31-19.wav\",\"Id\":\"4\",\"Text\":\"i know how i know \",\"Type\":3}";
             var answerJson = "{\"AudioLength\":5,\"AudioUrl\":\"http://172.16.41.241:10103/Web_AITeachCloudV10/Files/UpLoad/zxstu155/2020/11/25/8a5d785d626748bbaa027895568d1bc3.wav\",\"Comment\":\"\",\"Id\":\"10\",\"PicUrl\":\"\",\"Score\":\"\",\"Text\":\"Good .\",\"Type\":3}";
             reviewAnswer(answerJson);
         });

Some files were not shown because too many files changed in this diff