refactor: 移除多余的console.log语句以清理代码
清理了多个组件和视图中的console.log语句,以提高代码的可读性和维护性,避免在生产环境中输出不必要的调试信息。
This commit is contained in:
parent
a320cb9d97
commit
1ea3894be8
@ -73,7 +73,6 @@ const timedTransmission = () => {
|
||||
if (socketTask.readyState != 1) return
|
||||
// timedTransmissionState = true
|
||||
socketTask.send(JSON.stringify({ type: "ping" }))
|
||||
console.log("ping", new Date())
|
||||
setTimeout(() => timedTransmission(), useSocketInterval)
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,6 @@ const selectOption = (type, value) => {
|
||||
break;
|
||||
}
|
||||
|
||||
console.log('pitchValue', pitchValue.value);
|
||||
emit('handleTransfer', pitchValue)
|
||||
|
||||
}
|
||||
|
@ -290,7 +290,6 @@ let pitchValue = ref({
|
||||
watchEffect(() => {
|
||||
// nearSchoolList = store.state.apartment.school || []
|
||||
nearSchoolList = store.state.schoolList || []
|
||||
console.log("nearSchoolList", nearSchoolList)
|
||||
roomTypeList = store.state.apartment.roomtype || []
|
||||
roomTypeKey = store.state.roomTypeKey || {}
|
||||
roomlistingsList = store.state.apartment.roomlistings || []
|
||||
|
@ -69,7 +69,6 @@ watchEffect(() => {
|
||||
show = props.show
|
||||
list.splice(0, list.length)
|
||||
list.push(...props.list)
|
||||
// console.log(show)
|
||||
if (show && props.clearList) {
|
||||
checkList.list = []
|
||||
}
|
||||
|
@ -83,7 +83,6 @@ let prev = () => carousel.value.prev()
|
||||
|
||||
// 轮播图滚动后事件
|
||||
const carouselChange = value => {
|
||||
console.log("value")
|
||||
imageTab.value = value
|
||||
}
|
||||
|
||||
|
@ -38,13 +38,11 @@ export default {
|
||||
|
||||
let tab = ref("person"); // person intermediary more
|
||||
|
||||
// console.log("props['intermediary']", props['intermediary']);
|
||||
// if (props['intermediary'] == 1) tab.value = "intermediary"
|
||||
// else tab.value = "person"
|
||||
|
||||
watch(() => props.intermediary, (newValue, oldValue) => {
|
||||
// 在这里处理popState属性的变化
|
||||
// console.log('popState属性发生变化', newValue, oldValue);
|
||||
|
||||
if (newValue == 1) tab.value = "intermediary"
|
||||
else tab.value = "person"
|
||||
|
@ -104,7 +104,6 @@ async function init() {
|
||||
isintermediary.value = data.isintermediary
|
||||
// isintermediary.value = 1
|
||||
|
||||
// console.log("data.isintermediary",data.isintermediary);
|
||||
// if (data['ispopup'] == 0) overallJump()
|
||||
if (data['ispopup'] == 0) overallJump()
|
||||
else popType.value = 'choice'
|
||||
|
@ -92,7 +92,6 @@ let closeSeach = () => {
|
||||
//确认按钮
|
||||
let selectSeach = (data) => {
|
||||
props.checkBtn(data,'location',JSON.stringify(nowSelectArea.data))
|
||||
// console.log(data)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -54,7 +54,6 @@ const submit = () => {
|
||||
id: props['id'],
|
||||
message
|
||||
}).then(res => {
|
||||
console.log("res", res);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success(res.message)
|
||||
checkList.value = []
|
||||
|
@ -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] = 18
|
||||
if (props['type'] == 'housing') popperOptions.value['modifiers'][0]['options']['offset'][0] = 38
|
||||
// console.log("newValue", props['type']);
|
||||
|
||||
|
||||
watch(() => props.concatType, (newValue, oldValue) => {
|
||||
|
@ -17,7 +17,7 @@ import videojs from "video.js"
|
||||
import { reactive, onMounted, ref, defineProps, watchEffect, watch, onUnmounted, nextTick } from "vue"
|
||||
|
||||
const onCanPlay = event => {
|
||||
console.log("视频可以播放了")
|
||||
// console.log("视频可以播放了")
|
||||
// 这里可以添加额外的逻辑,例如显示播放按钮等
|
||||
}
|
||||
const onError = event => {
|
||||
@ -47,17 +47,16 @@ watch(
|
||||
() => props.imageTab,
|
||||
newVal => {
|
||||
if (newVal != props.val) {
|
||||
// console.log("videoRef", videoRef.value)
|
||||
if (player.value != null) {
|
||||
player.value.pause() // dispose()会直接删除Dom元素
|
||||
}
|
||||
|
||||
if (videoRef.value) {
|
||||
if (!videoRef.value.paused) {
|
||||
console.log("视频正在播放,现在停止.")
|
||||
// console.log("视频正在播放,现在停止.")
|
||||
videoRef.value.pause()
|
||||
} else {
|
||||
console.log("视频已经暂停.")
|
||||
// console.log("视频已经暂停.")
|
||||
}
|
||||
} else {
|
||||
// console.error("Video element not found.")
|
||||
@ -75,7 +74,6 @@ let ism3u8 = ref(false) // 是否是 m3u8 格式
|
||||
|
||||
onMounted(() => {
|
||||
if (props.src.indexOf("m3u8") == -1) {
|
||||
// console.log("mp4")
|
||||
return
|
||||
}
|
||||
ism3u8.value = true
|
||||
|
@ -211,7 +211,6 @@ let setLocation = (type, data, isupdate = true) => {
|
||||
|
||||
//设置搜索数据 type: 类型 data: 数据 second: 二级数据
|
||||
let setSeachConditions = (type, data, second = null) => {
|
||||
console.log("赋值前的数据:", seachAllType)
|
||||
if (type === "rent") {
|
||||
seachAllType["rent_min"] = data.min
|
||||
seachAllType["rent_max"] = data.max
|
||||
@ -229,12 +228,8 @@ let setSeachConditions = (type, data, second = null) => {
|
||||
if (type === "school") seachAllType.location = []
|
||||
if (type === "location") seachAllType.school = ""
|
||||
|
||||
if (second) {
|
||||
seachAllType[second.type] = second.id
|
||||
}
|
||||
console.log(type, data, second)
|
||||
console.log("保存前的处理数据:", seachAllType)
|
||||
|
||||
if (second) seachAllType[second.type] = second.id
|
||||
|
||||
getDataList(seachAllType)
|
||||
}
|
||||
|
||||
|
@ -376,9 +376,7 @@ let searchInit = data => {
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log("1111")
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//判断搜索数据数量
|
||||
|
@ -290,8 +290,6 @@ const props = defineProps({
|
||||
const pitchValue = inject('pitchValue') || {}
|
||||
|
||||
onMounted(()=>{
|
||||
console.log("min", pitchValue);
|
||||
|
||||
if (pitchValue['gender']) gender.id = pitchValue['gender']
|
||||
if (pitchValue['publish']) releaseObj.id = pitchValue['publish']
|
||||
if (pitchValue['leaseterm']) hireDate.id = pitchValue['leaseterm']
|
||||
|
@ -80,8 +80,6 @@ api.index()
|
||||
.then(res => {
|
||||
const data = res.data
|
||||
// const url = import("@/assets/homeImage/informationO.png")
|
||||
// console.log("url", url)
|
||||
// console.log("data", data.articleList)
|
||||
store.state.seachTypeData = data.combination
|
||||
store.state.indexData = data
|
||||
store.state.ListSelectBtn = data.recommendedTab
|
||||
|
@ -151,7 +151,6 @@ router.beforeEach((to, from, next) => {
|
||||
isInitialNavigation = false;
|
||||
} else {
|
||||
// return
|
||||
// console.log("1111111,", to.path, to.fullPath);
|
||||
// if (window._hmt) {
|
||||
// if (to.path) {
|
||||
// // window._hmt.push(['_trackPageview', '/#' + to.fullPath])
|
||||
|
@ -231,7 +231,6 @@ let getRecommendList = () => {
|
||||
type: ListSelectBtn.selectType,
|
||||
pagevalue: pagevalue.value,
|
||||
}).then(res => {
|
||||
// console.log(res)
|
||||
if (res.code === 200) {
|
||||
if (res.data.pagevalue) {
|
||||
if (pages.value === 1) waterfallList.value = []
|
||||
|
@ -834,7 +834,6 @@ let scrollWidth = ref(null)
|
||||
let scrollMove = false
|
||||
//点击方向按钮
|
||||
let moveImageList = type => {
|
||||
console.log("type", type, imgListTab.value, imageLIstLeft)
|
||||
if (type === "right" && imgScrollBottom()) return
|
||||
if ((type === "left" && imgListTab.value === 0) || (imgListTab.value === imageLIstLeft.value.length - 1 && type === "right")) return
|
||||
type === "left" ? imgListTab.value-- : imgListTab.value++
|
||||
|
@ -1154,7 +1154,6 @@ export default {
|
||||
formData.append("name", target.name) // 文件名
|
||||
formData.append("type", type) // 文件名
|
||||
formData.append("data", this.uploadData) // 文件名
|
||||
console.log("formData", formData)
|
||||
// this.$axios.post('/tenement/pc/api/publish/upload', formData).then(res => {
|
||||
this.$axios
|
||||
.post("https://oss.gter.net/upload", formData)
|
||||
|
@ -77,9 +77,6 @@ let setInitial = () => {
|
||||
|
||||
//获取搜索数据
|
||||
let getDataList = (data, type = true) => {
|
||||
// console.log("11414");
|
||||
// console.log(data,type)
|
||||
// console.log(type);
|
||||
if (!type) {
|
||||
//是否继续搜索
|
||||
seachSelectData.data.tabType !== "apartment" ? (pageList.value = []) : (listApartment.value = [])
|
||||
@ -102,10 +99,8 @@ let getDataList = (data, type = true) => {
|
||||
} else {
|
||||
seachApi = api.apartment(postData)
|
||||
}
|
||||
// console.log("555");
|
||||
seachApi.then(res => {
|
||||
if (res.code === 200) {
|
||||
// console.log(res.data)
|
||||
dataList.data = res.data.data
|
||||
if (res.data.data.length < 20) {
|
||||
loadingText.value = ` 到底了 `
|
||||
|
Loading…
x
Reference in New Issue
Block a user