图书馆小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

725 lines
21 KiB

2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
  1. <template>
  2. <view style="padding-bottom: 20px;">
  3. <view class="top-bar">
  4. <image class="top-bar-bg" src="@/static/images/mingqi-beij@2x.png" mode="aspectFill"></image>
  5. <view class="library-info">
  6. <image class="avatar" src="@/static/images/logo.jpg" mode="aspectFill"></image>
  7. <view class="library-name">葛店经济技术开发区图书馆</view>
  8. </view>
  9. <uni-icons class="search-icon" type="search" size="30" @click="onToSearch"></uni-icons>
  10. </view>
  11. <view class="status-cards">
  12. <view class="status-card" @click="toBorrowPage(0)">
  13. <view class="status-icon icon-color1" >
  14. <uni-icons custom-prefix="iconfont" type="icon-daiban02" size="22"></uni-icons>
  15. </view>
  16. <view class="status-label">在借中</view>
  17. </view>
  18. <!-- <view class="status-card" @click="toBorrowPage(2)">
  19. <view class="status-icon icon-color2" >
  20. <uni-icons custom-prefix="iconfont" type="icon-zuofei05" size="22"></uni-icons>
  21. </view>
  22. <view class="status-label">将过期</view>
  23. </view>
  24. <view class="status-card" @click="toBorrowPage(3)">
  25. <view class="status-icon icon-color3" >
  26. <uni-icons custom-prefix="iconfont" type="icon-yuqi04" size="22"></uni-icons>
  27. </view>
  28. <view class="status-label">已过期</view>
  29. </view> -->
  30. <view class="status-card" @click="toBorrowPage(1)">
  31. <view class="status-icon icon-color4" >
  32. <uni-icons custom-prefix="iconfont" type="icon-a-zhidu4" size="22"></uni-icons>
  33. </view>
  34. <view class="status-label">历史借阅</view>
  35. </view>
  36. </view>
  37. <swiper class="banner-swiper" interval="3000" circular :vertical="false" :indicator-dots="true" :autoplay="true">
  38. <swiper-item>
  39. <image data-post-id="3" src="https://mmbiz.qpic.cn/mmbiz_jpg/bVyA57fUOMicbQqItawJwQlR2oCoYql1icEbuH45ibSAzZsk2T3aDbUOIdMyOOc2CzkYouok0El5u5U3LONACaeNw/640?wx_fmt=jpeg&from=appmsg&tp=webp&wxfrom=5&wx_lazy=1#imgIndex=1"></image>
  40. </swiper-item>
  41. <swiper-item>
  42. <image data-post-id="4" src="https://mmbiz.qpic.cn/sz_mmbiz_gif/tuyGibvSXrsqqiaNpAFJ7lbfGL5vibHtUdV5SUk1RWnlq3QqDe9liaWhdS91L0orEsFxZMiaHOFxDOzINmkiby24fYmmWstiayUgywfVia1pwMcNpBA/640?wx_fmt=gif&from=appmsg&tp=webp&wxfrom=5&wx_lazy=1#imgIndex=3"></image>
  43. </swiper-item>
  44. </swiper>
  45. <!-- :indicator-dots="true" -->
  46. <swiper class="menu-swiper" interval="6000" :vertical="false" :autoplay="false">
  47. <swiper-item>
  48. <view class="menu-grid">
  49. <view class="menu-item" @click="onToSearch">
  50. <view class="menu-icon">
  51. <uni-icons custom-prefix="iconfont" type="icon-ziyuan" size="22"></uni-icons>
  52. </view>
  53. <view class="menu-label">书目检索</view>
  54. </view>
  55. <view class="menu-item" @click="onToLendCar">
  56. <view class="menu-icon">
  57. <uni-icons custom-prefix="iconfont" type="icon-z_renew_normal" size="24"></uni-icons>
  58. </view>
  59. <view class="menu-label">图书续借</view>
  60. </view>
  61. <!-- <view class="menu-item" >
  62. <view class="menu-icon">
  63. <uni-icons custom-prefix="iconfont" type="icon-guanwaizhuanjie1" size="26"></uni-icons>
  64. </view>
  65. <view class="menu-label">图书转借</view>
  66. </view> -->
  67. <view class="menu-item" @click="toLibraryCard">
  68. <view class="menu-icon">
  69. <uni-icons custom-prefix="iconfont" type="icon-duzhezheng" size="26"></uni-icons>
  70. </view>
  71. <view class="menu-label">电子证</view>
  72. </view>
  73. <view class="menu-item" @click="toRanking">
  74. <view class="menu-icon">
  75. <uni-icons custom-prefix="iconfont" type="icon-paihangbang" size="22"></uni-icons>
  76. </view>
  77. <view class="menu-label">借阅排行</view>
  78. </view>
  79. <view class="menu-item" @click="toActivityList">
  80. <view class="menu-icon">
  81. <uni-icons custom-prefix="iconfont" type="icon-remenhuodong" size="26"></uni-icons>
  82. </view>
  83. <view class="menu-label">活动报名</view>
  84. </view>
  85. <view class="menu-item" @click="toFeedback">
  86. <view class="menu-icon">
  87. <uni-icons custom-prefix="iconfont" type="icon-duzheliuyan" size="26"></uni-icons>
  88. </view>
  89. <view class="menu-label">读者留言</view>
  90. </view>
  91. <view class="menu-item" @click="onToUser">
  92. <view class="menu-icon">
  93. <uni-icons custom-prefix="iconfont" type="icon-yonghuxinxi-gerenxinxi" size="20"></uni-icons>
  94. </view>
  95. <view class="menu-label">个人中心</view>
  96. </view>
  97. </view>
  98. </swiper-item>
  99. </swiper>
  100. <!-- 已有绑定滑动切换多个借阅证 -->
  101. <view v-if="isBindLibraryCard" class="library-card-has">
  102. <view class="section-title">我的借阅证</view>
  103. <!-- 左右滑动切换证件 -->
  104. <!-- :indicator-dots="readerCardList.length > 1"
  105. indicator-color="#d1d1d1"
  106. indicator-active-color="#01a4fe" -->
  107. <swiper
  108. class="card-swiper"
  109. :circular="false"
  110. >
  111. <swiper-item v-for="item in readerCardList" :key="item.id">
  112. <!-- :class="{'active': item.bindDefault}" -->
  113. <view class="card-item" @click.stop="showQrcode(item.bindValue)">
  114. <image class="card-left-img" src="@/static/images/card-img2.png" mode="widthFix" />
  115. <view class="card-right-info">
  116. <text class="info-title">读者证号</text>
  117. <text class="info-num">{{ formatCardNo(item.bindValue) }}</text>
  118. </view>
  119. <view class="default-tag" v-if="item.bindDefault">默认证</view>
  120. <uni-icons class="erweima-style" custom-prefix="iconfont" type="icon-erweima" size="28"></uni-icons>
  121. </view>
  122. </swiper-item>
  123. </swiper>
  124. </view>
  125. <!-- 未绑定借阅证 -->
  126. <view class="library-card-section" @click="toCheckLogin" v-else>
  127. <view class="section-title">借阅证</view>
  128. <image class="card-icon" src="@/static/images/card-img2.png"></image>
  129. <view class="card-tip">您还没有绑定读者证哦</view>
  130. <button class="bind-btn">立即绑定</button>
  131. </view>
  132. <root-portal>
  133. <uni-popup
  134. ref="popup"
  135. type="center"
  136. :mask-click="true"
  137. @maskClick="closePopup"
  138. :custom-style="popupFixedStyle"
  139. >
  140. <view class="qrcode-popup">
  141. <view class="qrcode-title">读者证二维码</view>
  142. <w-qrcode
  143. v-if="qrcodeText"
  144. :value="qrcodeText"
  145. :size="160"
  146. foreground="#333"
  147. background="#ffffff"
  148. />
  149. <view class="qrcode-num">{{ qrcodeText }}</view>
  150. <view class="close-btn" @click="closePopup">关闭</view>
  151. </view>
  152. </uni-popup>
  153. </root-portal>
  154. <view class="recommendation-section">
  155. <view class="section-title">
  156. <text class="left-txt">图书推荐</text>
  157. <view class="more-link" @click="getMoreBoook" v-if="!(recommendedBooks.length === 0 && !isLoading)">
  158. <text style="margin-right: 5px;">查看更多</text>
  159. <uni-icons custom-prefix="iconfont" type="icon-gengduo" size="12"></uni-icons>
  160. </view>
  161. </view>
  162. <view class="recommendation-list">
  163. <uni-load-more status="loading" v-if="isLoading"></uni-load-more>
  164. <view v-else class="book-item" v-for="(item,index) in recommendedBooks.slice(0,3)" @click="goToBookDetail(item)" :key="index" >
  165. <!-- :src="item.base64Cover || '/static/images/default-book.png'" -->
  166. <image
  167. class="book-cover"
  168. :src="item.base64Cover || '/static/images/default-book.png'"
  169. @error="onImgError"
  170. ></image>
  171. <view class="book-title">{{item.name}}</view>
  172. </view>
  173. </view>
  174. <view class="empty" v-if="recommendedBooks.length === 0 && !isLoading">
  175. <uni-icons custom-prefix="iconfont" type="icon-kongshuju" size="80"></uni-icons>
  176. <text style="margin-top: 20px;">暂无推荐书籍~</text>
  177. </view>
  178. </view>
  179. </view>
  180. </template>
  181. <script>
  182. import { FetchOpenId, FetchFindAllReaderBindByOpenId} from '@/api/user';
  183. import { FetchInitScreenBookRecommend } from '@/api/book';
  184. import config from '@/utils/config';
  185. import { STORAGE_KEYS } from '@/utils/storage';
  186. export default {
  187. data() {
  188. return {
  189. isLoading: true,
  190. recommendedBooks: [],
  191. token: "",
  192. userInfo: {},
  193. isBindLibraryCard: false,
  194. readerCardList: [], // 多个借阅证
  195. baseUrl: config.baseUrl,
  196. qrcodeText: '', // 二维码内容
  197. popupFixedStyle: 'position:fixed;top:0;left:0;right:0;bottom:0;'
  198. };
  199. },
  200. onLoad() {
  201. this.getRecommendBooks();
  202. },
  203. onShow() {
  204. this.initUserAndCheckBind();
  205. },
  206. methods:{
  207. // 格式化读者证号
  208. formatCardNo(cardNo) {
  209. if (!cardNo) return '';
  210. const str = String(cardNo);
  211. const len = str.length;
  212. if (len > 8) {
  213. // 前2位 + 中间全部* + 后2位
  214. const front = str.substring(0, 2);
  215. const end = str.substring(len - 2);
  216. const star = '*'.repeat(len - 4); // 中间全部隐藏
  217. return front + star + end;
  218. } else {
  219. // 小于等于8:*** + 后2位
  220. return '***' + str.substring(len - 2);
  221. }
  222. },
  223. onImgError(e) {
  224. e.target.src = "/static/images/default-book.png";
  225. },
  226. // 初始化:登录 → 获取openid → 查是否绑定
  227. async initUserAndCheckBind() {
  228. try {
  229. // 1. 先看缓存有没有 openId
  230. let openId = uni.getStorageSync('wx_login_code');
  231. // 2. 没有 → 走微信登录流程
  232. if (!openId) {
  233. const loginRes = await new Promise((resolve, reject) => {
  234. uni.login({
  235. success: resolve,
  236. fail: reject
  237. });
  238. });
  239. if (!loginRes.code) {
  240. uni.showToast({ title: '授权失败', icon: 'none' });
  241. return;
  242. }
  243. // 3. 获取 openId
  244. const openRes = await FetchOpenId({
  245. libcode: config.LIB_CODE,
  246. code: loginRes.code
  247. });
  248. if (openRes.code !== 200 || !openRes.data) {
  249. return;
  250. }
  251. openId = openRes.data;
  252. uni.setStorageSync('wx_login_code', openId);
  253. }
  254. // 4. 有了 openId → 查绑定状态
  255. const res = await FetchFindAllReaderBindByOpenId({
  256. libcode: config.LIB_CODE,
  257. openId: openId
  258. });
  259. if (res.code === 200 && res.data.length > 0) {
  260. this.isBindLibraryCard = true;
  261. // 👉 默认证排第一位
  262. const defaultCard = res.data.find(item => item.bindDefault === true);
  263. const otherCards = res.data.filter(item => !item.bindDefault);
  264. // 合并:默认在前,其他在后
  265. this.readerCardList = defaultCard ? [defaultCard, ...otherCards] : res.data;
  266. uni.setStorageSync(STORAGE_KEYS.READER_CARD_LIST, this.readerCardList);
  267. uni.setStorageSync(STORAGE_KEYS.CURRENT_READER_CARD, defaultCard);
  268. } else {
  269. this.isBindLibraryCard = false;
  270. this.readerCardList = [];
  271. uni.setStorageSync(STORAGE_KEYS.READER_CARD_LIST, []);
  272. uni.setStorageSync(STORAGE_KEYS.CURRENT_READER_CARD, null);
  273. }
  274. } catch (err) {
  275. console.error('初始化失败:', err);
  276. const list = uni.getStorageSync(STORAGE_KEYS.READER_CARD_LIST) || [];
  277. // 同样默认排第一
  278. const defaultCard = list.find(item => item.bindDefault === true);
  279. const otherCards = list.filter(item => !item.bindDefault);
  280. this.readerCardList = defaultCard ? [defaultCard, ...otherCards] : list;
  281. this.isBindLibraryCard = list.length > 0;
  282. }
  283. },
  284. // 获取图书推荐 + 封面转 base64
  285. async getRecommendBooks() {
  286. try {
  287. const res = await FetchInitScreenBookRecommend({ libcode: config.LIB_CODE });
  288. let books = res.data || [];
  289. // 只处理并展示前3条,避免setData数据过大
  290. const limit = 3;
  291. const displayBooks = books.slice(0, limit);
  292. for (let i = 0; i < displayBooks.length; i++) {
  293. let item = displayBooks[i];
  294. if (item.imgPath) {
  295. const imageUrl = this.baseUrl + '/api/fileRelevant/getImg?imgType=2&imgId=' + item.imgPath;
  296. try {
  297. const base64 = await this.urlToBase64(imageUrl);
  298. item.base64Cover = base64;
  299. } catch (err) {
  300. item.base64Cover = '';
  301. }
  302. } else {
  303. item.base64Cover = '';
  304. }
  305. }
  306. // 只将展示所需的前3条数据放入响应式,减少setData传输量
  307. this.recommendedBooks = displayBooks;
  308. this.isLoading = false;
  309. } catch (err) {
  310. console.error('获取图书推荐失败:', err);
  311. this.isLoading = false;
  312. }
  313. },
  314. goToBookDetail(item) {
  315. // 把整个图书对象 转成字符串 带过去
  316. uni.navigateTo({
  317. url: "/subpkg/pages/book-detail/book-detail?bookData=" + encodeURIComponent(JSON.stringify(item)) + "&fromRecommend=true"
  318. })
  319. },
  320. // 查看更多 → 进入图书列表页
  321. getMoreBoook(){
  322. uni.navigateTo({
  323. url: "/subpkg/pages/book-list/book-list"
  324. })
  325. },
  326. // 去图书检索页
  327. onToSearch() {
  328. uni.switchTab({
  329. url: "/pages/search/search"
  330. });
  331. },
  332. // 去图书借阅车页
  333. onToLendCar() {
  334. this.checkBindAndNavigate("/pages/lendCar/lendCar", "请您绑定读者证", true);
  335. },
  336. // 点击未绑定借阅证区域 触发跳转
  337. toCheckLogin() {
  338. uni.navigateTo({
  339. url: "/pages/login/login"
  340. });
  341. },
  342. toRanking(){
  343. uni.navigateTo({
  344. url: "/subpkg/pages/ranking/ranking"
  345. })
  346. },
  347. toActivityList(){
  348. this.checkBindAndNavigate("/subpkg/pages/activity-list/activity-list", "请您绑定读者证");
  349. },
  350. toBorrowPage(index) {
  351. if (this.isBindLibraryCard) {
  352. uni.setStorageSync('switch_tab_index', index);
  353. uni.navigateTo({
  354. url: '/subpkg/pages/myLending/myLending'
  355. });
  356. } else {
  357. uni.showModal({
  358. title: '提示',
  359. content: '请您绑定读者证',
  360. confirmText: '去绑定',
  361. cancelText: '取消',
  362. success: (res) => {
  363. if (res.confirm) {
  364. uni.navigateTo({ url: "/pages/login/login" });
  365. }
  366. }
  367. });
  368. }
  369. },
  370. toBorrowCar() {
  371. uni.switchTab({
  372. url: '/pages/lendCar/lendCar'
  373. });
  374. },
  375. toFeedback() {
  376. this.checkBindAndNavigate("/subpkg/pages/feedback/feedback", "请您绑定读者证");
  377. },
  378. // 去借阅证列表页
  379. toLibraryCard() {
  380. // 已绑定 → 进列表
  381. if (this.isBindLibraryCard) {
  382. uni.navigateTo({ url: '/subpkg/pages/reader-card/reader-card' });
  383. }
  384. // 未绑定 → 进绑定页
  385. else {
  386. uni.navigateTo({ url: "/pages/login/login" });
  387. }
  388. },
  389. // 去个人中心页
  390. onToUser() {
  391. this.checkBindAndNavigate("/pages/user/user", "请您绑定读者证", true);
  392. },
  393. checkBindAndNavigate(url, message, isSwitchTab = false) {
  394. if (this.isBindLibraryCard) {
  395. if (isSwitchTab) {
  396. uni.switchTab({ url });
  397. } else {
  398. uni.navigateTo({ url });
  399. }
  400. } else {
  401. uni.showModal({
  402. title: '提示',
  403. content: message,
  404. confirmText: '去绑定',
  405. cancelText: '取消',
  406. success: (res) => {
  407. if (res.confirm) {
  408. uni.navigateTo({ url: "/pages/login/login" });
  409. }
  410. }
  411. });
  412. }
  413. },
  414. showQrcode(bindValue) {
  415. this.qrcodeText = bindValue;
  416. this.$refs.popup.open();
  417. },
  418. closePopup() {
  419. this.qrcodeText = '';
  420. this.$refs.popup.close();
  421. },
  422. urlToBase64(url) {
  423. return new Promise((resolve, reject) => {
  424. uni.request({
  425. url,
  426. method: 'GET',
  427. responseType: 'arraybuffer',
  428. success: (res) => {
  429. try {
  430. const buffer = new Uint8Array(res.data);
  431. let binary = '';
  432. for (let i = 0; i < buffer.length; i++) {
  433. binary += String.fromCharCode(buffer[i]);
  434. }
  435. const base64 = uni.arrayBufferToBase64(res.data);
  436. const dataUri = 'data:image/jpeg;base64,' + base64;
  437. resolve(dataUri);
  438. } catch (e) {
  439. reject(e);
  440. }
  441. },
  442. fail: reject
  443. });
  444. });
  445. },
  446. }
  447. }
  448. </script>
  449. <style lang="scss" scoped>
  450. .top-bar{
  451. .search-icon{
  452. position: absolute;
  453. right: 16px;
  454. top: 15px;
  455. z-index: 22;
  456. ::v-deep .uni-icons{
  457. color: #fff !important;
  458. }
  459. }
  460. }
  461. .status-cards {
  462. display: flex;
  463. background-color: #fff;
  464. margin: 10px;
  465. border-radius: 8px;
  466. padding: 20px 10px;
  467. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  468. .status-card {
  469. flex: 1;
  470. display: flex;
  471. flex-direction: column;
  472. align-items: center;
  473. }
  474. .status-icon {
  475. display: flex;
  476. justify-content: center;
  477. align-items: center;
  478. width: 40px;
  479. height: 40px;
  480. margin-bottom: 6px;
  481. border-radius: 50%;
  482. }
  483. .icon-color1{
  484. background-color: #e4f2ff;
  485. }
  486. .icon-color2{
  487. background-color: #ffeff0;
  488. }
  489. .icon-color3{
  490. background-color: #e4fff4;
  491. }
  492. .icon-color4{
  493. background-color: #fef8e2;
  494. }
  495. .status-label {
  496. font-size: 12px;
  497. color: #333;
  498. }
  499. }
  500. swiper.banner-swiper{
  501. width: 100%;
  502. height: 130px;
  503. }
  504. swiper.banner-swiper image{
  505. width: 100%;
  506. height: 130px;
  507. }
  508. swiper.menu-swiper{
  509. width:100%;
  510. margin-top: 10px;
  511. background-color: #fff;
  512. }
  513. .menu-grid {
  514. display: grid;
  515. grid-template-columns: repeat(4, 1fr);
  516. .menu-item {
  517. flex: 1;
  518. display: flex;
  519. flex-direction: column;
  520. align-items: center;
  521. padding: 10px 0;
  522. .menu-icon{
  523. display: flex;
  524. flex-direction: column;
  525. justify-content: center;
  526. height: 30px;
  527. ::v-deep .uni-icons{
  528. color: #01a4fe !important;
  529. }
  530. }
  531. .menu-label {
  532. font-size: 12px;
  533. color: #333;
  534. text-align: center;
  535. }
  536. }
  537. }
  538. .library-card-section {
  539. display: flex;
  540. flex-direction: column;
  541. justify-content: space-between;
  542. align-items: center;
  543. width: 100%;
  544. padding: 20px 0;
  545. .section-title {
  546. font-size: 22px;
  547. font-weight: bold;
  548. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  549. -webkit-background-clip: text;
  550. color: transparent;
  551. letter-spacing: 0.1em;
  552. margin-bottom: 5px;
  553. }
  554. .card-icon {
  555. width: 80px;
  556. height: 80px;
  557. }
  558. .card-tip {
  559. font-size: 12px;
  560. color: #999;
  561. margin: 5px 0;
  562. }
  563. .bind-btn {
  564. display: flex;
  565. flex-direction: row;
  566. align-items: center;
  567. justify-content: center;
  568. border: 1px solid #06a8ff ;
  569. width: 128px !important;
  570. height: 28px;
  571. border-radius: 28px;
  572. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  573. font-size: 14px;
  574. color: #fff;
  575. line-height: 28px;
  576. }
  577. }
  578. .recommendation-section {
  579. background-color: #fff;
  580. margin: 10px;
  581. border-radius: 8px;
  582. padding: 0 0 10px 0;
  583. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  584. .section-title{
  585. display: flex;
  586. flex-direction: row;
  587. justify-content: space-between;
  588. align-items: center;
  589. height: 40px;
  590. padding: 0 10px;
  591. .left-txt{
  592. color: #343434;
  593. font-size: 15px;
  594. font-weight: 700;
  595. }
  596. .more-link{
  597. display: flex;
  598. flex-direction: row;
  599. justify-content: flex-start;
  600. align-items: center;
  601. color: #999;
  602. font-size: 11px;
  603. }
  604. }
  605. }
  606. .library-card-has {
  607. width: 100%;
  608. padding: 20px 10px;
  609. box-sizing: border-box;
  610. .section-title {
  611. font-size: 22px;
  612. font-weight: bold;
  613. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  614. -webkit-background-clip: text;
  615. color: transparent;
  616. letter-spacing: 0.1em;
  617. margin-bottom: 10px;
  618. padding-left: 5px;
  619. }
  620. .card-list {
  621. width: 100%;
  622. }
  623. }
  624. .card-swiper {
  625. height: 106px;
  626. .card-item{
  627. display: flex;
  628. justify-content: space-between;
  629. align-items: center;
  630. padding: 10px;
  631. border: 2px solid #C6C6E2;
  632. border-radius: 8px;
  633. background: rgba(241,241,249,0.4);
  634. cursor: pointer;
  635. &.active{
  636. border-color: #01a4fe;
  637. background: rgba(1, 164, 254, 0.1);
  638. }
  639. .card-left-img{
  640. width: 80px;
  641. margin-right: 12px;
  642. display: block;
  643. }
  644. .card-right-info{
  645. flex: 1;
  646. display: flex;
  647. flex-direction: column;
  648. .info-title{
  649. font-size: 16px;
  650. color: #333;
  651. font-weight: bold;
  652. padding-bottom: 12px;
  653. }
  654. .info-num{
  655. font-size: 14px;
  656. color: #999;
  657. }
  658. }
  659. .default-tag {
  660. position: absolute;
  661. right: 12px;
  662. top: 12px;
  663. font-size: 11px;
  664. color: #01a4fe;
  665. border: 1px solid #01a4fe;
  666. border-radius: 4px;
  667. padding: 2px 6px;
  668. }
  669. }
  670. }
  671. .erweima-style{
  672. position: absolute;
  673. right: 12px;
  674. bottom: 22px;
  675. ::v-deep .icon-erweima{
  676. // font-weight: bold;
  677. color: #999 !important;
  678. }
  679. }
  680. </style>