3.11提交
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<view class="search-header">
|
||||
<view class="navbox">
|
||||
<view class="status_bar"></view>
|
||||
<view class="search-header">
|
||||
<view class="status_bar"></view>
|
||||
<view class="back-icon" @click="goBack">
|
||||
<uni-icons type="left" size="30" color="#8B2316"></uni-icons>
|
||||
</view>
|
||||
@@ -21,6 +24,7 @@
|
||||
<text class="cancel-text">搜索</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page">
|
||||
<!-- <view class="top">
|
||||
|
||||
@@ -111,15 +115,26 @@
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<view class="empty-state" v-if="articleList.length === 0 && !loading">
|
||||
<!-- <view class="empty-state" v-if="articleList.length === 0 && !loading">
|
||||
<uni-icons type="article" size="80" color="#cccccc"></uni-icons>
|
||||
<text class="empty-text">暂无文章</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<empty v-if="articleList.length === 0 && !loading" :emptyDesc="'暂无文章'"></empty>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
|
||||
</view>
|
||||
<unidialog
|
||||
:visible="noticeVisible"
|
||||
:title="'是否确定发送此患教科普'"
|
||||
:content="content"
|
||||
:confirmText="'发送'"
|
||||
:cancelText="'取消'"
|
||||
@close="noticeVisible=false"
|
||||
@confirm="noticeConfirm"
|
||||
>
|
||||
</unidialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -130,9 +145,22 @@
|
||||
import filter from "@/static/cb_screen_no.png"
|
||||
import filterOn from "@/static/cb_screen_yes.png"
|
||||
import api from "@/api/api.js"
|
||||
import empty from "@/components/empty/empty.vue"
|
||||
import docUrl from '@/utils/docUrl.js';
|
||||
import navTo from '@/utils/navTo.js';
|
||||
import navBar from '@/components/navBar/navBar.vue';
|
||||
import unidialog from '@/components/dialog/dialog.vue'
|
||||
//import navBar from '@/components/navBar/navBar.vue';
|
||||
const content=ref('');
|
||||
const noticeVisible=ref(false);
|
||||
const articeItem=ref(null);
|
||||
const noticeConfirm=()=>{
|
||||
noticeVisible.value=false;
|
||||
content.value='';
|
||||
uni.$emit('articelItem', articeItem.value);
|
||||
uni.navigateBack({
|
||||
delta:2
|
||||
});
|
||||
}
|
||||
|
||||
const type=ref(1)
|
||||
|
||||
@@ -187,10 +215,9 @@
|
||||
|
||||
try {
|
||||
const page = isRefresh ? 1 : currentPage.value;
|
||||
const res = await api.polularScienceArticleListByKeywordsNew({
|
||||
keywords: keywords.value,
|
||||
page: page,
|
||||
type: type.value
|
||||
const res = await api.polularScienceArticleListIndexNew({
|
||||
topic: keywords.value,
|
||||
page: page
|
||||
});
|
||||
|
||||
if (res && res.code === 200 && res.data) {
|
||||
@@ -281,9 +308,9 @@
|
||||
|
||||
const goToDetail = (article) => {
|
||||
console.log('查看文章详情:', article);
|
||||
// 跳转到详情页
|
||||
uni.$emit('articelItem', article);
|
||||
uni.navigateBack();
|
||||
articeItem.value=article;
|
||||
noticeVisible.value=true;
|
||||
content.value=article.title;
|
||||
};
|
||||
|
||||
// 跳转到搜索页面
|
||||
@@ -440,20 +467,11 @@ $padding-small: 10px;
|
||||
}
|
||||
// 头部搜索栏
|
||||
.search-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 100;
|
||||
background-color: #eeeeee;
|
||||
|
||||
display: flex;
|
||||
height:140rpx;
|
||||
height:44px;
|
||||
align-items: center;
|
||||
padding:0 30rpx;
|
||||
gap: 20rpx;
|
||||
|
||||
|
||||
padding:0 30rpx 0 8rpx;
|
||||
.search-input-wrapper {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@@ -485,7 +503,7 @@ $padding-small: 10px;
|
||||
padding: 10rpx 20rpx;
|
||||
background:#8B2316;
|
||||
border-radius: 10rpx;
|
||||
|
||||
margin-left: 20rpx;
|
||||
.cancel-text {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user