1
This commit is contained in:
12
tmp/check_revcol.py
Normal file
12
tmp/check_revcol.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if '.rev-col {' in line:
|
||||
for j in range(i, min(i+10, len(lines))):
|
||||
print(f'{j+1}: {lines[j]}', end='')
|
||||
if '}' in lines[j] and j > i:
|
||||
break
|
||||
break
|
||||
sys.stdout.flush()
|
||||
14
tmp/check_revcol2.py
Normal file
14
tmp/check_revcol2.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
in_block = False
|
||||
for i, line in enumerate(lines):
|
||||
if '.rev-col {' in line and 'header' not in lines[i-1] if i > 0 else True:
|
||||
in_block = True
|
||||
if in_block:
|
||||
print(f'{i+1}: {lines[i]}', end='')
|
||||
if '}' in line:
|
||||
in_block = False
|
||||
print()
|
||||
sys.stdout.flush()
|
||||
7
tmp/chk.py
Normal file
7
tmp/chk.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i in range(879, 885):
|
||||
print(f'{i+1}: {repr(lines[i])}')
|
||||
sys.stdout.flush()
|
||||
7
tmp/chk2.py
Normal file
7
tmp/chk2.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i in range(876, 892):
|
||||
print(f'{i+1}: {repr(lines[i])}')
|
||||
sys.stdout.flush()
|
||||
11
tmp/fc2.py
Normal file
11
tmp/fc2.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
targets = ['flow-item-right {', 'flow-item-value {', 'flow-sum-right {', 'flow-sum-value {', 'coach-fin-col {', 'coach-fin-val {', 'coach-fin-bold {']
|
||||
for i, line in enumerate(lines):
|
||||
for t in targets:
|
||||
if t in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
break
|
||||
sys.stdout.flush()
|
||||
6
tmp/find_cmp.py
Normal file
6
tmp/find_cmp.py
Normal file
@@ -0,0 +1,6 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if 'compare-text-up-xs' in line or 'compare-text-down-xs' in line or 'compare-text-up-sm' in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
13
tmp/find_cmp_row.py
Normal file
13
tmp/find_cmp_row.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if '.compare-row {' in line or 'compare-row {' in line and not 'inline' in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
for j in range(i+1, min(i+8, len(lines))):
|
||||
print(f'{j+1}: {lines[j]}', end='')
|
||||
if '}' in lines[j]:
|
||||
break
|
||||
break
|
||||
sys.stdout.flush()
|
||||
6
tmp/find_coach.py
Normal file
6
tmp/find_coach.py
Normal file
@@ -0,0 +1,6 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if 'flow-item-right' in line or 'flow-item-value' in line or 'flow-sum-right' in line or 'flow-sum-value' in line or 'coach-fin-col' in line or 'coach-fin-val' in line or 'coach-fin-bold' in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
8
tmp/find_coach_val_sm.py
Normal file
8
tmp/find_coach_val_sm.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if 'coach-fin-val-sm' in line or 'coach-fin-val {' in line or '助教分析环比' in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
sys.stdout.flush()
|
||||
6
tmp/find_flow.py
Normal file
6
tmp/find_flow.py
Normal file
@@ -0,0 +1,6 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if 'flow-detail-right' in line or 'flow-total-right' in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
6
tmp/find_lines.py
Normal file
6
tmp/find_lines.py
Normal file
@@ -0,0 +1,6 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if 'rev-col' in line and ('{' in line or 'text-align' in line or 'display' in line):
|
||||
print(f'{i+1}: {line}', end='')
|
||||
8
tmp/find_rev.py
Normal file
8
tmp/find_rev.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if 'rev-col--name' in line or 'rev-col {' in line or 'rev-name' in line and '{' in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
sys.stdout.flush()
|
||||
33
tmp/fix_coach_compare.py
Normal file
33
tmp/fix_coach_compare.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
# 在 .coach-fin-val-sm 规则前插入助教环比固定宽度规则
|
||||
marker = '.coach-fin-val-sm {'
|
||||
insert = '''
|
||||
/* 助教分析环比列固定宽度,保证上下行对齐 */
|
||||
.coach-fin-col .compare-row-inline {
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.coach-fin-col .compare-text-up-xs,
|
||||
.coach-fin-col .compare-text-down-xs,
|
||||
.coach-fin-col .compare-text-flat-xs {
|
||||
min-width: 72rpx;
|
||||
text-align: right;
|
||||
display: block;
|
||||
}
|
||||
|
||||
'''
|
||||
|
||||
idx = content.find(marker)
|
||||
if idx != -1:
|
||||
content = content[:idx] + insert + content[idx:]
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('OK')
|
||||
else:
|
||||
print('NOT FOUND')
|
||||
sys.stdout.flush()
|
||||
42
tmp/fix_flow2.py
Normal file
42
tmp/fix_flow2.py
Normal file
@@ -0,0 +1,42 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
# flow-detail-right: lines 1010-1014 (0-indexed: 1009-1013)
|
||||
lines[1009] = '\n'
|
||||
lines[1010] = '.flow-detail-right {\n'
|
||||
lines[1011] = ' display: flex;\n'
|
||||
lines[1012] = ' align-items: center;\n'
|
||||
lines[1013] = ' gap: 0;\n'
|
||||
# line 1014 is already '}'
|
||||
|
||||
# flow-total-right: lines 1064-1068 (0-indexed: 1063-1067)
|
||||
lines[1063] = '.flow-total-right {\n'
|
||||
lines[1064] = ' display: flex;\n'
|
||||
lines[1065] = ' align-items: center;\n'
|
||||
lines[1066] = ' gap: 0;\n'
|
||||
# line 1067 is already '}'
|
||||
|
||||
# flow-detail-val: lines 1017-1022 (0-indexed: 1016-1021)
|
||||
lines[1016] = '.flow-detail-val {\n'
|
||||
lines[1017] = ' font-size: 26rpx;\n'
|
||||
lines[1018] = ' line-height: 36rpx;\n'
|
||||
lines[1019] = ' font-weight: 500;\n'
|
||||
lines[1020] = ' color: #4b4b4b;\n'
|
||||
lines[1021] = ' min-width: 120rpx;\n'
|
||||
# Need to insert one more line - shift remaining
|
||||
lines.insert(1022, ' text-align: right;\n')
|
||||
|
||||
# After insert, flow-total-value shifts by 1
|
||||
# flow-total-value: lines 1070-1075 (0-indexed: 1069-1074) -> now 1070-1075
|
||||
lines[1070] = '.flow-total-value {\n'
|
||||
lines[1071] = ' font-size: 33rpx;\n'
|
||||
lines[1072] = ' line-height: 51rpx;\n'
|
||||
lines[1073] = ' font-weight: 600;\n'
|
||||
lines[1074] = ' color: #242424;\n'
|
||||
lines[1075] = ' min-width: 140rpx;\n'
|
||||
lines.insert(1076, ' text-align: right;\n')
|
||||
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.writelines(lines)
|
||||
print('OK')
|
||||
85
tmp/fix_flow3.py
Normal file
85
tmp/fix_flow3.py
Normal file
@@ -0,0 +1,85 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
# Fix the broken block
|
||||
bad = '''.flow-detail-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
|
||||
.flow-detail-val {
|
||||
.flow-detail-val {
|
||||
font-size: 26rpx;
|
||||
line-height: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #4b4b4b;
|
||||
min-width: 120rpx;
|
||||
text-align: right;
|
||||
.flow-detail-val--red {'''
|
||||
|
||||
good = '''.flow-detail-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.flow-detail-val {
|
||||
font-size: 26rpx;
|
||||
line-height: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #4b4b4b;
|
||||
min-width: 120rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.flow-detail-val--red {'''
|
||||
|
||||
if bad in content:
|
||||
content = content.replace(bad, good, 1)
|
||||
print('fixed detail-right')
|
||||
else:
|
||||
print('detail-right pattern not found')
|
||||
|
||||
bad2 = '''.flow-total-right {
|
||||
.flow-total-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
|
||||
.flow-total-value {
|
||||
.flow-total-value {
|
||||
font-size: 33rpx;
|
||||
line-height: 51rpx;
|
||||
font-weight: 600;
|
||||
color: #242424;
|
||||
min-width: 140rpx;
|
||||
text-align: right;
|
||||
/* ===== 现金流入 - 流水项 ===== */'''
|
||||
|
||||
good2 = '''.flow-total-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.flow-total-value {
|
||||
font-size: 33rpx;
|
||||
line-height: 51rpx;
|
||||
font-weight: 600;
|
||||
color: #242424;
|
||||
min-width: 140rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* ===== 现金流入 - 流水项 ===== */'''
|
||||
|
||||
if bad2 in content:
|
||||
content = content.replace(bad2, good2, 1)
|
||||
print('fixed total-right')
|
||||
else:
|
||||
print('total-right pattern not found')
|
||||
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('done')
|
||||
29
tmp/fix_flow4.py
Normal file
29
tmp/fix_flow4.py
Normal file
@@ -0,0 +1,29 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
insert1 = '\n\n/* 收入确认环比列固定宽度,保证上下行对齐 */\n.flow-detail-right .compare-text-up-xs,\n.flow-detail-right .compare-text-down-xs,\n.flow-detail-right .compare-text-up-sm,\n.flow-detail-right .compare-text-down-sm {\n min-width: 72rpx;\n text-align: right;\n display: block;\n}'
|
||||
|
||||
insert2 = '\n\n/* 合计行环比列固定宽度 */\n.flow-total-right .compare-text-up-xs,\n.flow-total-right .compare-text-down-xs,\n.flow-total-right .compare-text-up-sm,\n.flow-total-right .compare-text-down-sm {\n min-width: 72rpx;\n text-align: right;\n display: block;\n}'
|
||||
|
||||
# Insert after .flow-detail-val block
|
||||
marker1 = '.flow-detail-val--red {'
|
||||
idx1 = content.find(marker1)
|
||||
if idx1 != -1:
|
||||
content = content[:idx1] + insert1.lstrip('\n') + '\n\n' + content[idx1:]
|
||||
print('inserted detail compare rule')
|
||||
else:
|
||||
print('marker1 not found')
|
||||
|
||||
# Insert after .flow-total-value block
|
||||
marker2 = '/* ===== 现金流入 - 流水项 ===== */'
|
||||
idx2 = content.find(marker2)
|
||||
if idx2 != -1:
|
||||
content = content[:idx2] + insert2.lstrip('\n') + '\n\n' + content[idx2:]
|
||||
print('inserted total compare rule')
|
||||
else:
|
||||
print('marker2 not found')
|
||||
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('done')
|
||||
44
tmp/fix_flow5.py
Normal file
44
tmp/fix_flow5.py
Normal file
@@ -0,0 +1,44 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
# 1. 现金流入: flow-item-right 改为同行 flex row
|
||||
old1 = '.flow-item-right {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}'
|
||||
new1 = '.flow-item-right {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0;\n}'
|
||||
if old1 in content: content = content.replace(old1, new1, 1); print('1 OK')
|
||||
else: print('1 NOT FOUND')
|
||||
|
||||
# 2. 现金流入: flow-item-value 加 min-width
|
||||
old2 = '.flow-item-value {\n font-size: 30rpx;\n line-height: 44rpx;\n font-weight: 600;\n color: #242424;\n}'
|
||||
new2 = '.flow-item-value {\n font-size: 30rpx;\n line-height: 44rpx;\n font-weight: 600;\n color: #242424;\n min-width: 130rpx;\n text-align: right;\n}'
|
||||
if old2 in content: content = content.replace(old2, new2, 1); print('2 OK')
|
||||
else: print('2 NOT FOUND')
|
||||
|
||||
# 3. 助教: coach-fin-col 改为 flex 列布局
|
||||
old3 = '.coach-fin-col {\n text-align: right;\n}'
|
||||
new3 = '.coach-fin-col {\n text-align: right;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n}'
|
||||
if old3 in content: content = content.replace(old3, new3, 1); print('3 OK')
|
||||
else: print('3 NOT FOUND')
|
||||
|
||||
# 4. 助教: coach-fin-bold 加 min-width
|
||||
old4 = '.coach-fin-bold {\n font-size: 26rpx;\n line-height: 36rpx;\n font-weight: 600;\n color: #242424;\n display: block;\n}'
|
||||
new4 = '.coach-fin-bold {\n font-size: 26rpx;\n line-height: 36rpx;\n font-weight: 600;\n color: #242424;\n display: block;\n min-width: 100rpx;\n text-align: right;\n}'
|
||||
if old4 in content: content = content.replace(old4, new4, 1); print('4 OK')
|
||||
else: print('4 NOT FOUND')
|
||||
|
||||
# 5. 助教: coach-fin-val 加 min-width
|
||||
old5 = '.coach-fin-val {\n font-size: 26rpx;\n line-height: 36rpx;\n color: #5e5e5e;\n display: block;\n}'
|
||||
new5 = '.coach-fin-val {\n font-size: 26rpx;\n line-height: 36rpx;\n color: #5e5e5e;\n display: block;\n min-width: 100rpx;\n text-align: right;\n}'
|
||||
if old5 in content: content = content.replace(old5, new5, 1); print('5 OK')
|
||||
else: print('5 NOT FOUND')
|
||||
|
||||
# 6. 现金流入环比固定宽度
|
||||
marker = '.flow-item-value {'
|
||||
insert = '\n/* 现金流入环比列固定宽度 */\n.flow-item-right .compare-text-up-xs,\n.flow-item-right .compare-text-down-xs,\n.flow-item-right .compare-text-up-sm,\n.flow-item-right .compare-text-down-sm {\n min-width: 72rpx;\n text-align: right;\n display: block;\n}\n'
|
||||
idx = content.find(marker)
|
||||
if idx != -1: content = content[:idx] + insert + content[idx:]; print('6 OK')
|
||||
else: print('6 NOT FOUND')
|
||||
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('all done')
|
||||
16
tmp/fix_flow_right.py
Normal file
16
tmp/fix_flow_right.py
Normal file
@@ -0,0 +1,16 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
old1 = '.flow-detail-right {\n display: flex;\n align-items: center;\n gap: 8rpx;\n}'
|
||||
new1 = '.flow-detail-right {\n display: flex;\n align-items: center;\n gap: 0;\n}'
|
||||
|
||||
old2 = '.flow-total-right {\n display: flex;\n align-items: center;\n gap: 12rpx;\n}'
|
||||
new2 = '.flow-total-right {\n display: flex;\n align-items: center;\n gap: 0;\n}'
|
||||
|
||||
content = content.replace(old1, new1, 1)
|
||||
content = content.replace(old2, new2, 1)
|
||||
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('OK')
|
||||
14
tmp/fix_gift.py
Normal file
14
tmp/fix_gift.py
Normal file
@@ -0,0 +1,14 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
old = '.gift-col--name {\n text-align: left;\n font-weight: 500;\n align-items: flex-start;\n}'
|
||||
new = '.gift-col--name {\n text-align: left;\n font-weight: 500;\n align-items: flex-start;\n}\n\n/* 左列标题行:标题靠左,环比靠右 */\n.gift-col--name .gift-label-line {\n display: flex;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n gap: 8rpx;\n}'
|
||||
|
||||
if old in content:
|
||||
content = content.replace(old, new, 1)
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('OK')
|
||||
else:
|
||||
print('NOT FOUND')
|
||||
19
tmp/fix_gift2.py
Normal file
19
tmp/fix_gift2.py
Normal file
@@ -0,0 +1,19 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
duplicate = '\n\n/* 左列标题行:标题靠左,环比靠右 */\n.gift-col--name .gift-label-line {\n display: flex;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n gap: 8rpx;\n}'
|
||||
|
||||
# 只保留第一次出现,去掉第二次
|
||||
first = content.find(duplicate)
|
||||
if first != -1:
|
||||
second = content.find(duplicate, first + 1)
|
||||
if second != -1:
|
||||
content = content[:second] + content[second + len(duplicate):]
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('Removed duplicate OK')
|
||||
else:
|
||||
print('No duplicate found')
|
||||
else:
|
||||
print('Pattern not found')
|
||||
13
tmp/fix_rev4.py
Normal file
13
tmp/fix_rev4.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
# Remove line 883 (index 882): duplicate text-align: left
|
||||
# Remove line 886 (index 885): extra }
|
||||
# After removing 882, the old 885 becomes 884
|
||||
del lines[882] # removes duplicate text-align
|
||||
del lines[884] # removes extra } (was 885, now 884 after first delete)
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.writelines(lines)
|
||||
print('OK')
|
||||
sys.stdout.flush()
|
||||
14
tmp/fix_revcol.py
Normal file
14
tmp/fix_revcol.py
Normal file
@@ -0,0 +1,14 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
old = '.rev-col {\n text-align: right;\n}'
|
||||
new = '.rev-col {\n text-align: right;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n}'
|
||||
|
||||
if old in content:
|
||||
content = content.replace(old, new, 1)
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('OK')
|
||||
else:
|
||||
print('NOT FOUND')
|
||||
11
tmp/fix_revcol2.py
Normal file
11
tmp/fix_revcol2.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
# line 883 (0-indexed 882) is the closing }
|
||||
# insert align-items before it
|
||||
lines[882] = ' text-align: left;\n align-items: flex-start;\n}\n'
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.writelines(lines)
|
||||
print('OK')
|
||||
sys.stdout.flush()
|
||||
16
tmp/fix_revcol3.py
Normal file
16
tmp/fix_revcol3.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
# lines 881-885: .rev-col--name block
|
||||
# 881: .rev-col--name {
|
||||
# 882: ' text-align: left;\n'
|
||||
# 883: ' text-align: left;\n align-items: flex-start;\n}\n' <- bad
|
||||
# Fix: replace 882+883 with clean version
|
||||
lines[882] = ' text-align: left;\n'
|
||||
lines[883] = ' align-items: flex-start;\n'
|
||||
lines.insert(884, '}\n')
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.writelines(lines)
|
||||
print('OK')
|
||||
sys.stdout.flush()
|
||||
16
tmp/fix_revcol_final.py
Normal file
16
tmp/fix_revcol_final.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
old = '.rev-col {\n text-align: center;\n}'
|
||||
new = '.rev-col {\n text-align: right;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n}'
|
||||
|
||||
if old in content:
|
||||
content = content.replace(old, new, 1)
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('OK')
|
||||
else:
|
||||
print('NOT FOUND')
|
||||
sys.stdout.flush()
|
||||
11
tmp/verify2.py
Normal file
11
tmp/verify2.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
targets = ['flow-item-right {', 'flow-item-value {', 'flow-item-right .compare', 'coach-fin-col {', 'coach-fin-bold {', 'coach-fin-val {']
|
||||
for i, line in enumerate(lines):
|
||||
for t in targets:
|
||||
if t in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
break
|
||||
sys.stdout.flush()
|
||||
6
tmp/verify_flow.py
Normal file
6
tmp/verify_flow.py
Normal file
@@ -0,0 +1,6 @@
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
for i, line in enumerate(lines):
|
||||
if 'flow-detail-right .compare' in line or 'flow-total-right .compare' in line or 'flow-detail-val--red' in line or '现金流入 - 流水项' in line:
|
||||
print(f'{i+1}: {line}', end='')
|
||||
29998
tmp/结账记录_朗朗桌球_20251209_20260310.csv
Normal file
29998
tmp/结账记录_朗朗桌球_20251209_20260310.csv
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user