From 455e4536d4ab08f84d7b717bdc98b03edf6d82bd Mon Sep 17 00:00:00 2001 From: huangzhenbao <17818024429@163.com> Date: Thu, 26 Feb 2026 08:46:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check_encodings.py | 24 ++++++ check_file_tags.py | 56 +++++++++++++ check_one.py | 20 +++++ close_tags.txt | Bin 0 -> 7098 bytes components/supadb/aksupa - 副本.uts | 2 +- components/supadb/aksupa.uts | 2 +- fix_boms.py | 25 ++++++ fix_encoding.py | 75 ++++++++++++++++++ layouts/admin/AdminLayout.uvue | 14 ++-- main.js | 2 +- open_tags.txt | Bin 0 -> 8942 bytes pages/mall/admin/app/pc/config.uvue | 2 +- pages/mall/admin/cms/article/list.uvue | 2 +- pages/mall/admin/cms/category/list.uvue | 2 +- pages/mall/admin/decoration/home.uvue | 2 + .../admin/distribution/setting/index.uvue | 2 +- pages/mall/admin/finance/balance_stats.uvue | 2 +- pages/mall/admin/kefu/config.uvue | 2 +- pages/mall/admin/kefu/words.uvue | 2 +- pages/mall/admin/maintain/data/city-data.uvue | 2 +- .../mall/admin/maintain/data/clear-data.uvue | 2 +- .../maintain/data/logistics-company.uvue | 2 +- .../maintain/dev-config/combination-data.uvue | 2 +- .../admin/maintain/dev-config/cron-job.uvue | 2 +- .../maintain/dev-config/custom-event.uvue | 2 +- .../maintain/dev-config/module-config.uvue | 2 +- .../admin/maintain/dev-config/permission.uvue | 2 +- pages/mall/admin/maintain/dev-tools/api.uvue | 2 +- .../admin/maintain/dev-tools/codegen.uvue | 2 +- .../admin/maintain/dev-tools/data-dict.uvue | 2 +- .../admin/maintain/dev-tools/database.uvue | 2 +- pages/mall/admin/maintain/dev-tools/file.uvue | 2 +- .../mall/admin/maintain/external/account.uvue | 2 +- .../admin/maintain/i18n/language-detail.uvue | 2 +- .../admin/maintain/i18n/language-list.uvue | 2 +- .../mall/admin/maintain/i18n/region-list.uvue | 2 +- .../admin/maintain/i18n/translate-config.uvue | 2 +- .../maintain/security/online-upgrade.uvue | 2 +- .../maintain/security/refresh-cache.uvue | 2 +- .../admin/maintain/security/system-log.uvue | 2 +- pages/mall/admin/maintain/system-info.uvue | 2 +- .../admin/marketing/combination/create.uvue | 2 +- pages/mall/admin/order-management.uvue | 1 + .../order/order-configuration/index.uvue | 2 +- .../admin/product/classification/index.uvue | 2 +- pages/mall/admin/product/labels/index.uvue | 2 +- .../mall/admin/product/parameters/index.uvue | 2 +- .../mall/admin/product/protection/index.uvue | 2 +- .../mall/admin/setting/interface/collect.uvue | 2 +- .../setting/interface/onepass/config.uvue | 2 +- .../setting/interface/onepass/index.uvue | 2 +- .../mall/admin/setting/interface/storage.uvue | 2 +- pages/mall/admin/setting/system/config.uvue | 2 +- .../admin/subscription/plan-management.uvue | 4 +- pages/mall/consumer/address.uvue | 4 +- pages/mall/consumer/apply-refund.uvue | 2 +- pages/mall/consumer/checkout.uvue | 6 +- pages/mall/consumer/refund-review.uvue | 2 +- pages/mall/consumer/review.uvue | 2 +- pages/mall/delivery/feedback.uvue | 2 +- pages/mall/delivery/vehicle-add.uvue | 2 +- pages/mall/delivery/vehicle-edit.uvue | 2 +- pages_default_temp.json | 2 +- pages_utf8_temp.json | 2 +- scan_self_closing.py | 51 ++++++++++++ scan_tags.py | 57 +++++++++++++ 66 files changed, 376 insertions(+), 65 deletions(-) create mode 100644 check_encodings.py create mode 100644 check_file_tags.py create mode 100644 check_one.py create mode 100644 close_tags.txt create mode 100644 fix_boms.py create mode 100644 fix_encoding.py create mode 100644 open_tags.txt create mode 100644 scan_self_closing.py create mode 100644 scan_tags.py diff --git a/check_encodings.py b/check_encodings.py new file mode 100644 index 00000000..070ad656 --- /dev/null +++ b/check_encodings.py @@ -0,0 +1,24 @@ + +import os + +def check_encoding(directory): + for root, dirs, files in os.walk(directory): + for file in files: + if file.endswith('.uvue') or file.endswith('.uts'): + filepath = os.path.join(root, file) + try: + with open(filepath, 'rb') as f: + raw = f.read() + + # Check for BOM + if raw.startswith(b'\xef\xbb\xbf'): + print(f"BOM detected: {filepath}") + + # Try decoding as UTF-8 + raw.decode('utf-8') + + except Exception as e: + print(f"Potential encoding error or mojibake in: {filepath}") + +check_encoding(r'd:\骅锋\mall\pages\mall\admin') +check_encoding(r'd:\骅锋\mall\layouts') diff --git a/check_file_tags.py b/check_file_tags.py new file mode 100644 index 00000000..c4796ba4 --- /dev/null +++ b/check_file_tags.py @@ -0,0 +1,56 @@ +import sys +import re + +def check_file(file_path): + print(f"Checking {file_path}") + try: + with open(file_path, 'r', encoding='utf-8') as f: + content = f.read() + + tags = ['template', 'script', 'style', 'view', 'text', 'image', 'scroll-view', 'input', 'textarea', 'button', 'swiper', 'swiper-item', 'component', 'slot'] + + for tag in tags: + # Count open tags: or + # Avoid matching diff --git a/pages/mall/admin/distribution/setting/index.uvue b/pages/mall/admin/distribution/setting/index.uvue index 89a1d864..b73af0fb 100644 --- a/pages/mall/admin/distribution/setting/index.uvue +++ b/pages/mall/admin/distribution/setting/index.uvue @@ -1,4 +1,4 @@ -