index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. <template>
  2. <view class="ac-container" :style="{ '--font-scale': fontScale }">
  3. <!-- 登录浮层(全局组件,页面内弹出底部登录) -->
  4. <login-sheet ref="loginSheet" @success="onSheetLoginSuccess" />
  5. <!-- 自定义导航栏 -->
  6. <view class="ac-nav">
  7. <view class="ac-nav-left" @click="onBack">
  8. <text class="ac-nav-back">&#x2190;</text>
  9. </view>
  10. <text class="ac-nav-title">知识分享</text>
  11. <view class="ac-nav-right">
  12. <text class="ac-nav-search-icon" @click="focusSearch">&#x1F50D;</text>
  13. <text class="ac-nav-add" @click="goEdit">+</text>
  14. </view>
  15. </view>
  16. <!-- 搜索栏(聚焦时展开) -->
  17. <view v-if="searchFocused || searchKeyword" class="ac-search-bar">
  18. <input
  19. class="ac-search-input"
  20. v-model="searchKeyword"
  21. placeholder="搜索文章..."
  22. confirm-type="search"
  23. @confirm="onSearch"
  24. @blur="onSearchBlur"
  25. />
  26. <text class="ac-search-cancel" @click="searchKeyword = ''; searchFocused = false; onSearch()">取消</text>
  27. </view>
  28. <!-- Tab 导航(药丸式) -->
  29. <view class="ac-tabs">
  30. <scroll-view scroll-x show-scrollbar="false" class="ac-tab-scroll">
  31. <view
  32. v-for="tab in tabList"
  33. :key="tab.code"
  34. :class="['ac-tab', currentTab === tab.code ? 'active' : '']"
  35. :style="currentTab === tab.code ? 'background:' + tab.color + ';color:' + whiteColor + ';border-color:' + tab.color : ''"
  36. @click="onTabChange(tab.code)"
  37. >
  38. {{ tab.name }}
  39. </view>
  40. </scroll-view>
  41. </view>
  42. <!-- 书册式推荐阅读 -->
  43. <ArticleBookshelf
  44. v-if="recommendedArticles.length > 0 || !recommendLoading"
  45. :articles="recommendedArticles"
  46. :loading="recommendLoading"
  47. :isLoggedIn="isLoggedIn"
  48. @articleClick="goDetail"
  49. @moreArticles="goExplore"
  50. />
  51. <!-- 文章列表区域 -->
  52. <scroll-view scroll-y class="ac-scroll" @scrolltolower="onLoadMore">
  53. <!-- 骨架屏 -->
  54. <view v-if="loading && articles.length === 0" class="ac-skeleton-wrap">
  55. <view v-for="n in 3" :key="n" class="sk-card">
  56. <view class="sk-cover"></view>
  57. <view class="sk-body">
  58. <view class="sk-row sk-tag"></view>
  59. <view class="sk-row sk-title"></view>
  60. <view class="sk-row sk-desc"></view>
  61. <view class="sk-row sk-footer"></view>
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 空状态 -->
  66. <view v-else-if="articles.length === 0" class="ac-empty">
  67. <image class="ac-empty-img" src="/static/empty-article.png" mode="aspectFit" lazy-load></image>
  68. <text class="ac-empty-text">暂无文章</text>
  69. </view>
  70. <!-- 文章列表 -->
  71. <view v-else class="ac-feed">
  72. <view
  73. v-for="item in articles"
  74. :key="item.id"
  75. class="ac-card"
  76. hover-class="ac-card-pressed"
  77. @click="goDetail(item.id)"
  78. >
  79. <view class="ac-card-media">
  80. <image
  81. class="ac-card-cover"
  82. :src="getImageUrl(item.coverImage) || '/static/default-article.png'"
  83. mode="aspectFill"
  84. lazy-load />
  85. <view class="ac-card-dimension-tags" v-if="item.relatedDimensions">
  86. <view
  87. v-for="dim in parseDimensions(item.relatedDimensions)"
  88. :key="dim.code"
  89. class="ac-card-dim-tag"
  90. :style="'background:' + dim.color"
  91. >{{ dim.name }}</view>
  92. </view>
  93. </view>
  94. <view class="ac-card-body">
  95. <view class="ac-card-meta-top">
  96. <text class="ac-card-category" v-if="item.categoryName">{{ item.categoryName }}</text>
  97. <text class="ac-card-readtime">&#x1F4D6; {{ item.readTime || 3 }}分钟</text>
  98. </view>
  99. <text class="ac-card-title">{{ item.title }}</text>
  100. <text class="ac-card-summary" v-if="item.summary">{{ item.summary }}</text>
  101. <view class="ac-card-footer">
  102. <text class="ac-card-author">{{ item.author || '浠艾福' }}</text>
  103. <text class="ac-card-sep">|</text>
  104. <text class="ac-card-date">{{ formatDate(item.publishedAt) }}</text>
  105. <text class="ac-card-fav">&#x2B50; {{ item.favCount || 0 }}</text>
  106. <text class="ac-card-sep">|</text>
  107. <text class="ac-card-readcount">&#x1F441; {{ item.viewCount || 0 }}</text>
  108. <text class="ac-card-sep">|</text>
  109. <text class="ac-card-duration">&#x23F1; {{ formatDuration(item.totalDurationSeconds) }}</text>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <!-- 加载更多 / 没有更多 -->
  115. <view v-if="loadingMore" class="ac-loading-more">
  116. <text class="ac-loading-text">加载中...</text>
  117. </view>
  118. <view v-if="noMore && articles.length > 0" class="ac-no-more">
  119. <text class="ac-no-more-text">— 没有更多了 —</text>
  120. </view>
  121. <view class="ac-bottom-gap"></view>
  122. </scroll-view>
  123. <!-- 浮动发布按钮 -->
  124. <view class="ac-fab" @click="goEdit">
  125. <text class="ac-fab-icon">+</text>
  126. </view>
  127. </view>
  128. </template>
  129. <script>
  130. import { BrandColors } from '../../utils/brand-colors.js'
  131. import { getArticleList, getArticleTags, getFeaturedArticles } from '@/utils/api.js'
  132. import config from '@/config.js'
  133. import fontScaleMixin from '@/mixins/font-scale.js'
  134. export default {
  135. mixins: [fontScaleMixin],
  136. data() {
  137. return {
  138. whiteColor: BrandColors.white,
  139. tabList: [
  140. { code: '', name: '全部', color: BrandColors.primary }
  141. ],
  142. currentTab: '',
  143. articles: [],
  144. page: 1,
  145. size: 10,
  146. total: 0,
  147. loading: false,
  148. loadingMore: false,
  149. noMore: false,
  150. searchKeyword: '',
  151. searchFocused: false,
  152. isLoggedIn: false,
  153. recommendedArticles: [],
  154. recommendLoading: false
  155. }
  156. },
  157. components: {
  158. ArticleBookshelf: () => require('@/pages/home-pages/components/ArticleBookshelf.vue')
  159. },
  160. onLoad(options) {
  161. // 兼容旧入口:外部传入 dimension(旧五维 code)时仍设置 currentTab。
  162. // 新语义下 currentTab 表示「文章标签」,若外部传的是旧五维 code,
  163. // 将命中 tag 为空的降级结果(无可匹配文章),属可接受的降级行为。
  164. if (options && options.dimension) {
  165. this.currentTab = options.dimension
  166. }
  167. this.isLoggedIn = !!uni.getStorageSync('token')
  168. this.currentChildId = uni.getStorageSync('currentChildId') || null
  169. this.loadTags()
  170. this.loadArticles()
  171. this.loadRecommendedArticles()
  172. },
  173. onShow() {
  174. this.isLoggedIn = !!uni.getStorageSync('token')
  175. },
  176. methods: {
  177. async loadTags() {
  178. try {
  179. var res = await getArticleTags()
  180. if (res && res.code === 200 && res.data && res.data.length) {
  181. var addList = res.data.map(function(tag) {
  182. return { code: tag, name: tag, color: BrandColors.primary }
  183. })
  184. this.tabList = [{ code: '', name: '全部', color: BrandColors.primary }].concat(addList)
  185. }
  186. } catch (e) {
  187. // 标签拉取失败时保留「全部」,文章列表仍可正常浏览
  188. }
  189. },
  190. async loadArticles(isLoadMore) {
  191. if (!isLoadMore) {
  192. if (this.loading) return
  193. this.loading = true
  194. this.page = 1
  195. this.articles = []
  196. this.noMore = false
  197. } else {
  198. if (this.loadingMore || this.noMore) return
  199. this.loadingMore = true
  200. }
  201. try {
  202. var params = { page: this.page, size: this.size }
  203. if (this.currentChildId) {
  204. params.memberId = parseInt(this.currentChildId)
  205. }
  206. if (this.currentTab) {
  207. params.tag = this.currentTab
  208. }
  209. if (this.searchKeyword && this.searchKeyword.trim()) {
  210. params.keyword = this.searchKeyword.trim()
  211. }
  212. var res = await getArticleList(params)
  213. if (res.code === 200 && res.data) {
  214. var list = res.data.records || []
  215. if (this.page === 1) {
  216. this.articles = list
  217. } else {
  218. this.articles = this.articles.concat(list)
  219. }
  220. this.total = res.data.total || 0
  221. this.noMore = this.articles.length >= this.total
  222. }
  223. } catch (e) {
  224. uni.showToast({ title: '加载失败', icon: 'none' })
  225. } finally {
  226. this.loading = false
  227. this.loadingMore = false
  228. }
  229. },
  230. onTabChange(code) {
  231. if (this.currentTab === code) return
  232. this.currentTab = code
  233. this.searchKeyword = ''
  234. this.searchFocused = false
  235. this.page = 1
  236. this.articles = []
  237. this.noMore = false
  238. this.loadArticles()
  239. },
  240. async loadRecommendedArticles() {
  241. var self = this
  242. self.recommendLoading = true
  243. try {
  244. var res = await getFeaturedArticles({ size: 8 })
  245. if (res && res.code === 200 && res.data) {
  246. // 兼容数组 / { list } / { records } 三种响应结构,保证永远赋值数组
  247. var raw = Array.isArray(res.data) ? res.data : (res.data.list || res.data.records || [])
  248. self.recommendedArticles = Array.isArray(raw) ? raw : []
  249. }
  250. } catch (e) {
  251. // silent fail
  252. } finally {
  253. self.recommendLoading = false
  254. }
  255. },
  256. onLoadMore() {
  257. if (this.noMore || this.loading || this.loadingMore) return
  258. this.page++
  259. this.loadArticles(true)
  260. },
  261. goDetail(idOrArticle) {
  262. var id = idOrArticle && idOrArticle.id ? idOrArticle.id : idOrArticle
  263. uni.navigateTo({ url: '/pages/article-center/article-detail?id=' + id })
  264. },
  265. goEdit() {
  266. var isLoggedIn = !!uni.getStorageSync('token')
  267. if (isLoggedIn) {
  268. uni.navigateTo({ url: '/pages/article-center/article-edit' })
  269. } else {
  270. this.openLoginSheet({ redirect: '/pages/article-center/index' })
  271. }
  272. },
  273. goExplore() {
  274. // 筛选全部文章
  275. this.currentTab = ''
  276. this.page = 1
  277. this.articles = []
  278. this.loadArticles()
  279. },
  280. // 登录浮层成功回调:刷新文章列表(登录后可见编辑入口等)
  281. onLoginSuccess() {
  282. this.loadArticles()
  283. },
  284. formatDate(dateStr) {
  285. if (!dateStr) return ''
  286. return dateStr.slice(0, 10)
  287. },
  288. formatDuration(seconds) {
  289. if (!seconds || seconds <= 0) return '0分钟'
  290. var mins = Math.round(seconds / 60)
  291. if (mins < 60) return mins + '分钟'
  292. var hours = Math.floor(mins / 60)
  293. var restMins = mins % 60
  294. return restMins > 0 ? hours + '小时' + restMins + '分钟' : hours + '小时'
  295. },
  296. parseDimensions(str) {
  297. if (!str) return []
  298. var dimMap = {
  299. body: { code: 'body', color: BrandColors.body, name: '身' },
  300. mind: { code: 'mind', color: BrandColors.mind, name: '心' },
  301. wisdom: { code: 'wisdom', color: BrandColors.wisdom, name: '智' },
  302. action: { code: 'action', color: BrandColors.success, name: '行' },
  303. wealth: { code: 'wealth', color: BrandColors.wealth, name: '富' }
  304. }
  305. var codes = str.split(',').map(function(s) { return s.trim().toLowerCase() })
  306. return codes.filter(function(c) { return dimMap[c] }).map(function(c) { return dimMap[c] })
  307. },
  308. focusSearch() {
  309. this.searchFocused = true
  310. },
  311. onSearch() {
  312. this.page = 1
  313. this.articles = []
  314. this.noMore = false
  315. this.loadArticles()
  316. },
  317. onSearchBlur() {
  318. if (!this.searchKeyword) {
  319. this.searchFocused = false
  320. }
  321. },
  322. onBack() {
  323. uni.navigateBack()
  324. },
  325. getImageUrl: function(path) {
  326. if (!path || path === 'null' || path === 'undefined' || path === '/null') return ''
  327. var s = String(path).trim()
  328. if (!s || s === 'null' || s === '/null') return ''
  329. if (s.indexOf('http://') === 0 || s.indexOf('https://') === 0) return s
  330. return config.API_BASE_URL + (s.charAt(0) === '/' ? s : '/' + s)
  331. }
  332. }
  333. }
  334. </script>
  335. <style scoped lang="scss">
  336. /* ====================================
  337. 知识分享 — 重设计
  338. 白色导航 + 药丸Tab + 精装卡片
  339. ==================================== */
  340. .ac-container {
  341. min-height: 100vh;
  342. background: $app-bg;
  343. position: relative;
  344. }
  345. /* ---- 导航栏(白色简约) ---- */
  346. .ac-nav {
  347. display: flex;
  348. align-items: center;
  349. justify-content: space-between;
  350. padding: 84rpx 28rpx 20rpx;
  351. background: $app-surface;
  352. position: sticky;
  353. top: 0;
  354. z-index: 100;
  355. }
  356. .ac-nav-left {
  357. width: 60rpx;
  358. height: 48rpx;
  359. display: flex;
  360. align-items: center;
  361. justify-content: flex-start;
  362. flex-shrink: 0;
  363. }
  364. .ac-nav-back {
  365. font-size: calc(36rpx * var(--font-scale, 1));
  366. color: $facade-text-strong;
  367. font-weight: bold;
  368. }
  369. .ac-nav-title {
  370. font-size: calc(32rpx * var(--font-scale, 1));
  371. font-weight: bold;
  372. color: $text-charcoal;
  373. flex: 1;
  374. text-align: center;
  375. }
  376. .ac-nav-right {
  377. display: flex;
  378. align-items: center;
  379. gap: 20rpx;
  380. flex-shrink: 0;
  381. }
  382. .ac-nav-search-icon {
  383. font-size: calc(32rpx * var(--font-scale, 1));
  384. color: $facade-text-body;
  385. }
  386. .ac-nav-add {
  387. font-size: calc(40rpx * var(--font-scale, 1));
  388. color: $brand-primary;
  389. font-weight: 400;
  390. line-height: 1;
  391. }
  392. /* ---- 搜索展开条 ---- */
  393. .ac-search-bar {
  394. display: flex;
  395. align-items: center;
  396. padding: 12rpx 28rpx 16rpx;
  397. background: $app-surface;
  398. border-bottom: 1rpx solid $facade-fill;
  399. }
  400. .ac-search-input {
  401. flex: 1;
  402. height: 60rpx;
  403. background: $facade-fill-2;
  404. border-radius: 24rpx;
  405. padding: 0 28rpx;
  406. font-size: calc(26rpx * var(--font-scale, 1));
  407. color: $facade-text-strong;
  408. }
  409. .ac-search-cancel {
  410. font-size: calc(26rpx * var(--font-scale, 1));
  411. color: $facade-text-muted;
  412. margin-left: 16rpx;
  413. flex-shrink: 0;
  414. }
  415. /* ---- Tab 药丸导航 ---- */
  416. .ac-tabs {
  417. padding: 16rpx 28rpx;
  418. background: $app-surface;
  419. border-bottom: 1rpx solid $facade-fill;
  420. position: sticky;
  421. z-index: 10;
  422. }
  423. .ac-tab-scroll {
  424. white-space: nowrap;
  425. display: flex;
  426. }
  427. .ac-tab {
  428. display: inline-flex;
  429. align-items: center;
  430. justify-content: center;
  431. height: 52rpx;
  432. padding: 0 28rpx;
  433. margin-right: 16rpx;
  434. font-size: calc(24rpx * var(--font-scale, 1));
  435. color: $facade-text-body;
  436. background: $facade-fill;
  437. border-radius: 24rpx;
  438. border: 2rpx solid $facade-fill;
  439. flex-shrink: 0;
  440. transition: font-weight 0.2s;
  441. }
  442. .ac-tab.active {
  443. font-weight: 600;
  444. }
  445. /* ---- 滚动列表区域 ---- */
  446. .ac-scroll {
  447. height: calc(100vh - 200rpx);
  448. }
  449. /* ---- 骨架屏 ---- */
  450. .ac-skeleton-wrap { padding: 24rpx 28rpx; }
  451. .sk-card {
  452. background: $app-surface;
  453. border-radius: 24rpx;
  454. overflow: hidden;
  455. margin-bottom: 24rpx;
  456. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
  457. }
  458. .sk-cover {
  459. height: 340rpx;
  460. background: linear-gradient(90deg, $facade-fill 25%, $facade-fill-4 50%, $facade-fill 75%);
  461. background-size: 200% 100%;
  462. animation: sk-shimmer 1.5s infinite;
  463. }
  464. .sk-body { padding: 24rpx; }
  465. .sk-row {
  466. height: 22rpx;
  467. background: linear-gradient(90deg, $facade-fill 25%, $facade-fill-4 50%, $facade-fill 75%);
  468. background-size: 200% 100%;
  469. border-radius: 8rpx;
  470. margin-bottom: 14rpx;
  471. animation: sk-shimmer 1.5s infinite;
  472. }
  473. .sk-tag { width: 20%; }
  474. .sk-title { width: 65%; }
  475. .sk-desc { width: 90%; }
  476. .sk-footer { width: 40%; height: 18rpx; }
  477. @keyframes sk-shimmer {
  478. 0% { background-position: -200% 0; }
  479. 100% { background-position: 200% 0; }
  480. }
  481. /* ---- 空状态 ---- */
  482. .ac-empty {
  483. display: flex;
  484. flex-direction: column;
  485. align-items: center;
  486. padding-top: 240rpx;
  487. }
  488. .ac-empty-img {
  489. width: 200rpx;
  490. height: 200rpx;
  491. margin-bottom: 28rpx;
  492. }
  493. .ac-empty-text {
  494. font-size: calc(28rpx * var(--font-scale, 1));
  495. color: $facade-text-ghost-light;
  496. }
  497. /* ---- 文章卡片(新版) ---- */
  498. .ac-feed {
  499. padding: 24rpx 28rpx;
  500. }
  501. .ac-card {
  502. background: $app-surface;
  503. border-radius: 24rpx;
  504. overflow: hidden;
  505. margin-bottom: 24rpx;
  506. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  507. transition: transform 0.15s;
  508. }
  509. .ac-card-pressed {
  510. transform: scale(0.97);
  511. opacity: 0.9;
  512. }
  513. /* 封面 + 维度浮标 */
  514. .ac-card-media {
  515. position: relative;
  516. width: 100%;
  517. overflow: hidden;
  518. }
  519. .ac-card-cover {
  520. display: block;
  521. width: 100%;
  522. height: 340rpx;
  523. background: $facade-fill;
  524. }
  525. .ac-card-dimension-tags {
  526. position: absolute;
  527. bottom: 12rpx;
  528. left: 16rpx;
  529. display: flex;
  530. gap: 8rpx;
  531. }
  532. .ac-card-dim-tag {
  533. padding: 2rpx 14rpx;
  534. border-radius: 16rpx;
  535. font-size: calc(20rpx * var(--font-scale, 1));
  536. color: $app-surface;
  537. font-weight: 500;
  538. line-height: 1.4;
  539. }
  540. /* 正文区 */
  541. .ac-card-body {
  542. padding: 24rpx 24rpx 28rpx;
  543. }
  544. .ac-card-meta-top {
  545. display: flex;
  546. align-items: center;
  547. margin-bottom: 12rpx;
  548. }
  549. .ac-card-category {
  550. font-size: calc(20rpx * var(--font-scale, 1));
  551. color: $brand-primary;
  552. background: rgba(249,115,22,0.08);
  553. padding: 2rpx 14rpx;
  554. border-radius: 8rpx;
  555. margin-right: 16rpx;
  556. }
  557. .ac-card-readtime {
  558. font-size: calc(20rpx * var(--font-scale, 1));
  559. color: $text-ghost-soft;
  560. }
  561. .ac-card-title {
  562. display: block;
  563. font-size: calc(30rpx * var(--font-scale, 1));
  564. font-weight: 600;
  565. color: $text-charcoal;
  566. line-height: 1.45;
  567. margin-bottom: 10rpx;
  568. overflow: hidden;
  569. text-overflow: ellipsis;
  570. display: -webkit-box;
  571. -webkit-line-clamp: 2;
  572. -webkit-box-orient: vertical;
  573. }
  574. .ac-card-summary {
  575. display: block;
  576. font-size: calc(24rpx * var(--font-scale, 1));
  577. color: $facade-text-muted;
  578. line-height: 1.5;
  579. margin-bottom: 16rpx;
  580. overflow: hidden;
  581. text-overflow: ellipsis;
  582. display: -webkit-box;
  583. -webkit-line-clamp: 2;
  584. -webkit-box-orient: vertical;
  585. }
  586. .ac-card-footer {
  587. display: flex;
  588. align-items: center;
  589. font-size: calc(20rpx * var(--font-scale, 1));
  590. color: $facade-text-ghost-light;
  591. }
  592. .ac-card-author {
  593. color: $facade-text-faint;
  594. }
  595. .ac-card-sep {
  596. margin: 0 10rpx;
  597. color: $facade-border-soft;
  598. }
  599. .ac-card-date {
  600. flex: 1;
  601. }
  602. .ac-card-fav {
  603. color: $facade-text-ghost;
  604. }
  605. .ac-card-readcount {
  606. color: $facade-text-ghost;
  607. }
  608. /* ---- 加载更多 / 没有更多 ---- */
  609. .ac-loading-more,
  610. .ac-no-more {
  611. text-align: center;
  612. padding: $uni-space-page;
  613. }
  614. .ac-loading-text {
  615. font-size: calc(24rpx * var(--font-scale, 1));
  616. color: $facade-text-ghost-light;
  617. }
  618. .ac-no-more-text {
  619. font-size: calc(24rpx * var(--font-scale, 1));
  620. color: $facade-border-soft;
  621. }
  622. .ac-bottom-gap {
  623. height: 140rpx;
  624. }
  625. /* ---- 浮动发布按钮 ---- */
  626. .ac-fab {
  627. position: fixed;
  628. right: 36rpx;
  629. bottom: 100rpx;
  630. width: 96rpx;
  631. height: 96rpx;
  632. background: linear-gradient(135deg, $brand-primary, $brand-primary-dark);
  633. color: $app-surface;
  634. border-radius: 50%;
  635. display: flex;
  636. align-items: center;
  637. justify-content: center;
  638. box-shadow: 0 6rpx 20rpx rgba(249,115,22,0.35);
  639. z-index: 100;
  640. }
  641. .ac-fab:active {
  642. transform: scale(0.92);
  643. opacity: 0.85;
  644. }
  645. .ac-fab-icon {
  646. font-size: calc(48rpx * var(--font-scale, 1));
  647. font-weight: 400;
  648. line-height: 1;
  649. }
  650. </style>