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

817 lines
24 KiB

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