detail.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. <template>
  2. <view class="device-detail">
  3. <view class="device-detail__header">
  4. <u-icon
  5. size="36"
  6. class="arrow-left"
  7. name="arrow-left"
  8. @click="handleBack"
  9. ></u-icon>
  10. {{ deviceInfo.name }}
  11. </view>
  12. <view class="operation" @click.stop="isShowOperation = !isShowOperation">操作</view>
  13. <view class="operation-container" v-if="isShowOperation" @click="closeOperationHandler">
  14. <view class="operation-background"></view>
  15. <view class="operation-content">
  16. <view class="operation-item" v-if="isShowPhoto" @click="handlePhotoClick">
  17. <image :src="photoIcon" class="operation-icon"></image>
  18. 拍照
  19. </view>
  20. <!-- <view class="operation-item" @click="handleServiceClick">
  21. <image :src="serviceIcon" class="operation-icon"></image>
  22. 维修
  23. </view> -->
  24. <view class="operation-item" @click="handleSettingClick">
  25. <image :src="settingIcon" class="operation-icon"></image>
  26. 设置
  27. </view>
  28. <view class="operation-item" @click="handleSimClick">
  29. <image :src="simIcon" class="operation-icon"></image>
  30. SIM卡
  31. </view>
  32. <view class="operation-item" @click="modification">
  33. <image :src="editIcon" class="operation-icon"></image>
  34. 修改
  35. </view>
  36. </view>
  37. </view>
  38. <view class="device-detail__body">
  39. <DeviceCard
  40. :dataSource="deviceInfo"
  41. :collectTime="time"
  42. :title="deviceInfo.name"
  43. :deviceType="deviceType"
  44. />
  45. <view class="tabs">
  46. <view class="tab-container" v-if="isShowTab">
  47. <!-- <view class="tab-item" :class="activeTab === 'viewImage'?'active':''" @click="handleTabClick('viewImage')">
  48. 查看图片
  49. </view> -->
  50. <view class="tab-item deviceData active" @click="handleTabClick('deviceData')">
  51. 设备数据
  52. </view>
  53. <view class="tab-item" @click="handleTabClick('videoMonitor')">
  54. 视频监控
  55. </view>
  56. </view>
  57. <view class="select-timer-container">
  58. <view class="select-year">
  59. <view class="select-year-item" @click="showPicker = true">
  60. {{ currentYear }}
  61. <u-icon name="arrow-down" size="18" class="arrow-down"></u-icon>
  62. </view>
  63. </view>
  64. <view class="tabs-timer-container" @click="showCalendar">
  65. <view class="tabs-timer-item">
  66. {{startDate}}
  67. </view>
  68. 至
  69. <view class="tabs-timer-item">
  70. {{endDate}}
  71. </view>
  72. <u-icon name="calendar" size="36" class="calendar-icon"></u-icon>
  73. </view>
  74. </view>
  75. </view>
  76. <view v-if="activeTab === 'viewImage'">
  77. <photoImage
  78. :images="imageList"
  79. :pestList="pestList"
  80. :disableShow="disableShow"
  81. @changeTab="changeTab"
  82. :currentYear="currentYear"
  83. :deviceInfo="deviceInfo"
  84. />
  85. </view>
  86. <view v-if="activeTab === 'deviceData'">
  87. <DeviceData
  88. :deviceStatic="deviceStatic"
  89. :deviceInfo="deviceInfo"
  90. :polylineList="polylineList"
  91. :deviceHistoryList="deviceHistoryList"
  92. :totalPage="totalPage"
  93. :currentPage="page"
  94. :page_size="page_size"
  95. @prevPage="prevPage"
  96. @nextPage="nextPage"
  97. />
  98. </view>
  99. </view>
  100. <u-calendar v-model="show" :mode="mode" range-color="#999" btn-type="success" active-bg-color="#0bbc58" range-bg-color="rgba(11,188,88,0.13)" @change="handleChange" :max-date="maxDate" :min-date="minDate"></u-calendar>
  101. <u-picker v-model="showPicker" mode="selector" :range="selectorRange" range-key="id" :default-selector="[0]" @confirm="confirmHandler"></u-picker>
  102. </view>
  103. </template>
  104. <script>
  105. import DeviceCard from './components/DeviceCard.vue';
  106. import PestDiscern from './components/pestDiscern.vue';
  107. import PestEchart from './components/pestEchart.vue';
  108. import PestArchive from './components/pestArchive.vue';
  109. import photoImage from './components/photoImage.vue';
  110. import DeviceData from './components/deviceData.vue';
  111. export default {
  112. components: {
  113. DeviceCard,
  114. PestDiscern,
  115. PestEchart,
  116. PestArchive,
  117. photoImage,
  118. DeviceData,
  119. },
  120. data(){
  121. return {
  122. videoUrl: 'https://wx.hnyfwlw.com/wexin/h52.html?device_id=GF2820249-1&accessToken=X9ounKAN5BxIa3QqMk99EY+2sAeOEjrGKd3A4/IJHC8=',
  123. isShowTab: false,
  124. showPicker: false,
  125. disableShow: false,
  126. isShowOperation: false,
  127. photoIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/photoIcon.png',
  128. editIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/editIcon.png',
  129. serviceIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/serviceIcon.png',
  130. simIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/simIcon.png',
  131. settingIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/settingIcon.png',
  132. totalPage: 0,
  133. currentYear: new Date().getFullYear(),
  134. selectorRange: [],
  135. maxDate: this.formatDate(new Date()),
  136. minDate: this.formatDate(new Date(new Date().getFullYear(), 0, 1)),
  137. show: false,
  138. showSim: false,
  139. // 当前日期向前推30天 格式2026-01-01 月份和日期小于10的时候前面加个0
  140. startDate: this.formatDate(new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000)),
  141. endDate: this.formatDate(new Date()),
  142. mode: 'range',
  143. imageList: [],
  144. pest_order: {},
  145. deviceInfo: {},
  146. pestInfo: {},
  147. time: '',
  148. activeTab: 'deviceData',
  149. deviceType: '',
  150. location: '',
  151. total: 0,
  152. day: [],
  153. pest: [],
  154. page: 1,
  155. is_pest: '',
  156. page_size: 24,
  157. pestList: [],
  158. pest_names: '',
  159. pests: [],
  160. polylineList: [],
  161. isShowPhoto: false,
  162. deviceHistoryList: [],
  163. deviceStatic: {}
  164. }
  165. },
  166. onLoad(options){
  167. this.deviceInfo = JSON.parse(options.info);
  168. const newVal = this.deviceInfo;
  169. if (newVal.device_model == '11'){
  170. this.isShowPhoto = true
  171. } else if(newVal.device_model == '12'){
  172. this.isShowPhoto = false
  173. } else if(newVal.device_model == '13'){
  174. this.isShowPhoto = true
  175. } else if(newVal.device_model == '14'){
  176. this.isShowPhoto = true
  177. } else if(newVal.device_model == '15'){
  178. this.isShowPhoto = false
  179. } else{
  180. this.isShowPhoto = true
  181. }
  182. // this.getPestAnalysis();
  183. this.isShow();
  184. const currentYear = new Date().getFullYear();
  185. this.selectorRange = [];
  186. for(let i = 0; i < 50; i++){
  187. const item = {
  188. label: currentYear - i,
  189. id: currentYear - i
  190. }
  191. this.selectorRange.push(item);
  192. }
  193. },
  194. methods: {
  195. handleSimClick(){
  196. // this.showSim = true;
  197. //`/pages/deviceDetails/weatherStation/${type}?deviceInfo=${encodeURIComponent(JSON.stringify(this.deviceInfo))}`
  198. uni.navigateTo({
  199. url:
  200. '/pages/deviceDetails/weatherStation/simDetail?deviceInfo=' +
  201. encodeURIComponent(JSON.stringify(this.deviceInfo))
  202. });
  203. },
  204. modification() {
  205. uni.navigateTo({
  206. url:
  207. '/pages/equipList/seabox/modification?data=' +
  208. JSON.stringify(this.deviceInfo) +
  209. '&id=' +
  210. this.deviceInfo.type,
  211. });
  212. },
  213. async handlePhotoClick(){
  214. const res = await this.$myRequest({
  215. url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
  216. method: 'POST',
  217. data: {
  218. device_type_id: this.deviceInfo.type,
  219. d_id: this.deviceInfo.d_id,
  220. cmd: 'takephoto',
  221. },
  222. });
  223. if(res){
  224. this.$u.toast('拍照成功')
  225. }
  226. },
  227. handleServiceClick(){
  228. uni.navigateTo({
  229. url: '/pages/afterSale/addafter?d_id=' + this.deviceInfo.d_id +'&device_id='+this.deviceInfo.id + '&device_type=' + this.deviceInfo.type,
  230. })
  231. },
  232. handleSettingClick(){
  233. uni.navigateTo({
  234. url: '/pages/bzy/deviceControl?deviceId=' + this.deviceInfo.id + '&d_id=' + this.deviceInfo.d_id,
  235. });
  236. },
  237. closeOperationHandler(){
  238. this.isShowOperation = false;
  239. },
  240. isShow(){
  241. // disable == 0 或者 device_model == 15 表示不可以查看
  242. if(!this.deviceInfo.d_id){
  243. return false;
  244. }
  245. let showStatus = true;
  246. if(this.deviceInfo.device_model == 15 || this.deviceInfo.device_model == 12){
  247. showStatus = false;
  248. }
  249. if(showStatus){
  250. this.activeTab = 'deviceData';
  251. }else{
  252. this.activeTab = 'deviceData';
  253. }
  254. this.initAction();
  255. this.isShowTab = showStatus;
  256. if(this.deviceInfo.disable == 0){
  257. this.disableShow = false;
  258. if(showStatus){
  259. this.activeTab = 'deviceData';
  260. this.handleTabClick('deviceData');
  261. }
  262. }else{
  263. this.disableShow = true;
  264. }
  265. },
  266. prevPage(e){
  267. if(e == 1){
  268. return
  269. }
  270. this.page = e-=1;
  271. this.getDeviceHistoryData();
  272. },
  273. nextPage(e){
  274. if(e * this.page_size >= this.totalPage){
  275. return
  276. }
  277. this.page = e+=1;
  278. this.getDeviceHistoryData();
  279. },
  280. changeTab(pestList){
  281. let pest_names = pestList.map(item => item.pest_name);
  282. this.pest_names = pest_names.join(',');
  283. this.initImageList();
  284. },
  285. confirmHandler(e){
  286. this.currentYear = this.selectorRange[e].id;
  287. if(this.currentYear == new Date().getFullYear()){
  288. // 结束日期为this.endDate的月份和日期加上选择的年份
  289. const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
  290. this.endDate = this.formatDate(new Date(timeDate));
  291. // 开始日期为结束日期前30天
  292. this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
  293. this.maxDate = this.formatDate(new Date());
  294. this.minDate = this.formatDate(new Date(new Date().getFullYear(), 0, 1));
  295. }else{
  296. // 结束日期为this.endDate的月份和日期加上选择的年份
  297. const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
  298. this.endDate = this.formatDate(new Date(timeDate));
  299. // 开始日期为结束日期前30天
  300. this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
  301. this.maxDate = this.formatDate(new Date(this.currentYear, 11, 31));
  302. this.minDate = this.formatDate(new Date(this.currentYear, 0, 1));
  303. }
  304. this.initAction();
  305. this.showPicker = false;
  306. },
  307. getInfo(info){
  308. this.pestInfo = info;
  309. },
  310. // 格式化日期为YYYY-MM-DD格式,月份和日期小于10时前面加0
  311. formatDate(date) {
  312. const year = date.getFullYear();
  313. const month = String(date.getMonth() + 1).padStart(2, '0');
  314. const day = String(date.getDate()).padStart(2, '0');
  315. return `${year}-${month}-${day}`;
  316. },
  317. formatTime(date){
  318. const time = new Date(date).getTime() / 1000;
  319. return time.toFixed(0);
  320. },
  321. handleChange(e){
  322. this.startDate = e.startDate;
  323. this.endDate = e.endDate;
  324. this.initAction();
  325. },
  326. showCalendar(){
  327. this.show = true;
  328. },
  329. handleBack() {
  330. uni.navigateBack({
  331. delta: 1
  332. });
  333. },
  334. initAction(){
  335. this.pest_order = {}
  336. if(this.activeTab === 'deviceData'){
  337. // this.getDeviceData();
  338. this.getPolylineData();
  339. this.getDeviceHistoryData();
  340. }
  341. },
  342. handleTabClick(tab) {
  343. if(tab === 'videoMonitor'){
  344. uni.navigateTo({
  345. url:
  346. '/pages/scd/videoMonitor?videoUrl=' + this.videoUrl
  347. });
  348. }else{
  349. this.initAction();
  350. }
  351. },
  352. async getDeviceData(){
  353. const res = await this.$myRequest({
  354. url: '/api/api_gateway?method=forecast.worm_lamp.device_status_data',
  355. method: 'POST',
  356. data: {
  357. device_id: this.deviceInfo.id,
  358. },
  359. });
  360. this.deviceStatic = res;
  361. },
  362. async initImageList(){
  363. const res = await this.$myRequest({
  364. url: '/api/api_gateway?method=forecast.forecast_system.equip_photo',
  365. method: 'POST',
  366. data: {
  367. page:this.page,
  368. page_number:this.page_size,
  369. device_id: this.deviceInfo.id,
  370. ret:'list',
  371. time_begin: this.formatTime(this.formatDate(new Date(this.startDate)) + ' 00:00:00'),// 格式化开始时间YYYY-MM-DD HH:MM:SS
  372. time_end: this.formatTime(this.formatDate(new Date(this.endDate)) + ' 23:59:59'),// 格式化结束时间YYYY-MM-DD HH:MM:SS
  373. },
  374. });
  375. const data = res?.data || [];
  376. this.imageList = data
  377. },
  378. async initPest(){
  379. const res = await this.$myRequest({
  380. url: '/api/api_gateway?method=forecast.new_cbd.pest_type_list',
  381. method: 'POST',
  382. data:{
  383. page:1,
  384. page_size:999999,
  385. device_id: this.deviceInfo.id,
  386. identify_model: 'B',
  387. time_begin: this.formatTime(this.formatDate(new Date(this.startDate)) + ' 00:00:00'),// 格式化开始时间YYYY-MM-DD HH:MM:SS
  388. time_end: this.formatTime(this.formatDate(new Date(this.endDate)) + ' 23:59:59'),// 格式化结束时间YYYY-MM-DD HH:MM:SS
  389. },
  390. });
  391. const data = res?.data || [];
  392. this.pestList = data
  393. },
  394. async getPolylineData(){
  395. const res = await this.$myRequest({
  396. url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
  397. method: 'POST',
  398. data: {
  399. device_type_id: this.deviceInfo.type_id,
  400. d_id: this.deviceInfo.d_id,
  401. start_time: new Date(this.startDate).getTime()/1000,// 转成毫秒
  402. end_time: new Date(this.endDate).getTime()/1000,// 转成毫秒
  403. },
  404. });
  405. const data = res || [];
  406. this.polylineList = data
  407. },
  408. async getDeviceHistoryData(){
  409. const res = await this.$myRequest({
  410. url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
  411. method: 'POST',
  412. data: {
  413. device_type_id: this.deviceInfo.type_id,
  414. device_id: this.deviceInfo.id,
  415. start_time: new Date(this.startDate).getTime()/1000,
  416. end_time: new Date(this.endDate).getTime()/1000,
  417. page: this.page,
  418. page_size: this.page_size,
  419. },
  420. });
  421. const data = res?.data || [];
  422. this.totalPage = res.counts;
  423. this.deviceHistoryList = data
  424. },
  425. async getPestAnalysis(){
  426. const res = await this.$myRequest({
  427. url: '/api/api_gateway?method=forecast.cbd_analysis.analysis_pest_result',
  428. method: 'POST',
  429. data: {
  430. d_id: this.deviceInfo.d_id,
  431. start: this.startDate,
  432. end: this.endDate,
  433. model: 'B'
  434. },
  435. });
  436. const pest_order = res?.pest_order;
  437. this.getInfo({});
  438. let total = 0;
  439. this.pests = [];
  440. for(let key in pest_order){
  441. total += pest_order[key] || 0;
  442. this.pests.push({
  443. name: key,
  444. percent: (pest_order[key] / total) * 100
  445. })
  446. }
  447. this.pest_order = pest_order;
  448. this.day = res?.day || [];
  449. const pest = res?.pest || [];
  450. this.pest = pest;
  451. // pest.forEach(p =>{
  452. // for(let i = 0;i< p.length;i++){
  453. // this.pest.push(p[i]);
  454. // }
  455. // })
  456. this.total = total;
  457. }
  458. }
  459. }
  460. </script>
  461. <style scoped lang="scss">
  462. ::v-deep .u-calendar__action{
  463. display:flex;
  464. justify-content: space-between;
  465. }
  466. ::v-deep .u-hover-class{
  467. .u-calendar__content__item__inner{
  468. color:#aaa !important;
  469. }
  470. }
  471. .operation-container{
  472. position: fixed;
  473. right: 0;
  474. top: 0;
  475. width: 100%;
  476. height: 100%;
  477. z-index: 99;
  478. }
  479. .operation{
  480. position: fixed;
  481. top: 260rpx;
  482. right: 0;
  483. z-index: 999;
  484. width:48rpx;
  485. height: 100rpx;
  486. line-height: 50rpx;
  487. border-radius: 8px 0 0 8px;
  488. border-top: 4rpx solid #FFF;
  489. border-bottom: 4rpx solid #FFF;
  490. border-left: 4rpx solid #FFF;
  491. background: #dddfe6a3;
  492. color: #515153;
  493. text-align: center;
  494. font-family: "Source Han Sans CN VF";
  495. font-size: 24rpx;
  496. font-weight: 500;
  497. writing-mode: vertical-rl;
  498. }
  499. .operation-background{
  500. position: fixed;
  501. right: 0;
  502. top: 0;
  503. width: 100%;
  504. height: 100%;
  505. z-index: 998;
  506. background: #00000040;
  507. }
  508. .operation-content{
  509. position: fixed;
  510. top: 240rpx;
  511. right: 80rpx;
  512. height: 126rpx;
  513. display: flex;
  514. padding: 16rpx 32rpx;
  515. align-items: center;
  516. gap: 64rpx;
  517. z-index: 999;
  518. border-radius: 32rpx;
  519. border: 2rpx solid #FFF;
  520. background: #FFF;
  521. backdrop-filter: blur(8rpx);
  522. .operation-item{
  523. display: flex;
  524. flex-direction: column;
  525. align-items: center;
  526. justify-content: center;
  527. color: #333333;
  528. text-align: center;
  529. font-family: "Source Han Sans CN VF";
  530. font-size: 24rpx;
  531. font-weight: 400;
  532. }
  533. .operation-icon{
  534. width: 58rpx;
  535. height: 58rpx;
  536. }
  537. }
  538. .device-detail {
  539. display: flex;
  540. width: 100%;
  541. height: calc(100vh - 112rpx);
  542. padding-top: 112rpx;
  543. flex-direction: column;
  544. align-items: center;
  545. overflow-y: scroll;
  546. background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  547. .device-detail__header {
  548. width: 100%;
  549. font-size: 28rpx;
  550. color: #999;
  551. color: #042118;
  552. font-family: 'Source Han Sans CN VF';
  553. font-weight: 700;
  554. position: relative;
  555. text-align: center;
  556. .arrow-left {
  557. position: absolute;
  558. left: 32rpx;
  559. margin-right: 12rpx;
  560. }
  561. }
  562. .device-detail__body {
  563. width: calc(100% - 64rpx);
  564. margin: 0 auto;
  565. border-radius: 16rpx;
  566. overflow-x: hidden;
  567. overflow-y: auto;
  568. // 隐藏滚动条
  569. -ms-overflow-style: none;
  570. scrollbar-width: none;
  571. }
  572. .tab-content{
  573. width: 100%;
  574. padding-bottom: 32rpx;
  575. }
  576. .tabs {
  577. background: #ffffff;
  578. margin: 24rpx 0;
  579. border-radius: 16rpx;
  580. padding: 16rpx 0;
  581. padding-top: 0;
  582. .tab-container{
  583. display: flex;
  584. width: 100%;
  585. height: 88rpx;
  586. line-height: 88rpx;
  587. text-align: center;
  588. font-size: 28rpx;
  589. font-weight: 700;
  590. color: #042118;
  591. font-family: 'Source Han Sans CN VF';
  592. }
  593. .select-timer-container{
  594. display:flex;
  595. align-items: center;
  596. padding-left: 32rpx;
  597. .select-year{
  598. width: 110rpx;
  599. text-align: center;
  600. height: 64rpx;
  601. border-radius: 32rpx;
  602. font-family: 'Source Han Sans CN VF';
  603. line-height: 64rpx;
  604. background: #F1F4F8;
  605. padding: 0 32rpx;
  606. .select-year-item{
  607. color: #656565;
  608. font-size: 24rpx;
  609. display: flex;
  610. align-items: center;
  611. justify-content: space-around;
  612. }
  613. }
  614. }
  615. .tabs-timer-container{
  616. display: flex;
  617. align-items: center;
  618. width: calc(100% - 256rpx);
  619. height: 64rpx;
  620. line-height: 64rpx;
  621. text-align: center;
  622. font-size: 24rpx;
  623. font-weight: 500;
  624. font-family: 'Source Han Sans CN VF';
  625. border-radius: 32rpx;
  626. background: #F1F4F8;
  627. padding: 0 32rpx;
  628. color: #656565;
  629. margin: 16rpx;
  630. position: relative;
  631. .tabs-timer-item{
  632. width: 42%;
  633. color: #656565;
  634. text-align: center;
  635. font-family: "Source Han Sans CN VF";
  636. font-size: 24rpx;
  637. font-weight: 400;
  638. }
  639. .calendar-icon{
  640. margin-left: 24rpx;
  641. }
  642. }
  643. .tab-item {
  644. flex: 1;
  645. color: #999999;
  646. text-align: center;
  647. font-family: "Source Han Sans CN VF";
  648. font-size: 28rpx;
  649. font-weight: 400;
  650. }
  651. .active{
  652. position: relative;
  653. color: #303133;
  654. text-align: center;
  655. font-family: "Source Han Sans CN VF";
  656. font-size: 28rpx;
  657. font-weight: 700;
  658. &::after {
  659. content: '';
  660. position: absolute;
  661. bottom: 0;
  662. left: 50%;
  663. -webkit-transform: translateX(-50%);
  664. transform: translateX(-50%);
  665. width: 36rpx;
  666. height: 36rpx;
  667. border: 6rpx solid #0bbc58;
  668. border-radius: 50%;
  669. border-color: transparent;
  670. border-bottom-color: #0bbc58;
  671. }
  672. }
  673. }
  674. }
  675. </style>