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

874 lines
24 KiB

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