index.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121
  1. <template>
  2. <view class="flex-col justify-start home-container">
  3. <view class="container-bg"></view>
  4. <cu-custom bgColor="#fff"><view slot="content" style="color: #FFFFFF">UU睡眠</view></cu-custom>
  5. <view class="flex-col home-module space-y-20">
  6. <!-- no device added -->
  7. <view v-if="!deviceAdded">
  8. <view class="flex-col items-start home-header space-y-10">
  9. <text class="home-header-title">欢迎回来!</text>
  10. <text class="font_3 text_3 home-header-subtitle">我是小U,您的健康智慧管家。</text>
  11. </view>
  12. <view class="flex-row items-center home_add_devive space-x-10">
  13. <image
  14. class="image_4"
  15. src="../../static/home/homeIconAdd.png"
  16. />
  17. <text class="text_5">添加设备</text>
  18. </view>
  19. <view class="home-ad flex-col group_5 space-y-40">
  20. <view class="flex-col home-header space-y-6">
  21. <view class="flex-row items-center space-x-8">
  22. <text class="font_4 text_8">UU AI智能睡眠监测仪</text>
  23. <view class="flex-row items-center section_7">
  24. <text class="font_5 text_9">去看看</text>
  25. <image
  26. class="shrink-0 image_9"
  27. src="../../static/home/homeIconGO.png"
  28. />
  29. </view>
  30. </view>
  31. <view class="flex-row items-center space-x-10">
  32. <text class="font_5 text_3 text_10">AI时代,全家人的睡眠健康顾问</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="flex-col">
  37. <view class="flex-col group_5">
  38. <view class="flex-col home_blank_heart">
  39. <view class="flex-row items-center group_7 space-x-4">
  40. <image
  41. class="image_6"
  42. src="../../static/home/homeIconHeart.png"
  43. />
  44. <text class="font_1 text_9">心率</text>
  45. </view>
  46. <view class="flex-row justify-end items-start">
  47. <view class="section_5 view"></view>
  48. <text class="font_3 text_10">--</text>
  49. </view>
  50. <view class="flex-col group_8">
  51. <text class="self-start font_4 text_11">次/分</text>
  52. <view class="shrink-0 self-end section_5"></view>
  53. </view>
  54. </view>
  55. <view class="flex-col home_blank_breath">
  56. <view class="flex-row items-center group_10 space-x-4">
  57. <image
  58. class="image_7"
  59. src="../../static/home/homeIconBreath.png"
  60. />
  61. <text class="font_1 text_12">呼吸</text>
  62. </view>
  63. <view class="flex-row justify-end items-start">
  64. <view class="section_5 view_2"></view>
  65. <text class="font_3 text_13">--</text>
  66. </view>
  67. <view class="flex-col group_8">
  68. <text class="self-start font_4 text_11">次/分</text>
  69. <view class="shrink-0 self-end section_5"></view>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="flex-row items-center home_blank_alert space-x-16">
  74. <image
  75. class="image_8"
  76. src="../../static/home/homeIconGift.png"
  77. />
  78. <view class="flex-col items-start flex-auto space-y-4">
  79. <text class="font_5">昨晚您的睡眠质量很好</text>
  80. <text class="font_5">暂时没有预警信息</text>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. <!-- device added -->
  86. <view v-if="deviceAdded" class="flex-col">
  87. <view class="flex-col items-start home-header space-y-10">
  88. <text class="home-header-title">欢迎回来!</text>
  89. <text class="font_3 text_3 home-header-subtitle">我是小U,您的健康智慧管家。</text>
  90. </view>
  91. <!-- home device -->
  92. <view class="flex-col home-device space-y-15">
  93. <view class="flex-row home-device-header">
  94. <!-- <view class="flex-row justify-between flex-auto equal-division">-->
  95. <!-- <view class="flex-row equal-division-item space-x-4">-->
  96. <!-- <text class="font_3 text_5">场景</text>-->
  97. <!-- <text class="font_3">老人房</text>-->
  98. <!-- </view>-->
  99. <!-- <view class="flex-row equal-division-item space-x-14">-->
  100. <!-- <view class="flex-row space-x-4">-->
  101. <!-- <image class="shrink-0 image_6" src="../../static/home/homeIconWifi.png" />-->
  102. <!-- <text class="font_3">在线</text>-->
  103. <!-- </view>-->
  104. <!-- <view class="flex-row items-center space-x-6">-->
  105. <!-- <text class="font_3 text_6">45%</text>-->
  106. <!-- <image class="shrink-0 image_7" src="../../static/home/homeIconPower.png" />-->
  107. <!-- </view>-->
  108. <!-- </view>-->
  109. <!-- </view>-->
  110. <!-- <view class="flex-row items-center section_5 space-x-4">-->
  111. <!-- <image class="shrink-0 image_8" src="../../static/home/homeIconChange.png"/>-->
  112. <!-- <text class="font_3">切换</text>-->
  113. <!-- </view>-->
  114. </view>
  115. <view class="flex-row justify-center self-center home-device-status space-x-8">
  116. <text class="font_4 text_7">当前状态</text>
  117. <text class="font_4">{{ sleepStatus }}</text>
  118. </view>
  119. <view>
  120. <uni-steps :options="list1" :active="active" />
  121. </view>
  122. <view class="flex-row self-center items-center home-device-setting">
  123. <image
  124. class="shrink-0 image_8"
  125. src="../../static/home/homeIconSet.png"
  126. />
  127. <text>设置目标</text>
  128. </view>
  129. </view>
  130. <view class="home-report flex-col group_5 space-y-40">
  131. <view class="flex-col home-header space-y-6">
  132. <view class="flex-row items-center space-x-8">
  133. <text class="font_4 text_8">睡眠报告</text>
  134. <view class="flex-row items-center section_7">
  135. <text class="font_5 text_9">去看看</text>
  136. <image
  137. class="shrink-0 image_9"
  138. src="../../static/home/homeIconGO.png"
  139. />
  140. </view>
  141. </view>
  142. <view class="flex-row items-center space-x-10">
  143. <text class="font_5 text_3 text_10">小U已为您生成最后一份睡眠报告</text>
  144. <text class="font_5 text_3 text_11">2021-08-24</text>
  145. </view>
  146. </view>
  147. </view>
  148. <view class="flex-col space-y-40 home-data">
  149. <view class="flex-row group_6 equal-division">
  150. <view class="flex-row group_7 space-x-6 home-data-item equal-division-item">
  151. <view class="flex-col shrink-0 self-stretch group_9 space-y-20">
  152. <view class="flex-row items-center space-x-4">
  153. <image
  154. class="shrink-0 image_10"
  155. src="../../static/home/homeIconHeart.png"
  156. />
  157. <text class="font_1">心率</text>
  158. </view>
  159. <text class="self-center font_6">73</text>
  160. </view>
  161. <text class="self-start font_7 text_14">次/分</text>
  162. </view>
  163. <view class="flex-row justify-center group_8 space-x-6 home-data-item equal-division-item">
  164. <view class="flex-col space-y-20">
  165. <view class="flex-row space-x-4">
  166. <image
  167. class="shrink-0 image_4"
  168. src="../../static/home/homeIconBreath.png"
  169. />
  170. <text class="font_1 text_12">呼吸</text>
  171. </view>
  172. <text class="self-center font_6 text_13">24</text>
  173. </view>
  174. <text class="self-start font_7 text_15">次/分</text>
  175. </view>
  176. </view>
  177. </view>
  178. <view class="cu-card article">
  179. <view class="cu-item shadow chartsBgColor">
  180. <view class="title"><view class="text-cut text-lg text-gray">心率 <text class="text-green margin-left">{{ pjxl }} 分钟/次</text></view></view>
  181. <view class="content">
  182. <view class="echarts-wrap">
  183. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-1" ref="xinlvRefChart" @onInit="onInit1"></mpvue-echarts>
  184. </view>
  185. </view>
  186. </view>
  187. </view>
  188. <view class="cu-card article">
  189. <view class="cu-item shadow chartsBgColor">
  190. <view class="title"><view class="text-cut text-lg text-white">呼吸<text class="text-orange margin-left">{{ pjhx }} 分钟/次</text></view></view>
  191. <view class="content">
  192. <view class="echarts-wrap">
  193. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-2" ref="huxiRefChart" @onInit="onInit2"></mpvue-echarts>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. <view class="flex-col home-alert space-y-4">
  199. <view @click="jumpToAlertSetting" class="flex-row items-center space-x-4 home-alert-header">
  200. <image
  201. class="image_10"
  202. src="../../static/home/homeIconHeart.png"
  203. />
  204. <text class="font_1">实时预警</text>
  205. </view>
  206. <view @click="handleAlertSetting" class="flex-col home-alert-list">
  207. <view class="flex-row justify-between items-center list-item" :key="i" v-for="(item, i) in list_alerts">
  208. <view class="flex-row items-center space-x-6">
  209. <image
  210. class="shrink-0 image_11"
  211. src="../../static/home/homeIconAlert.png"
  212. />
  213. <text class="font_8">心率警报</text>
  214. <text class="font_9 text_16">2:25</text>
  215. </view>
  216. <view class="flex-row items-baseline space-x-4">
  217. <text class="font_10">102</text>
  218. <text class="font_8">次/分</text>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <!-- <tab-bar currentPage="home" /> -->
  226. </view>
  227. </template>
  228. <script>
  229. import echarts from '@/static/echarts.min.js'
  230. import mpvueEcharts from '@/components/mpvue-echarts/src/echarts.vue'
  231. export default {
  232. components: {
  233. mpvueEcharts
  234. },
  235. data() {
  236. return {
  237. deviceAdded: true,
  238. list_alerts: [null, null],
  239. active: 4,
  240. list1: [{
  241. title: '昨日就寝 11:24PM'
  242. }, {
  243. title: '就寝目标 11:00PM'
  244. }, {
  245. title: '起床目标 7:00AM'
  246. }, {
  247. title: '今日起床 7:14AM'
  248. }],
  249. chartObj1: null, // 心率图表
  250. chartObj2: null, // 呼吸图表
  251. myData1: [], // 心率数据
  252. myData2: [], // 呼吸数据
  253. myCount1: 0, // 心率x轴数字
  254. myCount2: 0, // 呼吸x轴数字
  255. allXl: 0, // 总心率
  256. pjxl: 0, // 平均心率
  257. allHx: 0, // 总呼吸
  258. pjhx: 0, // 平均呼吸
  259. sleepStatus: '离床',
  260. connecting: false,
  261. connected: false,
  262. mySocketTask: null
  263. };
  264. },
  265. created() {
  266. },
  267. onLoad() {
  268. const _this = this
  269. setTimeout(() => {
  270. _this.nowChart1()
  271. _this.nowChart2()
  272. _this.connect()
  273. }, 800)
  274. },
  275. methods: {
  276. connect() {
  277. let _this = this
  278. if (this.connected || this.connecting) {
  279. uni.showModal({
  280. content: '正在连接或者已经连接,请勿重复连接!',
  281. showCancel: false
  282. });
  283. return false
  284. }
  285. this.connecting = true
  286. // let wsUrl = api.base.replace('http', 'ws')
  287. this.mySocketTask = uni.connectSocket({
  288. url: 'ws://wdkl.natapp1.cc/sleep_report/monitor/50289', // 先写死
  289. success(res) {
  290. // 这里是接口调用成功的回调,不是连接成功的回调,请注意
  291. },
  292. fail(err) {
  293. // 这里是接口调用失败的回调,不是连接失败的回调,请注意
  294. }
  295. })
  296. this.mySocketTask.onOpen(res => {
  297. this.connecting = false
  298. this.connected = true
  299. uni.hideLoading()
  300. let _this = this
  301. this.timer = setInterval(function () { //每隔5秒钟发送一次心跳,避免websocket连接因超时而自动断开
  302. _this.mySocketTask.send({data: 'ping'})
  303. }, 30000) // 30秒的心跳包
  304. })
  305. this.mySocketTask.onError(err => {
  306. this.connecting = false
  307. this.connected = false
  308. uni.hideLoading()
  309. uni.showModal({
  310. content: '连接失败,可能是websocket服务不可用,请稍后再试',
  311. showCancel: false
  312. })
  313. console.log('onError', err)
  314. })
  315. this.mySocketTask.onMessage(res => {
  316. let msg = res.data
  317. console.log('收到消息:', msg)
  318. if (msg.length === 30) {
  319. this.getValue1(parseInt(msg.substring(22, 24), 16))
  320. this.getValue2(parseInt(msg.substring(24, 26), 16))
  321. switch (msg.substring(26, 28)) {
  322. case "03":
  323. this.sleepStatus = '在床'
  324. break;
  325. case "04":
  326. this.sleepStatus = '离床'
  327. break;
  328. case "05":
  329. this.sleepStatus = '打鼾'
  330. break;
  331. case "06":
  332. this.sleepStatus = '体动'
  333. break;
  334. default:
  335. break;
  336. }
  337. }
  338. })
  339. this.mySocketTask.onClose(res => {
  340. this.connected = false
  341. this.msg = false
  342. clearInterval(this.timer)
  343. })
  344. },
  345. nowChart1() {
  346. this.onInit1(this.chartObj1)
  347. let canvas = this.$refs.xinlvRefChart.canvas
  348. echarts.setCanvasCreator(() => canvas)
  349. this.myChart1 = echarts.init(canvas, 'halloween', {
  350. width: this.chartObj1.width,
  351. height: this.chartObj1.height
  352. })
  353. this.options1 = Object.assign(this.getOptions('#FFFFFF', 800), {})
  354. this.options1.series.forEach((item) => {
  355. item.data = this.myData1
  356. })
  357. this.myChart1.setOption(this.options1)
  358. },
  359. nowChart2() {
  360. this.onInit2(this.chartObj2);
  361. let canvas = this.$refs.huxiRefChart.canvas;
  362. echarts.setCanvasCreator(() => canvas);
  363. this.myChart2 = echarts.init(canvas, 'halloween', {
  364. width: this.chartObj2.width,
  365. height: this.chartObj2.height
  366. });
  367. this.options2 = Object.assign(this.getOptions('#06f5d2', 400), {})
  368. this.options2.series.forEach((item) => {
  369. item.data = this.myData2
  370. })
  371. this.myChart2.setOption(this.options2)
  372. },
  373. onInit1(e) {
  374. this.chartObj1 = e
  375. },
  376. onInit2(e) {
  377. this.chartObj2 = e
  378. },
  379. getOptions(color, xMax) {
  380. return {
  381. visualMap: [
  382. {
  383. show: false,
  384. type: 'continuous',
  385. seriesIndex: 0,
  386. min: 0,
  387. max: 300,
  388. },
  389. ],
  390. color: color,
  391. title: {
  392. left: 'left',
  393. // text: title,
  394. },
  395. tooltip: {
  396. trigger: 'axis',
  397. axisPointer: {
  398. animation: false,
  399. },
  400. },
  401. grid: {
  402. top: '15%',
  403. bottom: '10%',
  404. },
  405. xAxis: {
  406. type: 'category',
  407. boundaryGap: [0, '100%'],
  408. show: false, // 不显示x轴
  409. splitLine: {
  410. show: false,
  411. },
  412. triggerEvent: true
  413. },
  414. yAxis: {
  415. type: 'value',
  416. boundaryGap: [0, '100%'],
  417. min: 0,
  418. max: xMax,
  419. // max: 'dataMax', // 取数据在该轴上的最大值作为最大刻度
  420. splitLine: {
  421. show: false, // 是否显示分隔线
  422. },
  423. axisLine: {
  424. show: false, // 是否显示坐标轴轴线
  425. lineStyle:{
  426. color:'#FFFFFF',
  427. width:1, //x轴线的宽度
  428. }
  429. },
  430. },
  431. series: [
  432. {
  433. type: 'line',
  434. showSymbol: false,
  435. hoverAnimation: false,
  436. data: [],
  437. },
  438. ]
  439. }
  440. },
  441. getValue1(value) {
  442. console.log("心率是", value)
  443. this.pjxl = value
  444. if (this.myData1.length > 60) {
  445. this.myData1.splice(0,5)
  446. }
  447. if (value !== 0) {
  448. for (let i = 0; i < 5; i++) {
  449. this.myCount1 ++;
  450. value = parseInt(Math.random(100) * 500 + 300)
  451. this.myData1.push([this.myCount1, value])
  452. }
  453. } else {
  454. for (let i = 0; i < 5; i++) {
  455. this.myCount1 ++;
  456. value = 410
  457. this.myData1.push([this.myCount1, value])
  458. }
  459. }
  460. this.myChart1.setOption(this.options1)
  461. this.myChart1.setOption(this.options1)
  462. },
  463. getValue2(value) {
  464. console.log("呼吸值是", value)
  465. this.pjhx = value
  466. if (this.myData2.length > 60) {
  467. this.myData2.splice(0,5)
  468. }
  469. if (value === 0) {
  470. for (let i = 0; i < 5; i++) {
  471. this.myCount2 ++;
  472. value = 220
  473. this.myData2.push([this.myCount2, value])
  474. }
  475. } else {
  476. value = parseInt((Math.random(10) * 300 + 100))
  477. for (let i = 0; i < 5; i++) {
  478. this.myCount2 ++;
  479. value += parseInt(Math.random() * 10 - 5)
  480. this.myData2.push([this.myCount2, value])
  481. }
  482. }
  483. this.myChart2.setOption(this.options2)
  484. this.myChart2.setOption(this.options2)
  485. },
  486. handleAlertSetting() {
  487. uni.navigateTo({
  488. url: "/pages/alertSetting/alertSetting"
  489. });
  490. }
  491. }
  492. };
  493. </script>
  494. <style lang="scss" scoped>
  495. @import "../../colorui/animation.css";
  496. .echarts-wrap {
  497. width: 100%;
  498. height: 150px;
  499. /*padding: 10upx;*/
  500. margin-bottom: 0.3rem
  501. }
  502. .chartsBgColor{
  503. background: linear-gradient(90deg, rgba(86, 17, 247, 0.5) 0%, #4d9efa 100%);
  504. }
  505. .equal-division {
  506. .equal-division-item {
  507. padding: 0.25rem 0.38rem 0;
  508. flex: 1 1 10.81rem;
  509. }
  510. }
  511. .home_add_devive {
  512. margin-right: 1.25rem;
  513. margin: 1rem;
  514. padding: 3.75rem 0;
  515. background-color: #0233c699;
  516. border-radius: 1rem;
  517. backdrop-filter: blur(0.63rem);
  518. width: 20.94rem;
  519. .image_4 {
  520. margin-left: 6.38rem;
  521. width: 1.5rem;
  522. height: 1.5rem;
  523. }
  524. .text_5 {
  525. color: #ffffff;
  526. font-size: 1.5rem;
  527. font-family: PingFangSC;
  528. line-height: 1.38rem;
  529. }
  530. }
  531. .space-x-10 {
  532. & > view:not(:first-child),
  533. & > text:not(:first-child),
  534. & > image:not(:first-child) {
  535. margin-left: 0.63rem;
  536. }
  537. }
  538. .home_ad {
  539. margin-left: 2.25rem;
  540. background: url(../../static/home/homeBg2.png);
  541. background-repeat: no-repeat;
  542. background-size: contain;
  543. .text_6 {
  544. padding: 0.13rem 0;
  545. color: #ffffff;
  546. font-size: 1rem;
  547. font-family: PingFangSC;
  548. line-height: 0.94rem;
  549. }
  550. .section_4 {
  551. padding: 0.13rem 0.38rem;
  552. background-image: linear-gradient(90deg, #2c25f799 0%, #061599 100%);
  553. border-radius: 0.44rem;
  554. width: 2.88rem;
  555. height: 0.88rem;
  556. .font_2 {
  557. font-size: 0.69rem;
  558. font-family: PingFangSC;
  559. line-height: 0.63rem;
  560. color: #ffffff;
  561. }
  562. .text_7 {
  563. font-size: 0.63rem;
  564. line-height: 0.56rem;
  565. }
  566. .image_5 {
  567. width: 0.19rem;
  568. height: 0.31rem;
  569. }
  570. }
  571. }
  572. .space-x-6 {
  573. & > view:not(:first-child),
  574. & > text:not(:first-child),
  575. & > image:not(:first-child) {
  576. margin-left: 0.38rem;
  577. }
  578. }
  579. .group_5 {
  580. padding-left: 1rem;
  581. padding-right: 1rem;
  582. .font_2 {
  583. font-size: 0.69rem;
  584. font-family: PingFangSC;
  585. line-height: 0.63rem;
  586. color: #ffffff;
  587. }
  588. .text_8 {
  589. font-size: 0.63rem;
  590. line-height: 0.59rem;
  591. opacity: 0.6;
  592. }
  593. .home_blank_heart {
  594. margin-top: 1rem;
  595. opacity: 1;
  596. border-radius: 16px;
  597. background: linear-gradient(180deg, rgba(52, 26, 75, 1) 0%, rgba(22, 125, 242, 1) 100%);
  598. backdrop-filter: blur(20px);
  599. padding:1rem 0rem 2rem 1rem;
  600. .group_7 {
  601. padding-bottom: 1.13rem;
  602. .image_6 {
  603. width: 1.13rem;
  604. height: 0.88rem;
  605. }
  606. .text_9 {
  607. line-height: 1.03rem;
  608. }
  609. }
  610. .view {
  611. margin-right: -20.13rem;
  612. }
  613. .text_10 {
  614. margin-right: 18.75rem;
  615. margin-top: 1rem;
  616. }
  617. }
  618. .home_blank_breath {
  619. margin-top: 1rem;
  620. opacity: 1;
  621. border-radius: 16px;
  622. background: linear-gradient(180deg, rgba(52, 26, 75, 1) 0%, rgba(22, 125, 242, 1) 100%);
  623. backdrop-filter: blur(20px);
  624. padding:1rem 0rem 2rem 1rem;
  625. .group_10 {
  626. padding-bottom: 1.25rem;
  627. .image_7 {
  628. width: 1.13rem;
  629. height: 1.06rem;
  630. }
  631. .text_12 {
  632. line-height: 1rem;
  633. }
  634. }
  635. .view_2 {
  636. margin-right: -20rem;
  637. }
  638. .text_13 {
  639. margin-right: 18.63rem;
  640. margin-top: 1rem;
  641. }
  642. }
  643. .space-x-4 {
  644. & > view:not(:first-child),
  645. & > text:not(:first-child),
  646. & > image:not(:first-child) {
  647. margin-left: 0.25rem;
  648. }
  649. }
  650. .font_1 {
  651. font-size: 1.13rem;
  652. font-family: PingFangSC;
  653. line-height: 1.06rem;
  654. color: #ffffff;
  655. }
  656. .section_5 {
  657. background-color: #ffffff1a;
  658. width: 15.94rem;
  659. height: 0.063rem;
  660. }
  661. .font_3 {
  662. font-size: 2.5rem;
  663. font-family: PingFangSC;
  664. line-height: 0.19rem;
  665. color: #ffffff;
  666. }
  667. .group_8 {
  668. margin-top: 1.38rem;
  669. padding-left: 0.63rem;
  670. .font_4 {
  671. font-size: 0.69rem;
  672. font-family: PingFangSC;
  673. line-height: 0.63rem;
  674. color: #ffffff80;
  675. }
  676. .text_11 {
  677. font-size: 0.75rem;
  678. line-height: 0.69rem;
  679. }
  680. }
  681. }
  682. .home_blank_alert {
  683. margin: 1rem 1.25rem 0;
  684. padding: 0.94rem;
  685. background-color: #02299ecc;
  686. border-radius: 1rem;
  687. .image_8 {
  688. width: 7.06rem;
  689. height: 4.94rem;
  690. }
  691. .space-y-4 {
  692. & > view:not(:first-child),
  693. & > text:not(:first-child),
  694. & > image:not(:first-child) {
  695. margin-top: 0.25rem;
  696. }
  697. .font_5 {
  698. font-size: 0.88rem;
  699. font-family: PingFangSC;
  700. line-height: 1.06rem;
  701. color: #167df2;
  702. }
  703. }
  704. }
  705. .space-x-16 {
  706. & > view:not(:first-child),
  707. & > text:not(:first-child),
  708. & > image:not(:first-child) {
  709. margin-left: 1rem;
  710. }
  711. }
  712. .container-bg {
  713. position: fixed;
  714. left: -130px;
  715. top: -130px;
  716. width: 480px;
  717. height: 344px;
  718. opacity: 1;
  719. overflow: hidden;
  720. border-radius: 63px;
  721. -webkit-transform: rotate(-315deg);
  722. transform: rotate(-315deg);
  723. background: linear-gradient(90deg, rgba(86, 17, 247, 0.5) 0%, #4d9efa 100%);
  724. }
  725. .home-container {
  726. padding-bottom: 2rem;
  727. background-color: #000000;
  728. width: 100%;
  729. overflow-y: auto;
  730. overflow-x: hidden;
  731. height: 100%;
  732. .home-module {
  733. padding: 1.75rem 0 3.38rem;
  734. overflow-y: auto;
  735. z-index: 100;
  736. .home-header {
  737. padding: 0 1.25rem;
  738. .home-header-title {
  739. color: #ffffff;
  740. font-size: 1.25rem;
  741. font-family: PingFangSC;
  742. line-height: 1.16rem;
  743. }
  744. .text_8 {
  745. color: #ffffff;
  746. opacity: 1;
  747. }
  748. .text_3 {
  749. opacity: 0.6;
  750. }
  751. .home-header-subtitle {
  752. line-height: 0.72rem;
  753. }
  754. .space-x-10 {
  755. & > view:not(:first-child),
  756. & > text:not(:first-child),
  757. & > image:not(:first-child) {
  758. margin-left: 0.63rem;
  759. }
  760. .text_10 {
  761. line-height: 0.59rem;
  762. }
  763. .text_11 {
  764. line-height: 0.47rem;
  765. }
  766. }
  767. }
  768. .space-y-10 {
  769. & > view:not(:first-child),
  770. & > text:not(:first-child),
  771. & > image:not(:first-child) {
  772. margin-top: 0.63rem;
  773. }
  774. }
  775. .home-device {
  776. margin: 1rem 1.25rem;
  777. padding-bottom: 2rem;
  778. background-color: #0233c699;
  779. border-radius: 1rem;
  780. backdrop-filter: blur(0.63rem);
  781. .home-device-setting {
  782. width: 70px;
  783. height: 20px;
  784. opacity: 1;
  785. border-radius: 7px;
  786. background: linear-gradient(90deg, rgba(255, 35, 247, 1) 0%, rgba(91, 30, 154, 1) 100%);
  787. .image_8 {
  788. width: 10px;
  789. height: 10px;
  790. }
  791. font-size: 10px;
  792. font-weight: 400;
  793. line-height: 10px;
  794. color: rgba(255, 255, 255, 1);
  795. padding: 0.3rem;
  796. }
  797. .home-device-header {
  798. background-color: #ffffff33;
  799. border-radius: 1rem 1rem 0px 0px;
  800. .equal-division {
  801. padding: 0 1rem;
  802. .equal-division-item {
  803. padding: 0.38rem 0;
  804. .text_5 {
  805. opacity: 0.5;
  806. }
  807. }
  808. .space-x-14 {
  809. & > view:not(:first-child),
  810. & > text:not(:first-child),
  811. & > image:not(:first-child) {
  812. margin-left: 0.88rem;
  813. }
  814. }
  815. }
  816. .section_5 {
  817. padding: 0.38rem 0.5rem;
  818. background-image: linear-gradient(90deg, #2c25f799 0%, #061599 100%);
  819. border-radius: 0px 1rem 0px 0px;
  820. height: 1.5rem;
  821. .image_8 {
  822. width: 0.75rem;
  823. height: 0.75rem;
  824. }
  825. }
  826. }
  827. .home-device-status {
  828. padding: 0.25rem 0 0.25rem 0.25rem;
  829. background-color: #ffffff33;
  830. border-radius: 0.75rem;
  831. width: 7.88rem;
  832. .text_7 {
  833. opacity: 0.4;
  834. }
  835. }
  836. }
  837. .space-y-15 {
  838. & > view:not(:first-child),
  839. & > text:not(:first-child),
  840. & > image:not(:first-child) {
  841. margin-top: 0.94rem;
  842. }
  843. }
  844. .font_3 {
  845. font-size: 0.75rem;
  846. font-family: PingFangSC;
  847. line-height: 0.69rem;
  848. color: #ffffff;
  849. }
  850. .home-report {
  851. margin: 0 1.25rem;
  852. padding: 1rem 0;
  853. background-image: url(../../static/home/homeReportBg.png);
  854. background-size: contain;
  855. background-repeat: no-repeat;
  856. .space-y-6 {
  857. & > view:not(:first-child),
  858. & > text:not(:first-child),
  859. & > image:not(:first-child) {
  860. margin-top: 0.38rem;
  861. }
  862. }
  863. }
  864. .home-ad {
  865. margin: 0 1.25rem;
  866. padding: 1rem 0;
  867. background-image: url(../../static/home/homeBg2.png);
  868. background-size: contain;
  869. background-repeat: no-repeat;
  870. .space-y-6 {
  871. & > view:not(:first-child),
  872. & > text:not(:first-child),
  873. & > image:not(:first-child) {
  874. margin-top: 0.38rem;
  875. }
  876. }
  877. }
  878. .home-data {
  879. margin: 0rem 1.25rem;
  880. padding: 1rem 0rem;
  881. .home-data-item {
  882. padding: 1rem 0rem;
  883. margin: 0 0.3rem;
  884. opacity: 1;
  885. border-radius: 16px;
  886. background: linear-gradient(180deg, rgba(52, 26, 75, 0.65) 0%, rgba(22, 125, 242, 1) 100%);
  887. backdrop-filter: blur(20px);
  888. }
  889. }
  890. .group_6 {
  891. overflow-x: hidden;
  892. width: 100%;
  893. .group_7 {
  894. overflow-x: hidden;
  895. width: 10rem;
  896. .group_9 {
  897. margin-left: 2.25rem;
  898. }
  899. .text_14 {
  900. margin-top: 3.5rem;
  901. }
  902. }
  903. .group_8 {
  904. width: 10rem;
  905. .text_15 {
  906. margin-top: 3.63rem;
  907. }
  908. }
  909. .font_6 {
  910. font-size: 3rem;
  911. font-family: PingFangSC;
  912. line-height: 2.19rem;
  913. color: #ffffff;
  914. }
  915. .font_7 {
  916. font-size: 0.75rem;
  917. font-family: PingFangSC;
  918. line-height: 0.69rem;
  919. color: #ffffff80;
  920. }
  921. }
  922. .space-y-40 {
  923. & > view:not(:first-child),
  924. & > text:not(:first-child),
  925. & > image:not(:first-child) {
  926. margin-top: 2.5rem;
  927. }
  928. }
  929. .space-x-8 {
  930. & > view:not(:first-child),
  931. & > text:not(:first-child),
  932. & > image:not(:first-child) {
  933. margin-left: 0.5rem;
  934. }
  935. .text_8 {
  936. padding: 0.13rem 0;
  937. }
  938. .section_7 {
  939. padding: 0.13rem 0.38rem;
  940. background-image: linear-gradient(90deg, #ff23f7 0%, #5b1e9a 100%);
  941. border-radius: 0.44rem;
  942. height: 0.88rem;
  943. .text_9 {
  944. line-height: 0.56rem;
  945. }
  946. .image_9 {
  947. width: 0.19rem;
  948. height: 0.31rem;
  949. }
  950. }
  951. }
  952. .font_4 {
  953. font-size: 1rem;
  954. font-family: PingFangSC;
  955. line-height: 0.94rem;
  956. color: #ffffff;
  957. }
  958. .font_5 {
  959. font-size: 0.63rem;
  960. font-family: PingFangSC;
  961. color: #ffffff;
  962. }
  963. .space-x-6 {
  964. & > view:not(:first-child),
  965. & > text:not(:first-child),
  966. & > image:not(:first-child) {
  967. margin-left: 0.38rem;
  968. }
  969. .text_6 {
  970. line-height: 0.56rem;
  971. }
  972. .image_7 {
  973. width: 1.31rem;
  974. height: 0.69rem;
  975. }
  976. .image_11 {
  977. width: 1.13rem;
  978. height: 0.94rem;
  979. }
  980. .font_9 {
  981. font-size: 0.88rem;
  982. font-family: PingFangSC;
  983. line-height: 0.69rem;
  984. color: #167df2;
  985. }
  986. .text_16 {
  987. line-height: 0.63rem;
  988. }
  989. }
  990. .space-x-4 {
  991. & > view:not(:first-child),
  992. & > text:not(:first-child),
  993. & > image:not(:first-child) {
  994. margin-left: 0.25rem;
  995. }
  996. .image_6 {
  997. width: 0.94rem;
  998. height: 0.75rem;
  999. }
  1000. .image_10 {
  1001. width: 1.13rem;
  1002. height: 0.88rem;
  1003. }
  1004. .font_1 {
  1005. font-size: 1.13rem;
  1006. font-family: PingFangSC;
  1007. line-height: 1.03rem;
  1008. color: #ffffff;
  1009. }
  1010. .image_4 {
  1011. width: 1.13rem;
  1012. height: 1.06rem;
  1013. }
  1014. .text_12 {
  1015. line-height: 1rem;
  1016. }
  1017. .font_10 {
  1018. font-size: 1.13rem;
  1019. font-family: PingFangSC;
  1020. line-height: 0.81rem;
  1021. color: #ff465a;
  1022. }
  1023. }
  1024. .home-alert {
  1025. margin: 0 1.25rem;
  1026. padding: 1rem 0.88rem 0.13rem;
  1027. background-color: #0233c6cc;
  1028. border-radius: 1rem;
  1029. .home-alert-header {
  1030. }
  1031. .home-alert-list {
  1032. .list-item {
  1033. padding: 0.88rem 0;
  1034. border-bottom: solid 0.063rem #ffffff1a;
  1035. }
  1036. }
  1037. }
  1038. .space-y-4 {
  1039. & > view:not(:first-child),
  1040. & > text:not(:first-child),
  1041. & > image:not(:first-child) {
  1042. margin-top: 0.25rem;
  1043. }
  1044. }
  1045. .font_8 {
  1046. font-size: 0.88rem;
  1047. font-family: PingFangSC;
  1048. line-height: 0.81rem;
  1049. color: #ffffff;
  1050. }
  1051. }
  1052. .space-y-20 {
  1053. & > view:not(:first-child),
  1054. & > text:not(:first-child),
  1055. & > image:not(:first-child) {
  1056. margin-top: 1.25rem;
  1057. }
  1058. .text_13 {
  1059. line-height: 2.16rem;
  1060. }
  1061. }
  1062. }
  1063. </style>