完善功能
This commit is contained in:
@@ -47,6 +47,13 @@
|
||||
</view>
|
||||
<view class="certificate-list" v-else>暂无</view>
|
||||
</view>
|
||||
<view class="taihu_common">
|
||||
<text>名医精彩</text>
|
||||
<view class="certificate-list" v-if="courseList.length>0">
|
||||
<view v-for="(item, index) in courseList" :key='index' style=" text-decoration: underline;" @click="goToDetail(item)">{{item.title}}</view>
|
||||
</view>
|
||||
<view class="certificate-list" v-else>暂无</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -60,6 +67,7 @@ export default {
|
||||
taihuTalent: {},
|
||||
label: [], //标签
|
||||
certificates: [], //证书
|
||||
courseList: [], //名医精彩数据
|
||||
status: false,
|
||||
showAll: false, //是否显示全部
|
||||
defaultShowCount: 6 //默认显示条数
|
||||
@@ -104,6 +112,10 @@ export default {
|
||||
this.taihuTalent = res.taihuTalent;
|
||||
this.label = res.label;
|
||||
this.certificates = res.certificates;
|
||||
|
||||
if(res.courseList&&res.courseList.length>0){
|
||||
this.courseList = res.courseList;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -115,12 +127,18 @@ export default {
|
||||
goToUrl(urlArr){
|
||||
if(urlArr&&urlArr.length>0){
|
||||
uni.navigateTo({
|
||||
url: '/pages/talents/certificateUrl?data='+JSON.stringify(urlArr),
|
||||
url: '/pages/talents/certificateUrl?data='+JSON.stringify(urlArr)
|
||||
});
|
||||
}else{
|
||||
this.$commonJS.showToast("暂无证书图片");
|
||||
}
|
||||
},
|
||||
//跳转到课程详情
|
||||
goToDetail(item){
|
||||
uni.navigateTo({
|
||||
url: '/pages/curriculum/index?navTitle='+item.title+'&title='+item.title+'&id='+item.id
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -142,8 +160,9 @@ export default {
|
||||
}
|
||||
.infor_image{
|
||||
display: block;
|
||||
width: 180rpx;
|
||||
width: 200rpx;
|
||||
height: 220rpx;
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
.infor_right{
|
||||
width: calc(100% - 220rpx);
|
||||
|
||||
@@ -54,25 +54,29 @@
|
||||
placeholderClass="name-placeholder"
|
||||
class="center-input"
|
||||
/>
|
||||
<button @click="getData()">查询</button>
|
||||
<button @click="getData(true)">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 遮罩层 -->
|
||||
<view v-if="activeFilter" class="overlay" @click="closeFilter"></view>
|
||||
|
||||
<view class="talents_list" v-if="list&&list.length>0">
|
||||
<view class="talents_item" v-for="(item,index) in list" :key="index" @click="goToDetail(item.id)">
|
||||
<image :src="item.icon" class="item_image" mode="aspectFit"></image>
|
||||
<view class="item_right">
|
||||
<view class="item_top">
|
||||
<text class="item_name">{{item.name}}</text>
|
||||
<text class="item_title">{{item.title}}</text>
|
||||
<scroll-view scroll-y="true"
|
||||
:scroll-top="scrollTop"
|
||||
style="height: calc(100vh - 300rpx); margin-top: 185rpx; padding-bottom: 140rpx;"
|
||||
v-if="list&&list.length>0">
|
||||
<view class="talents_list">
|
||||
<view class="talents_item" v-for="(item,index) in list" :key="index" @click="goToDetail(item.id)">
|
||||
<image :src="item.icon" class="item_image" mode="aspectFit"></image>
|
||||
<view class="item_right">
|
||||
<view class="item_top">
|
||||
<text class="item_name">{{item.name}}</text>
|
||||
<text class="item_title">{{item.title}}</text>
|
||||
</view>
|
||||
<text class="item_con">{{item.introduce}}</text>
|
||||
</view>
|
||||
<text class="item_con">{{item.introduce}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<text class="null_text" v-else>{{null_text}}</text>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
@@ -105,8 +109,22 @@ export default {
|
||||
//城市模块是否显示
|
||||
cityStatus: false,
|
||||
selectedPath: [], //存储选中路径
|
||||
scrollTop: 0, //滚动位置
|
||||
isRefreshing: false, //刷新状态
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.isRefreshing = true;
|
||||
console.log("下拉刷新");
|
||||
|
||||
setTimeout(() => {
|
||||
this.region = '';
|
||||
this.getData();
|
||||
uni.stopPullDownRefresh();
|
||||
this.isRefreshing = false;
|
||||
console.log("下拉刷新已停止");
|
||||
}, 800);
|
||||
},
|
||||
onLoad() {
|
||||
uni.hideTabBar();
|
||||
this.getAllBaseArea();
|
||||
@@ -117,7 +135,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
//获取数据
|
||||
getData() {
|
||||
getData(type) {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
@@ -137,6 +155,13 @@ export default {
|
||||
uni.hideLoading();
|
||||
if (res.list&&res.list.length>0) {
|
||||
this.list = res.list;
|
||||
|
||||
if(type){
|
||||
this.scrollTop = 0
|
||||
this.$nextTick(() => {
|
||||
this.scrollTop = 0.1; // 确保触发滚动
|
||||
})
|
||||
}
|
||||
}else{
|
||||
this.list = [];
|
||||
this.null_text = '暂无数据';
|
||||
@@ -272,6 +297,7 @@ export default {
|
||||
},
|
||||
//详情
|
||||
goToDetail(id){
|
||||
if (this.isRefreshing) return;
|
||||
uni.navigateTo({
|
||||
url: '/pages/talents/detail?id='+id,
|
||||
});
|
||||
@@ -309,8 +335,7 @@ export default {
|
||||
background-color: #fff;
|
||||
}
|
||||
.talents_list{
|
||||
margin: 185rpx 30rpx 20rpx;
|
||||
padding-bottom: 120rpx;
|
||||
margin: 0 30rpx 20rpx;
|
||||
}
|
||||
.talents_item{
|
||||
border: 1rpx solid $themeColor;
|
||||
@@ -322,8 +347,9 @@ export default {
|
||||
}
|
||||
.item_image{
|
||||
display: block;
|
||||
width: 160rpx;
|
||||
width: 180rpx;
|
||||
height: 200rpx;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
.item_right{
|
||||
width: calc(100% - 200rpx);
|
||||
@@ -367,7 +393,7 @@ export default {
|
||||
.talents_module{
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
z-index: 99;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user