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
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,6 @@ const selectOption = (type, value) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('pitchValue', pitchValue.value);
|
|
||||||
emit('handleTransfer', pitchValue)
|
emit('handleTransfer', pitchValue)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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 || []
|
||||||
|
@ -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 = []
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,6 @@ let prev = () => carousel.value.prev()
|
|||||||
|
|
||||||
// 轮播图滚动后事件
|
// 轮播图滚动后事件
|
||||||
const carouselChange = value => {
|
const carouselChange = value => {
|
||||||
console.log("value")
|
|
||||||
imageTab.value = value
|
imageTab.value = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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'
|
||||||
|
@ -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>
|
||||||
|
@ -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 = []
|
||||||
|
@ -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) => {
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,9 +376,7 @@ let searchInit = data => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
|
||||||
console.log("1111")
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断搜索数据数量
|
//判断搜索数据数量
|
||||||
|
@ -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']
|
||||||
|
@ -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
|
||||||
|
@ -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])
|
||||||
|
@ -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 = []
|
||||||
|
@ -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++
|
||||||
|
@ -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)
|
||||||
|
@ -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 = ` 到底了 `
|
||||||
|
Loading…
x
Reference in New Issue
Block a user