index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. <template>
  2. <view class="mine-page">
  3. <!-- <u-navbar title="我的" bgColor="transparent" titleBold></u-navbar> -->
  4. <!-- 顶部用户信息 -->
  5. <view class="user-info">
  6. <view class="user-header" @tap="handleUpdateUserInfo">
  7. <view class="user-avatar">
  8. <image class="avatar" :src="userInfo.imgPath" mode="aspectFill" v-if="userInfo.imgPath"
  9. style="width: 100%; height: 100%; display: block"></image>
  10. <image class="avatar" src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/logo3.png"
  11. mode="heightFix" v-else style="width: 100%; height: 116rpx; display: block; border-radius: 10%">
  12. </image>
  13. </view>
  14. <view class="user-detail">
  15. <view class="nickname">{{ userInfo.nickName }}</view>
  16. <view class="user-tag" v-for="(tag, index) in userInfo.tags" :key="index">{{ tag }}</view>
  17. </view>
  18. </view>
  19. <!-- 用户数据 -->
  20. <view class="user-data">
  21. <view class="data-item" @click="navigateToTool('/pages-mine/pages/wallet')">
  22. <view class="amount">{{ userInfo.accountMoney || 0 }}</view>
  23. <view class="label">我的钱包</view>
  24. </view>
  25. <view class="data-item" @click="navigateToTool('/pages-car/pages/red-packet')">
  26. <view class="amount">{{ userInfo.unusedCouponNum || 0 }}</view>
  27. <view class="label">我的红包</view>
  28. <view class="badge" v-if="userInfo.couponNum">{{ userInfo.couponNum }}个可领</view>
  29. </view>
  30. <view class="data-item">
  31. <view class="amount">{{ userInfo.point || 0 }}</view>
  32. <view class="label">我的积分</view>
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 我的订单 -->
  37. <view class="order-section">
  38. <view class="section-header">
  39. <text>买书订单</text>
  40. <view class="view-all" @click="navigateToOrder('/pages-car/pages/my-order')">
  41. <text>查看全部</text>
  42. <u-icon name="arrow-right" size="24" color="#999"></u-icon>
  43. </view>
  44. </view>
  45. <view class="order-types" style="padding: 0 20rpx">
  46. <view class="type-item flex-d flex-a-c" v-for="(item, index) in myOrderTypes" :key="index"
  47. @click="navigateToOrder(item.path)">
  48. <image class="type-icon" :src="item.icon" mode="aspectFit"></image>
  49. <text>{{ item.name }}</text>
  50. <view class="badge" v-if="item.badge">{{ item.badge }}</view>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 卖书订单 -->
  55. <view class="order-section" style="margin-top: 30rpx;">
  56. <view class="section-header">
  57. <text>卖书订单</text>
  58. <view class="view-all" @click="navigateToOrder('/pages-mine/pages/order-page')">
  59. <text>查看全部</text>
  60. <u-icon name="arrow-right" size="24" color="#999"></u-icon>
  61. </view>
  62. </view>
  63. <view class="order-types" style="padding: 0 20rpx">
  64. <view class="type-item flex-d flex-a-c" v-for="(item, index) in orderTypes" :key="index"
  65. @click="navigateToOrder(item.path)">
  66. <image class="type-icon" :src="item.icon" mode="aspectFit"></image>
  67. <text>{{ item.name }}</text>
  68. <view class="badge" v-if="item.badge">{{ item.badge }}</view>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 实用工具 -->
  73. <view class="tools-section">
  74. <view class="section-title">实用工具</view>
  75. <view class="tools-grid">
  76. <view class="tool-item flex-d flex-a-c" v-for="(tool, index) in tools" :key="index"
  77. @click="navigateToTool(tool.path)">
  78. <!-- #ifdef MP-ALIPAY -->
  79. <button class="link-service flex-d flex-a-c" v-if="tool.path == 'link-service'"
  80. @click="navigateToCustomerService">
  81. <image class="tool-icon" :src="tool.icon" mode="aspectFit"></image>
  82. <text>联系客服</text>
  83. </button>
  84. <!-- #endif -->
  85. <!-- #ifndef MP-ALIPAY -->
  86. <button class="link-service flex-d flex-a-c" open-type="contact" v-if="tool.path == 'link-service'">
  87. <image class="tool-icon" :src="tool.icon" mode="aspectFit"></image>
  88. <text>联系客服</text>
  89. </button>
  90. <!-- #endif -->
  91. <block v-else>
  92. <image class="tool-icon" :src="tool.icon" mode="aspectFit"></image>
  93. <text>{{ tool.name }}</text>
  94. </block>
  95. </view>
  96. </view>
  97. </view>
  98. <!-- 悬浮提现确认按钮 -->
  99. <withdrawal-confirm :visible="withdrawalOrder && withdrawalOrder.length > 0" :initialPosition="buttonPosition"
  100. @click="navigateToWithdrawal" @position-change="onPositionChange" />
  101. <!-- 活动悬浮按钮 -->
  102. <floating-activity :img="activityInfo.img" :visible="activityInfo.frequency && activityInfo.frequency == 3"
  103. :initialPosition="activityPosition" @click="contactCustomerService"
  104. @position-change="onActivityButtonPositionChange" />
  105. <!-- 提现进度弹窗 -->
  106. <withdrawal-progress :orderInfo="currentWithdrawalOrder" @confirm="confirmWithdrawal" ref="withdrawalRef" />
  107. <policy-consent-host />
  108. </view>
  109. </template>
  110. <script>
  111. import WithdrawalProgress from './components/withdrawal-progress.vue';
  112. import WithdrawalConfirm from '../../components/withdrawal-confirm.vue';
  113. import floatingActivity from '../../components/floating-activity.vue';
  114. import PolicyConsentHost from '@/components/policy-consent-host.vue';
  115. import { buildAgreementPageUrl } from '@/utils/policy-config.js';
  116. export default {
  117. components: {
  118. WithdrawalProgress,
  119. WithdrawalConfirm,
  120. floatingActivity,
  121. PolicyConsentHost,
  122. },
  123. data() {
  124. return {
  125. userInfo: {
  126. userId: 0,
  127. openid: '',
  128. imgPath: '',
  129. nickName: '这里是昵称.',
  130. mobile: '',
  131. tags: [],
  132. accountMoney: 0,
  133. couponNum: 0,
  134. unusedCouponNum: 0,
  135. point: 0,
  136. firstAuditNum: 0,
  137. pickUpNum: 0,
  138. auditNum: 0,
  139. payNum: 0,
  140. refundNum: 0,
  141. shopWaitPayNum: 0,
  142. shopWaitSendNum: 0,
  143. shopWaitReceiptNum: 0,
  144. shopRefundNum: 0,
  145. shopFinishNum: 0
  146. },
  147. orderTypes: [
  148. {
  149. name: '待初审',
  150. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/1.png',
  151. badge: 0,
  152. key: 'firstAuditNum',
  153. path: '/pages-mine/pages/order-page?status=2'
  154. },
  155. {
  156. name: '待取件',
  157. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/2.png',
  158. badge: 0,
  159. key: 'pickUpNum',
  160. path: '/pages-mine/pages/order-page?status=3'
  161. },
  162. {
  163. name: '待审核',
  164. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/3.png',
  165. badge: 0,
  166. key: 'auditNum',
  167. path: '/pages-mine/pages/order-page?status=8'
  168. },
  169. {
  170. name: '待到款',
  171. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/4.png',
  172. badge: 0,
  173. key: 'payNum',
  174. path: '/pages-mine/pages/order-page?status=10'
  175. },
  176. {
  177. name: '申请退回',
  178. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/5.png',
  179. badge: 0,
  180. key: 'refundNum',
  181. path: '/pages-mine/pages/apply-return'
  182. }
  183. ],
  184. myOrderTypes: [
  185. {
  186. name: '待付款',
  187. icon: '/static/my-order/icon-1.png',
  188. badge: 0,
  189. key: 'shopWaitPayNum',
  190. path: '/pages-car/pages/my-order?status=1'
  191. },
  192. {
  193. name: '待发货',
  194. icon: '/static/my-order/icon-2.png',
  195. badge: 0,
  196. key: 'shopWaitSendNum',
  197. path: '/pages-car/pages/my-order?status=2'
  198. },
  199. {
  200. name: '待收货',
  201. icon: '/static/my-order/icon-3.png',
  202. badge: 0,
  203. key: 'shopWaitReceiptNum',
  204. path: '/pages-car/pages/my-order?status=3'
  205. },
  206. {
  207. name: '退款/售后',
  208. icon: '/static/my-order/icon-4.png',
  209. badge: 0,
  210. key: 'shopRefundNum',
  211. path: '/pages-car/pages/my-order?status=5'
  212. },
  213. {
  214. name: '已完成',
  215. icon: '/static/my-order/icon-5.png',
  216. badge: 0,
  217. key: 'shopFinishNum',
  218. path: '/pages-car/pages/my-order?status=4'
  219. }
  220. ],
  221. tools: [
  222. {
  223. name: '消息通知',
  224. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t1.png',
  225. path: '/pages-mine/pages/notice'
  226. },
  227. {
  228. name: '我的收藏',
  229. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t2.png',
  230. path: '/pages-car/pages/my-fav'
  231. },
  232. {
  233. name: '我的足迹',
  234. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t3.png',
  235. path: '/pages-car/pages/my-footprint'
  236. },
  237. {
  238. name: '我的地址',
  239. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t4.png',
  240. path: '/pages-mine/pages/address/list'
  241. },
  242. {
  243. name: '我的红包',
  244. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t5.png',
  245. path: '/pages-car/pages/red-packet'
  246. },
  247. {
  248. name: '联系客服',
  249. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t6.png',
  250. path: 'link-service'
  251. },
  252. {
  253. name: '意见反馈',
  254. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t7.png',
  255. path: '/pages-mine/pages/feedback'
  256. },
  257. {
  258. name: '到货提醒',
  259. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t8.png',
  260. path: '/pages-car/pages/arrival-reminder'
  261. },
  262. {
  263. name: '合伙人计划',
  264. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t9.png',
  265. path: '/pages-mine/pages/partner/partner-rule'
  266. },
  267. {
  268. name: '买卖答疑',
  269. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t10.png',
  270. path: '/pages-mine/pages/rules-for-sellbooks'
  271. },
  272. {
  273. name: '关于书嗨',
  274. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t11.png',
  275. path: '/pages-home/pages/about-us'
  276. },
  277. {
  278. name: '用户协议',
  279. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t11.png',
  280. path: buildAgreementPageUrl('userAgreement')
  281. },
  282. {
  283. name: '隐私政策',
  284. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t10.png',
  285. path: buildAgreementPageUrl('privacyPolicy')
  286. },
  287. {
  288. name: '我的余额',
  289. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t12.png',
  290. path: '/pages-mine/pages/wallet'
  291. },
  292. {
  293. name: '用户设置',
  294. icon: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/t13.png',
  295. path: '/pages-mine/pages/setting'
  296. }
  297. ],
  298. // 悬浮按钮位置
  299. buttonPosition: {
  300. left: 'auto',
  301. right: 0,
  302. bottom: '10%'
  303. },
  304. // 客服按钮位置
  305. activityPosition: {
  306. left: 'auto',
  307. right: 0,
  308. bottom: '25%'
  309. },
  310. withdrawalOrder: [],
  311. // 提现进度弹窗相关
  312. showWithdrawalModal: false,
  313. currentWithdrawalOrder: {},
  314. //活动弹窗信息
  315. activityInfo: {}
  316. };
  317. },
  318. methods: {
  319. //获取是否显示活动弹窗
  320. getActivityStatus() {
  321. uni.$u.http.post('/token/home/activity/dialog').then((res) => {
  322. if (res.code == 200) {
  323. this.activityInfo = res.data;
  324. }
  325. });
  326. },
  327. //获取是否存在待确认提现的订单
  328. getWithdrawalOrder() {
  329. uni.$u.http.get('/token/user/withdrawWindows').then((res) => {
  330. console.log(res);
  331. if (res.code == 200) {
  332. this.withdrawalOrder = res.data;
  333. }
  334. });
  335. },
  336. //用户信息
  337. handleUpdateUserInfo() {
  338. uni.navigateTo({
  339. url: '/pages-mine/pages/setting'
  340. });
  341. },
  342. //查看全部订单
  343. viewAllOrders() {
  344. uni.navigateTo({
  345. url: '/pages-car/pages/my-order?status=-1'
  346. });
  347. },
  348. //跳转订单
  349. navigateToOrder(path) {
  350. uni.navigateTo({
  351. url: path
  352. });
  353. },
  354. //跳转工具
  355. navigateToTool(path) {
  356. if (path === 'link-service') return
  357. if (!path)
  358. return uni.showToast({
  359. title: '开发中...',
  360. icon: 'none'
  361. });
  362. if (path == '/pages-mine/pages/partner/partner-rule') {
  363. this.getPartnerStatus();
  364. } else {
  365. uni.navigateTo({
  366. url: path
  367. });
  368. }
  369. },
  370. // 导航到提现确认页面
  371. navigateToWithdrawal() {
  372. if (this.withdrawalOrder && this.withdrawalOrder.length > 0) {
  373. // 显示提现进度弹窗,使用第一个提现订单
  374. this.currentWithdrawalOrder = this.withdrawalOrder[0];
  375. this.$refs.withdrawalRef.openModal();
  376. } else {
  377. // 如果没有待确认的提现订单,直接跳转到钱包页面
  378. uni.navigateTo({
  379. url: '/pages-mine/pages/wallet'
  380. });
  381. }
  382. },
  383. //获取用户信息
  384. getUserInfo() {
  385. uni.$u.http.get('/token/user/detail').then((res) => {
  386. console.log(res);
  387. if (res.code == 200) {
  388. this.userInfo = res.data;
  389. uni.setStorageSync('userInfo', this.userInfo);
  390. this.orderTypes.forEach((item) => {
  391. item.badge = this.userInfo[item.key];
  392. });
  393. this.myOrderTypes.forEach((item) => {
  394. item.badge = this.userInfo[item.key];
  395. });
  396. }
  397. });
  398. },
  399. //获取合伙人状态
  400. getPartnerStatus() {
  401. let item = this.tools.find((item) => item.name == '合伙人计划');
  402. uni.$u.get('/token/getUserPartnerInfo').then((res) => {
  403. if (res.code == 200) {
  404. let { status } = res.data;
  405. if (status == -1 || status == 4) {
  406. item.path = '/pages-mine/pages/partner/partner-rule';
  407. } else if (status == 1) {
  408. item.path = '/pages-mine/pages/partner/partner-home';
  409. } else {
  410. item.path = '/pages-mine/pages/partner/partner-status';
  411. }
  412. } else {
  413. item.path = '/pages-mine/pages/partner/partner-status';
  414. }
  415. uni.navigateTo({
  416. url: item.path
  417. });
  418. });
  419. },
  420. // 更新悬浮按钮位置
  421. onPositionChange(position) {
  422. this.buttonPosition = position;
  423. },
  424. // 更新活动按钮位置
  425. onActivityButtonPositionChange(position) {
  426. this.activityPosition = position;
  427. },
  428. // 联系客服
  429. contactCustomerService() {
  430. uni.navigateTo({
  431. url: this.activityInfo.jumpPage
  432. });
  433. },
  434. // 关闭提现进度弹窗
  435. closeWithdrawalModal() {
  436. this.$refs.withdrawalRef.handleClose();
  437. },
  438. confirmWithdrawal(item) {
  439. uni.$u.http
  440. .post('/token/user/withdrawConfirm', {
  441. orderNo: item.orderNo
  442. })
  443. .then((res) => {
  444. if (res.code === 200) {
  445. this.handleConfirmReceipt(res.data);
  446. }
  447. })
  448. .catch((err) => {
  449. uni.showToast({
  450. title: err.message || '确认失败',
  451. icon: 'none'
  452. });
  453. });
  454. },
  455. //执行微信确认收款操作
  456. handleConfirmReceipt(data) {
  457. if (wx.canIUse('requestMerchantTransfer')) {
  458. wx.requestMerchantTransfer({
  459. mchId: data.mchId,
  460. appId: data.appId,
  461. package: data.packageStr,
  462. success: (res) => {
  463. // res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
  464. uni.showToast({
  465. title: '确认收款成功',
  466. icon: 'none'
  467. });
  468. this.closeWithdrawalModal();
  469. // 刷新列表
  470. this.getWithdrawalOrder();
  471. },
  472. fail: (res) => {
  473. console.log('fail:', res);
  474. }
  475. });
  476. } else {
  477. wx.showModal({
  478. content: '你的微信版本过低,请更新至最新版本。',
  479. showCancel: false
  480. });
  481. }
  482. },
  483. navigateToCustomerService() {
  484. uni.navigateTo({
  485. url: '/pages-mine/pages/customer-service'
  486. });
  487. }
  488. },
  489. onReady() {
  490. // 获取屏幕宽度和高度
  491. uni.getSystemInfo({
  492. success: (res) => {
  493. this.screenWidth = res.windowWidth;
  494. this.screenHeight = res.windowHeight;
  495. }
  496. });
  497. this.getActivityStatus();
  498. },
  499. onShow() {
  500. this.$updateCartBadge();
  501. let token = uni.getStorageSync('token');
  502. if (token) {
  503. this.getUserInfo();
  504. this.getWithdrawalOrder();
  505. }
  506. }
  507. };
  508. </script>
  509. <style lang="scss" scoped>
  510. .mine-page {
  511. min-height: 100vh;
  512. background-color: #f5f5f5;
  513. position: relative;
  514. .link-service {
  515. background: transparent;
  516. border: none;
  517. padding: 0;
  518. margin: 0;
  519. width: 100%;
  520. height: 100%;
  521. line-height: 36rpx;
  522. }
  523. .user-info {
  524. background: url('/static/img/bg.png') no-repeat center center;
  525. background-size: 100% 100%;
  526. position: absolute;
  527. top: 0;
  528. left: 0;
  529. padding: 20rpx 50rpx 120rpx;
  530. color: #fff;
  531. position: relative;
  532. padding-top: 160rpx;
  533. &::after {
  534. width: 140%;
  535. position: absolute;
  536. left: -20%;
  537. top: 0;
  538. z-index: -1;
  539. content: '';
  540. border-radius: 0 0 50% 50%;
  541. background: #fd6954;
  542. }
  543. .user-header {
  544. display: flex;
  545. align-items: center;
  546. margin-bottom: 40rpx;
  547. .user-avatar {
  548. border-radius: 50%;
  549. margin-right: 20rpx;
  550. border: 4rpx solid #fff;
  551. width: 128rpx;
  552. height: 128rpx;
  553. overflow: hidden;
  554. flex-shrink: 0;
  555. background: #fff;
  556. .avatar {
  557. width: 100%;
  558. height: 100%;
  559. border-radius: 50%;
  560. object-fit: cover;
  561. }
  562. }
  563. .user-detail {
  564. .nickname {
  565. font-size: 32rpx;
  566. font-weight: 500;
  567. margin-bottom: 8rpx;
  568. }
  569. .user-tag {
  570. display: inline-block;
  571. font-size: 22rpx;
  572. padding: 4rpx 12rpx;
  573. background: linear-gradient(-90deg, #272321, #4b4542);
  574. border-radius: 4rpx;
  575. margin-top: 8rpx;
  576. margin-right: 10rpx;
  577. }
  578. }
  579. }
  580. .user-data {
  581. display: flex;
  582. justify-content: space-between;
  583. position: relative;
  584. z-index: 1;
  585. padding: 0 40rpx;
  586. .data-item {
  587. position: relative;
  588. text-align: center;
  589. .amount {
  590. font-size: 38rpx;
  591. font-weight: 500;
  592. margin-bottom: 8rpx;
  593. }
  594. .label {
  595. font-size: 24rpx;
  596. font-weight: 400;
  597. opacity: 0.9;
  598. }
  599. .badge {
  600. position: absolute;
  601. top: -15rpx;
  602. right: -120%;
  603. padding: 0 10rpx;
  604. font-size: 20rpx;
  605. line-height: 30rpx;
  606. height: 30rpx;
  607. background: #ff8400;
  608. border-radius: 15rpx 15rpx 15rpx 0rpx;
  609. }
  610. }
  611. }
  612. }
  613. .order-section {
  614. margin: -90rpx 30rpx 20rpx;
  615. background: #fff;
  616. border-radius: 12rpx;
  617. padding: 30rpx;
  618. position: relative;
  619. z-index: 2;
  620. .section-header {
  621. display: flex;
  622. justify-content: space-between;
  623. align-items: center;
  624. margin-bottom: 30rpx;
  625. .view-all {
  626. display: flex;
  627. align-items: center;
  628. color: #999;
  629. font-size: 26rpx;
  630. }
  631. }
  632. .order-types {
  633. display: flex;
  634. justify-content: space-between;
  635. .type-item {
  636. text-align: center;
  637. position: relative;
  638. .badge {
  639. position: absolute;
  640. top: -15rpx;
  641. right: -6px;
  642. padding: 0 10rpx;
  643. font-size: 20rpx;
  644. line-height: 30rpx;
  645. height: 30rpx;
  646. background: #f56c6c;
  647. color: #fff;
  648. border-radius: 15rpx 15rpx 15rpx 0rpx;
  649. }
  650. .type-icon {
  651. width: 60rpx;
  652. height: 60rpx;
  653. margin-bottom: 12rpx;
  654. }
  655. text {
  656. font-size: 26rpx;
  657. color: #333;
  658. }
  659. }
  660. }
  661. }
  662. .tools-section {
  663. margin: 30rpx;
  664. background: #fff;
  665. border-radius: 12rpx;
  666. padding: 30rpx;
  667. position: relative;
  668. z-index: 2;
  669. .section-title {
  670. font-size: 30rpx;
  671. font-weight: 500;
  672. margin-bottom: 30rpx;
  673. }
  674. .tools-grid {
  675. display: grid;
  676. grid-template-columns: repeat(4, 1fr);
  677. gap: 30rpx;
  678. .tool-item {
  679. text-align: center;
  680. .tool-icon {
  681. width: 60rpx;
  682. height: 60rpx;
  683. margin-bottom: 12rpx;
  684. }
  685. text {
  686. font-size: 24rpx;
  687. color: #333;
  688. }
  689. }
  690. }
  691. }
  692. }
  693. </style>