index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. <template>
  2. <view class="warning-center">
  3. <!-- 顶部导航栏 -->
  4. <custom-card>
  5. <block slot="backText">预警中心</block>
  6. <block slot="right">
  7. <view class="header-right">
  8. <view class="notification-icon">
  9. <u-icon name="bell" size="32rpx" color="#333" />
  10. <view class="badge"></view>
  11. </view>
  12. <view class="settings-icon">
  13. <u-icon name="settings" size="32rpx" color="#333" />
  14. </view>
  15. </view>
  16. </block>
  17. </custom-card>
  18. <!-- 主要内容 -->
  19. <view class="content">
  20. <!-- 宣传语区域 -->
  21. <view class="banner">
  22. <view class="banner-text">
  23. <text class="banner-title">天灾虫害,预警在先</text>
  24. <text class="banner-subtitle">全天候监测,风险早知晓</text>
  25. </view>
  26. <view class="warning-icon">
  27. <view class="icon-triangle">
  28. <image :src="exclamation" class="icon-image" />
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 日期选择器 -->
  33. <view class="date-picker">
  34. <view class="date-inputs" @click="showDatePickerHandle()">
  35. <text class="date-label">{{ startTime }}</text>
  36. <text class="date-separator">-</text>
  37. <text class="date-label">{{ endTime }}</text>
  38. <u-icon name="calendar" size="28rpx" color="#999" />
  39. </view>
  40. <view class="date-icons">
  41. <image :src="warning" class="icon-image" />
  42. </view>
  43. </view>
  44. <!-- 标签导航 -->
  45. <view class="tab-nav">
  46. <view
  47. v-for="(tab, index) in tabs"
  48. :key="index"
  49. class="tab-item"
  50. :class="{ active: activeTab === index }"
  51. @click="activeTabHandler(index)"
  52. >
  53. {{ tab }}
  54. </view>
  55. </view>
  56. <!-- 预警列表 -->
  57. <scroll-view
  58. v-if="activeTab == 0"
  59. class="warning-list"
  60. scroll-y
  61. :scroll-top="listScrollTop"
  62. scroll-with-animation
  63. @scrolltolower="loadMore"
  64. @scrolltoupper="refresh"
  65. >
  66. <view
  67. v-for="(warning, index) in warningList"
  68. :key="index"
  69. class="warning-item"
  70. @click="popupShowHandler(warning)"
  71. >
  72. <view class="warning-header">
  73. <view class="warning-type">
  74. <view class="type-icon" :class="warning.status == '0' ? 'type-blue' : 'type-gray'">
  75. <image :src="weather" class="icon-image" />
  76. </view>
  77. <text class="type-text">{{ warning.warning_title }}</text>
  78. <text class="device-type">{{ warning.device_type }}</text>
  79. </view>
  80. <view class="warning-level" :class="warning.level == '0' ? 'level-normal' :warning.level == '1'? 'level-important':'level-urgent'">
  81. </view>
  82. </view>
  83. <view class="warning-content">
  84. {{ warning.warning_content }}
  85. </view>
  86. <view class="warning-footer">
  87. <text class="warning-time">{{ formatTime(warning.upl_time) }}</text>
  88. <view class="warning-location">
  89. <u-icon name="location" size="20rpx" color="#999" />
  90. </view>
  91. </view>
  92. <view class="location-text">
  93. <u-icon name="map" size="28"></u-icon>
  94. <text style="margin-left: 10rpx">{{ warning.address || '-' }}</text>
  95. </view>
  96. </view>
  97. <!-- 加载更多提示 -->
  98. <view class="loading-more">
  99. <text v-if="loading">加载中...</text>
  100. <text v-else-if="finished">没有更多数据了</text>
  101. <text v-else>上拉加载更多</text>
  102. </view>
  103. </scroll-view>
  104. <scroll-view
  105. v-if="activeTab == 1"
  106. class="warning-list"
  107. scroll-y
  108. :scroll-top="listScrollTop"
  109. scroll-with-animation
  110. @scrolltolower="loadMore"
  111. @scrolltoupper="refresh"
  112. >
  113. <view
  114. v-for="(warning, index) in manualWarningList"
  115. :key="index"
  116. class="warning-item"
  117. @click="popupManualShowHandler(warning)"
  118. >
  119. <view class="warning-content">
  120. {{ warning.conf }}
  121. </view>
  122. <view class="warning-footer">
  123. <text class="warning-time">{{ formatTime(warning.create_time) }}</text>
  124. <view class="warning-location">
  125. <u-icon name="location" size="20rpx" color="#999" />
  126. </view>
  127. </view>
  128. </view>
  129. <!-- 加载更多提示 -->
  130. <view class="loading-more">
  131. <text v-if="loading">加载中...</text>
  132. <text v-else-if="finished">没有更多数据了</text>
  133. <text v-else>上拉加载更多</text>
  134. </view>
  135. </scroll-view>
  136. <!-- 回到顶部 -->
  137. <view class="back-to-top" @click="scrollToTop">
  138. <u-icon name="arrow-up" size="28rpx" color="#999" />
  139. </view>
  140. </view>
  141. <u-calendar v-model="showDatePicker" :mode="mode" @change="changeCalendar"></u-calendar>
  142. <u-popup v-model="popupShow" mode="bottom" height="80%" border-radius="20">
  143. <view class="popup-container">
  144. <view class="popup-icon" :class="current.level == '0' ? 'popup-level-normal' :current.level == '1'? 'popup-level-important':'popup-level-urgent'">
  145. </view>
  146. <view class="popup-header">{{ current.warning_title }}</view>
  147. <view class="popup-type">
  148. <text class="type-text">{{ current.device_type }}</text>
  149. </view>
  150. <view class="popup-content">{{ current.warning_content }}</view>
  151. <view class="popup-time">{{ formatTime(current.upl_time) }}</view>
  152. <view class="popup-text">
  153. <u-icon name="map" size="28"></u-icon>
  154. <text style="margin-left: 10rpx">{{ warning.address || '-' }}</text>
  155. </view>
  156. </view>
  157. </u-popup>
  158. <u-popup v-model="popupManualShow" mode="bottom" height="80%" border-radius="20">
  159. <view class="popup-container" style="margin-top:40rpx">
  160. <view class="popup-content">{{ currentManual.conf }}</view>
  161. <view class="popup-time">{{ formatTime(currentManual.create_time) }}</view>
  162. </view>
  163. </u-popup>
  164. </view>
  165. </template>
  166. <script>
  167. import exclamation from './assets/exclamation.png';
  168. import warning from './assets/warning.png';
  169. import pest from './assets/pest.png';
  170. import weather from './assets/weather.png';
  171. import offline from './assets/offline.png';
  172. export default {
  173. data() {
  174. return {
  175. current:{},
  176. currentManual:{},
  177. popupShow: false,
  178. popupManualShow: false,
  179. exclamation,
  180. warning,
  181. pest,
  182. weather,
  183. offline,
  184. showDatePicker: false,
  185. mode: 'range',
  186. activeTab: 0,
  187. listScrollTop: 0,
  188. tabs: ['环境监测','手动预警'],
  189. warningList: [],
  190. manualWarningList: [],
  191. page_size: 10,
  192. page: 1,
  193. // 获取7天前的日期
  194. startTime: this.getSevenDaysAgo() || '开始日期',
  195. endTime: this.getCurrentDate() || '结束日期',
  196. deviceId: '',
  197. device_type_id:'',
  198. total: 0,
  199. loading: false,
  200. finished: false,
  201. refreshing: false,
  202. };
  203. },
  204. onLoad() {
  205. this.getWarningList();
  206. },
  207. methods: {
  208. activeTabHandler(index){
  209. this.activeTab = index;
  210. if(index == 0){
  211. this.getWarningList();
  212. }else if(index == 1){
  213. this.getWarningManualList();
  214. }
  215. },
  216. popupManualShowHandler(warning){
  217. this.currentManual = warning;
  218. this.popupManualShow = true;
  219. },
  220. popupShowHandler(warning){
  221. this.current = warning;
  222. this.popupShow = true;
  223. },
  224. changeCalendar(e){
  225. this.startTime = e.startDate;
  226. this.endTime = e.endDate;
  227. // 重置分页参数
  228. this.page = 1;
  229. this.loading = false;
  230. this.finished = false;
  231. if(this.activeTab == 0){
  232. this.getWarningList();
  233. }else if(this.activeTab == 1){
  234. this.getWarningManualList();
  235. }
  236. },
  237. // 加载更多
  238. loadMore() {
  239. if (this.finished) return;
  240. if(this.activeTab == 0){
  241. this.getWarningList();
  242. }else if(this.activeTab == 1){
  243. this.getWarningManualList();
  244. }
  245. },
  246. // 下拉刷新
  247. refresh() {
  248. if (this.loading) return;
  249. // 重置分页参数
  250. this.page = 1;
  251. this.loading = false;
  252. this.finished = false;
  253. this.refreshing = true;
  254. if(this.activeTab == 0){
  255. this.getWarningList();
  256. }else if(this.activeTab == 1){
  257. this.getWarningManualList();
  258. }
  259. },
  260. formatTime(time){
  261. if(!time){
  262. return '';
  263. }
  264. const date = new Date(time * 1000);
  265. const year = date.getFullYear();
  266. const month = String(date.getMonth() + 1).padStart(2, '0');
  267. const day = String(date.getDate()).padStart(2, '0');
  268. const hour = String(date.getHours()).padStart(2, '0');
  269. const minute = String(date.getMinutes()).padStart(2, '0');
  270. const second = String(date.getSeconds()).padStart(2, '0');
  271. return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
  272. },
  273. // 获取7天前的日期
  274. getSevenDaysAgo() {
  275. const today = new Date();
  276. const sevenDaysAgo = new Date(today);
  277. sevenDaysAgo.setDate(today.getDate() - 7);
  278. const year = sevenDaysAgo.getFullYear();
  279. const month = String(sevenDaysAgo.getMonth() + 1).padStart(2, '0');
  280. const day = String(sevenDaysAgo.getDate()).padStart(2, '0');
  281. return `${year}-${month}-${day}`;
  282. },
  283. // 获取当前日期
  284. getCurrentDate() {
  285. const today = new Date();
  286. const year = today.getFullYear();
  287. const month = String(today.getMonth() + 1).padStart(2, '0');
  288. const day = String(today.getDate()).padStart(2, '0');
  289. return `${year}-${month}-${day}`;
  290. },
  291. showDatePickerHandle(){
  292. this.showDatePicker = true;
  293. },
  294. // 把日期转成秒数
  295. dateToTimestamp(date) {
  296. return Math.floor(new Date(date).getTime() / 1000);
  297. },
  298. async getWarningManualList(){
  299. if (this.loading) return;
  300. this.loading = true;
  301. const start = this.dateToTimestamp(this.startTime + ' 00:00:00');
  302. const end = this.dateToTimestamp(this.endTime + ' 23:59:59');
  303. const params = {
  304. start,
  305. end,
  306. page: this.page,
  307. page_size: this.page_size,
  308. device_id: this.deviceId,
  309. device_type_id: this.device_type_id
  310. }
  311. try {
  312. const res = await this.$myRequest({
  313. url:'/api/api_gateway?method=device.env_sec_alert.get_manual_env_sec_alert_record',
  314. method:'POST',
  315. data: params,
  316. })
  317. const resData = res?.data || [];
  318. const list = resData || [];
  319. if (this.page === 1) {
  320. this.manualWarningList = list;
  321. } else {
  322. this.manualWarningList = [...this.manualWarningList, ...list];
  323. }
  324. this.total = res?.total || 0;
  325. this.loading = false;
  326. // 计算是否还有更多数据
  327. if (this.manualWarningList.length >= this.total) {
  328. this.finished = true;
  329. } else {
  330. this.page++;
  331. }
  332. // 结束刷新状态
  333. if (this.refreshing) {
  334. this.refreshing = false;
  335. }
  336. } catch (error) {
  337. console.error('获取预警列表失败:', error);
  338. this.loading = false;
  339. if (this.refreshing) {
  340. this.refreshing = false;
  341. }
  342. }
  343. },
  344. async getWarningList(){
  345. if (this.loading) return;
  346. this.loading = true;
  347. const start = this.dateToTimestamp(this.startTime + ' 00:00:00');
  348. const end = this.dateToTimestamp(this.endTime + ' 23:59:59');
  349. const params = {
  350. start,
  351. end,
  352. page: this.page,
  353. page_size: this.page_size,
  354. device_id: this.deviceId,
  355. device_type_id: this.device_type_id
  356. }
  357. try {
  358. const res = await this.$myRequest({
  359. url:'/api/api_gateway?method=device.env_sec_alert.get_env_sec_alert',
  360. method:'POST',
  361. data: params,
  362. })
  363. const resData = res?.data || [];
  364. const list = resData || [];
  365. if (this.page === 1) {
  366. this.warningList = list;
  367. } else {
  368. this.warningList = [...this.warningList, ...list];
  369. }
  370. this.total = res?.total_num || 0;
  371. this.loading = false;
  372. // 计算是否还有更多数据
  373. if (this.warningList.length >= this.total) {
  374. this.finished = true;
  375. } else {
  376. this.page++;
  377. }
  378. // 结束刷新状态
  379. if (this.refreshing) {
  380. this.refreshing = false;
  381. }
  382. } catch (error) {
  383. console.error('获取预警列表失败:', error);
  384. this.loading = false;
  385. if (this.refreshing) {
  386. this.refreshing = false;
  387. }
  388. }
  389. },
  390. // 回到顶部
  391. scrollToTop() {
  392. console.log('222222222')
  393. this.listScrollTop = 0;
  394. }
  395. }
  396. };
  397. </script>
  398. <style scoped lang="scss">
  399. .warning-center {
  400. min-height: 100vh;
  401. font-family: 'Source Han Sans CN';
  402. background: linear-gradient(0deg, #F5F6FA 79.64%, #FFEEEC 99.35%);
  403. }
  404. ::v-deep .u-calendar__action{
  405. display:flex;
  406. }
  407. ::v-deep .u-calendar__action__icon{
  408. width: 40rpx;
  409. }
  410. ::v-deep .u-calendar__action__text{
  411. width: calc(100% - 160rpx);
  412. text-align: center;
  413. }
  414. .content {
  415. padding: 0 32rpx;
  416. }
  417. /* 宣传语区域 */
  418. .banner {
  419. display: flex;
  420. align-items: center;
  421. justify-content: space-between;
  422. margin: 32rpx 0;
  423. margin-bottom: 0rpx;
  424. padding: 24rpx;
  425. .banner-text {
  426. flex: 1;
  427. .banner-title {
  428. font-style: italic;
  429. display: block;
  430. color: #303133;
  431. font-family: "Source Han Sans CN VF";
  432. font-size: 40rpx;
  433. font-weight: 700;
  434. margin-bottom: 8rpx;
  435. }
  436. .banner-subtitle {
  437. display: block;
  438. font-size: 24rpx;
  439. color: #666666;
  440. }
  441. }
  442. .warning-icon {
  443. .icon-triangle {
  444. width: 130rpx;
  445. height: 130rpx;
  446. position: relative;
  447. .icon-image{
  448. width: 100%;
  449. height: 100%;
  450. }
  451. }
  452. }
  453. }
  454. .popup-container{
  455. position:relative;
  456. .popup-icon {
  457. position: absolute;
  458. top:0;
  459. right:0;
  460. margin-left: 12rpx;
  461. width: 112rpx;
  462. height: 48rpx;
  463. background: url('./assets/normal-gray.png');
  464. background-repeat: no-repeat;
  465. background-size: 100%;
  466. &.popup-level-normal {
  467. background: url('./assets/normal.png');
  468. background-repeat: no-repeat;
  469. background-size: 100%;
  470. }
  471. &.popup-level-important {
  472. background: url('./assets/important.png');
  473. background-repeat: no-repeat;
  474. background-size: 100%;
  475. }
  476. &.popup-level-urgent {
  477. background: url('./assets/urgent.png');
  478. background-repeat: no-repeat;
  479. background-size: 100%;
  480. }
  481. }
  482. }
  483. .popup-header{
  484. padding: 20rpx 32rpx;
  485. width: 100%;
  486. text-align: left;
  487. color: #303133;
  488. font-family: "Source Han Sans CN VF";
  489. font-size: 32rx;
  490. font-weight: 700;
  491. }
  492. .popup-type{
  493. border-radius:32rpx;
  494. margin-left: 32rpx;
  495. display:inline-block;
  496. border: 2rpx solid #E4E7ED;
  497. padding: 2rpx 12rpx;
  498. color: #666666;
  499. font-family: "Source Han Sans CN VF";
  500. font-size: 24rpx;
  501. font-weight: 400;
  502. margin-bottom: 24rpx;
  503. }
  504. .popup-content{
  505. padding: 0 32rpx;
  506. line-height: 50rpx;
  507. }
  508. .popup-time{
  509. padding:0 32rpx;
  510. margin-top: 36rpx;
  511. color:#999999;
  512. font-size: 24rpx;
  513. text-align: left;
  514. color: #bdbdbd;
  515. font-family: "Source Han Sans CN VF";
  516. font-style: normal;
  517. font-weight: 400;
  518. }
  519. .popup-location{
  520. font-size: 24rpx;
  521. margin-top: 16rpx;
  522. padding-top: 16rpx;
  523. font-family: "Source Han Sans CN VF";
  524. color: #999999;
  525. display:flex;
  526. align-items: center;
  527. }
  528. .popup-text {
  529. padding: 0 32rpx;
  530. font-size: 24rpx;
  531. margin-top: 16rpx;
  532. padding-top: 16rpx;
  533. font-family: "Source Han Sans CN VF";
  534. color: #999999;
  535. display:flex;
  536. align-items: center;
  537. }
  538. /* 日期选择器 */
  539. .date-picker {
  540. display: flex;
  541. align-items: center;
  542. justify-content: space-between;
  543. margin-bottom: 32rpx;
  544. .date-inputs {
  545. display: flex;
  546. align-items: center;
  547. background: #ffffff;
  548. border-radius: 48rpx;
  549. padding: 14rpx;
  550. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  551. .date-label {
  552. width:250rpx;
  553. font-size: 26rpx;
  554. color: #999999;
  555. text-align: center;
  556. }
  557. .date-separator {
  558. margin: 0 24rpx;
  559. font-size: 26rpx;
  560. color: #999999;
  561. }
  562. }
  563. .date-icons {
  564. display: flex;
  565. align-items: center;
  566. justify-content: center;
  567. width: 60rpx ;
  568. height: 60rpx;
  569. border-radius: 50%;
  570. background:#ffffff;
  571. .icon-image{
  572. width: 32rpx;
  573. height: 32rpx;
  574. }
  575. }
  576. }
  577. /* 标签导航 */
  578. .tab-nav {
  579. display: flex;
  580. margin-bottom: 24rpx;
  581. border-bottom: 1rpx solid #e5e5e5;
  582. .tab-item {
  583. padding: 20rpx 0;
  584. font-size: 28rpx;
  585. color: #666666;
  586. position: relative;
  587. margin-right: 30rpx;
  588. &.active {
  589. color: #333333;
  590. font-weight: 500;
  591. &::after {
  592. content: '';
  593. position: absolute;
  594. bottom: 0;
  595. left: 50%;
  596. transform: translateX(-50%);
  597. width: 100%;
  598. height: 4rpx;
  599. background: #515153;
  600. border-radius: 2rpx;
  601. }
  602. }
  603. }
  604. }
  605. /* 预警列表 */
  606. .warning-list {
  607. margin-bottom: 100rpx;
  608. height: calc(100vh - 600rpx);
  609. overflow-y: auto;
  610. .warning-item {
  611. position: relative;
  612. padding: 28rpx 24rpx;
  613. margin-bottom: 24rpx;
  614. background: #ffffff;
  615. border-radius: 16rpx;
  616. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
  617. .warning-header {
  618. display: flex;
  619. align-items: center;
  620. justify-content: space-between;
  621. margin-bottom: 16rpx;
  622. .warning-type {
  623. display: flex;
  624. align-items: center;
  625. flex: 1;
  626. min-width: 0;
  627. .type-icon {
  628. width: 48rpx;
  629. height: 48rpx;
  630. border-radius: 50%;
  631. margin-right: 12rpx;
  632. flex-shrink: 0;
  633. display:flex;
  634. align-items: center;
  635. justify-content: center;
  636. &.type-red {
  637. background: linear-gradient(180deg, #FFA9A5 0%, #FF716A 100%);
  638. }
  639. &.type-blue {
  640. background: linear-gradient(180deg, #83D2FF 0%, #09A5FC 100%);
  641. }
  642. &.type-yellow {
  643. background: linear-gradient(180deg, #FED057 0%, #FFAF40 100%);
  644. }
  645. &.type-gray {
  646. background: #DDDFE6;
  647. }
  648. .icon-image{
  649. width: 28rpx;
  650. height: 28rpx;
  651. }
  652. }
  653. .type-text {
  654. font-size: 26rpx;
  655. font-weight: 500;
  656. color: #333333;
  657. margin-right: 12rpx;
  658. flex-shrink: 0;
  659. }
  660. .device-type {
  661. font-size: 22rpx;
  662. color: #515153;
  663. font-family: "Source Han Sans CN VF";
  664. font-style: normal;
  665. font-weight: 400;
  666. border: 2rpx solid #E4E7ED;
  667. padding: 2rpx 12rpx;
  668. border-radius: 32rpx;
  669. margin-left: 8rpx;
  670. flex-shrink: 0;
  671. }
  672. }
  673. .warning-level {
  674. position: absolute;
  675. top:0;
  676. right:0;
  677. margin-left: 12rpx;
  678. width: 112rpx;
  679. height: 48rpx;
  680. background: url('./assets/normal-gray.png');
  681. background-repeat: no-repeat;
  682. background-size: 100%;
  683. &.level-normal {
  684. background: url('./assets/normal.png');
  685. background-repeat: no-repeat;
  686. background-size: 100%;
  687. }
  688. &.level-important {
  689. background: url('./assets/important.png');
  690. background-repeat: no-repeat;
  691. background-size: 100%;
  692. }
  693. &.level-urgent {
  694. background: url('./assets/urgent.png');
  695. background-repeat: no-repeat;
  696. background-size: 100%;
  697. }
  698. }
  699. }
  700. .warning-content {
  701. font-size: 28rpx;
  702. color: #333333;
  703. line-height: 40rpx;
  704. margin-bottom: 20rpx;
  705. //最多显示2行
  706. overflow: hidden;
  707. text-overflow: ellipsis;
  708. display: -webkit-box;
  709. -webkit-line-clamp: 2;
  710. -webkit-box-orient: vertical;
  711. }
  712. .warning-footer {
  713. display: flex;
  714. align-items: center;
  715. justify-content: space-between;
  716. .warning-time {
  717. font-size: 24rpx;
  718. color: #999999;
  719. }
  720. .warning-location {
  721. display: flex;
  722. align-items: center;
  723. }
  724. }
  725. .location-text {
  726. font-size: 24rpx;
  727. margin-top: 16rpx;
  728. padding-top: 16rpx;
  729. border-top: 1rpx solid #f0f0f0;
  730. font-family: "Source Han Sans CN VF";
  731. color: #999999;
  732. display:flex;
  733. align-items: center;
  734. }
  735. }
  736. }
  737. /* 加载更多提示 */
  738. .loading-more {
  739. text-align: center;
  740. padding: 32rpx 0;
  741. font-size: 24rpx;
  742. color: #999999;
  743. }
  744. /* 回到顶部 */
  745. .back-to-top {
  746. position: fixed;
  747. bottom: 80rpx;
  748. right: 32rpx;
  749. width: 64rpx;
  750. height: 64rpx;
  751. background: #ffffff;
  752. border-radius: 50%;
  753. display: flex;
  754. align-items: center;
  755. justify-content: center;
  756. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
  757. z-index: 99;
  758. }
  759. /* 顶部导航栏右侧图标 */
  760. .header-right {
  761. display: flex;
  762. align-items: center;
  763. .notification-icon {
  764. position: relative;
  765. margin-right: 32rpx;
  766. .badge {
  767. position: absolute;
  768. top: -4rpx;
  769. right: -4rpx;
  770. width: 12rpx;
  771. height: 12rpx;
  772. background: #ff6b6b;
  773. border-radius: 50%;
  774. }
  775. }
  776. }
  777. </style>