fix: 解决控制台报错
This commit is contained in:
@@ -3,8 +3,8 @@ let socketUrl = "";
|
|||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
//开发环境
|
//开发环境
|
||||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试
|
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试
|
||||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||||
} else if (process.env.NODE_ENV === 'production') {
|
} else if (process.env.NODE_ENV === 'production') {
|
||||||
//生产环境
|
//生产环境
|
||||||
baseUrl = "https://api.nuttyreading.com/";
|
baseUrl = "https://api.nuttyreading.com/";
|
||||||
|
|||||||
@@ -93,8 +93,6 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<common-list
|
<common-list
|
||||||
@lower="onReachBottom1"
|
|
||||||
:pagination="pagination"
|
|
||||||
:dataList="titleList"
|
:dataList="titleList"
|
||||||
@hancleClick="gotoDetail"
|
@hancleClick="gotoDetail"
|
||||||
label="title"
|
label="title"
|
||||||
@@ -107,7 +105,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="curOneCateIndex == 0 || curOneCateIndex == 2">
|
<template v-else-if="curOneCateIndex == 0 || curOneCateIndex == 2">
|
||||||
<common-list
|
<common-list
|
||||||
@lower="onReachBottom1"
|
|
||||||
:dataList="titleList"
|
:dataList="titleList"
|
||||||
@hancleClick="gotoDetail"
|
@hancleClick="gotoDetail"
|
||||||
label="name"
|
label="name"
|
||||||
@@ -125,7 +122,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="curOneCateIndex == 3">
|
<template v-if="curOneCateIndex == 3">
|
||||||
<common-list
|
<common-list
|
||||||
@lower="onReachBottom1"
|
|
||||||
:dataList="titleList"
|
:dataList="titleList"
|
||||||
@hancleClick="gotoDetail"
|
@hancleClick="gotoDetail"
|
||||||
label="title"
|
label="title"
|
||||||
@@ -575,8 +571,12 @@ export default {
|
|||||||
// }).exec();
|
// }).exec();
|
||||||
await uni
|
await uni
|
||||||
.createSelectorQuery()
|
.createSelectorQuery()
|
||||||
.select(".cateList")
|
.in(this)
|
||||||
|
.select(".twoCateList")
|
||||||
.boundingClientRect(function (rect) {
|
.boundingClientRect(function (rect) {
|
||||||
|
if (!rect || typeof rect.height !== "number") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
console.log(rect.height, "22222");
|
console.log(rect.height, "22222");
|
||||||
|
|
||||||
var height = 42 + rect.height + 20;
|
var height = 42 + rect.height + 20;
|
||||||
@@ -771,21 +771,28 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.u-grid-list {
|
// .u-grid-list {
|
||||||
// height: 40rpx;
|
// height: 40rpx;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.custom-grid {
|
.custom-grid {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
// border: 1px solid #dadbde;
|
// border-top: 1px solid #dadbde;
|
||||||
// border-bottom: 0;
|
// border-bottom: 1px solid #dadbde;
|
||||||
|
|
||||||
&.col-3 {
|
&.col-3 {
|
||||||
.grid-item {
|
.grid-item {
|
||||||
min-width: 33.33%;
|
min-width: 33.33%;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// .grid-item:nth-child(-n + 3) {
|
||||||
|
// border-top: 0;
|
||||||
|
// }
|
||||||
|
// .grid-item:nth-child(3n + 1) {
|
||||||
|
// border-left: 0;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
&.col-4 {
|
&.col-4 {
|
||||||
@@ -793,11 +800,18 @@ export default {
|
|||||||
min-width: 25%;
|
min-width: 25%;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// .grid-item:nth-child(-n + 4) {
|
||||||
|
// border-top: 0;
|
||||||
|
// }
|
||||||
|
// .grid-item:nth-child(4n + 1) {
|
||||||
|
// border-left: 0;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-item {
|
.grid-item {
|
||||||
// border-right: 1px solid #dadbde;
|
// border-left: 1px solid #dadbde;
|
||||||
// border-bottom: 1px solid #dadbde;
|
// border-top: 1px solid #dadbde;
|
||||||
padding: 10rpx 0;
|
padding: 10rpx 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@@ -943,12 +957,12 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-view-item {
|
// .scroll-view-item {
|
||||||
// height: 300rpx;
|
// height: 300rpx;
|
||||||
// line-height: 300rpx;
|
// line-height: 300rpx;
|
||||||
// text-align: center;
|
// text-align: center;
|
||||||
// font-size: 36rpx;
|
// font-size: 36rpx;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.scroll-view-item_H {
|
.scroll-view-item_H {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
Reference in New Issue
Block a user