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