refactor: 移除多余的console.log语句以清理代码

清理了多个组件和视图中的console.log语句,以提高代码的可读性和维护性,避免在生产环境中输出不必要的调试信息。
This commit is contained in:
DESKTOP-RQ919RC\Pc 2025-04-10 18:56:24 +08:00
parent a320cb9d97
commit 1ea3894be8
20 changed files with 6 additions and 39 deletions

View File

@ -73,7 +73,6 @@ const timedTransmission = () => {
if (socketTask.readyState != 1) return if (socketTask.readyState != 1) return
// timedTransmissionState = true // timedTransmissionState = true
socketTask.send(JSON.stringify({ type: "ping" })) socketTask.send(JSON.stringify({ type: "ping" }))
console.log("ping", new Date())
setTimeout(() => timedTransmission(), useSocketInterval) setTimeout(() => timedTransmission(), useSocketInterval)
} }

View File

@ -229,7 +229,6 @@ const selectOption = (type, value) => {
break; break;
} }
console.log('pitchValue', pitchValue.value);
emit('handleTransfer', pitchValue) emit('handleTransfer', pitchValue)
} }

View File

@ -290,7 +290,6 @@ let pitchValue = ref({
watchEffect(() => { watchEffect(() => {
// nearSchoolList = store.state.apartment.school || [] // nearSchoolList = store.state.apartment.school || []
nearSchoolList = store.state.schoolList || [] nearSchoolList = store.state.schoolList || []
console.log("nearSchoolList", nearSchoolList)
roomTypeList = store.state.apartment.roomtype || [] roomTypeList = store.state.apartment.roomtype || []
roomTypeKey = store.state.roomTypeKey || {} roomTypeKey = store.state.roomTypeKey || {}
roomlistingsList = store.state.apartment.roomlistings || [] roomlistingsList = store.state.apartment.roomlistings || []

View File

@ -69,7 +69,6 @@ watchEffect(() => {
show = props.show show = props.show
list.splice(0, list.length) list.splice(0, list.length)
list.push(...props.list) list.push(...props.list)
// console.log(show)
if (show && props.clearList) { if (show && props.clearList) {
checkList.list = [] checkList.list = []
} }

View File

@ -83,7 +83,6 @@ let prev = () => carousel.value.prev()
// //
const carouselChange = value => { const carouselChange = value => {
console.log("value")
imageTab.value = value imageTab.value = value
} }

View File

@ -38,13 +38,11 @@ export default {
let tab = ref("person"); // person intermediary more let tab = ref("person"); // person intermediary more
// console.log("props['intermediary']", props['intermediary']);
// if (props['intermediary'] == 1) tab.value = "intermediary" // if (props['intermediary'] == 1) tab.value = "intermediary"
// else tab.value = "person" // else tab.value = "person"
watch(() => props.intermediary, (newValue, oldValue) => { watch(() => props.intermediary, (newValue, oldValue) => {
// popState // popState
// console.log('popState', newValue, oldValue);
if (newValue == 1) tab.value = "intermediary" if (newValue == 1) tab.value = "intermediary"
else tab.value = "person" else tab.value = "person"

View File

@ -104,7 +104,6 @@ async function init() {
isintermediary.value = data.isintermediary isintermediary.value = data.isintermediary
// isintermediary.value = 1 // isintermediary.value = 1
// console.log("data.isintermediary",data.isintermediary);
// if (data['ispopup'] == 0) overallJump() // if (data['ispopup'] == 0) overallJump()
if (data['ispopup'] == 0) overallJump() if (data['ispopup'] == 0) overallJump()
else popType.value = 'choice' else popType.value = 'choice'

View File

@ -92,7 +92,6 @@ let closeSeach = () => {
// //
let selectSeach = (data) => { let selectSeach = (data) => {
props.checkBtn(data,'location',JSON.stringify(nowSelectArea.data)) props.checkBtn(data,'location',JSON.stringify(nowSelectArea.data))
// console.log(data)
} }
</script> </script>

View File

@ -54,7 +54,6 @@ const submit = () => {
id: props['id'], id: props['id'],
message message
}).then(res => { }).then(res => {
console.log("res", res);
if (res.code == 200) { if (res.code == 200) {
ElMessage.success(res.message) ElMessage.success(res.message)
checkList.value = [] checkList.value = []

View File

@ -55,7 +55,6 @@ const popperOptions = ref({
// if (props['type'] == 'housingTop') popperOptions.value['modifiers'][0]['options']['offset'][0] = 14 // if (props['type'] == 'housingTop') popperOptions.value['modifiers'][0]['options']['offset'][0] = 14
if (props['type'] == 'housingTop') popperOptions.value['modifiers'][0]['options']['offset'][0] = 18 if (props['type'] == 'housingTop') popperOptions.value['modifiers'][0]['options']['offset'][0] = 18
if (props['type'] == 'housing') popperOptions.value['modifiers'][0]['options']['offset'][0] = 38 if (props['type'] == 'housing') popperOptions.value['modifiers'][0]['options']['offset'][0] = 38
// console.log("newValue", props['type']);
watch(() => props.concatType, (newValue, oldValue) => { watch(() => props.concatType, (newValue, oldValue) => {

View File

@ -17,7 +17,7 @@ import videojs from "video.js"
import { reactive, onMounted, ref, defineProps, watchEffect, watch, onUnmounted, nextTick } from "vue" import { reactive, onMounted, ref, defineProps, watchEffect, watch, onUnmounted, nextTick } from "vue"
const onCanPlay = event => { const onCanPlay = event => {
console.log("视频可以播放了") // console.log("")
// //
} }
const onError = event => { const onError = event => {
@ -47,17 +47,16 @@ watch(
() => props.imageTab, () => props.imageTab,
newVal => { newVal => {
if (newVal != props.val) { if (newVal != props.val) {
// console.log("videoRef", videoRef.value)
if (player.value != null) { if (player.value != null) {
player.value.pause() // dispose()Dom player.value.pause() // dispose()Dom
} }
if (videoRef.value) { if (videoRef.value) {
if (!videoRef.value.paused) { if (!videoRef.value.paused) {
console.log("视频正在播放,现在停止.") // console.log(".")
videoRef.value.pause() videoRef.value.pause()
} else { } else {
console.log("视频已经暂停.") // console.log(".")
} }
} else { } else {
// console.error("Video element not found.") // console.error("Video element not found.")
@ -75,7 +74,6 @@ let ism3u8 = ref(false) // 是否是 m3u8 格式
onMounted(() => { onMounted(() => {
if (props.src.indexOf("m3u8") == -1) { if (props.src.indexOf("m3u8") == -1) {
// console.log("mp4")
return return
} }
ism3u8.value = true ism3u8.value = true

View File

@ -211,7 +211,6 @@ let setLocation = (type, data, isupdate = true) => {
// type: data: second: // type: data: second:
let setSeachConditions = (type, data, second = null) => { let setSeachConditions = (type, data, second = null) => {
console.log("赋值前的数据:", seachAllType)
if (type === "rent") { if (type === "rent") {
seachAllType["rent_min"] = data.min seachAllType["rent_min"] = data.min
seachAllType["rent_max"] = data.max seachAllType["rent_max"] = data.max
@ -229,12 +228,8 @@ let setSeachConditions = (type, data, second = null) => {
if (type === "school") seachAllType.location = [] if (type === "school") seachAllType.location = []
if (type === "location") seachAllType.school = "" if (type === "location") seachAllType.school = ""
if (second) { if (second) seachAllType[second.type] = second.id
seachAllType[second.type] = second.id
}
console.log(type, data, second)
console.log("保存前的处理数据:", seachAllType)
getDataList(seachAllType) getDataList(seachAllType)
} }

View File

@ -376,9 +376,7 @@ let searchInit = data => {
}) })
} }
}) })
.catch(err => {
console.log("1111")
})
} }
// //

View File

@ -290,8 +290,6 @@ const props = defineProps({
const pitchValue = inject('pitchValue') || {} const pitchValue = inject('pitchValue') || {}
onMounted(()=>{ onMounted(()=>{
console.log("min", pitchValue);
if (pitchValue['gender']) gender.id = pitchValue['gender'] if (pitchValue['gender']) gender.id = pitchValue['gender']
if (pitchValue['publish']) releaseObj.id = pitchValue['publish'] if (pitchValue['publish']) releaseObj.id = pitchValue['publish']
if (pitchValue['leaseterm']) hireDate.id = pitchValue['leaseterm'] if (pitchValue['leaseterm']) hireDate.id = pitchValue['leaseterm']

View File

@ -80,8 +80,6 @@ api.index()
.then(res => { .then(res => {
const data = res.data const data = res.data
// const url = import("@/assets/homeImage/informationO.png") // const url = import("@/assets/homeImage/informationO.png")
// console.log("url", url)
// console.log("data", data.articleList)
store.state.seachTypeData = data.combination store.state.seachTypeData = data.combination
store.state.indexData = data store.state.indexData = data
store.state.ListSelectBtn = data.recommendedTab store.state.ListSelectBtn = data.recommendedTab

View File

@ -151,7 +151,6 @@ router.beforeEach((to, from, next) => {
isInitialNavigation = false; isInitialNavigation = false;
} else { } else {
// return // return
// console.log("1111111,", to.path, to.fullPath);
// if (window._hmt) { // if (window._hmt) {
// if (to.path) { // if (to.path) {
// // window._hmt.push(['_trackPageview', '/#' + to.fullPath]) // // window._hmt.push(['_trackPageview', '/#' + to.fullPath])

View File

@ -231,7 +231,6 @@ let getRecommendList = () => {
type: ListSelectBtn.selectType, type: ListSelectBtn.selectType,
pagevalue: pagevalue.value, pagevalue: pagevalue.value,
}).then(res => { }).then(res => {
// console.log(res)
if (res.code === 200) { if (res.code === 200) {
if (res.data.pagevalue) { if (res.data.pagevalue) {
if (pages.value === 1) waterfallList.value = [] if (pages.value === 1) waterfallList.value = []

View File

@ -834,7 +834,6 @@ let scrollWidth = ref(null)
let scrollMove = false let scrollMove = false
// //
let moveImageList = type => { let moveImageList = type => {
console.log("type", type, imgListTab.value, imageLIstLeft)
if (type === "right" && imgScrollBottom()) return if (type === "right" && imgScrollBottom()) return
if ((type === "left" && imgListTab.value === 0) || (imgListTab.value === imageLIstLeft.value.length - 1 && type === "right")) return if ((type === "left" && imgListTab.value === 0) || (imgListTab.value === imageLIstLeft.value.length - 1 && type === "right")) return
type === "left" ? imgListTab.value-- : imgListTab.value++ type === "left" ? imgListTab.value-- : imgListTab.value++

View File

@ -1154,7 +1154,6 @@ export default {
formData.append("name", target.name) // formData.append("name", target.name) //
formData.append("type", type) // formData.append("type", type) //
formData.append("data", this.uploadData) // formData.append("data", this.uploadData) //
console.log("formData", formData)
// this.$axios.post('/tenement/pc/api/publish/upload', formData).then(res => { // this.$axios.post('/tenement/pc/api/publish/upload', formData).then(res => {
this.$axios this.$axios
.post("https://oss.gter.net/upload", formData) .post("https://oss.gter.net/upload", formData)

View File

@ -77,9 +77,6 @@ let setInitial = () => {
// //
let getDataList = (data, type = true) => { let getDataList = (data, type = true) => {
// console.log("11414");
// console.log(data,type)
// console.log(type);
if (!type) { if (!type) {
// //
seachSelectData.data.tabType !== "apartment" ? (pageList.value = []) : (listApartment.value = []) seachSelectData.data.tabType !== "apartment" ? (pageList.value = []) : (listApartment.value = [])
@ -102,10 +99,8 @@ let getDataList = (data, type = true) => {
} else { } else {
seachApi = api.apartment(postData) seachApi = api.apartment(postData)
} }
// console.log("555");
seachApi.then(res => { seachApi.then(res => {
if (res.code === 200) { if (res.code === 200) {
// console.log(res.data)
dataList.data = res.data.data dataList.data = res.data.data
if (res.data.data.length < 20) { if (res.data.data.length < 20) {
loadingText.value = ` 到底了 ` loadingText.value = ` 到底了 `