Files
medical-mall/fix_encoding.py
2026-02-26 08:46:33 +08:00

76 lines
1.8 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import os
file_path = r'd:\骅锋\mall\pages\mall\admin\order-management.uvue'
# The goal is to rewrite the file as UTF-8 without BOM with clean content
content = """<template>
<AdminLayout :currentPage="currentPage">
<view class="admin-page">
<view class="admin-sections">
<view class="admin-card Header">
<text class="Title">订单</text>
<text class="SubTitle">order-management</text>
</view>
<view class="admin-card Card">
<text class="Label">页面参数query</text>
<text class="Mono">{{ params }}</text>
</view>
</view>
</view>
</AdminLayout>
</template>
<script setup lang="uts">
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
const params = ref('')
const currentPage = ref('order-list')
onLoad((options: Record<string, string>) => {
params.value = JSON.stringify(options ?? {})
const tab = options['tab'] || ''
if (tab == 'stats') currentPage.value = 'order-stats'
else if (tab == 'aftersale') currentPage.value = 'order-aftersale'
else if (tab == 'cashier') currentPage.value = 'order-cashier'
else if (tab == 'verify') currentPage.value = 'order-verify'
else if (tab == 'config') currentPage.value = 'order-config'
})
</script>
<style>
.Header {
}
.Title {
font-size: 36rpx;
font-weight: 700;
}
.SubTitle {
margin-top: 8rpx;
font-size: 24rpx;
opacity: 0.7;
}
.Card {
}
.Label {
font-size: 26rpx;
font-weight: 600;
margin-bottom: 12rpx;
}
.Mono {
font-size: 24rpx;
font-family: monospace;
line-height: 36rpx;
word-break: break-all;
}
</style>
"""
with open(file_path, 'w', encoding='utf-8') as f:
f.write(content)
print(f"Successfully fixed {file_path}")