邪性 4 gadi atpakaļ
vecāks
revīzija
2834b736bc
3 mainītis faili ar 25 papildinājumiem un 19 dzēšanām
  1. 15 8
      .idea/workspace.xml
  2. 1 1
      h_exam/exam_detail.html
  3. 9 10
      js/exam_detail.js

+ 15 - 8
.idea/workspace.xml

@@ -3,8 +3,8 @@
   <component name="ChangeListManager">
     <list default="true" id="82570a17-8430-4238-ae79-81bbbd2de81f" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/css/new_detail.css" beforeDir="false" afterPath="$PROJECT_DIR$/css/new_detail.css" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/h_news/news_detail.html" beforeDir="false" afterPath="$PROJECT_DIR$/h_news/news_detail.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/h_exam/exam_detail.html" beforeDir="false" afterPath="$PROJECT_DIR$/h_exam/exam_detail.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/js/exam_detail.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/exam_detail.js" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -162,8 +162,8 @@
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/css/components.less">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="198">
-              <caret line="700" column="30" lean-forward="true" selection-start-line="700" selection-start-column="30" selection-end-line="700" selection-end-column="30" />
+            <state relative-caret-position="165">
+              <caret line="689" column="11" lean-forward="true" selection-start-line="689" selection-start-column="11" selection-end-line="689" selection-end-column="11" />
             </state>
           </provider>
         </entry>
@@ -725,14 +725,21 @@
       <option name="project" value="LOCAL" />
       <updated>1629861123237</updated>
     </task>
-    <option name="localTasksCounter" value="41" />
+    <task id="LOCAL-00041" summary="11-11">
+      <created>1629876549594</created>
+      <option name="number" value="00041" />
+      <option name="presentableId" value="LOCAL-00041" />
+      <option name="project" value="LOCAL" />
+      <updated>1629876549594</updated>
+    </task>
+    <option name="localTasksCounter" value="42" />
     <servers />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
+    <frame x="-8" y="-8" width="1936" height="1056" extended-state="7" />
     <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.17004265" />
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.17004265" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
       <window_info id="Favorites" order="2" side_tool="true" />
       <window_info anchor="bottom" id="Message" order="0" />
@@ -743,7 +750,7 @@
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="6" />
       <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
-      <window_info anchor="bottom" id="Version Control" order="8" visible="true" weight="0.21041214" />
+      <window_info active="true" anchor="bottom" id="Version Control" order="8" visible="true" weight="0.21041214" />
       <window_info anchor="bottom" id="Database Changes" order="9" show_stripe_button="false" />
       <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
       <window_info anchor="bottom" id="Terminal" order="11" weight="0.3264642" />

+ 1 - 1
h_exam/exam_detail.html

@@ -68,7 +68,7 @@
               <div data-href="http://www.gaokaoapp.net" class="list-item">
                 <h4>语文</h4>
                 <div class="p">
-                  <div class="blue">查看试题</div>
+                  <div class="blue" data-href="http://www.gaokaoapp.net/h_exam/123.html">查看试题</div>
                   <div class="blue">查看答案</div>
                 </div>
               </div>

+ 9 - 10
js/exam_detail.js

@@ -1,15 +1,14 @@
 $(function () {
-  let list_flex = $(".list .list-flex");
+  let list_flex = $(".list .list-flex ");
+  function href (e) {
+    e.stopPropagation();
+    let url = $(this).data("href");
+    if (!url) return false;
+    window.location.href = url;
+  }
   Array.from(list_flex).forEach(item => {
-    let list_item = $(item).find(".list-item");
-    list_item.click(function (e) {
-      if (e.target.className != "blue" && $(e.target).parent()[0].className == "p") {
-        $("#toast").show();
-        return false;
-      }
-      if (!$(this).data("href")) return false;
-      window.location.href = $(this).data("href");
-    })
+    let list_item = $(item).find(".list-item,.blue");
+    list_item.click(href);
     if (list_item.length == 1) {
       $(item).append(`<div style="visibility:hidden" class="list-item"></div>`);
     }