Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +25 -7
index.html
CHANGED
|
@@ -5,7 +5,26 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 6 |
<title>药店拜访助手</title>
|
| 7 |
<script defer src="https://cdn.jsdelivr.net/npm/tesseract.js@5/dist/tesseract.min.js"></script>
|
| 8 |
-
<script
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
<style>
|
| 10 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 11 |
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f0f4f8; color: #1e293b; padding-bottom: 80px; }
|
|
@@ -387,15 +406,14 @@ const parseMemoText = (text) => {
|
|
| 387 |
const normalized = normalizeText(text);
|
| 388 |
const visitDate = normalizeDate(normalized);
|
| 389 |
const personInCharge = extractFirst(normalized, [
|
| 390 |
-
/(?:活动负责人|负责人|执行人员|执行人)[::\s]\s*([^\s,,。;;\n]+)/,
|
| 391 |
/(?:活动负责人|负责人|执行人员|执行人)\s*[::]?\s*([\u4e00-\u9fa5]{2,4})/,
|
| 392 |
-
/
|
| 393 |
-
/人员[::
|
| 394 |
]);
|
| 395 |
const region = extractFirst(normalized, [
|
| 396 |
-
/(?:服务省份及地区|服务地区|服务省份|地区|城市)[::
|
| 397 |
-
/
|
| 398 |
-
/省份[::
|
| 399 |
]);
|
| 400 |
const pharmacies = extractPharmacies(normalized);
|
| 401 |
const expectedCount = extractExpectedCount(normalized);
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 6 |
<title>药店拜访助手</title>
|
| 7 |
<script defer src="https://cdn.jsdelivr.net/npm/tesseract.js@5/dist/tesseract.min.js"></script>
|
| 8 |
+
<script>
|
| 9 |
+
// 多CDN源加载docx.js,优先jsdelivr,失败则回退unpkg和cdnjs
|
| 10 |
+
(function() {
|
| 11 |
+
var sources = [
|
| 12 |
+
'https://cdn.jsdelivr.net/npm/docx@8.5.0/build/index.js',
|
| 13 |
+
'https://unpkg.com/docx@8.5.0/build/index.js',
|
| 14 |
+
'https://cdnjs.cloudflare.com/ajax/libs/docx/8.5.0/index.js',
|
| 15 |
+
];
|
| 16 |
+
var idx = 0;
|
| 17 |
+
function loadNext() {
|
| 18 |
+
if (idx >= sources.length) { console.error('所有docx CDN源加载失败'); return; }
|
| 19 |
+
var s = document.createElement('script');
|
| 20 |
+
s.src = sources[idx];
|
| 21 |
+
s.onload = function() { console.log('docx.js loaded from:', sources[idx]); };
|
| 22 |
+
s.onerror = function() { idx++; loadNext(); };
|
| 23 |
+
document.head.appendChild(s);
|
| 24 |
+
}
|
| 25 |
+
loadNext();
|
| 26 |
+
})();
|
| 27 |
+
</script>
|
| 28 |
<style>
|
| 29 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 30 |
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f0f4f8; color: #1e293b; padding-bottom: 80px; }
|
|
|
|
| 406 |
const normalized = normalizeText(text);
|
| 407 |
const visitDate = normalizeDate(normalized);
|
| 408 |
const personInCharge = extractFirst(normalized, [
|
|
|
|
| 409 |
/(?:活动负责人|负责人|执行人员|执行人)\s*[::]?\s*([\u4e00-\u9fa5]{2,4})/,
|
| 410 |
+
/人员\s*[::]?\s*([\u4e00-\u9fa5]{2,4})/,
|
| 411 |
+
/(?:活动负责人|负责人|执行人员|执行人)\s*[::]?\s*([^\s,,。;;\n]+)/,
|
| 412 |
]);
|
| 413 |
const region = extractFirst(normalized, [
|
| 414 |
+
/(?:服务省份及地区|服务地区|服务省份|地区|城市)\s*[::]?\s*([\u4e00-\u9fa5]{2,8})/,
|
| 415 |
+
/省份\s*[::]?\s*([\u4e00-\u9fa5]{2,6})/,
|
| 416 |
+
/(?:服务省份及地区|服务地区|服务省份|地区|城市)\s*[::]?\s*([^\s,,。;;\n]+)/,
|
| 417 |
]);
|
| 418 |
const pharmacies = extractPharmacies(normalized);
|
| 419 |
const expectedCount = extractExpectedCount(normalized);
|