Browse Source

知识库

master
ZhaoYang 1 month ago
parent
commit
6ee5585899
  1. 4
      app.json
  2. 9
      pages/home/home.js
  3. 2
      pages/home/home.wxml
  4. 2
      pages/home/home.wxss
  5. BIN
      pages/images/EZSx3exf4cjI.woff
  6. BIN
      pages/images/EZSx3exf4cjI.woff2
  7. 18
      pagesA/pages/expert/expert.js
  8. 10
      pagesA/pages/expert/expert.wxml
  9. 29
      pagesA/pages/expert/expert.wxss
  10. BIN
      pagesB/images/sou.png
  11. BIN
      pagesB/images/syts.png
  12. 66
      pagesB/pages/apple/apple.js
  13. 3
      pagesB/pages/apple/apple.json
  14. 2
      pagesB/pages/apple/apple.wxml
  15. 1
      pagesB/pages/apple/apple.wxss
  16. 258
      pagesB/pages/repository/repository.js
  17. 4
      pagesB/pages/repository/repository.json
  18. 149
      pagesB/pages/repository/repository.wxml
  19. 451
      pagesB/pages/repository/repository.wxss
  20. 4
      utils/font.wxss

4
app.json

@ -24,7 +24,7 @@
{ {
"root": "pagesB", "root": "pagesB",
"pages": [ "pages": [
"pages/apple/apple"
"pages/repository/repository"
], ],
"independent": true "independent": true
} }
@ -71,7 +71,7 @@
} }
] ]
}, },
"requiredPrivateInfos": [
"requiredPrivateInfos": [
"getLocation", "getLocation",
"chooseAddress", "chooseAddress",
"chooseLocation", "chooseLocation",

9
pages/home/home.js

@ -13,8 +13,6 @@ Page({
}, },
// 轮播 // 轮播
getCarousel() { getCarousel() {
http.carousel({ http.carousel({
@ -69,6 +67,13 @@ Page({
}) })
}, },
// 养殖知识库
bindZsk(){
wx.navigateTo({
url: '/pagesB/pages/repository/repository',
})
},
//获取当前位置信息 //获取当前位置信息
getLocation() { getLocation() {

2
pages/home/home.wxml

@ -60,7 +60,7 @@
<!-- 知识库 --> <!-- 知识库 -->
<view class="repository"> <view class="repository">
<view class="repository1_1 zsk">
<view class="repository1_1 zsk" bind:tap="bindZsk">
<view>养殖知识库</view> <view>养殖知识库</view>
<view>快速查询养殖知识</view> <view>快速查询养殖知识</view>
</view> </view>

2
pages/home/home.wxss

@ -310,7 +310,7 @@
} }
.notice-swiper { .notice-swiper {
height: 200rpx;
height: 150rpx;
} }
.notice-item { .notice-item {

BIN
pages/images/EZSx3exf4cjI.woff

BIN
pages/images/EZSx3exf4cjI.woff2

18
pagesA/pages/expert/expert.js

@ -166,8 +166,6 @@ Page({
// 筛选后的专家列表 // 筛选后的专家列表
filteredExperts: [], filteredExperts: [],
// 在线专家数量
onlineCount: 0,
// 当前选中的专家 // 当前选中的专家
currentExpert: null, currentExpert: null,
@ -324,31 +322,27 @@ Page({
// 开始咨询 // 开始咨询
startConsultation() { startConsultation() {
const expert = this.data.currentExpert; const expert = this.data.currentExpert;
console.log(1111,expert);
wx.showModal({ wx.showModal({
title: '咨询确认', title: '咨询确认',
content: expert.online ?
`确定要立即咨询 ${expert.name} 专家吗?` : `确定要预约咨询 ${expert.name} 专家吗?`,
content: expert.isOnline=='在线' ?
`确定要立即咨询 ${expert.realName} 专家吗?` : `确定要预约咨询 ${expert.realName} 专家吗?`,
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
if (expert.online) {
if (expert.isOnline=='在线') {
wx.showToast({ wx.showToast({
title: '正在为您连接专家...',
title: '正在为您连接',
icon: 'loading', icon: 'loading',
duration: 2000 duration: 2000
}); });
setTimeout(() => { setTimeout(() => {
// 跳转一对一咨询专家 // 跳转一对一咨询专家
wx.navigateTo({ wx.navigateTo({
url: '/pagesA/pages/expertChat/expertChat', url: '/pagesA/pages/expertChat/expertChat',
}) })
this.hideContactDialog(); this.hideContactDialog();
}, 2000); }, 2000);
} else { } else {
wx.showToast({ wx.showToast({
title: '预约成功,专家将尽快回复', title: '预约成功,专家将尽快回复',
@ -367,6 +361,6 @@ Page({
title: '牲畜专家咨询平台', title: '牲畜专家咨询平台',
path: '/pages/expert/expert', path: '/pages/expert/expert',
imageUrl: '/images/share-cover.jpg' imageUrl: '/images/share-cover.jpg'
};
}
} }
}); });

10
pagesA/pages/expert/expert.wxml

@ -25,10 +25,6 @@
<text class="stat-label">总专家数</text> <text class="stat-label">总专家数</text>
</view> </view>
<view class="stat-divider"></view> <view class="stat-divider"></view>
<view class="stat-item">
<text class="stat-number">{{onlineCount}}</text>
<text class="stat-label">在线专家</text>
</view>
<view class="stat-divider"></view> <view class="stat-divider"></view>
<view class="stat-item"> <view class="stat-item">
<text class="stat-number">24h</text> <text class="stat-number">24h</text>
@ -56,17 +52,17 @@
<view class="filter-tags"> <view class="filter-tags">
<view class="filter-tag {{currentFilter === '全部' ? 'active' : ''}}" bindtap="changeFilter" data-filter="全部"> <view class="filter-tag {{currentFilter === '全部' ? 'active' : ''}}" bindtap="changeFilter" data-filter="全部">
<text>全部专家</text> <text>全部专家</text>
<view class="tag-count">{{allExperts.length}}</view>
</view> </view>
<view class="filter-tag {{currentFilter === '在线' ? 'active' : ''}}" bindtap="changeFilter" data-filter="在线"> <view class="filter-tag {{currentFilter === '在线' ? 'active' : ''}}" bindtap="changeFilter" data-filter="在线">
<text>在线专家</text> <text>在线专家</text>
<view class="tag-count online-count">{{onlineCount}}</view>
</view> </view>
<view class="filter-tag {{currentFilter === '离线' ? 'active' : ''}}" bindtap="changeFilter" data-filter="离线"> <view class="filter-tag {{currentFilter === '离线' ? 'active' : ''}}" bindtap="changeFilter" data-filter="离线">
<text>离线专家</text> <text>离线专家</text>
<view class="tag-count">{{allExperts.length - onlineCount}}</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>

29
pagesA/pages/expert/expert.wxss

@ -191,22 +191,23 @@
} }
.filter-tags { .filter-tags {
display: inline-flex;
width: 100%;
display:grid;
grid-template-columns: 1fr 1fr 1fr;
column-gap: 20rpx;
padding-bottom: 20rpx; padding-bottom: 20rpx;
} }
.filter-tag { .filter-tag {
display: inline-flex;
align-items: center;
padding: 16rpx 24rpx; padding: 16rpx 24rpx;
margin-right: 20rpx;
background: #f8faf9; background: #f8faf9;
border-radius: 30rpx;
border-radius: 20rpx;
border: 2rpx solid #e8f5e9; border: 2rpx solid #e8f5e9;
color: #666; color: #666;
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
transition: all 0.3s; transition: all 0.3s;
text-align: center;
} }
.filter-tag.active { .filter-tag.active {
@ -215,23 +216,12 @@
color: white; color: white;
} }
.tag-count {
background: rgba(255, 255, 255, 0.2);
color: #2c8c34;
font-size: 22rpx;
padding: 2rpx 10rpx;
border-radius: 20rpx;
margin-left: 8rpx;
}
.filter-tag.active .tag-count { .filter-tag.active .tag-count {
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.3);
color: white; color: white;
} }
.online-count {
color: #4caf50;
}
/* 专家列表区域 */ /* 专家列表区域 */
@ -748,14 +738,17 @@
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
transition: all 0.3s; transition: all 0.3s;
} }
.secondary-btn { .secondary-btn {
background: #f8faf9; background: #f8faf9;
color: #666; color: #666;
border: 2rpx solid #e8f5e9;
border:1px solid #F0F5F1;
} }
.secondary-btn::after {
display: none;
}
.primary-btn { .primary-btn {
background: linear-gradient(135deg, #4caf50 0%, #2c8c34 100%); background: linear-gradient(135deg, #4caf50 0%, #2c8c34 100%);

BIN
pagesB/images/sou.png

After

Width: 200  |  Height: 200  |  Size: 4.5 KiB

BIN
pagesB/images/syts.png

After

Width: 200  |  Height: 200  |  Size: 6.2 KiB

66
pagesB/pages/apple/apple.js

@ -1,66 +0,0 @@
// pagesB/pages/apple/apple.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

3
pagesB/pages/apple/apple.json

@ -1,3 +0,0 @@
{
"usingComponents": {}
}

2
pagesB/pages/apple/apple.wxml

@ -1,2 +0,0 @@
<!--pagesB/pages/apple/apple.wxml-->
<text>pagesB/pages/apple/apple.wxml</text>

1
pagesB/pages/apple/apple.wxss

@ -1 +0,0 @@
/* pagesB/pages/apple/apple.wxss */

258
pagesB/pages/repository/repository.js

@ -0,0 +1,258 @@
// 模拟知识库数据
const knowledgeBase = [
{
id: 1,
title: "猪瘟防治",
content: "猪瘟是由猪瘟病毒引起的高度接触性传染病。防治措施:1. 定期接种猪瘟疫苗 2. 加强饲养管理 3. 发现病猪立即隔离 4. 猪舍定期消毒",
category: "疾病防治",
tags: ["猪", "传染病", "疫苗"],
date: "2024-01-15"
},
{
id: 2,
title: "鸡新城疫预防",
content: "新城疫主要症状:呼吸困难、下痢、神经紊乱。预防:1. 接种新城疫疫苗 2. 加强鸡舍卫生 3. 严格控制人员进出 4. 定期检测抗体水平",
category: "疾病防治",
tags: ["鸡", "禽类", "病毒病"],
date: "2024-01-10"
},
{
id: 3,
title: "奶牛饲养管理",
content: "科学饲养要点:1. 合理搭配精粗饲料 2. 保证充足饮水 3. 定时定量饲喂 4. 保持牛舍清洁干燥 5. 定期进行健康检查",
category: "饲养管理",
tags: ["奶牛", "饲养", "管理"],
date: "2024-01-05"
},
{
id: 4,
title: "仔猪腹泻治疗",
content: "常见原因:细菌感染、病毒感染、饲养不当。治疗:1. 补充电解质 2. 使用抗生素(需兽医指导)3. 改善饲养环境 4. 加强母猪管理",
category: "疾病防治",
tags: ["猪", "腹泻", "治疗"],
date: "2024-01-08"
},
{
id: 5,
title: "羊的饲料配方",
content: "育肥羊饲料配方:玉米60%、豆粕20%、麦麸15%、预混料5%。注意事项:1. 逐渐换料 2. 保证粗纤维摄入 3. 添加适量食盐",
category: "饲养管理",
tags: ["羊", "饲料", "营养"],
date: "2024-01-12"
},
{
id: 6,
title: "犬细小病毒防治",
content: "症状:呕吐、腹泻、精神萎靡。防治:1. 定期接种疫苗 2. 发病早期使用血清 3. 补液治疗 4. 严格隔离病犬",
category: "疾病防治",
tags: ["犬", "宠物", "病毒"],
date: "2024-01-18"
},
{
id: 7,
title: "水产养殖水质管理",
content: "水质指标控制:1. pH值7.5-8.5 2. 溶解氧>5mg/L 3. 氨氮<0.2mg/L 4. 定期换水 5. 使用微生物制剂",
category: "饲养管理",
tags: ["水产", "水质", "管理"],
date: "2024-01-14"
}
];
Page({
data: {
searchValue: '',
searchResults: [],
allKnowledge: knowledgeBase,
recentSearches: [],
isLoading: false,
activeCategory: '全部',
categories: ['全部', '疾病防治', '饲养管理'],
showTipsModal: false,
searchTimer: null // 搜索防抖定时器
},
onLoad() {
// 初始显示所有知识
this.setData({
searchResults: this.data.allKnowledge
});
// 页面加载后显示提示弹框
setTimeout(() => {
this.setData({ showTipsModal: true });
}, 500);
},
onShow() {
const hasShownTips = wx.getStorageSync('hasShownTips');
if (!hasShownTips) {
setTimeout(() => {
this.setData({ showTipsModal: true });
wx.setStorageSync('hasShownTips', true);
}, 500);
}
},
// 输入搜索关键词(自动搜索)
onInputSearch(e) {
const value = e.detail.value;
this.setData({
searchValue: value,
isLoading: true
});
// 清除之前的定时器
if (this.data.searchTimer) {
clearTimeout(this.data.searchTimer);
}
// 设置新的定时器(防抖处理)
this.data.searchTimer = setTimeout(() => {
if (!value.trim()) {
// 如果搜索框为空,显示所有知识
this.setData({
searchResults: this.data.allKnowledge,
isLoading: false
});
} else {
// 执行搜索
this.performSearch(value.trim());
}
}, 300); // 300ms防抖延迟
},
// 执行搜索操作
performSearch(keyword) {
const results = this.searchKnowledge(keyword);
this.setData({
searchResults: results,
isLoading: false
});
// 如果没有搜索结果且有关键词,显示提示
if (results.length === 0 && keyword) {
wx.showToast({
title: '未找到相关结果',
icon: 'none',
duration: 2000
});
}
},
// 手动搜索(点击搜索按钮或按回车)
onSearch() {
const keyword = this.data.searchValue.trim();
if (!keyword) {
this.setData({
searchResults: this.data.allKnowledge
});
return;
}
this.setData({ isLoading: true });
// 清除定时器
if (this.data.searchTimer) {
clearTimeout(this.data.searchTimer);
}
// 立即执行搜索
this.performSearch(keyword);
},
// 搜索知识库
searchKnowledge(keyword) {
const lowerKeyword = keyword.toLowerCase();
return this.data.allKnowledge.filter(item => {
return item.title.toLowerCase().includes(lowerKeyword) ||
item.content.toLowerCase().includes(lowerKeyword) ||
item.tags.some(tag => tag.toLowerCase().includes(lowerKeyword)) ||
item.category.toLowerCase().includes(lowerKeyword);
});
},
// 隐藏提示弹框
hideTips() {
this.setData({ showTipsModal: false });
},
// 阻止事件冒泡
stopPropagation() {
return;
},
// 查看详情
onViewDetail(e) {
const id = e.currentTarget.dataset.id;
const item = this.data.allKnowledge.find(item => item.id === id);
if (item) {
wx.showModal({
title: item.title,
content: item.content,
showCancel: false,
confirmText: '知道了'
});
}
},
// 按分类筛选
onFilterCategory(e) {
const category = e.currentTarget.dataset.category;
this.setData({
activeCategory: category,
searchValue: '' // 清空搜索框
});
if (category === '全部') {
this.setData({
searchResults: this.data.allKnowledge
});
} else {
const results = this.data.allKnowledge.filter(item =>
item.category === category
);
this.setData({
searchResults: results
});
}
},
// 清空搜索
onClearSearch() {
this.setData({
searchValue: '',
searchResults: this.data.allKnowledge,
activeCategory: '全部'
});
},
// 复制内容到剪贴板
onCopyContent(e) {
const content = e.currentTarget.dataset.content;
wx.setClipboardData({
data: content,
success: () => {
wx.showToast({
title: '复制成功',
icon: 'success'
});
}
});
},
onShareAppMessage() {
return {
title: '动物疾病防治与饲养管理知识库',
path: '/pages/search/index'
};
},
onUnload() {
// 页面卸载时清除定时器
if (this.data.searchTimer) {
clearTimeout(this.data.searchTimer);
}
}
});

4
pagesB/pages/repository/repository.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText":"知识库",
"usingComponents": {}
}

149
pagesB/pages/repository/repository.wxml

@ -0,0 +1,149 @@
<view class="container_zsl">
<!-- 搜索区域 -->
<view class="search-area">
<view class="search-box">
<view class="search-input-wrapper">
<image src="/pagesB/images/sou.png" class="search-icon" />
<input
class="search-input"
placeholder="请输入关键词搜索,如:猪瘟、饲养、疫苗..."
placeholder-class="placeholder"
value="{{searchValue}}"
bindinput="onInputSearch"
bindconfirm="onSearch"
/>
<icon
class="clear-icon"
type="clear"
size="16"
wx:if="{{searchValue}}"
bindtap="onClearSearch"
/>
</view>
</view>
<!-- 分类筛选 -->
<view class="category-filter">
<view
class="category-item {{activeCategory === item ? 'active' : ''}}"
wx:for="{{categories}}"
wx:key="index"
data-category="{{item}}"
bindtap="onFilterCategory"
>
{{item}}
<view class="category-dot" wx:if="{{activeCategory === item}}"></view>
</view>
</view>
</view>
<!-- 加载状态 -->
<view wx:if="{{isLoading}}" class="loading">
<view class="spinner">
<view class="spinner-item"></view>
<view class="spinner-item"></view>
<view class="spinner-item"></view>
</view>
<text class="loading-text">正在搜索...</text>
</view>
<!-- 搜索结果 -->
<scroll-view wx:else class="result-list" scroll-y enable-back-to-top>
<!-- 搜索结果列表 -->
<view wx:if="{{searchResults.length > 0}}">
<view class="result-count">
<text>找到 {{searchResults.length}} 条相关结果</text>
</view>
<view class="knowledge-list">
<view
class="knowledge-item"
wx:for="{{searchResults}}"
wx:key="id"
data-id="{{item.id}}"
bindtap="onViewDetail"
>
<view class="item-header">
<view class="title-wrapper">
<view class="item-title">{{item.title}}</view>
<view class="item-category">{{item.category}}</view>
</view>
</view>
<view class="item-content">{{item.content}}</view>
<view class="item-footer">
<view class="tags">
<view class="tag" wx:for="{{item.tags}}" wx:key="*this">
{{item}}
</view>
</view>
<view class="actions">
<view class="date-info">
<text class="date">{{item.date}}</text>
</view>
<view
class="copy-btn"
data-content="{{item.content}}"
bindtap="onCopyContent"
>
<text>复制</text>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 无结果 -->
<view class="empty-state" wx:if="{{searchValue && searchResults.length==0}}">
<text class="empty-text">未找到"{{searchValue}}"的相关信息</text>
<view class="suggestions">
<view class="suggestion-item">
<view class="suggestion-dot"></view>
<text>检查关键词拼写</text>
</view>
<view class="suggestion-item">
<view class="suggestion-dot"></view>
<text>尝试其他相关词汇</text>
</view>
<view class="suggestion-item">
<view class="suggestion-dot"></view>
<text>咨询专业兽医</text>
</view>
</view>
</view>
</scroll-view>
</view>
<!-- 使用提示弹框 -->
<view wx:if="{{showTipsModal}}" class="modal-mask" bindtap="hideTips">
<view class="modal-content" catchtap="stopPropagation">
<view class="modal-header">
<image src="/pagesB/images/syts.png" class="modal-icon" />
<text class="modal-title">使用提示</text>
</view>
<view class="modal-body">
<view class="tip-item">
<view class="tip-number">1</view>
<text class="tip-text">可以搜索疾病名称(如:猪瘟)</text>
</view>
<view class="tip-item">
<view class="tip-number">2</view>
<text class="tip-text">可以搜索动物种类(如:鸡、牛)</text>
</view>
<view class="tip-item">
<view class="tip-number">3</view>
<text class="tip-text">可以搜索症状(如:腹泻)</text>
</view>
<view class="tip-item">
<view class="tip-number">4</view>
<text class="tip-text">可以搜索管理方法(如:饲料、消毒)</text>
</view>
</view>
<view class="modal-footer">
<button class="modal-confirm" bindtap="hideTips">我知道了</button>
</view>
</view>
</view>

451
pagesB/pages/repository/repository.wxss

@ -0,0 +1,451 @@
/* 基础样式 */
.container_zsl {
min-height: 100vh;
background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
padding: 0;
font-family: '思源宋体 Light' !important;
}
/* 搜索区域 */
.search-area {
background: #FFFFFF;
padding: 32rpx 32rpx 24rpx;
border-bottom-left-radius: 32rpx;
border-bottom-right-radius: 32rpx;
box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.04);
position: sticky;
top: 0;
z-index: 100;
}
.search-box {
display: flex;
align-items: center;
margin-bottom: 32rpx;
}
.search-input-wrapper {
flex: 1;
height: 80rpx;
background: #F8FAFC;
border-radius: 40rpx;
padding: 0 20rpx;
display: flex;
align-items: center;
border: 2rpx solid #E2E8F0;
transition: all 0.3s ease;
}
.search-input-wrapper:focus-within {
border-color: #3B82F6;
box-shadow: 0 0 0 3rpx rgba(59, 130, 246, 0.1);
}
.search-icon {
width: 45rpx;
height: 45rpx;
margin-right: 16rpx;
}
.search-input {
flex: 1;
height: 100%;
font-size: 28rpx;
color: #1E293B;
}
.placeholder {
color: #94A3B8;
font-size: 28rpx;
}
.clear-icon {
color: #94A3B8;
padding: 8rpx;
border-radius: 50%;
background: rgba(148, 163, 184, 0.1);
}
/* 分类筛选 */
.category-filter {
display: flex;
gap: 20rpx;
overflow-x: auto;
padding-bottom: 8rpx;
}
.category-filter::-webkit-scrollbar {
display: none;
}
.category-item {
padding: 16rpx 32rpx;
background: #F1F5F9;
border-radius: 40rpx;
font-size: 28rpx;
color: #64748B;
display: flex;
align-items: center;
white-space: nowrap;
transition: all 0.3s ease;
position: relative;
}
.category-item.active {
background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
color: #FFFFFF;
font-weight: 500;
box-shadow: 0 8rpx 20rpx rgba(59, 130, 246, 0.3);
}
.category-dot {
width: 8rpx;
height: 8rpx;
background: #FFFFFF;
border-radius: 50%;
margin-left: 8rpx;
}
/* 加载状态 */
.loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 0;
}
.spinner {
display: flex;
gap: 12rpx;
margin-bottom: 32rpx;
}
.spinner-item {
width: 20rpx;
height: 20rpx;
background: #3B82F6;
border-radius: 50%;
animation: bounce 1.4s infinite ease-in-out both;
}
.spinner-item:nth-child(1) {
animation-delay: -0.32s;
}
.spinner-item:nth-child(2) {
animation-delay: -0.16s;
}
@keyframes bounce {
0%,
80%,
100% {
transform: scale(0);
}
40% {
transform: scale(1);
}
}
.loading-text {
font-size: 28rpx;
color: #64748B;
}
/* 搜索结果 */
.result-list {
height: calc(100vh - 240rpx);
}
.result-count {
display: flex;
align-items: center;
padding: 32rpx 32rpx 24rpx;
font-size: 28rpx;
color: #475569;
}
/* 知识列表 */
.knowledge-list {
padding: 0 32rpx;
}
.knowledge-item {
background: #FFFFFF;
border-radius: 24rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
border: 1rpx solid rgba(226, 232, 240, 0.6);
}
.item-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 24rpx;
}
.title-wrapper {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.item-title {
font-size: 32rpx;
font-weight: 600;
color: #1E293B;
}
.item-category {
padding: 8rpx 20rpx;
background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
color: #065F46;
font-size: 24rpx;
border-radius: 20rpx;
font-weight: 500;
}
.item-content {
font-size: 28rpx;
color: #475569;
line-height: 1.6;
margin-bottom: 28rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
/* 底部信息 */
.item-footer {
border-top: 1rpx solid #F1F5F9;
padding-top: 24rpx;
}
.tags {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
margin-bottom: 24rpx;
}
.tag {
padding: 8rpx 20rpx;
background: #F1F5F9;
color: #475569;
font-size: 24rpx;
border-radius: 16rpx;
}
.actions {
display: flex;
justify-content: space-between;
align-items: center;
}
.date-info {
display: flex;
align-items: center;
}
.date {
font-size: 24rpx;
color: #94A3B8;
}
.copy-btn {
display: flex;
align-items: center;
padding: 12rpx 24rpx;
background: #F8FAFC;
border-radius: 20rpx;
font-size: 26rpx;
color: #3B82F6;
border: 1rpx solid #E2E8F0;
transition: all 0.2s ease;
}
.copy-btn:active {
background: #F1F5F9;
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
padding: 80rpx 32rpx;
text-align: center;
}
.empty-text {
font-size: 32rpx;
font-weight: 600;
color: #1E293B;
margin-bottom: 48rpx;
}
.suggestions {
display: flex;
flex-direction: column;
gap: 20rpx;
width: 100%;
max-width: 500rpx;
}
.suggestion-item {
display: flex;
align-items: center;
padding: 24rpx;
background: #F8FAFC;
border-radius: 16rpx;
font-size: 28rpx;
color: #475569;
}
.suggestion-dot {
width: 12rpx;
height: 12rpx;
background: #3B82F6;
border-radius: 50%;
margin-right: 16rpx;
}
/* 弹框样式 */
.modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(15, 23, 42, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
backdrop-filter: blur(4rpx);
animation: fadeIn 0.3s ease-out;
font-family: '思源宋体 Light' !important;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.modal-content {
background: #FFFFFF;
border-radius: 32rpx;
width: 80%;
max-width: 600rpx;
overflow: hidden;
animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(80rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.modal-header {
display: flex;
flex-direction: column;
align-items: center;
padding: 48rpx 0 40rpx;
background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
}
.modal-icon {
width: 60rpx;
height: 60rpx;
margin-bottom: 20rpx;
}
.modal-title {
font-size: 36rpx;
font-weight: 600;
color: #0C4A6E;
}
.modal-body {
padding: 40rpx 48rpx;
}
.tip-item {
display: flex;
align-items: flex-start;
margin-bottom: 32rpx;
}
.tip-item:last-child {
margin-bottom: 0;
}
.tip-number {
width: 48rpx;
height: 48rpx;
background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
color: #FFFFFF;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
font-weight: 600;
margin-right: 20rpx;
flex-shrink: 0;
}
.tip-text {
font-size: 28rpx;
color: #334155;
line-height: 1.5;
padding-top: 10rpx;
}
.modal-footer {
padding: 0 48rpx 48rpx;
}
.modal-confirm {
width: 100%;
height: 88rpx;
background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
color: #FFFFFF;
border-radius: 44rpx;
font-size: 32rpx;
font-weight: 500;
line-height: 88rpx;
border: none;
box-shadow: 0 8rpx 24rpx rgba(59, 130, 246, 0.3);
transition: transform 0.2s ease;
}
.modal-confirm:active {
transform: scale(0.98);
}
.modal-confirm::after {
border: none;
}

4
utils/font.wxss

@ -2,7 +2,7 @@
@font-face { @font-face {
font-family: "思源宋体 Light" !important; font-family: "思源宋体 Light" !important;
font-weight: 300; font-weight: 300;
src: url("/pages/assets/img/EZSx3exf4cjI.woff2") format("woff2"),
url("/pages/assets/img/EZSx3exf4cjI.woff") format("woff");
src: url("/pages/images/EZSx3exf4cjI.woff2") format("woff2"),
url("/pages/images/EZSx3exf4cjI.woff") format("woff");
font-display: swap; font-display: swap;
} }
Loading…
Cancel
Save