11111
This commit is contained in:
parent
51367c48c9
commit
da3659412d
20
pages.json
20
pages.json
@ -9,16 +9,16 @@
|
||||
}
|
||||
},
|
||||
"pages": [
|
||||
// {
|
||||
// "path": "pages/loading/loading",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "",
|
||||
// "navigationStyle": "custom",
|
||||
// "app": {
|
||||
// "bounce": "none"
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"path": "pages/loading/loading",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"app": {
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -40,11 +40,13 @@
|
||||
class="player-wrapper"
|
||||
:src="videoSrc"
|
||||
:videoHeight="220"
|
||||
:videoWidth="videoWidth"
|
||||
:seekTime="0"
|
||||
@fullscreenchange="onFullscreenChange"
|
||||
/>
|
||||
<!-- 标签切换 -->
|
||||
<cover-view class="tabs" v-if="from != 'download'" :style="{ opacity: isFullScreen ? 0: 1 }">
|
||||
|
||||
<cover-view class="tabs" v-if="from != 'download'" :style="{ opacity:isFullScreen?0:1, width: videoWidth + 'px' }" >
|
||||
<cover-view
|
||||
class="tab"
|
||||
:class="{ active: activeTab === 'info' }"
|
||||
@ -958,7 +960,6 @@ $theme-color: #8b2316;
|
||||
position: relative;
|
||||
top: calc(var(--status-bar-height) + 44px);
|
||||
z-index: 0;
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
.share-img {
|
||||
@ -1034,7 +1035,7 @@ $theme-color: #8b2316;
|
||||
}
|
||||
.intro {
|
||||
// background: #fff;
|
||||
padding: 30rpx 28rpx 100rpx;
|
||||
padding: 40rpx 28rpx 100rpx;
|
||||
// margin-top: calc(var(--status-bar-height) + 44px + 220px + 88rpx);
|
||||
// height: calc(100vh - var(--status-bar-height) - 44px - 220px - 88rpx);
|
||||
// overflow-y: scroll;
|
||||
@ -1056,9 +1057,7 @@ $theme-color: #8b2316;
|
||||
.video-author {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,11 +9,10 @@
|
||||
:border="false"
|
||||
backgroundColor="#eeeeee"
|
||||
></uni-nav-bar> -->
|
||||
<navBar title="诊疗指南"/>
|
||||
<view class="zhinan-page" v-if="tab=='zhinan'">
|
||||
<navBar title="诊疗指南" />
|
||||
<view class="zhinan-page" v-if="tab == 'zhinan'">
|
||||
<!-- 导航栏 -->
|
||||
|
||||
|
||||
<!-- 固定搜索栏 -->
|
||||
<view class="search-container-fixed filter-bar">
|
||||
<view class="search-box" @click="goSearch">
|
||||
@ -24,7 +23,11 @@
|
||||
<view class="divider"></view>
|
||||
<view class="filter-item" @click="showFilterPopup">
|
||||
<text>筛选</text>
|
||||
<up-image :src="isFilterActive ? filterOn : filter" width="30rpx" height="30rpx" ></up-image>
|
||||
<up-image
|
||||
:src="isFilterActive ? filterOn : filter"
|
||||
width="30rpx"
|
||||
height="30rpx"
|
||||
></up-image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -36,8 +39,12 @@
|
||||
:key="index"
|
||||
@click="enterCategory(item)"
|
||||
>
|
||||
<view class="item-image" >
|
||||
<image :src="docUrl+item.imgs" mode="widthFix" class="category-icon"></image>
|
||||
<view class="item-image">
|
||||
<image
|
||||
:src="docUrl + item.imgs"
|
||||
mode="widthFix"
|
||||
class="category-icon"
|
||||
></image>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<text class="category-title">{{ item.name }}</text>
|
||||
@ -46,16 +53,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="total">
|
||||
<up-image :src="star1" width="85rpx" height="9rpx" ></up-image>
|
||||
<view class="count"> {{total}}份文献</view>
|
||||
<up-image :src="star2" width="85rpx" height="9rpx" ></up-image>
|
||||
<up-image :src="star1" width="85rpx" height="9rpx"></up-image>
|
||||
<view class="count"> {{ total }}份文献</view>
|
||||
<up-image :src="star2" width="85rpx" height="9rpx"></up-image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="qikan-page" v-else-if="tab=='qikan'">
|
||||
<view class="qikan-page" v-else-if="tab == 'qikan'">
|
||||
<!-- 导航头部 -->
|
||||
|
||||
|
||||
<!-- 主要内容区域 -->
|
||||
<view class="main-content">
|
||||
<!-- 标签切换区域 -->
|
||||
@ -67,8 +72,13 @@
|
||||
@click="switchTabQikan('daichawenxian')"
|
||||
>
|
||||
<text class="tab-text">代查文献</text>
|
||||
<view class="tab-underline" >
|
||||
<up-image :src="activeImg" width="48rpx" height="18rpx" v-if="activeTab === 'daichawenxian'"></up-image>
|
||||
<view class="tab-underline">
|
||||
<up-image
|
||||
:src="activeImg"
|
||||
width="48rpx"
|
||||
height="18rpx"
|
||||
v-if="activeTab === 'daichawenxian'"
|
||||
></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
@ -78,7 +88,12 @@
|
||||
>
|
||||
<text class="tab-text">英文文献</text>
|
||||
<view class="tab-underline">
|
||||
<up-image :src="activeImg" width="48rpx" height="18rpx" v-if="activeTab === 'yingwenwenxian'"></up-image>
|
||||
<up-image
|
||||
:src="activeImg"
|
||||
width="48rpx"
|
||||
height="18rpx"
|
||||
v-if="activeTab === 'yingwenwenxian'"
|
||||
></up-image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -88,7 +103,7 @@
|
||||
<view class="content-section" v-if="activeTab === 'daichawenxian'">
|
||||
<!-- 顶部图标和说明 -->
|
||||
|
||||
<up-image :src="paperImg" width="100%" ></up-image>
|
||||
<up-image :src="paperImg" width="100%"></up-image>
|
||||
<!-- 表单区域 -->
|
||||
<view class="form-section">
|
||||
<!-- 接收邮箱 -->
|
||||
@ -168,12 +183,19 @@
|
||||
</view>
|
||||
|
||||
<!-- 删除按钮 -->
|
||||
<view class="delbox" v-if="literatureList.length > 1" @click="removeLiterature(index)">
|
||||
<view
|
||||
class="delbox"
|
||||
v-if="literatureList.length > 1"
|
||||
@click="removeLiterature(index)"
|
||||
>
|
||||
<up-image :src="delImg" width="40rpx" height="52rpx"></up-image>
|
||||
</view>
|
||||
|
||||
<!-- 文献分隔线 -->
|
||||
<view class="literature-divider" v-if="index < literatureList.length - 1"></view>
|
||||
<view
|
||||
class="literature-divider"
|
||||
v-if="index < literatureList.length - 1"
|
||||
></view>
|
||||
</view>
|
||||
<!-- 添加代查文献按钮 -->
|
||||
<view class="add-literature-section" v-if="literatureList.length < 5">
|
||||
@ -183,17 +205,27 @@
|
||||
</view>
|
||||
<view class="limit-tip">
|
||||
<view class="imgbox">
|
||||
<up-image :src="countImg" width="186rpx" height="74rpx"></up-image>
|
||||
<up-image
|
||||
:src="countImg"
|
||||
width="186rpx"
|
||||
height="74rpx"
|
||||
></up-image>
|
||||
</view>
|
||||
<view class="count">还可添加{{ 5 - literatureList.length }}篇</view>
|
||||
<view class="count"
|
||||
>还可添加{{ 5 - literatureList.length }}篇</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 常见问题 -->
|
||||
<view class="faq-section">
|
||||
<up-image :src="questionImg" width="100%" mode="widtFix" height="540rpx"></up-image>
|
||||
|
||||
<up-image
|
||||
:src="questionImg"
|
||||
width="100%"
|
||||
mode="widtFix"
|
||||
height="540rpx"
|
||||
></up-image>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<view class="title">注意</view>
|
||||
@ -202,8 +234,12 @@
|
||||
<view class="row">不支持模糊代查,请尽可能详细提供所需文献信息</view>
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<up-image :src="submitImg" width="100%" height="160rpx" mode="widtFix"></up-image>
|
||||
|
||||
<up-image
|
||||
:src="submitImg"
|
||||
width="100%"
|
||||
height="160rpx"
|
||||
mode="widtFix"
|
||||
></up-image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -215,12 +251,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 筛选弹窗 -->
|
||||
<view class="filter-popup" v-if="showFilter" @click="hideFilterPopup">
|
||||
<view class="filter-content" @click.stop>
|
||||
@ -247,272 +279,290 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import upImg from "@/static/cb_up.png"
|
||||
import downImg from "@/static/cb_up.png"
|
||||
import filter from "@/static/cb_screen_no.png"
|
||||
import filterOn from "@/static/cb_screen_yes.png"
|
||||
import star1 from "@/static/xingxing1.png"
|
||||
import star2 from "@/static/xingxing2.png"
|
||||
import paperImg from "@/static/paper_bg.png"
|
||||
import activeImg from "@/static/route.png"
|
||||
import emailImg from "@/static/email_bg.png"
|
||||
import countImg from "@/static/sheng_bg.png"
|
||||
import questionImg from "@/static/paper_question.png"
|
||||
import submitImg from "@/static/paper_submit.png"
|
||||
import delImg from "@/static/delete_paper.png"
|
||||
import api from '@/api/api.js'
|
||||
import docUrl from "@/utils/docUrl.js"
|
||||
import navTo from '@/utils/navTo.js';
|
||||
import navBar from "@/components/navBar/navBar.vue"
|
||||
const total=ref(0);
|
||||
const tab=ref('zhinan')
|
||||
// 响应式数据
|
||||
const searchText = ref('');
|
||||
const guidelineCategories = ref([]);
|
||||
const isFilterActive=ref(false)
|
||||
// 指南库检索结果(如需在列表页使用)
|
||||
const searchLibraryList = ref([]);
|
||||
const filterTags = ref([]);
|
||||
const keywords = ref('');
|
||||
// 页面加载
|
||||
onMounted(() => {
|
||||
import { ref, onMounted } from "vue";
|
||||
import { onShow, onBackPress } from "@dcloudio/uni-app";
|
||||
import upImg from "@/static/cb_up.png";
|
||||
import downImg from "@/static/cb_up.png";
|
||||
import filter from "@/static/cb_screen_no.png";
|
||||
import filterOn from "@/static/cb_screen_yes.png";
|
||||
import star1 from "@/static/xingxing1.png";
|
||||
import star2 from "@/static/xingxing2.png";
|
||||
import paperImg from "@/static/paper_bg.png";
|
||||
import activeImg from "@/static/route.png";
|
||||
import emailImg from "@/static/email_bg.png";
|
||||
import countImg from "@/static/sheng_bg.png";
|
||||
import questionImg from "@/static/paper_question.png";
|
||||
import submitImg from "@/static/paper_submit.png";
|
||||
import delImg from "@/static/delete_paper.png";
|
||||
import api from "@/api/api.js";
|
||||
import docUrl from "@/utils/docUrl.js";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import navBar from "@/components/navBar/navBar.vue";
|
||||
const total = ref(0);
|
||||
const tab = ref("zhinan");
|
||||
// 响应式数据
|
||||
const searchText = ref("");
|
||||
const guidelineCategories = ref([]);
|
||||
const isFilterActive = ref(false);
|
||||
// 指南库检索结果(如需在列表页使用)
|
||||
const searchLibraryList = ref([]);
|
||||
const filterTags = ref([]);
|
||||
const keywords = ref("");
|
||||
onBackPress(() => {
|
||||
try {
|
||||
uni.sendNativeEvent(
|
||||
"goTabbarPage",
|
||||
{
|
||||
msg: "home",
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
plus.runtime.quit();
|
||||
return true;
|
||||
});
|
||||
// 页面加载
|
||||
onMounted(() => {
|
||||
loadGuideTypes();
|
||||
loadSearchLibrary();
|
||||
loadGuideTags();
|
||||
});
|
||||
const showFilter=ref(false);
|
||||
// 筛选弹窗相关方法
|
||||
const showFilterPopup = () => {
|
||||
});
|
||||
const showFilter = ref(false);
|
||||
// 筛选弹窗相关方法
|
||||
const showFilterPopup = () => {
|
||||
showFilter.value = true;
|
||||
};
|
||||
const goSearch=()=>{
|
||||
uni.sendNativeEvent('goHomeSearch', {
|
||||
msg: 'goHomeSearch'
|
||||
},ret => {
|
||||
};
|
||||
const goSearch = () => {
|
||||
uni.sendNativeEvent(
|
||||
"goHomeSearch",
|
||||
{
|
||||
msg: "goHomeSearch",
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
})
|
||||
}
|
||||
const hideFilterPopup = () => {
|
||||
);
|
||||
};
|
||||
const hideFilterPopup = () => {
|
||||
showFilter.value = false;
|
||||
};
|
||||
};
|
||||
|
||||
const toggleTag = (index) => {
|
||||
const toggleTag = (index) => {
|
||||
filterTags.value[index].selected = !filterTags.value[index].selected;
|
||||
isFilterActive.value = filterTags.value.some(tag => tag.selected);
|
||||
};
|
||||
isFilterActive.value = filterTags.value.some((tag) => tag.selected);
|
||||
};
|
||||
|
||||
const resetFilter = () => {
|
||||
const resetFilter = () => {
|
||||
// 清空所有已选标签
|
||||
filterTags.value.forEach(tag => tag.selected = false);
|
||||
filterTags.value.forEach((tag) => (tag.selected = false));
|
||||
// 关闭筛选激活态
|
||||
isFilterActive.value = false;
|
||||
// 清空关键字
|
||||
keywords.value = '';
|
||||
keywords.value = "";
|
||||
// 刷新列表数据(可按需保留或移除)
|
||||
// currentPage.value = 1;
|
||||
// hasMoreData.value = true;
|
||||
//loadVideoData(true);
|
||||
};
|
||||
};
|
||||
|
||||
const confirmFilter = () => {
|
||||
const selectedTags = filterTags.value.filter(tag => tag.selected);
|
||||
console.log('选中的筛选标签:', selectedTags);
|
||||
const confirmFilter = () => {
|
||||
const selectedTags = filterTags.value.filter((tag) => tag.selected);
|
||||
console.log("选中的筛选标签:", selectedTags);
|
||||
for (var i = 0; i < selectedTags.length; i++) {
|
||||
if(keywords.value){
|
||||
keywords.value+=","+selectedTags[i].NAME
|
||||
}else{
|
||||
keywords.value=selectedTags[i].NAME
|
||||
if (keywords.value) {
|
||||
keywords.value += "," + selectedTags[i].NAME;
|
||||
} else {
|
||||
keywords.value = selectedTags[i].NAME;
|
||||
}
|
||||
|
||||
navTo({
|
||||
url:'/pages_app/hot/hot?keywords='+encodeURIComponent(keywords.value)
|
||||
})
|
||||
|
||||
url: "/pages_app/hot/hot?keywords=" + encodeURIComponent(keywords.value),
|
||||
});
|
||||
}
|
||||
isFilterActive.value=true;
|
||||
isFilterActive.value = true;
|
||||
hideFilterPopup();
|
||||
// 根据选中的标签重新加载数据
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
onShow(() => {
|
||||
onShow(() => {
|
||||
// 页面显示时可以刷新数据
|
||||
loadGuideTags();
|
||||
});
|
||||
});
|
||||
|
||||
// 加载指南分类(guideType)
|
||||
const loadGuideTypes = async () => {
|
||||
// 加载指南分类(guideType)
|
||||
const loadGuideTypes = async () => {
|
||||
try {
|
||||
const res = await api.guideType({});
|
||||
guidelineCategories.value=res.data;
|
||||
guidelineCategories.value = res.data;
|
||||
for (var i = 0; i < res.data.length; i++) {
|
||||
total.value=total.value+res.data[i].total
|
||||
total.value = total.value + res.data[i].total;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error('加载指南分类失败:', e);
|
||||
console.error("加载指南分类失败:", e);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// 调用治疗指南列表(searchLibraryU)
|
||||
const loadSearchLibrary = async () => {
|
||||
// 调用治疗指南列表(searchLibraryU)
|
||||
const loadSearchLibrary = async () => {
|
||||
try {
|
||||
const res = await api.searchLibraryU({
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
type:1,
|
||||
keywords:'',
|
||||
type: 1,
|
||||
keywords: "",
|
||||
});
|
||||
if(res && res.code === 200) {
|
||||
searchLibraryList.value = res.data
|
||||
if (res && res.code === 200) {
|
||||
searchLibraryList.value = res.data;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error('加载指南库失败:', e);
|
||||
console.error("加载指南库失败:", e);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// 加载指南标签列表
|
||||
const loadGuideTags = async () => {
|
||||
// 加载指南标签列表
|
||||
const loadGuideTags = async () => {
|
||||
try {
|
||||
const res = await api.guideTag({
|
||||
type:3
|
||||
type: 3,
|
||||
});
|
||||
console.log('指南标签API响应:', res);
|
||||
if(res && res.code === 200 && res.data) {
|
||||
console.log("指南标签API响应:", res);
|
||||
if (res && res.code === 200 && res.data) {
|
||||
// 将API返回的标签数据转换为筛选标签格式
|
||||
filterTags.value = res.data.map(tag => ({
|
||||
filterTags.value = res.data.map((tag) => ({
|
||||
...tag,
|
||||
selected: false
|
||||
selected: false,
|
||||
}));
|
||||
console.log('指南标签加载成功:', filterTags.value);
|
||||
console.log("指南标签加载成功:", filterTags.value);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载指南标签失败:', e);
|
||||
console.error("加载指南标签失败:", e);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// 进入指南分类
|
||||
const enterCategory = (item) => {
|
||||
// 进入指南分类
|
||||
const enterCategory = (item) => {
|
||||
navTo({
|
||||
url: `/pages_app/zhinanList/zhinanList?typeUuid=${item.uuid}&title=${item.name}`
|
||||
url: `/pages_app/zhinanList/zhinanList?typeUuid=${item.uuid}&title=${item.name}`,
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// 显示筛选对话框
|
||||
const showFilterDialog = () => {
|
||||
console.log('显示筛选');
|
||||
// 显示筛选对话框
|
||||
const showFilterDialog = () => {
|
||||
console.log("显示筛选");
|
||||
// 可以实现筛选弹窗
|
||||
};
|
||||
};
|
||||
|
||||
// 切换底部标签
|
||||
const switchTab = (tabName) => {
|
||||
console.log('切换到:', tabName);
|
||||
tab.value=tabName;
|
||||
};
|
||||
// 切换底部标签
|
||||
const switchTab = (tabName) => {
|
||||
console.log("切换到:", tabName);
|
||||
tab.value = tabName;
|
||||
};
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.navigateBack({
|
||||
fail() {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
// 响应式数据
|
||||
const activeTab = ref('daichawenxian');
|
||||
};
|
||||
// 响应式数据
|
||||
const activeTab = ref("daichawenxian");
|
||||
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
email: '',
|
||||
literatureName: '',
|
||||
author: '',
|
||||
journalName: ''
|
||||
});
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
email: "",
|
||||
literatureName: "",
|
||||
author: "",
|
||||
journalName: "",
|
||||
});
|
||||
|
||||
// 文献列表数据
|
||||
const literatureList = ref([
|
||||
// 文献列表数据
|
||||
const literatureList = ref([
|
||||
{
|
||||
id: 1,
|
||||
literatureName: '',
|
||||
author: '',
|
||||
journalName: ''
|
||||
}
|
||||
]);
|
||||
literatureName: "",
|
||||
author: "",
|
||||
journalName: "",
|
||||
},
|
||||
]);
|
||||
|
||||
// 常见问题数据
|
||||
const faqList = ref([
|
||||
// 常见问题数据
|
||||
const faqList = ref([
|
||||
{
|
||||
question: '如何查找文献?',
|
||||
answer: '请提供准确的文献标题、作者和期刊信息,我们将为您查找并发送到指定邮箱。',
|
||||
expanded: false
|
||||
question: "如何查找文献?",
|
||||
answer:
|
||||
"请提供准确的文献标题、作者和期刊信息,我们将为您查找并发送到指定邮箱。",
|
||||
expanded: false,
|
||||
},
|
||||
{
|
||||
question: '查找需要多长时间?',
|
||||
answer: '通常在1-3个工作日内完成文献查找并发送到您的邮箱。',
|
||||
expanded: false
|
||||
question: "查找需要多长时间?",
|
||||
answer: "通常在1-3个工作日内完成文献查找并发送到您的邮箱。",
|
||||
expanded: false,
|
||||
},
|
||||
{
|
||||
question: '支持哪些文献类型?',
|
||||
answer: '支持国内外期刊论文、会议论文、学位论文等多种文献类型。',
|
||||
expanded: false
|
||||
}
|
||||
]);
|
||||
question: "支持哪些文献类型?",
|
||||
answer: "支持国内外期刊论文、会议论文、学位论文等多种文献类型。",
|
||||
expanded: false,
|
||||
},
|
||||
]);
|
||||
|
||||
// 切换顶部标签
|
||||
const switchTabQikan = (tab) => {
|
||||
// 切换顶部标签
|
||||
const switchTabQikan = (tab) => {
|
||||
activeTab.value = tab;
|
||||
};
|
||||
};
|
||||
|
||||
// 切换底部导航
|
||||
const switchBottomTab = (tab) => {
|
||||
if (tab === 'zhinan') {
|
||||
// 切换底部导航
|
||||
const switchBottomTab = (tab) => {
|
||||
if (tab === "zhinan") {
|
||||
uni.navigateTo({
|
||||
url: '/pages_app/zhinan/zhinan'
|
||||
url: "/pages_app/zhinan/zhinan",
|
||||
});
|
||||
} else if (tab === 'tools') {
|
||||
} else if (tab === "tools") {
|
||||
uni.showToast({
|
||||
title: '功能开发中',
|
||||
icon: 'none'
|
||||
title: "功能开发中",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// 添加文献
|
||||
const addLiterature = () => {
|
||||
// 添加文献
|
||||
const addLiterature = () => {
|
||||
if (literatureList.value.length >= 5) {
|
||||
uni.showToast({
|
||||
title: '最多只能添加5篇文献',
|
||||
icon: 'none'
|
||||
title: "最多只能添加5篇文献",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const newLiterature = {
|
||||
id: Date.now(), // 使用时间戳作为唯一ID
|
||||
literatureName: '',
|
||||
author: '',
|
||||
journalName: ''
|
||||
literatureName: "",
|
||||
author: "",
|
||||
journalName: "",
|
||||
};
|
||||
|
||||
literatureList.value.push(newLiterature);
|
||||
|
||||
uni.showToast({
|
||||
title: '添加成功',
|
||||
icon: 'none'
|
||||
title: "添加成功",
|
||||
icon: "none",
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// 删除文献
|
||||
const removeLiterature = (index) => {
|
||||
// 删除文献
|
||||
const removeLiterature = (index) => {
|
||||
if (literatureList.value.length <= 1) {
|
||||
uni.showToast({
|
||||
title: '至少保留一篇文献',
|
||||
icon: 'none'
|
||||
title: "至少保留一篇文献",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -520,27 +570,27 @@
|
||||
literatureList.value.splice(index, 1);
|
||||
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'none'
|
||||
title: "删除成功",
|
||||
icon: "none",
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// 切换FAQ展开状态
|
||||
const toggleFaq = (index) => {
|
||||
// 切换FAQ展开状态
|
||||
const toggleFaq = (index) => {
|
||||
faqList.value[index].expanded = !faqList.value[index].expanded;
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// SCSS Variables
|
||||
$primary-color: #8B2316;
|
||||
$primary-color: #8b2316;
|
||||
$bg-color: #f5f5f5;
|
||||
$white: #fff;
|
||||
$text-primary: #333;
|
||||
$text-secondary: #666;
|
||||
$text-light: #999;
|
||||
$primary-color: #ff6b6b;
|
||||
$theme-color: #8B2316;
|
||||
$theme-color: #8b2316;
|
||||
$white: #fff;
|
||||
$gray-bg: #f5f5f5;
|
||||
$gray-light: #eee;
|
||||
@ -554,7 +604,7 @@ $border-radius: 8px;
|
||||
$border-radius-small: 6px;
|
||||
$padding: 15px;
|
||||
$padding-small: 10px;
|
||||
$accent-color: #4A90E2;
|
||||
$accent-color: #4a90e2;
|
||||
.zhinan-page {
|
||||
background-color: $bg-color;
|
||||
min-height: 100vh;
|
||||
@ -604,7 +654,7 @@ $accent-color: #4A90E2;
|
||||
}
|
||||
|
||||
.filter-item {
|
||||
flex:1;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -620,8 +670,10 @@ $accent-color: #4A90E2;
|
||||
flex-wrap: wrap;
|
||||
padding: 30rpx;
|
||||
|
||||
margin:0 30rpx;
|
||||
margin-top: calc(var(--status-bar-height) + 44px + 106rpx); // 为固定搜索栏留出空间 (搜索栏高度约80rpx + 边距)
|
||||
margin: 0 30rpx;
|
||||
margin-top: calc(
|
||||
var(--status-bar-height) + 44px + 106rpx
|
||||
); // 为固定搜索栏留出空间 (搜索栏高度约80rpx + 边距)
|
||||
|
||||
.guideline-item {
|
||||
margin-top: 20rpx;
|
||||
@ -631,7 +683,7 @@ $accent-color: #4A90E2;
|
||||
overflow: hidden;
|
||||
|
||||
transition: transform 0.2s ease;
|
||||
&:nth-child(3n+1){
|
||||
&:nth-child(3n + 1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
&:active {
|
||||
@ -646,7 +698,7 @@ $accent-color: #4A90E2;
|
||||
|
||||
.category-icon {
|
||||
width: 100%;
|
||||
height:320rpx; /* 高度自适应 */
|
||||
height: 320rpx; /* 高度自适应 */
|
||||
display: block; /* 去除底部间隙 */
|
||||
}
|
||||
|
||||
@ -694,7 +746,7 @@ $accent-color: #4A90E2;
|
||||
gap: 8rpx;
|
||||
&.active {
|
||||
color: #fff;
|
||||
background-color: #8B2316;
|
||||
background-color: #8b2316;
|
||||
}
|
||||
.tab-icon {
|
||||
width: 44rpx;
|
||||
@ -706,11 +758,10 @@ $accent-color: #4A90E2;
|
||||
color: $text-secondary;
|
||||
&.active {
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.tab-item:nth-child(2){
|
||||
.tab-item:nth-child(2) {
|
||||
border-right: 2rpx solid #eee;
|
||||
border-left: 2rpx solid #eee;
|
||||
}
|
||||
@ -718,26 +769,26 @@ $accent-color: #4A90E2;
|
||||
|
||||
// 为网格添加底部边距,避免被tabbar遮挡
|
||||
.guidelines-grid {
|
||||
padding-bottom:0rpx;
|
||||
padding-bottom: 0rpx;
|
||||
background-color: $white;
|
||||
}
|
||||
.total{
|
||||
.total {
|
||||
margin-top: 0rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding-bottom:40rpx;
|
||||
.count{
|
||||
padding-bottom: 40rpx;
|
||||
.count {
|
||||
margin-top: 50rpx;
|
||||
font-size: 30rpx;
|
||||
color:#999;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.qikan-page {
|
||||
background:#f6f6f6;
|
||||
background: #f6f6f6;
|
||||
min-height: 100vh;
|
||||
padding-top:0rpx;
|
||||
padding-top: 0rpx;
|
||||
padding-bottom: 100rpx; // 为底部导航预留空间
|
||||
}
|
||||
|
||||
@ -755,7 +806,6 @@ $accent-color: #4A90E2;
|
||||
background-color: #a5d9fe;
|
||||
padding: 0 30rpx;
|
||||
|
||||
|
||||
.tab-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -768,7 +818,7 @@ $accent-color: #4A90E2;
|
||||
|
||||
.tab-text {
|
||||
font-size: 32rpx;
|
||||
color:#333!important;
|
||||
color: #333 !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@ -781,13 +831,11 @@ $accent-color: #4A90E2;
|
||||
|
||||
.tab-underline {
|
||||
position: absolute;
|
||||
bottom:15rpx;
|
||||
bottom: 15rpx;
|
||||
left: 50%;
|
||||
right: 0;
|
||||
transform: translateX(-50%);
|
||||
height: 18rpx;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -802,7 +850,7 @@ $accent-color: #4A90E2;
|
||||
|
||||
// 头部横幅
|
||||
.header-banner {
|
||||
background: linear-gradient(135deg, #87CEEB, #B0E0E6);
|
||||
background: linear-gradient(135deg, #87ceeb, #b0e0e6);
|
||||
margin: 20rpx 30rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx 30rpx;
|
||||
@ -844,40 +892,38 @@ $accent-color: #4A90E2;
|
||||
|
||||
// 表单区域
|
||||
.form-section {
|
||||
|
||||
margin: -156rpx 30rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 0rpx 0rpx ;
|
||||
.wenxian{
|
||||
padding: 0rpx 0rpx;
|
||||
.wenxian {
|
||||
margin-top: 40rpx;
|
||||
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
.from-cell{
|
||||
.from-cell {
|
||||
position: relative;
|
||||
.delbox{
|
||||
top:10rpx;
|
||||
right:30rpx;
|
||||
.delbox {
|
||||
top: 10rpx;
|
||||
right: 30rpx;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
.formbox{
|
||||
padding:30rpx 30rpx 30rpx;
|
||||
background:#fff url("@/static/email_bg.png") no-repeat 0rpx 0;
|
||||
.formbox {
|
||||
padding: 30rpx 30rpx 30rpx;
|
||||
background: #fff url("@/static/email_bg.png") no-repeat 0rpx 0;
|
||||
background-size: 100% 148rpx;
|
||||
border-radius: 10rpx;
|
||||
position: relative;
|
||||
z-index:8;
|
||||
z-index: 8;
|
||||
}
|
||||
.formemail{
|
||||
padding:0 30rpx;
|
||||
.formemail {
|
||||
padding: 0 30rpx;
|
||||
height: 148rpx;
|
||||
display: flex;
|
||||
align-items:center;
|
||||
align-items: center;
|
||||
border-radius: 20rpx;
|
||||
background:#fff url("@/static/email_bg.png") no-repeat 0rpx 0!important;
|
||||
background-size: cover!important;
|
||||
background: #fff url("@/static/email_bg.png") no-repeat 0rpx 0 !important;
|
||||
background-size: cover !important;
|
||||
}
|
||||
|
||||
// 文献分隔线
|
||||
@ -889,7 +935,6 @@ $accent-color: #4A90E2;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
|
||||
margin-bottom: 40rpx;
|
||||
display: flex;
|
||||
|
||||
@ -902,7 +947,7 @@ $accent-color: #4A90E2;
|
||||
.form-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width:160rpx;
|
||||
width: 160rpx;
|
||||
font-size: 28rpx;
|
||||
color: $text-primary;
|
||||
font-weight: 500;
|
||||
@ -914,12 +959,13 @@ $accent-color: #4A90E2;
|
||||
}
|
||||
|
||||
.input-container {
|
||||
flex:1;
|
||||
.form-input,.form-textarea{
|
||||
flex: 1;
|
||||
.form-input,
|
||||
.form-textarea {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
padding: 0 20rpx;
|
||||
background:#f6f6f6;
|
||||
background: #f6f6f6;
|
||||
border: 2rpx solid $border-color;
|
||||
border-radius: 12rpx;
|
||||
font-size: 28rpx;
|
||||
@ -934,8 +980,8 @@ $accent-color: #4A90E2;
|
||||
border-color: $accent-color;
|
||||
}
|
||||
}
|
||||
.form-textarea{
|
||||
padding:20rpx;
|
||||
.form-textarea {
|
||||
padding: 20rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
@ -952,13 +998,12 @@ $accent-color: #4A90E2;
|
||||
}
|
||||
}
|
||||
}
|
||||
.from-cell .form-group:nth-child(1){
|
||||
.from-cell .form-group:nth-child(1) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.formbox .form-group:nth-child(1){
|
||||
.formbox .form-group:nth-child(1) {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 添加文献区域
|
||||
@ -973,9 +1018,9 @@ $accent-color: #4A90E2;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 80rpx;
|
||||
margin:0 20rpx;
|
||||
margin: 0 20rpx;
|
||||
border: 2rpx solid #0197f1;
|
||||
border-radius:40rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: rgba(74, 144, 226, 0.05);
|
||||
|
||||
.add-text {
|
||||
@ -988,27 +1033,27 @@ $accent-color: #4A90E2;
|
||||
|
||||
.limit-tip {
|
||||
position: absolute;
|
||||
right:0;
|
||||
top:-10rpx;
|
||||
right: 0;
|
||||
top: -10rpx;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
|
||||
width: 186rpx;
|
||||
height:74rpx;
|
||||
height: 74rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
.imgbox{
|
||||
top:0;
|
||||
.imgbox {
|
||||
top: 0;
|
||||
position: absolute;
|
||||
}
|
||||
.count{
|
||||
.count {
|
||||
margin-top: -20rpx;
|
||||
position: relative;
|
||||
z-index:3;
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1019,15 +1064,14 @@ $accent-color: #4A90E2;
|
||||
background-color: $white;
|
||||
border-radius: 20rpx;
|
||||
padding: 1rpx 1rpx;
|
||||
|
||||
}
|
||||
.tips{
|
||||
.tips {
|
||||
font-size: 24rpx;
|
||||
margin:30rpx 30rpx;
|
||||
color:#999;
|
||||
margin: 30rpx 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
.btnbox{
|
||||
margin:0 30rpx;
|
||||
.btnbox {
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
// 占位内容
|
||||
.placeholder-content {
|
||||
@ -1057,8 +1101,8 @@ $accent-color: #4A90E2;
|
||||
z-index: 9999;
|
||||
|
||||
.filter-content {
|
||||
margin-top:247rpx;
|
||||
overflow-y:scroll;
|
||||
margin-top: 247rpx;
|
||||
overflow-y: scroll;
|
||||
background-color: $white;
|
||||
// border-radius: 20rpx 20rpx 0 0;
|
||||
padding: 20rpx 30rpx 60rpx;
|
||||
@ -1127,5 +1171,4 @@ $accent-color: #4A90E2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user