import os

def check_tags(file_path):
    print(f"Checking {file_path}")
    try:
        content = open(file_path, 'r', encoding='utf-8').read()
        tags = ['template', 'script', 'style', 'view', 'text', 'image', 'scroll-view']
        for tag in tags:
            o = content.count(f'<{tag}')
            c = content.count(f'</{tag}>')
            if o != c:
                print(f"  [ERROR] {tag}: open={o}, close={c}")
            else:
                print(f"  [OK] {tag}: {o}")
    except Exception as e:
        print(f"  [ERROR] Failed to read: {e}")

files = [
    r'd:\骅锋\mall\pages\mall\admin\order\order-statistics\index.uvue',
    r'd:\骅锋\mall\pages\mall\admin\order\list.uvue',
    r'd:\骅锋\mall\pages\mall\admin\order\order-configuration\index.uvue'
]

for f in files:
    check_tags(f)
