小程序迁移 静态页面完成!!!
This commit is contained in:
6
tmp/patch_ts.ps1
Normal file
6
tmp/patch_ts.ps1
Normal file
@@ -0,0 +1,6 @@
|
||||
$f = 'c:/NeoZQYY/apps/miniprogram/miniprogram/pages/performance-records/performance-records.ts'
|
||||
$c = [System.IO.File]::ReadAllText($f, [System.Text.Encoding]::UTF8)
|
||||
$c = $c.Replace(" totalHours: '0h',`r`n totalIncome: '¥0',", " totalHours: '0h',`r`n totalHoursRaw: '0h',`r`n totalIncome: '¥0',")
|
||||
$c = $c.Replace(" totalHours: '59.0h',`r`n totalIncome: '¥4,720',", " totalHours: '59.0h',`r`n totalHoursRaw: '60.5h',`r`n totalIncome: '¥4,720',")
|
||||
[System.IO.File]::WriteAllText($f, $c, [System.Text.Encoding]::UTF8)
|
||||
Write-Host 'done'
|
||||
16
tmp/patch_ts.py
Normal file
16
tmp/patch_ts.py
Normal file
@@ -0,0 +1,16 @@
|
||||
path = r'c:/NeoZQYY/apps/miniprogram/miniprogram/pages/performance-records/performance-records.ts'
|
||||
with open(path, 'rb') as f:
|
||||
content = f.read().decode('utf-8')
|
||||
|
||||
content = content.replace(
|
||||
" totalHours: '0h',\r\n totalIncome: '\xa50',",
|
||||
" totalHours: '0h',\r\n totalHoursRaw: '0h',\r\n totalIncome: '\xa50',"
|
||||
)
|
||||
content = content.replace(
|
||||
" totalHours: '59.0h',\r\n totalIncome: '\xa54,720',",
|
||||
" totalHours: '59.0h',\r\n totalHoursRaw: '60.5h',\r\n totalIncome: '\xa54,720',"
|
||||
)
|
||||
|
||||
with open(path, 'wb') as f:
|
||||
f.write(content.encode('utf-8'))
|
||||
print('done')
|
||||
Reference in New Issue
Block a user