提交11
This commit is contained in:
parent
b8f6257bf1
commit
ad39805b83
@ -67,7 +67,7 @@
|
||||
<view v-else-if="loadMoreStatus === 'more'" class="more">
|
||||
<text>上拉加载更多</text>
|
||||
</view>
|
||||
<view v-else-if="loadMoreStatus === 'noMore'" class="no-more">
|
||||
<view v-else-if="loadMoreStatus === 'noMore' && guidelinesList.length > 0" class="no-more">
|
||||
<text>没有更多数据了</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<uni-icons type="clear" size="20" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cancel-btn" @click="goBack">
|
||||
<view class="cancel-btn" @click="goSearch">
|
||||
<text class="cancel-text">搜索</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -38,7 +38,7 @@
|
||||
class="category-item"
|
||||
v-for="(item, index) in categoryList"
|
||||
:key="index"
|
||||
@click="onCategoryClick(Index,item.type)"
|
||||
@click="onCategoryClick(index,item.type)"
|
||||
>
|
||||
<view class="category-icon">
|
||||
<up-image :src="item.icon" width="60rpx" height="60rpx" v-if="tab!=index"></up-image>
|
||||
@ -78,7 +78,8 @@
|
||||
import doctorOn from "@/static/item_doctor_yes.png"
|
||||
import mall from "@/static/item_mall_no.png"
|
||||
import mallOn from "@/static/item_mall_yes.png"
|
||||
const tab=ref(-1);
|
||||
const tab=ref(0);
|
||||
const type=ref('');
|
||||
// 搜索关键词
|
||||
const searchKeyword = ref('');
|
||||
|
||||
@ -97,10 +98,10 @@
|
||||
{ name: '指南', icon:zhinan, activeIcon:zhinanOn,type: 'zhinan' },
|
||||
{ name: '精品课', icon:course,activeIcon:courseOn, type: 'course' },
|
||||
{ name: '肝胆课件', icon:ppt,activeIcon:pptOn, type: 'ppt' },
|
||||
{ name: '患者', icon:patient, patientIcon:patientOn,type: 'patient' },
|
||||
{ name: '名院', icon:doctor,activeIcon:doctorOn, type: 'doctor' },
|
||||
{ name: '名科', icon:department,activeIcon:departmentOn, type: 'department' },
|
||||
{ name: '名医', icon:doctor, activeIcon:doctorOn,type: 'doctor' },
|
||||
// { name: '患者', icon:patient, patientIcon:patientOn,type: 'patient' },
|
||||
// { name: '名院', icon:doctor,activeIcon:doctorOn, type: 'doctor' },
|
||||
// { name: '名科', icon:department,activeIcon:departmentOn, type: 'department' },
|
||||
// { name: '名医', icon:doctor, activeIcon:doctorOn,type: 'doctor' },
|
||||
{ name: '积分商城', icon:mall,activeIcon:mallOn, type: 'mall' }
|
||||
]);
|
||||
|
||||
@ -134,34 +135,51 @@
|
||||
};
|
||||
|
||||
// 点击分类
|
||||
const onCategoryClick = (index,type) => {
|
||||
tab.value=index;
|
||||
if(type=='video'){
|
||||
const goSearch = () => {
|
||||
if(!searchKeyword.value){
|
||||
uni.showToast({
|
||||
title: `请输入搜索内容`,
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(type.value=='video'){
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/searchVideo/searchVideo?keywords=${searchKeyword.value}`
|
||||
})
|
||||
}else if(type=='videoPatient'){
|
||||
}else if(type.value=='videoPatient'){
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/searchVideo/searchVideo?keywords=${searchKeyword.value}&from=hjsp`
|
||||
})
|
||||
}else if(type=='news'){
|
||||
}else if(type.value=='news'){
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/searchNews/searchNews?keywords=${searchKeyword.value}`
|
||||
})
|
||||
}else if(type=='kepu'){
|
||||
}else if(type.value=='kepu'){
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/searchNews/searchNews?keywords=${searchKeyword.value}&from=kp`
|
||||
})
|
||||
}else if(type=='zhinan'){
|
||||
}else if(type.value=='zhinan'){
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/hot/hot?name=${searchKeyword.value}`
|
||||
})
|
||||
}else if(type=='course'){
|
||||
}else if(type.value=='course'){
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/searchNews/searchNews?keywords=${searchKeyword.value}&from=kp`
|
||||
url: `/pages_course/index/index?keywords=${searchKeyword.value}`
|
||||
})
|
||||
}else if(type.value=='ppt'){
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/hot/hot?name=${searchKeyword.value}`
|
||||
})
|
||||
}else if(type.value=='mall'){
|
||||
uni.navigateTo({
|
||||
url: `/pages_app/pointMall/pointMall?keywords=${searchKeyword.value}`
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
const onCategoryClick = (index,typeStr) => {
|
||||
tab.value=index;
|
||||
type.value=typeStr;
|
||||
// 这里可以根据分类进行搜索
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user