index.vue 19 KB

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