fix: 解决控制台报错

This commit is contained in:
2026-03-27 10:22:44 +08:00
parent 84484bf597
commit 0299eab8d8
2 changed files with 34 additions and 20 deletions

View File

@@ -3,8 +3,8 @@ let socketUrl = "";
if (process.env.NODE_ENV === 'development') {
//开发环境
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
} else if (process.env.NODE_ENV === 'production') {
//生产环境
baseUrl = "https://api.nuttyreading.com/";

View File

@@ -93,8 +93,6 @@
"
>
<common-list
@lower="onReachBottom1"
:pagination="pagination"
:dataList="titleList"
@hancleClick="gotoDetail"
label="title"
@@ -107,7 +105,6 @@
</template>
<template v-else-if="curOneCateIndex == 0 || curOneCateIndex == 2">
<common-list
@lower="onReachBottom1"
:dataList="titleList"
@hancleClick="gotoDetail"
label="name"
@@ -125,7 +122,6 @@
</template>
<template v-if="curOneCateIndex == 3">
<common-list
@lower="onReachBottom1"
:dataList="titleList"
@hancleClick="gotoDetail"
label="title"
@@ -575,8 +571,12 @@ export default {
// }).exec();
await uni
.createSelectorQuery()
.select(".cateList")
.in(this)
.select(".twoCateList")
.boundingClientRect(function (rect) {
if (!rect || typeof rect.height !== "number") {
return;
}
console.log(rect.height, "22222");
var height = 42 + rect.height + 20;
@@ -771,21 +771,28 @@ export default {
</script>
<style lang="scss" scoped>
.u-grid-list {
// height: 40rpx;
}
// .u-grid-list {
// height: 40rpx;
// }
.custom-grid {
display: flex;
flex-wrap: wrap;
// border: 1px solid #dadbde;
// border-bottom: 0;
// border-top: 1px solid #dadbde;
// border-bottom: 1px solid #dadbde;
&.col-3 {
.grid-item {
min-width: 33.33%;
flex: 1;
}
// .grid-item:nth-child(-n + 3) {
// border-top: 0;
// }
// .grid-item:nth-child(3n + 1) {
// border-left: 0;
// }
}
&.col-4 {
@@ -793,11 +800,18 @@ export default {
min-width: 25%;
flex: 1;
}
// .grid-item:nth-child(-n + 4) {
// border-top: 0;
// }
// .grid-item:nth-child(4n + 1) {
// border-left: 0;
// }
}
.grid-item {
// border-right: 1px solid #dadbde;
// border-bottom: 1px solid #dadbde;
// border-left: 1px solid #dadbde;
// border-top: 1px solid #dadbde;
padding: 10rpx 0;
text-align: center;
font-size: 30rpx;
@@ -943,12 +957,12 @@ export default {
width: 100%;
}
.scroll-view-item {
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
// .scroll-view-item {
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
// }
.scroll-view-item_H {
display: inline-block;