图书馆小程序
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.

724 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
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. <image
  166. class="book-cover"
  167. :src="item.base64Cover || '/static/images/default-book.png'"
  168. @error="onImgError"
  169. ></image>
  170. <view class="book-title">{{item.name}}</view>
  171. </view>
  172. </view>
  173. <view class="empty" v-if="recommendedBooks.length === 0 && !isLoading">
  174. <uni-icons custom-prefix="iconfont" type="icon-kongshuju" size="80"></uni-icons>
  175. <text style="margin-top: 20px;">暂无推荐书籍~</text>
  176. </view>
  177. </view>
  178. </view>
  179. </template>
  180. <script>
  181. import { FetchOpenId, FetchFindAllReaderBindByOpenId} from '@/api/user';
  182. import { FetchInitScreenBookRecommend } from '@/api/book';
  183. import config from '@/utils/config';
  184. import { STORAGE_KEYS } from '@/utils/storage';
  185. export default {
  186. data() {
  187. return {
  188. isLoading: true,
  189. recommendedBooks: [],
  190. token: "",
  191. userInfo: {},
  192. isBindLibraryCard: false,
  193. readerCardList: [], // 多个借阅证
  194. baseUrl: config.baseUrl,
  195. qrcodeText: '', // 二维码内容
  196. popupFixedStyle: 'position:fixed;top:0;left:0;right:0;bottom:0;'
  197. };
  198. },
  199. onLoad() {
  200. this.getRecommendBooks();
  201. },
  202. onShow() {
  203. this.initUserAndCheckBind();
  204. },
  205. methods:{
  206. // 格式化读者证号
  207. formatCardNo(cardNo) {
  208. if (!cardNo) return '';
  209. const str = String(cardNo);
  210. const len = str.length;
  211. if (len > 8) {
  212. // 前2位 + 中间全部* + 后2位
  213. const front = str.substring(0, 2);
  214. const end = str.substring(len - 2);
  215. const star = '*'.repeat(len - 4); // 中间全部隐藏
  216. return front + star + end;
  217. } else {
  218. // 小于等于8:*** + 后2位
  219. return '***' + str.substring(len - 2);
  220. }
  221. },
  222. onImgError(e) {
  223. e.target.src = "/static/images/default-book.png";
  224. },
  225. // 初始化:登录 → 获取openid → 查是否绑定
  226. async initUserAndCheckBind() {
  227. try {
  228. // 1. 先看缓存有没有 openId
  229. let openId = uni.getStorageSync('wx_login_code');
  230. // 2. 没有 → 走微信登录流程
  231. if (!openId) {
  232. const loginRes = await new Promise((resolve, reject) => {
  233. uni.login({
  234. success: resolve,
  235. fail: reject
  236. });
  237. });
  238. if (!loginRes.code) {
  239. uni.showToast({ title: '授权失败', icon: 'none' });
  240. return;
  241. }
  242. // 3. 获取 openId
  243. const openRes = await FetchOpenId({
  244. libcode: config.LIB_CODE,
  245. code: loginRes.code
  246. });
  247. if (openRes.code !== 200 || !openRes.data) {
  248. return;
  249. }
  250. openId = openRes.data;
  251. uni.setStorageSync('wx_login_code', openId);
  252. }
  253. // 4. 有了 openId → 查绑定状态
  254. const res = await FetchFindAllReaderBindByOpenId({
  255. libcode: config.LIB_CODE,
  256. openId: openId
  257. });
  258. if (res.code === 200 && res.data.length > 0) {
  259. this.isBindLibraryCard = true;
  260. // 👉 默认证排第一位
  261. const defaultCard = res.data.find(item => item.bindDefault === true);
  262. const otherCards = res.data.filter(item => !item.bindDefault);
  263. // 合并:默认在前,其他在后
  264. this.readerCardList = defaultCard ? [defaultCard, ...otherCards] : res.data;
  265. uni.setStorageSync(STORAGE_KEYS.READER_CARD_LIST, this.readerCardList);
  266. uni.setStorageSync(STORAGE_KEYS.CURRENT_READER_CARD, defaultCard);
  267. } else {
  268. this.isBindLibraryCard = false;
  269. this.readerCardList = [];
  270. uni.setStorageSync(STORAGE_KEYS.READER_CARD_LIST, []);
  271. uni.setStorageSync(STORAGE_KEYS.CURRENT_READER_CARD, null);
  272. }
  273. } catch (err) {
  274. console.error('初始化失败:', err);
  275. const list = uni.getStorageSync(STORAGE_KEYS.READER_CARD_LIST) || [];
  276. // 同样默认排第一
  277. const defaultCard = list.find(item => item.bindDefault === true);
  278. const otherCards = list.filter(item => !item.bindDefault);
  279. this.readerCardList = defaultCard ? [defaultCard, ...otherCards] : list;
  280. this.isBindLibraryCard = list.length > 0;
  281. }
  282. },
  283. // 获取图书推荐 + 封面转 base64
  284. async getRecommendBooks() {
  285. try {
  286. const res = await FetchInitScreenBookRecommend({ libcode: config.LIB_CODE });
  287. let books = res.data || [];
  288. // 只处理并展示前3条,避免setData数据过大
  289. const limit = 3;
  290. const displayBooks = books.slice(0, limit);
  291. for (let i = 0; i < displayBooks.length; i++) {
  292. let item = displayBooks[i];
  293. if (item.imgPath) {
  294. const imageUrl = this.baseUrl + '/api/fileRelevant/getImg?imgType=2&imgId=' + item.imgPath;
  295. try {
  296. const base64 = await this.urlToBase64(imageUrl);
  297. item.base64Cover = base64;
  298. } catch (err) {
  299. item.base64Cover = '';
  300. }
  301. } else {
  302. item.base64Cover = '';
  303. }
  304. }
  305. // 只将展示所需的前3条数据放入响应式,减少setData传输量
  306. this.recommendedBooks = displayBooks;
  307. this.isLoading = false;
  308. } catch (err) {
  309. console.error('获取图书推荐失败:', err);
  310. this.isLoading = false;
  311. }
  312. },
  313. goToBookDetail(item) {
  314. // 把整个图书对象 转成字符串 带过去
  315. uni.navigateTo({
  316. url: "/subpkg/pages/book-detail/book-detail?bookData=" + encodeURIComponent(JSON.stringify(item)) + "&fromRecommend=true"
  317. })
  318. },
  319. // 查看更多 → 进入图书列表页
  320. getMoreBoook(){
  321. uni.navigateTo({
  322. url: "/subpkg/pages/book-list/book-list"
  323. })
  324. },
  325. // 去图书检索页
  326. onToSearch() {
  327. uni.switchTab({
  328. url: "/pages/search/search"
  329. });
  330. },
  331. // 去图书借阅车页
  332. onToLendCar() {
  333. this.checkBindAndNavigate("/pages/lendCar/lendCar", "请您绑定读者证", true);
  334. },
  335. // 点击未绑定借阅证区域 触发跳转
  336. toCheckLogin() {
  337. uni.navigateTo({
  338. url: "/pages/login/login"
  339. });
  340. },
  341. toRanking(){
  342. uni.navigateTo({
  343. url: "/subpkg/pages/ranking/ranking"
  344. })
  345. },
  346. toActivityList(){
  347. this.checkBindAndNavigate("/subpkg/pages/activity-list/activity-list", "请您绑定读者证");
  348. },
  349. toBorrowPage(index) {
  350. if (this.isBindLibraryCard) {
  351. uni.setStorageSync('switch_tab_index', index);
  352. uni.navigateTo({
  353. url: '/subpkg/pages/myLending/myLending'
  354. });
  355. } else {
  356. uni.showModal({
  357. title: '提示',
  358. content: '请您绑定读者证',
  359. confirmText: '去绑定',
  360. cancelText: '取消',
  361. success: (res) => {
  362. if (res.confirm) {
  363. uni.navigateTo({ url: "/pages/login/login" });
  364. }
  365. }
  366. });
  367. }
  368. },
  369. toBorrowCar() {
  370. uni.switchTab({
  371. url: '/pages/lendCar/lendCar'
  372. });
  373. },
  374. toFeedback() {
  375. this.checkBindAndNavigate("/subpkg/pages/feedback/feedback", "请您绑定读者证");
  376. },
  377. // 去借阅证列表页
  378. toLibraryCard() {
  379. // 已绑定 → 进列表
  380. if (this.isBindLibraryCard) {
  381. uni.navigateTo({ url: '/subpkg/pages/reader-card/reader-card' });
  382. }
  383. // 未绑定 → 进绑定页
  384. else {
  385. uni.navigateTo({ url: "/pages/login/login" });
  386. }
  387. },
  388. // 去个人中心页
  389. onToUser() {
  390. this.checkBindAndNavigate("/pages/user/user", "请您绑定读者证", true);
  391. },
  392. checkBindAndNavigate(url, message, isSwitchTab = false) {
  393. if (this.isBindLibraryCard) {
  394. if (isSwitchTab) {
  395. uni.switchTab({ url });
  396. } else {
  397. uni.navigateTo({ url });
  398. }
  399. } else {
  400. uni.showModal({
  401. title: '提示',
  402. content: message,
  403. confirmText: '去绑定',
  404. cancelText: '取消',
  405. success: (res) => {
  406. if (res.confirm) {
  407. uni.navigateTo({ url: "/pages/login/login" });
  408. }
  409. }
  410. });
  411. }
  412. },
  413. showQrcode(bindValue) {
  414. this.qrcodeText = bindValue;
  415. this.$refs.popup.open();
  416. },
  417. closePopup() {
  418. this.qrcodeText = '';
  419. this.$refs.popup.close();
  420. },
  421. urlToBase64(url) {
  422. return new Promise((resolve, reject) => {
  423. uni.request({
  424. url,
  425. method: 'GET',
  426. responseType: 'arraybuffer',
  427. success: (res) => {
  428. try {
  429. const buffer = new Uint8Array(res.data);
  430. let binary = '';
  431. for (let i = 0; i < buffer.length; i++) {
  432. binary += String.fromCharCode(buffer[i]);
  433. }
  434. const base64 = uni.arrayBufferToBase64(res.data);
  435. const dataUri = 'data:image/jpeg;base64,' + base64;
  436. resolve(dataUri);
  437. } catch (e) {
  438. reject(e);
  439. }
  440. },
  441. fail: reject
  442. });
  443. });
  444. },
  445. }
  446. }
  447. </script>
  448. <style lang="scss" scoped>
  449. .top-bar{
  450. .search-icon{
  451. position: absolute;
  452. right: 16px;
  453. top: 15px;
  454. z-index: 22;
  455. ::v-deep .uni-icons{
  456. color: #fff !important;
  457. }
  458. }
  459. }
  460. .status-cards {
  461. display: flex;
  462. background-color: #fff;
  463. margin: 10px;
  464. border-radius: 8px;
  465. padding: 20px 10px;
  466. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  467. .status-card {
  468. flex: 1;
  469. display: flex;
  470. flex-direction: column;
  471. align-items: center;
  472. }
  473. .status-icon {
  474. display: flex;
  475. justify-content: center;
  476. align-items: center;
  477. width: 40px;
  478. height: 40px;
  479. margin-bottom: 6px;
  480. border-radius: 50%;
  481. }
  482. .icon-color1{
  483. background-color: #e4f2ff;
  484. }
  485. .icon-color2{
  486. background-color: #ffeff0;
  487. }
  488. .icon-color3{
  489. background-color: #e4fff4;
  490. }
  491. .icon-color4{
  492. background-color: #fef8e2;
  493. }
  494. .status-label {
  495. font-size: 12px;
  496. color: #333;
  497. }
  498. }
  499. swiper.banner-swiper{
  500. width: 100%;
  501. height: 130px;
  502. }
  503. swiper.banner-swiper image{
  504. width: 100%;
  505. height: 130px;
  506. }
  507. swiper.menu-swiper{
  508. width:100%;
  509. margin-top: 10px;
  510. background-color: #fff;
  511. }
  512. .menu-grid {
  513. display: grid;
  514. grid-template-columns: repeat(4, 1fr);
  515. .menu-item {
  516. flex: 1;
  517. display: flex;
  518. flex-direction: column;
  519. align-items: center;
  520. padding: 10px 0;
  521. .menu-icon{
  522. display: flex;
  523. flex-direction: column;
  524. justify-content: center;
  525. height: 30px;
  526. ::v-deep .uni-icons{
  527. color: #01a4fe !important;
  528. }
  529. }
  530. .menu-label {
  531. font-size: 12px;
  532. color: #333;
  533. text-align: center;
  534. }
  535. }
  536. }
  537. .library-card-section {
  538. display: flex;
  539. flex-direction: column;
  540. justify-content: space-between;
  541. align-items: center;
  542. width: 100%;
  543. padding: 20px 0;
  544. .section-title {
  545. font-size: 22px;
  546. font-weight: bold;
  547. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  548. -webkit-background-clip: text;
  549. color: transparent;
  550. letter-spacing: 0.1em;
  551. margin-bottom: 5px;
  552. }
  553. .card-icon {
  554. width: 80px;
  555. height: 80px;
  556. }
  557. .card-tip {
  558. font-size: 12px;
  559. color: #999;
  560. margin: 5px 0;
  561. }
  562. .bind-btn {
  563. display: flex;
  564. flex-direction: row;
  565. align-items: center;
  566. justify-content: center;
  567. border: 1px solid #06a8ff ;
  568. width: 128px !important;
  569. height: 28px;
  570. border-radius: 28px;
  571. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  572. font-size: 14px;
  573. color: #fff;
  574. line-height: 28px;
  575. }
  576. }
  577. .recommendation-section {
  578. background-color: #fff;
  579. margin: 10px;
  580. border-radius: 8px;
  581. padding: 0 0 10px 0;
  582. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  583. .section-title{
  584. display: flex;
  585. flex-direction: row;
  586. justify-content: space-between;
  587. align-items: center;
  588. height: 40px;
  589. padding: 0 10px;
  590. .left-txt{
  591. color: #343434;
  592. font-size: 15px;
  593. font-weight: 700;
  594. }
  595. .more-link{
  596. display: flex;
  597. flex-direction: row;
  598. justify-content: flex-start;
  599. align-items: center;
  600. color: #999;
  601. font-size: 11px;
  602. }
  603. }
  604. }
  605. .library-card-has {
  606. width: 100%;
  607. padding: 20px 10px;
  608. box-sizing: border-box;
  609. .section-title {
  610. font-size: 22px;
  611. font-weight: bold;
  612. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  613. -webkit-background-clip: text;
  614. color: transparent;
  615. letter-spacing: 0.1em;
  616. margin-bottom: 10px;
  617. padding-left: 5px;
  618. }
  619. .card-list {
  620. width: 100%;
  621. }
  622. }
  623. .card-swiper {
  624. height: 106px;
  625. .card-item{
  626. display: flex;
  627. justify-content: space-between;
  628. align-items: center;
  629. padding: 10px;
  630. border: 2px solid #C6C6E2;
  631. border-radius: 8px;
  632. background: rgba(241,241,249,0.4);
  633. cursor: pointer;
  634. &.active{
  635. border-color: #01a4fe;
  636. background: rgba(1, 164, 254, 0.1);
  637. }
  638. .card-left-img{
  639. width: 80px;
  640. margin-right: 12px;
  641. display: block;
  642. }
  643. .card-right-info{
  644. flex: 1;
  645. display: flex;
  646. flex-direction: column;
  647. .info-title{
  648. font-size: 16px;
  649. color: #333;
  650. font-weight: bold;
  651. padding-bottom: 12px;
  652. }
  653. .info-num{
  654. font-size: 14px;
  655. color: #999;
  656. }
  657. }
  658. .default-tag {
  659. position: absolute;
  660. right: 12px;
  661. top: 12px;
  662. font-size: 11px;
  663. color: #01a4fe;
  664. border: 1px solid #01a4fe;
  665. border-radius: 4px;
  666. padding: 2px 6px;
  667. }
  668. }
  669. }
  670. .erweima-style{
  671. position: absolute;
  672. right: 12px;
  673. bottom: 22px;
  674. ::v-deep .icon-erweima{
  675. // font-weight: bold;
  676. color: #999 !important;
  677. }
  678. }
  679. </style>