Sfoglia il codice sorgente

feat: 学生信息区新增考生承若书区域

zhangjie 10 mesi fa
parent
commit
0a87f03904
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      card/mixins/exchange.js

+ 7 - 1
card/mixins/exchange.js

@@ -106,7 +106,7 @@ export default {
           exchange.fill_area = exchange.fill_area.concat(pnoInfo);
         }
 
-        // 课程代码条码
+        // 课程代码条码,考生承诺书
         const extraInfo = this.getExtraInfo(this.curPageDom);
         Object.entries(extraInfo).forEach(([key, vals]) => {
           exchange.extension[key] = exchange.extension[key].concat(vals);
@@ -122,6 +122,7 @@ export default {
     getExtraInfo(pageDom) {
       const info = {
         barcode: [],
+        info_area: [],
       };
       const courseBarDom = pageDom.querySelector(".course-barcode");
       if (courseBarDom) {
@@ -131,6 +132,11 @@ export default {
         });
       }
 
+      const undertakingDom = pageDom.querySelector(".elem-undertaking");
+      if (undertakingDom) {
+        info.info_area.push(this.getOffsetInfo(undertakingDom));
+      }
+
       return info;
     },
     getPageNumberInfo() {