feat: 更新心理论坛页面,优化分类和搜索功能

- 将应用版本号更新至1.0.53
- 修改开发环境baseUrl配置,确保使用本地测试地址
- 在心理论坛页面新增分类选择和搜索功能
- 优化滚动条样式和页面布局
This commit is contained in:
2026-03-30 16:33:42 +08:00
parent b0c63d3faa
commit 78cc9cbccf
3 changed files with 45 additions and 16 deletions

View File

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

View File

@@ -2,9 +2,9 @@
"name" : "心灵空间", "name" : "心灵空间",
"appid" : "__UNI__BBBDFD2", "appid" : "__UNI__BBBDFD2",
"description" : "心灵空间", "description" : "心灵空间",
"versionName" : "1.0.52", "versionName" : "1.0.53",
"sassImplementationName" : "node-sass", "sassImplementationName" : "node-sass",
"versionCode" : 1052, "versionCode" : 1053,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@@ -1,10 +1,12 @@
<template> <template>
<view class="commonPageBox"> <view class="commonPageBox">
<z-paging ref="paging" v-model="dataList" auto-show-back-to-top @query="getDataList"> <z-paging ref="paging" v-model="dataList" auto-show-back-to-top :auto="false" @query="getDataList">
<template #top> <template #top>
<z-nav-bar title="心理论坛"></z-nav-bar> <z-nav-bar title="心理论坛"></z-nav-bar>
<view class="search_box"> <view class="search_box">
<u-search placeholder="请输入文章标题" v-model="query.title" @search="handleSearch" @custom="handleSearch"></u-search> <u-search placeholder="请输入文章标题" v-model="query.title" @search="handleSearch" @custom="handleSearch"></u-search>
<u-tabs :list="classification" keyName="dictValue" lineWidth="30" class="classification_tabs" @click="handleClassification"></u-tabs>
</view> </view>
</template> </template>
@@ -39,15 +41,38 @@ export default {
}, },
dataList: [], //列表数据 dataList: [], //列表数据
statusNull: null, //暂无数据显示 statusNull: null, //暂无数据显示
classification: []
} }
}, },
mounted(){ mounted(){
}, },
onLoad() { onLoad() {
// this.getDataList(this.query.page, this.query.limit) this.getClassification();
}, },
methods: { methods: {
//免费课程数据 // 获取分类
getClassification(){
this.$http.request({
url: "book/sysdictdata/selectByType/psycheForumLabel",
method: "GET",
header: { "Content-Type": "application/json" },
})
.then((res) => {
if (res.code == 0 && res.dataList) {
this.classification = res.dataList;
this.query.type = res.dataList[0].dictType;
this.$refs.paging.reload();
}
})
.catch((e) => {
console.log("获取分类失败", e);
});
},
handleClassification(e){
this.query.type = e.dictType;
this.$refs.paging.reload();
},
// 获取列表
getDataList(pageNo, pageSize){ getDataList(pageNo, pageSize){
this.$http.request({ this.$http.request({
url: 'common/wxPublicAccount/getWxPublicAccountArticleList', url: 'common/wxPublicAccount/getWxPublicAccountArticleList',
@@ -63,7 +88,7 @@ export default {
}) })
.then(res=> { .then(res=> {
if (res.code == 0) { if (res.code == 0) {
if(res.page.records && res.page.records.length>0){ if(res.page.records){
this.$refs.paging.complete(res.page.records); this.$refs.paging.complete(res.page.records);
}else{ }else{
this.$refs.paging.complete(false); this.$refs.paging.complete(false);
@@ -85,7 +110,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.commonPageBox{ .commonPageBox{
background: #eff5f8; background: #eff5f8;
height: 100vh; height: 100vh;
@@ -94,6 +119,11 @@ export default {
background: #fff; background: #fff;
padding: 0 20rpx 20rpx; padding: 0 20rpx 20rpx;
} }
.classification_tabs {
::v-deep .u-tabs__wrapper__nav__item {
padding: 0 20rpx;
}
}
.cateList { .cateList {
width: 100%; width: 100%;
} }
@@ -189,25 +219,24 @@ export default {
color: #999; color: #999;
font-size: 22rpx; font-size: 22rpx;
} }
::v-deep .zp-scroll-view .uni-scroll-view::-webkit-scrollbar {
::v-deep ::-webkit-scrollbar {
/*滚动条整体样式*/ /*滚动条整体样式*/
width: 4px !important; width: 4px !important;
height: 1px !important; height: 4px !important;
overflow: auto !important; overflow: auto !important;
background: #ccc !important; background: #f5f5f5 !important;
-webkit-appearance: auto !important; -webkit-appearance: auto !important;
display: block; display: block;
} }
::v-deep ::-webkit-scrollbar-thumb { ::v-deep .zp-scroll-view .uni-scroll-view::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 10px !important; border-radius: 10px !important;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
background: #7b7979 !important; background: #eee !important;
} }
::v-deep ::-webkit-scrollbar-track { ::v-deep .zp-scroll-view .uni-scroll-view::-webkit-scrollbar-track {
/*滚动条里面轨道*/ /*滚动条里面轨道*/
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important; // box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
// border-radius: 10px !important; // border-radius: 10px !important;