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

815 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
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
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-duzheliuyan" 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-a-28-banzhengjian" 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. token: "",
  217. userInfo: {},
  218. isBindLibraryCard: false,
  219. readerCardList: [], // 多个借阅证
  220. baseUrl: config.baseUrl,
  221. qrcodeText: '', // 二维码内容
  222. popupFixedStyle: 'position:fixed;top:0;left:0;right:0;bottom:0;',
  223. wecharQRCode: null
  224. };
  225. },
  226. onLoad() {
  227. this.getRecommendBooks();
  228. this.getScreenSetting()
  229. },
  230. onShow() {
  231. this.initUserAndCheckBind();
  232. },
  233. methods:{
  234. async getScreenSetting() {
  235. const res = await FetchInitScreenSetting({ libcode: config.LIB_CODE });
  236. if (res.data.wechar_qr_code && res.data.wechar_qr_code.context) {
  237. const imageUrl = this.baseUrl + '/api/fileRelevant/getImg?imgType=1&imgId=' + res.data.wechar_qr_code.context;
  238. try {
  239. const base64 = await this.urlToBase64(imageUrl);
  240. this.wecharQRCode = base64;
  241. } catch (err) {
  242. this.wecharQRCode = null;
  243. }
  244. } else {
  245. this.wecharQRCode = null;
  246. }
  247. },
  248. // 显示顶部微信二维码弹窗
  249. showTopImgPopup() {
  250. if (!this.wecharQRCode) {
  251. uni.showToast({ title: '暂无图片', icon: 'none' })
  252. return
  253. }
  254. this.$refs.erweimapopup.open()
  255. },
  256. // 格式化读者证号
  257. formatCardNo(cardNo) {
  258. if (!cardNo) return '';
  259. const str = String(cardNo);
  260. const len = str.length;
  261. if (len > 8) {
  262. // 前2位 + 中间全部* + 后2位
  263. const front = str.substring(0, 2);
  264. const end = str.substring(len - 2);
  265. const star = '*'.repeat(len - 4); // 中间全部隐藏
  266. return front + star + end;
  267. } else {
  268. // 小于等于8:*** + 后2位
  269. return '***' + str.substring(len - 2);
  270. }
  271. },
  272. onImgError(e) {
  273. e.target.src = "/static/images/default-book.png";
  274. },
  275. // 初始化:登录 → 获取openid → 查是否绑定
  276. async initUserAndCheckBind() {
  277. try {
  278. // 1. 先看缓存有没有 openId
  279. let openId = uni.getStorageSync('wx_login_code');
  280. // 2. 没有 → 走微信登录流程
  281. if (!openId) {
  282. const loginRes = await new Promise((resolve, reject) => {
  283. uni.login({
  284. success: resolve,
  285. fail: reject
  286. });
  287. });
  288. if (!loginRes.code) {
  289. uni.showToast({ title: '授权失败', icon: 'none' });
  290. return;
  291. }
  292. // 3. 获取 openId
  293. const openRes = await FetchOpenId({
  294. libcode: config.LIB_CODE,
  295. code: loginRes.code
  296. });
  297. if (openRes.code !== 200 || !openRes.data) {
  298. return;
  299. }
  300. openId = openRes.data;
  301. uni.setStorageSync('wx_login_code', openId);
  302. }
  303. // 4. 有了 openId → 查绑定状态
  304. const res = await FetchFindAllReaderBindByOpenId({
  305. libcode: config.LIB_CODE,
  306. openId: openId
  307. });
  308. if (res.code === 200 && res.data.length > 0) {
  309. this.isBindLibraryCard = true;
  310. // 👉 默认证排第一位
  311. const defaultCard = res.data.find(item => item.bindDefault === true);
  312. const otherCards = res.data.filter(item => !item.bindDefault);
  313. // 合并:默认在前,其他在后
  314. this.readerCardList = defaultCard ? [defaultCard, ...otherCards] : res.data;
  315. uni.setStorageSync(STORAGE_KEYS.READER_CARD_LIST, this.readerCardList);
  316. uni.setStorageSync(STORAGE_KEYS.CURRENT_READER_CARD, defaultCard);
  317. } else {
  318. this.isBindLibraryCard = false;
  319. this.readerCardList = [];
  320. uni.setStorageSync(STORAGE_KEYS.READER_CARD_LIST, []);
  321. uni.setStorageSync(STORAGE_KEYS.CURRENT_READER_CARD, null);
  322. }
  323. } catch (err) {
  324. console.error('初始化失败:', err);
  325. const list = uni.getStorageSync(STORAGE_KEYS.READER_CARD_LIST) || [];
  326. // 同样默认排第一
  327. const defaultCard = list.find(item => item.bindDefault === true);
  328. const otherCards = list.filter(item => !item.bindDefault);
  329. this.readerCardList = defaultCard ? [defaultCard, ...otherCards] : list;
  330. this.isBindLibraryCard = list.length > 0;
  331. }
  332. },
  333. // 获取图书推荐 + 封面转 base64
  334. async getRecommendBooks() {
  335. try {
  336. const res = await FetchInitScreenBookRecommend({ libcode: config.LIB_CODE });
  337. let books = res.data || [];
  338. // 只处理并展示前3条,避免setData数据过大
  339. const limit = 3;
  340. const displayBooks = books.slice(0, limit);
  341. for (let i = 0; i < displayBooks.length; i++) {
  342. let item = displayBooks[i];
  343. if (item.imgPath) {
  344. const imageUrl = this.baseUrl + '/api/fileRelevant/getImg?imgType=2&imgId=' + item.imgPath;
  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. this.checkBindAndNavigate("/subpkg/pages/feedback/feedback", "请您绑定读者证");
  426. },
  427. // 去借阅证列表页
  428. toLibraryCard() {
  429. // 已绑定 → 进列表
  430. if (this.isBindLibraryCard) {
  431. uni.navigateTo({ url: '/subpkg/pages/reader-card/reader-card' });
  432. }
  433. // 未绑定 → 进绑定页
  434. else {
  435. uni.navigateTo({ url: "/pages/login/login" });
  436. }
  437. },
  438. // 去个人中心页
  439. onToUser() {
  440. this.checkBindAndNavigate("/pages/user/user", "请您绑定读者证", true);
  441. },
  442. checkBindAndNavigate(url, message, isSwitchTab = false) {
  443. if (this.isBindLibraryCard) {
  444. if (isSwitchTab) {
  445. uni.switchTab({ url });
  446. } else {
  447. uni.navigateTo({ url });
  448. }
  449. } else {
  450. uni.showModal({
  451. title: '提示',
  452. content: message,
  453. confirmText: '去绑定',
  454. cancelText: '取消',
  455. success: (res) => {
  456. if (res.confirm) {
  457. uni.navigateTo({ url: "/pages/login/login" });
  458. }
  459. }
  460. });
  461. }
  462. },
  463. showQrcode(bindValue) {
  464. this.qrcodeText = bindValue;
  465. this.$refs.popup.open();
  466. },
  467. closeAllPopup() {
  468. this.qrcodeText = '';
  469. this.$refs.popup.close();
  470. },
  471. closeErweiPopup() {
  472. this.$refs.erweimapopup.close()
  473. },
  474. /**
  475. * 二维码长按事件
  476. */
  477. onQRCodeLongPress() {
  478. // uni.showToast({
  479. // title: '长按识别二维码',
  480. // icon: 'none',
  481. // duration: 1500
  482. // });
  483. },
  484. urlToBase64(url) {
  485. return new Promise((resolve, reject) => {
  486. uni.request({
  487. url,
  488. method: 'GET',
  489. responseType: 'arraybuffer',
  490. success: (res) => {
  491. try {
  492. const buffer = new Uint8Array(res.data);
  493. let binary = '';
  494. for (let i = 0; i < buffer.length; i++) {
  495. binary += String.fromCharCode(buffer[i]);
  496. }
  497. const base64 = uni.arrayBufferToBase64(res.data);
  498. const dataUri = 'data:image/jpeg;base64,' + base64;
  499. resolve(dataUri);
  500. } catch (e) {
  501. reject(e);
  502. }
  503. },
  504. fail: reject
  505. });
  506. });
  507. },
  508. goRegister() {
  509. uni.navigateTo({
  510. url: '/pages/register/register'
  511. });
  512. }
  513. }
  514. }
  515. </script>
  516. <style lang="scss" scoped>
  517. .top-bar{
  518. .erweima-top{
  519. position: absolute;
  520. left: 16px;
  521. top: 15px;
  522. z-index: 999;
  523. }
  524. .search-icon{
  525. position: absolute;
  526. right: 16px;
  527. top: 15px;
  528. z-index: 22;
  529. ::v-deep .uni-icons{
  530. color: #fff !important;
  531. }
  532. }
  533. }
  534. .status-cards {
  535. display: flex;
  536. background-color: #fff;
  537. margin: 10px;
  538. border-radius: 8px;
  539. padding: 20px 10px;
  540. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  541. .status-card {
  542. flex: 1;
  543. display: flex;
  544. flex-direction: column;
  545. align-items: center;
  546. }
  547. .status-icon {
  548. display: flex;
  549. justify-content: center;
  550. align-items: center;
  551. width: 40px;
  552. height: 40px;
  553. margin-bottom: 6px;
  554. border-radius: 50%;
  555. }
  556. .icon-color1{
  557. background-color: #e4f2ff;
  558. }
  559. .icon-color2{
  560. background-color: #ffeff0;
  561. }
  562. .icon-color3{
  563. background-color: #e4fff4;
  564. }
  565. .icon-color4{
  566. background-color: #fef8e2;
  567. }
  568. .status-label {
  569. font-size: 12px;
  570. color: #333;
  571. }
  572. }
  573. swiper.banner-swiper{
  574. width: 100%;
  575. height: 130px;
  576. }
  577. swiper.banner-swiper image{
  578. width: 100%;
  579. height: 130px;
  580. }
  581. swiper.menu-swiper{
  582. width:100%;
  583. margin-top: 10px;
  584. background-color: #fff;
  585. }
  586. .menu-grid {
  587. display: grid;
  588. grid-template-columns: repeat(4, 1fr);
  589. .menu-item {
  590. flex: 1;
  591. display: flex;
  592. flex-direction: column;
  593. align-items: center;
  594. padding: 10px 0;
  595. .menu-icon{
  596. display: flex;
  597. flex-direction: column;
  598. justify-content: center;
  599. height: 30px;
  600. ::v-deep .uni-icons{
  601. color: #01a4fe !important;
  602. }
  603. }
  604. .menu-label {
  605. font-size: 12px;
  606. color: #333;
  607. text-align: center;
  608. }
  609. }
  610. }
  611. .library-card-section {
  612. display: flex;
  613. flex-direction: column;
  614. justify-content: space-between;
  615. align-items: center;
  616. width: 100%;
  617. padding: 20px 0;
  618. .section-title {
  619. font-size: 22px;
  620. font-weight: bold;
  621. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  622. -webkit-background-clip: text;
  623. color: transparent;
  624. letter-spacing: 0.1em;
  625. margin-bottom: 5px;
  626. }
  627. .card-icon {
  628. width: 80px;
  629. height: 80px;
  630. }
  631. .card-tip {
  632. font-size: 12px;
  633. color: #999;
  634. margin: 5px 0;
  635. }
  636. .bind-btn {
  637. display: flex;
  638. flex-direction: row;
  639. align-items: center;
  640. justify-content: center;
  641. border: 1px solid #06a8ff ;
  642. width: 128px !important;
  643. height: 28px;
  644. border-radius: 28px;
  645. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  646. font-size: 14px;
  647. color: #fff;
  648. line-height: 28px;
  649. }
  650. }
  651. .recommendation-section {
  652. background-color: #fff;
  653. margin: 10px;
  654. border-radius: 8px;
  655. padding: 0 0 10px 0;
  656. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  657. .section-title{
  658. display: flex;
  659. flex-direction: row;
  660. justify-content: space-between;
  661. align-items: center;
  662. height: 40px;
  663. padding: 0 10px;
  664. .left-txt{
  665. color: #343434;
  666. font-size: 15px;
  667. font-weight: 700;
  668. }
  669. .more-link{
  670. display: flex;
  671. flex-direction: row;
  672. justify-content: flex-start;
  673. align-items: center;
  674. color: #999;
  675. font-size: 11px;
  676. }
  677. }
  678. }
  679. .library-card-has {
  680. width: 100%;
  681. padding: 20px 10px;
  682. box-sizing: border-box;
  683. .section-title {
  684. font-size: 22px;
  685. font-weight: bold;
  686. background: linear-gradient(140deg, #01a4ff, #2ec8fe);
  687. -webkit-background-clip: text;
  688. color: transparent;
  689. letter-spacing: 0.1em;
  690. margin-bottom: 10px;
  691. padding-left: 5px;
  692. }
  693. .card-list {
  694. width: 100%;
  695. }
  696. }
  697. .card-swiper {
  698. height: 106px;
  699. .card-item{
  700. display: flex;
  701. justify-content: space-between;
  702. align-items: center;
  703. padding: 10px;
  704. border: 2px solid #C6C6E2;
  705. border-radius: 8px;
  706. background: rgba(241,241,249,0.4);
  707. cursor: pointer;
  708. &.active{
  709. border-color: #01a4fe;
  710. background: rgba(1, 164, 254, 0.1);
  711. }
  712. .card-left-img{
  713. width: 80px;
  714. margin-right: 12px;
  715. display: block;
  716. }
  717. .card-right-info{
  718. flex: 1;
  719. display: flex;
  720. flex-direction: column;
  721. .info-title{
  722. font-size: 16px;
  723. color: #333;
  724. font-weight: bold;
  725. padding-bottom: 12px;
  726. }
  727. .info-num{
  728. font-size: 14px;
  729. color: #999;
  730. }
  731. }
  732. .default-tag {
  733. position: absolute;
  734. right: 12px;
  735. top: 12px;
  736. font-size: 11px;
  737. color: #01a4fe;
  738. border: 1px solid #01a4fe;
  739. border-radius: 4px;
  740. padding: 2px 6px;
  741. }
  742. }
  743. }
  744. .erweima-style{
  745. position: absolute;
  746. right: 12px;
  747. bottom: 22px;
  748. ::v-deep .icon-erweima{
  749. // font-weight: bold;
  750. color: #999 !important;
  751. }
  752. }
  753. // .qrcode-popup {
  754. // padding: 20px;
  755. // border-radius: 12px;
  756. // background: #fff;
  757. // .qrcode-tip {
  758. // text-align: center;
  759. // font-size: 12px;
  760. // color: #999;
  761. // margin-top: 10px;
  762. // }
  763. // }
  764. </style>