index.vue 21 KB

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