chore: production cleanup - remove debug logs, add DB cleanup script
- App.vue: remove console.log on launch/show/hide, drop unused onShow/onHide imports
- interview.vue: remove verbose console.log('[ASR] upload response')
- login.vue: remove debug console.log('[wxLogin]') logs (keep error logs)
- scripts/cleanup-test-data.ts: new script to identify and remove test data
while preserving admin accounts; supports --dry-run preview mode
- All 43 backend tests pass
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||
import { onLaunch } from '@dcloudio/uni-app'
|
||||
|
||||
onLaunch(() => {
|
||||
console.log('职引 App launched')
|
||||
// #ifdef MP-WEIXIN
|
||||
initPrivacy()
|
||||
// #endif
|
||||
@@ -49,8 +48,6 @@ function initPrivacy() {
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
onShow(() => { console.log('职引 App shown') })
|
||||
onHide(() => { console.log('职引 App hidden') })
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -377,7 +377,6 @@ function stopRecord() {
|
||||
name: 'audio',
|
||||
header: { 'Authorization': `Bearer ${token()}` },
|
||||
})
|
||||
console.log('[ASR] upload response:', uploadRes.statusCode, typeof uploadRes.data === 'string' ? uploadRes.data.slice(0, 200) : JSON.stringify(uploadRes.data).slice(0, 200))
|
||||
if (uploadRes.statusCode === 200 && uploadRes.data) {
|
||||
const data = typeof uploadRes.data === 'string' ? JSON.parse(uploadRes.data) : uploadRes.data
|
||||
if (data.text) {
|
||||
|
||||
@@ -300,7 +300,6 @@ const doWxLogin = async () => {
|
||||
wxLoading.value = true
|
||||
try {
|
||||
const wxResp = await uni.login()
|
||||
console.log('[wxLogin] uni.login success:', JSON.stringify(wxResp).slice(0, 300))
|
||||
const { code, errMsg } = wxResp
|
||||
if (!code) { console.error('[wxLogin] no code:', errMsg); showToast('获取微信凭证失败'); return }
|
||||
const res = await uni.request({
|
||||
@@ -308,7 +307,6 @@ const doWxLogin = async () => {
|
||||
header: { 'Content-Type': 'application/json' },
|
||||
data: { code },
|
||||
})
|
||||
console.log('[wxLogin] server response:', res.statusCode, JSON.stringify(res.data).slice(0, 500))
|
||||
if (res.statusCode === 200 && res.data?.token) {
|
||||
loginSuccess(res.data)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user