publish.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. <template>
  2. <view class="publish-page">
  3. <!-- 自定义导航栏 -->
  4. <view class="custom-navbar" :style="{ paddingTop: statusBarHeight + 'px' }">
  5. <view class="navbar-left" @click="goBack">
  6. <text class="back-icon">← 返回</text>
  7. </view>
  8. <view class="navbar-title">{{ isEdit ? '编辑动态' : '发布动态' }}</view>
  9. <view class="navbar-right"></view>
  10. </view>
  11. <!-- 内容区域 -->
  12. <scroll-view class="content-scroll" scroll-y :style="{ paddingTop: `calc(96rpx + ${statusBarHeightRpx}rpx)` }">
  13. <view class="form-container">
  14. <!-- 内容输入 -->
  15. <view class="content-section">
  16. <textarea
  17. v-model="content"
  18. class="content-input"
  19. placeholder="分享你的心动瞬间"
  20. maxlength="1000"
  21. :show-count="true"
  22. auto-height
  23. />
  24. </view>
  25. <!-- 图片上传区域 -->
  26. <view class="media-section">
  27. <view class="section-title">📷 图片</view>
  28. <view class="media-grid">
  29. <view v-for="(m,idx) in mediaList" :key="idx" class="media-item">
  30. <image :src="m" mode="aspectFill" class="media-image"/>
  31. <text class="remove-btn" @click="removeMedia(idx)">×</text>
  32. </view>
  33. <view v-if="mediaList.length < 9" class="add-media" @click="chooseImages">
  34. <text class="add-icon">+</text>
  35. <text class="add-text">添加图片</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </scroll-view>
  41. <!-- 底部发布栏 -->
  42. <view class="publish-bottom-bar">
  43. <button
  44. class="publish-btn"
  45. :disabled="uploading || !content.trim()"
  46. :class="{ disabled: uploading || !content.trim() }"
  47. @click="submit">
  48. <text class="btn-icon">💕</text>
  49. <text class="btn-text">{{ isEdit ? '保存' : '发布' }}</text>
  50. </button>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import api from '@/utils/api.js'
  56. import contentSecurityCheck from '@/utils/contentSecurityCheck.js'
  57. export default {
  58. data() {
  59. return {
  60. content: '',
  61. mediaList: [],
  62. uploading: false,
  63. isEdit: false,
  64. dynamicId: null,
  65. visibility: 1,
  66. mediaType: 1,
  67. statusBarHeight: 0, // 状态栏高度(单位:px)
  68. statusBarHeightRpx: 0, // 状态栏高度(转换为rpx,适配页面布局)
  69. isIos: false // 是否为苹果设备
  70. }
  71. },
  72. onLoad(options) {
  73. // 检查是否是编辑模式
  74. if (options.edit === 'true' && options.dynamicId) {
  75. this.isEdit = true
  76. this.dynamicId = parseInt(options.dynamicId)
  77. // 加载动态数据
  78. if (options.content) {
  79. this.content = decodeURIComponent(options.content)
  80. }
  81. if (options.mediaUrls) {
  82. try {
  83. this.mediaList = JSON.parse(decodeURIComponent(options.mediaUrls))
  84. } catch (e) {
  85. console.error('解析媒体URL失败:', e)
  86. this.mediaList = []
  87. }
  88. }
  89. if (options.mediaType) {
  90. this.mediaType = parseInt(options.mediaType)
  91. }
  92. if (options.visibility) {
  93. this.visibility = parseInt(options.visibility)
  94. }
  95. }
  96. // 1. 获取系统信息(设备类型、状态栏高度)
  97. const systemInfo = uni.getSystemInfoSync();
  98. this.isIos = systemInfo.platform === 'ios'; // 判断是否为苹果设备
  99. this.statusBarHeight = systemInfo.statusBarHeight; // 获取状态栏高度(px)
  100. // 转换状态栏高度为rpx(uni-app中1rpx = 屏幕宽度/750 px)
  101. this.statusBarHeightRpx = (systemInfo.statusBarHeight * 750) / systemInfo.screenWidth;
  102. },
  103. methods: {
  104. // 返回上一页
  105. goBack() {
  106. uni.navigateBack()
  107. },
  108. isImage(url) {
  109. if (!url || typeof url !== 'string') return false
  110. // 1. 检查文件扩展名
  111. const hasImageExtension = /(\.png|\.jpg|\.jpeg|\.gif|\.webp|\.bmp)$/i.test(url)
  112. // 2. 检查是否是微信小程序的临时图片路径
  113. const isTempImagePath = url.includes('tmp_') ||
  114. url.includes('wxfile://tmp_') ||
  115. url.includes('tempFilePath') ||
  116. url.startsWith('http://tmp/') ||
  117. /\/tmp_[a-zA-Z0-9_]+\.(png|jpg|jpeg|gif|webp|bmp)$/i.test(url)
  118. // 3. 检查是否是MinIO的图片URL
  119. const isMinioImageUrl = url.includes('dynamic-comments/dynamics/') &&
  120. /(\.png|\.jpg|\.jpeg|\.gif|\.webp|\.bmp)(\?|$)/i.test(url)
  121. const result = hasImageExtension || isTempImagePath || isMinioImageUrl
  122. console.log(result)
  123. return result
  124. },
  125. removeMedia(i) { this.mediaList.splice(i,1) },
  126. async chooseImages() {
  127. const maxCount = Math.max(0, 9 - this.mediaList.length)
  128. if (maxCount <= 0) {
  129. uni.showToast({ title: '最多选择9张图片', icon: 'none' })
  130. return
  131. }
  132. uni.chooseImage({
  133. count: maxCount,
  134. sizeType: ['compressed'],
  135. success: async (res) => {
  136. const filePaths = res.tempFilePaths || []
  137. if (filePaths.length === 0) return
  138. // 立即预览
  139. this.mediaList.push(...filePaths)
  140. this.uploading = true
  141. uni.showLoading({ title: `正在上传 ${filePaths.length} 张图片...` })
  142. let uploadedCount = 0
  143. let failedCount = 0
  144. try {
  145. for (const filePath of filePaths) {
  146. try {
  147. // 1. 上传图片
  148. const url = await api.dynamic.uploadSingle(filePath)
  149. const idx = this.mediaList.indexOf(filePath)
  150. // 2. 上传成功后进行安全检测
  151. uni.showLoading({ title: `检测第 ${uploadedCount + 1} 张图片...` })
  152. const checkResult = await contentSecurityCheck.checkImage(url)
  153. if (!checkResult.safe) {
  154. // 图片违规,移除并提示
  155. if (idx !== -1) this.mediaList.splice(idx, 1)
  156. failedCount++
  157. uni.hideLoading()
  158. uni.showModal({
  159. title: '图片违规',
  160. content: checkResult.message || '该图片包含违规内容,已自动移除',
  161. showCancel: false,
  162. confirmText: '我知道了'
  163. })
  164. // 等待用户确认后继续
  165. await new Promise(resolve => setTimeout(resolve, 500))
  166. uni.showLoading({ title: `继续上传...` })
  167. } else {
  168. // 图片安全,更新URL
  169. if (idx !== -1) this.mediaList.splice(idx, 1, url)
  170. uploadedCount++
  171. }
  172. } catch (e) {
  173. console.error('上传图片失败:', e)
  174. const idx = this.mediaList.indexOf(filePath)
  175. if (idx !== -1) this.mediaList.splice(idx, 1)
  176. failedCount++
  177. }
  178. }
  179. // 上传完成提示
  180. if (failedCount > 0) {
  181. uni.showToast({
  182. title: `${uploadedCount}张上传成功,${failedCount}张被移除`,
  183. icon: 'none',
  184. duration: 2000
  185. })
  186. }
  187. } finally {
  188. this.uploading = false
  189. uni.hideLoading()
  190. }
  191. },
  192. fail: () => {
  193. uni.showToast({ title: '选择图片失败', icon: 'none' })
  194. }
  195. })
  196. },
  197. async submit() {
  198. if (!this.content.trim()) {
  199. uni.showToast({ title: '请分享你的心动瞬间吧~', icon: 'none' })
  200. return
  201. }
  202. if (this.content.length > 1000) {
  203. uni.showToast({ title: '内容过长,请精简到1000字以内', icon: 'none' })
  204. return
  205. }
  206. if (this.uploading) {
  207. uni.showToast({ title: '图片还在上传中,请稍等', icon: 'none' })
  208. return
  209. }
  210. uni.showLoading({ title: '内容检测中...' })
  211. // 文字内容安全检测(图片在上传时已检测)
  212. try {
  213. const textResult = await contentSecurityCheck.checkText(this.content)
  214. if (!textResult.safe) {
  215. uni.hideLoading()
  216. uni.showModal({
  217. title: '内容违规',
  218. content: textResult.message || '您发布的内容包含违规信息,请修改后重试',
  219. showCancel: false,
  220. confirmText: '我知道了'
  221. })
  222. return
  223. }
  224. } catch (e) {
  225. console.error('内容安全检测异常:', e)
  226. // 检测异常时继续发布,由后端二次校验
  227. }
  228. uni.showLoading({ title: this.isEdit ? '正在保存...' : '正在发布...' })
  229. try {
  230. const userId = uni.getStorageSync("userId")
  231. if (!userId) {
  232. uni.hideLoading()
  233. uni.showToast({ title: '请先登录', icon: 'none' })
  234. return
  235. }
  236. const payload = {
  237. userId: userId,
  238. content: this.content,
  239. mediaList: this.mediaList,
  240. mediaType: this.mediaList.length > 0 ? 2 : 1, // 自动检测:有图片为2,纯文本为1
  241. visibility: this.visibility || 1 // 默认公开
  242. }
  243. if (this.isEdit && this.dynamicId) {
  244. // 编辑模式:调用更新接口
  245. await api.dynamic.updateUserDynamic(this.dynamicId, userId, payload)
  246. uni.hideLoading()
  247. uni.showToast({ title: '保存成功!', icon: 'success' })
  248. // 触发动态更新事件
  249. uni.$emit('dynamic-update', {
  250. dynamicId: this.dynamicId,
  251. content: this.content,
  252. mediaUrls: this.mediaList,
  253. mediaType: payload.mediaType,
  254. visibility: payload.visibility
  255. })
  256. setTimeout(() => {
  257. uni.navigateBack()
  258. }, 1500)
  259. } else {
  260. // 发布模式:调用创建接口
  261. const dynamicId = await api.dynamic.publish(payload)
  262. uni.hideLoading()
  263. uni.showToast({ title: '发布成功!开始你的缘分旅程~', icon: 'success' })
  264. // 直接插入到广场页数据头部,避免全量刷新
  265. uni.$emit('dynamic-insert', {
  266. dynamicId,
  267. userId: userId,
  268. content: this.content,
  269. mediaUrls: this.mediaList,
  270. mediaType: payload.mediaType,
  271. visibility: payload.visibility,
  272. likeCount: 0,
  273. commentCount: 0,
  274. favoriteCount: 0,
  275. shareCount: 0,
  276. viewCount: 0,
  277. isLiked: false,
  278. isFavorited: false,
  279. createdAt: new Date().toISOString(),
  280. user: { userId: userId, nickname: '我', avatarUrl: '' }
  281. })
  282. setTimeout(() => {
  283. // 发布成功后回到动态列表页面
  284. uni.switchTab({
  285. url: '/pages/plaza/index',
  286. fail: () => {
  287. uni.redirectTo({ url: '/pages/plaza/index' })
  288. }
  289. })
  290. }, 1500)
  291. }
  292. } catch (e) {
  293. uni.hideLoading()
  294. uni.showToast({ title: this.isEdit ? '保存失败,请重试' : '发布失败,请重试', icon: 'none' })
  295. console.error(this.isEdit ? '保存失败:' : '发布失败:', e)
  296. }
  297. }
  298. }
  299. }
  300. </script>
  301. <style scoped lang="scss">
  302. .publish-page {
  303. min-height: 100vh;
  304. background: #FFF0F5; // 与广场一致淡粉背景
  305. // 自定义导航栏
  306. .custom-navbar {
  307. position: fixed;
  308. top: 0;
  309. left: 0;
  310. right: 0;
  311. height: 96rpx; // 提高高度以便垂直居中
  312. background: transparent; // 透明,标题用粉色
  313. display: flex;
  314. align-items: center;
  315. justify-content: space-between;
  316. padding: 0 32rpx;
  317. // padding-top: constant(safe-area-inset-top);
  318. // padding-top: env(safe-area-inset-top);
  319. z-index: 1000;
  320. box-shadow: none;
  321. .navbar-left,
  322. .navbar-right {
  323. width: 120rpx;
  324. height: 96rpx; // 与导航高度一致
  325. display: flex;
  326. align-items: center;
  327. }
  328. .back-icon {
  329. color: #E91E63;
  330. font-size: 36rpx;
  331. font-weight: bold;
  332. }
  333. .navbar-title {
  334. flex: 1;
  335. text-align: center;
  336. color: #D81B60;
  337. font-size: 32rpx;
  338. font-weight: 600;
  339. }
  340. .publish-text {
  341. color: #FFFFFF;
  342. font-size: 28rpx;
  343. font-weight: 500;
  344. background: linear-gradient(135deg, #E91E63, #FF6B9D);
  345. padding: 12rpx 24rpx;
  346. border-radius: 24rpx;
  347. border: none;
  348. }
  349. }
  350. // 内容滚动区域
  351. .content-scroll {
  352. // padding-top: calc(96rpx + constant(safe-area-inset-top));
  353. // padding-top: calc(96rpx + env(safe-area-inset-top));
  354. height: calc(100vh - 100rpx); // 预留底部发布栏空间
  355. padding-bottom: 0;
  356. }
  357. .form-container {
  358. padding: 32rpx;
  359. }
  360. // 底部发布栏
  361. .publish-bottom-bar {
  362. position: fixed;
  363. bottom: 0;
  364. left: 0;
  365. right: 0;
  366. background: #FFFFFF;
  367. padding: 20rpx 24rpx;
  368. box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.06);
  369. padding-bottom: constant(safe-area-inset-bottom);
  370. padding-bottom: env(safe-area-inset-bottom);
  371. z-index: 1001;
  372. .publish-btn {
  373. width: 100%;
  374. display: flex;
  375. align-items: center;
  376. justify-content: center;
  377. gap: 10rpx;
  378. padding: 18rpx 28rpx;
  379. border-radius: 999rpx;
  380. background: linear-gradient(135deg, #E91E63, #FF6B9D);
  381. color: #FFFFFF;
  382. border: none;
  383. &.disabled {
  384. background: #E0E0E0;
  385. color: #AAAAAA;
  386. }
  387. .btn-icon { font-size: 30rpx; }
  388. .btn-text { font-size: 28rpx; font-weight: 600; }
  389. }
  390. }
  391. // 内容输入区域
  392. .content-section {
  393. background: #FFFFFF;
  394. border-radius: 20rpx;
  395. padding: 32rpx;
  396. margin-bottom: 24rpx;
  397. box-shadow: 0 4rpx 24rpx rgba(0,0,0,0.06);
  398. .content-input {
  399. width: 100%;
  400. min-height: 240rpx;
  401. font-size: 28rpx;
  402. line-height: 1.6;
  403. color: #333333;
  404. background: transparent;
  405. border: none;
  406. outline: none;
  407. }
  408. }
  409. // 媒体上传区域
  410. .media-section {
  411. background: #FFFFFF;
  412. border-radius: 20rpx;
  413. padding: 24rpx;
  414. margin-bottom: 24rpx;
  415. box-shadow: 0 4rpx 24rpx rgba(0,0,0,0.06);
  416. .section-title {
  417. font-size: 30rpx;
  418. font-weight: 600;
  419. color: #333333;
  420. margin-bottom: 24rpx;
  421. }
  422. .media-grid {
  423. display: grid;
  424. grid-template-columns: repeat(3, 1fr);
  425. gap: 20rpx;
  426. }
  427. .media-item {
  428. position: relative;
  429. width: 100%;
  430. height: 200rpx;
  431. border-radius: 16rpx;
  432. overflow: hidden;
  433. .media-image {
  434. width: 100%;
  435. height: 100%;
  436. }
  437. .video-placeholder {
  438. width: 100%;
  439. height: 100%;
  440. background: #F5F5F5;
  441. display: flex;
  442. flex-direction: column;
  443. align-items: center;
  444. justify-content: center;
  445. .video-icon {
  446. font-size: 32rpx;
  447. margin-bottom: 8rpx;
  448. }
  449. .video-text {
  450. font-size: 24rpx;
  451. color: #666666;
  452. }
  453. }
  454. .remove-btn {
  455. position: absolute;
  456. top: 8rpx;
  457. right: 8rpx;
  458. width: 36rpx;
  459. height: 36rpx;
  460. background: rgba(0,0,0,0.7);
  461. color: #FFFFFF;
  462. border-radius: 50%;
  463. display: flex;
  464. align-items: center;
  465. justify-content: center;
  466. font-size: 24rpx;
  467. font-weight: bold;
  468. }
  469. }
  470. .add-media {
  471. width: 100%;
  472. height: 200rpx;
  473. background: #F8F9FA;
  474. border: 2rpx dashed #D0D7DE;
  475. border-radius: 16rpx;
  476. display: flex;
  477. flex-direction: column;
  478. align-items: center;
  479. justify-content: center;
  480. transition: all 0.3s ease;
  481. &:active {
  482. background: #F0F0F0;
  483. border-color: #E91E63;
  484. }
  485. .add-icon {
  486. font-size: 48rpx;
  487. color: #8C8C8C;
  488. margin-bottom: 8rpx;
  489. }
  490. .add-text {
  491. font-size: 24rpx;
  492. color: #8C8C8C;
  493. }
  494. }
  495. }
  496. // 设置区域
  497. .settings-section {
  498. background: #FFFFFF;
  499. border-radius: 20rpx;
  500. padding: 32rpx;
  501. margin-bottom: 24rpx;
  502. box-shadow: 0 4rpx 24rpx rgba(0,0,0,0.06);
  503. .section-title {
  504. font-size: 30rpx;
  505. font-weight: 600;
  506. color: #333333;
  507. margin-bottom: 24rpx;
  508. }
  509. .setting-item {
  510. display: flex;
  511. align-items: center;
  512. justify-content: space-between;
  513. padding: 20rpx 0;
  514. border-bottom: 1rpx solid #F0F0F0;
  515. &:last-child {
  516. border-bottom: none;
  517. }
  518. .setting-label {
  519. font-size: 28rpx;
  520. color: #333333;
  521. }
  522. .setting-value {
  523. display: flex;
  524. align-items: center;
  525. font-size: 26rpx;
  526. color: #666666;
  527. .arrow {
  528. margin-left: 12rpx;
  529. color: #CCCCCC;
  530. }
  531. }
  532. }
  533. }
  534. // 上传方式弹窗
  535. .upload-modal {
  536. position: fixed;
  537. top: 0;
  538. left: 0;
  539. right: 0;
  540. bottom: 0;
  541. z-index: 9999;
  542. .modal-mask {
  543. position: absolute;
  544. top: 0;
  545. left: 0;
  546. right: 0;
  547. bottom: 0;
  548. background: rgba(0,0,0,0.5);
  549. }
  550. .modal-content {
  551. position: absolute;
  552. bottom: 0;
  553. left: 0;
  554. right: 0;
  555. background: #FFFFFF;
  556. border-radius: 32rpx 32rpx 0 0;
  557. padding: 40rpx;
  558. padding-bottom: calc(40rpx + constant(safe-area-inset-bottom));
  559. padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
  560. .modal-title {
  561. text-align: center;
  562. font-size: 32rpx;
  563. font-weight: 600;
  564. color: #333333;
  565. margin-bottom: 32rpx;
  566. }
  567. .upload-options {
  568. display: flex;
  569. gap: 24rpx;
  570. }
  571. .upload-option {
  572. flex: 1;
  573. background: #F8F9FA;
  574. border-radius: 20rpx;
  575. padding: 40rpx 20rpx;
  576. display: flex;
  577. flex-direction: column;
  578. align-items: center;
  579. transition: all 0.3s ease;
  580. &:active {
  581. background: #E91E63;
  582. transform: scale(0.95);
  583. .option-icon,
  584. .option-text {
  585. color: #FFFFFF;
  586. }
  587. }
  588. .option-icon {
  589. font-size: 48rpx;
  590. margin-bottom: 16rpx;
  591. }
  592. .option-text {
  593. font-size: 28rpx;
  594. color: #333333;
  595. font-weight: 500;
  596. }
  597. }
  598. }
  599. }
  600. // 温馨提示区域
  601. .tips-section {
  602. background: linear-gradient(145deg, #FFF5F7 0%, #FFE8EC 100%);
  603. border-radius: 24rpx;
  604. padding: 32rpx;
  605. margin-bottom: 24rpx;
  606. box-shadow: 0 8rpx 24rpx rgba(233, 30, 99, 0.08);
  607. border: 2rpx solid rgba(255, 182, 193, 0.15);
  608. position: relative;
  609. overflow: hidden;
  610. &::before {
  611. content: '';
  612. position: absolute;
  613. top: 0;
  614. left: 0;
  615. right: 0;
  616. height: 4rpx;
  617. background: linear-gradient(90deg, #FFB3BA, #FF8A95, #FFC0CB);
  618. }
  619. &::after {
  620. content: '💕';
  621. position: absolute;
  622. top: 20rpx;
  623. right: 20rpx;
  624. font-size: 40rpx;
  625. opacity: 0.1;
  626. animation: pulse-love 3s ease-in-out infinite;
  627. }
  628. .section-header {
  629. text-align: center;
  630. margin-bottom: 24rpx;
  631. .header-decoration {
  632. margin-bottom: 12rpx;
  633. .feather-tiny {
  634. font-size: 24rpx;
  635. opacity: 0.6;
  636. margin: 0 8rpx;
  637. animation: float 3s ease-in-out infinite;
  638. &:first-child {
  639. animation-delay: 0s;
  640. }
  641. &:last-child {
  642. animation-delay: 1.5s;
  643. }
  644. }
  645. .section-icon {
  646. font-size: 32rpx;
  647. margin: 0 12rpx;
  648. }
  649. }
  650. .section-title {
  651. font-size: 32rpx;
  652. font-weight: 600;
  653. color: #2D1B69;
  654. margin-bottom: 8rpx;
  655. }
  656. .section-desc {
  657. font-size: 24rpx;
  658. color: #8B5A96;
  659. opacity: 0.8;
  660. }
  661. }
  662. .tips-content {
  663. .tip-item {
  664. display: flex;
  665. align-items: center;
  666. margin-bottom: 16rpx;
  667. padding: 16rpx 20rpx;
  668. background: rgba(255, 255, 255, 0.6);
  669. border-radius: 16rpx;
  670. border: 1rpx solid rgba(255, 182, 193, 0.2);
  671. transition: all 0.3s ease;
  672. &:last-child {
  673. margin-bottom: 0;
  674. }
  675. .tip-icon {
  676. font-size: 28rpx;
  677. margin-right: 16rpx;
  678. animation: float 2s ease-in-out infinite;
  679. }
  680. .tip-text {
  681. flex: 1;
  682. font-size: 26rpx;
  683. color: #2D1B69;
  684. line-height: 1.4;
  685. font-weight: 500;
  686. }
  687. }
  688. }
  689. }
  690. }
  691. </style>