consumerm模块完成度90%,完善消费者和商家端数据库表,商品、聊天、订单数据对接好了supabase,和商家端对接了聊天功能,安卓端编译通过了css样式,剩余几个页面在处理函数规范问题
This commit is contained in:
37
fix_index_uvue.py
Normal file
37
fix_index_uvue.py
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
import re
|
||||
|
||||
file_path = 'e:/companyproject/mall/pages/mall/consumer/index.uvue'
|
||||
with open(file_path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
# Fix display: grid -> flex wrap
|
||||
content = re.sub(r'display:\s*grid;', 'display: flex; flex-wrap: wrap;', content)
|
||||
content = re.sub(r'grid-template-columns:[^;]+;', '', content)
|
||||
|
||||
# Fix display: block/inline-block -> commented out
|
||||
content = re.sub(r'display:\s*(block|inline-block);', '/* display: \\1; */', content)
|
||||
|
||||
# Fix column-count/gap -> remove
|
||||
content = re.sub(r'column-count:[^;]+;', '', content)
|
||||
content = re.sub(r'column-gap:[^;]+;', '', content)
|
||||
|
||||
# Fix align-items: baseline -> flex-end
|
||||
content = re.sub(r'align-items:\s*baseline;', 'align-items: flex-end;', content)
|
||||
|
||||
# Fix nested selectors in CSS
|
||||
# .card-icon text -> .card-icon-text
|
||||
content = content.replace('.card-icon text', '.card-icon-text')
|
||||
# .service-icon text -> .service-icon-text
|
||||
content = content.replace('.service-icon text', '.service-icon-text')
|
||||
|
||||
# Fix HTML to match new class names
|
||||
# <view class=\"card-icon\">\n\t\t\t\t\t\t\t<text>{{ category.icon }}</text>\n\t\t\t\t\t\t</view>
|
||||
content = re.sub(r'(class="card-icon"[^>]*>\s*)<text>', r'\1<text class="card-icon-text">', content)
|
||||
|
||||
# <view class=\"service-icon\" ...>\n\t\t\t\t\t\t\t<text>...</text>
|
||||
content = re.sub(r'(class="service-icon"[^>]*>\s*)<text>', r'\1<text class="service-icon-text">', content)
|
||||
|
||||
with open(file_path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print("Successfully fixed index.uvue")
|
||||
Reference in New Issue
Block a user