12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196 |
- <template>
- <view class="flex-col justify-start home-container">
- <view class="container-bg"></view>
- <cu-custom bgColor="#fff"><view slot="content" style="color: #FFFFFF">UU睡眠</view></cu-custom>
- <view class="flex-col home-module space-y-20">
- <!-- no device added -->
- <view v-if="!deviceAdded">
- <view class="flex-col items-start home-header space-y-10">
- <text class="home-header-title">欢迎回来!</text>
- <text class="font_3 text_3 home-header-subtitle">我是小U,您的健康智慧管家。</text>
- </view>
- <view class="flex-row items-center home_add_devive space-x-10">
- <image
- class="image_4"
- src="../../static/home/homeIconAdd.png"
- />
- <text class="text_5">添加设备</text>
- </view>
- <view class="home-ad flex-col group_5 space-y-40">
- <view class="flex-col home-header space-y-6">
- <view class="flex-row items-center space-x-8">
- <text class="font_4 text_8">UU AI智能睡眠监测仪</text>
- <view class="flex-row items-center section_7">
- <text class="font_5 text_9">去看看</text>
- <image
- class="shrink-0 image_9"
- src="../../static/home/homeIconGO.png"
- />
- </view>
- </view>
- <view class="flex-row items-center space-x-10">
- <text class="font_5 text_3 text_10">AI时代,全家人的睡眠健康顾问</text>
- </view>
- </view>
- </view>
- <view class="flex-col">
- <view class="flex-col group_5">
- <view class="flex-col home_blank_heart">
- <view class="flex-row items-center group_7 space-x-4">
- <image
- class="image_6"
- src="../../static/home/homeIconHeart.png"
- />
- <text class="font_1 text_9">心率</text>
- </view>
- <view class="flex-row justify-end items-start">
- <view class="section_5 view"></view>
- <text class="font_3 text_10">--</text>
- </view>
- <view class="flex-col group_8">
- <text class="self-start font_4 text_11">次/分</text>
- <view class="shrink-0 self-end section_5"></view>
- </view>
- </view>
- <view class="flex-col home_blank_breath">
- <view class="flex-row items-center group_10 space-x-4">
- <image
- class="image_7"
- src="../../static/home/homeIconBreath.png"
- />
- <text class="font_1 text_12">呼吸</text>
- </view>
- <view class="flex-row justify-end items-start">
- <view class="section_5 view_2"></view>
- <text class="font_3 text_13">--</text>
- </view>
- <view class="flex-col group_8">
- <text class="self-start font_4 text_11">次/分</text>
- <view class="shrink-0 self-end section_5"></view>
- </view>
- </view>
- </view>
- <view class="flex-row items-center home_blank_alert space-x-16">
- <image
- class="image_8"
- src="../../static/home/homeIconGift.png"
- />
- <view class="flex-col items-start flex-auto space-y-4">
- <text class="font_5">昨晚您的睡眠质量很好</text>
- <text class="font_5">暂时没有预警信息</text>
- </view>
- </view>
- </view>
- </view>
- <!-- device added -->
- <view v-if="deviceAdded" class="flex-col">
- <view class="flex-col items-start home-header space-y-10">
- <text class="home-header-title">欢迎回来!</text>
- <text class="font_3 text_3 home-header-subtitle">我是小U,您的健康智慧管家。</text>
- </view>
- <!-- home device -->
- <view class="flex-col home-device space-y-15">
- <view class="flex-row home-device-header">
- <view class="flex-row justify-between flex-auto equal-division">
- <view class="flex-row equal-division-item space-x-4">
- <text class="font_3 text_5">当前设备</text>
- <text class="font_3">{{ homeFrom.nowDevice }}</text>
- </view>
- <view class="flex-row equal-division-item space-x-14">
- <view class="flex-row space-x-4 margin-left-xl">
- <image class="shrink-0 image_6" src="../../static/home/homeIconWifi.png" />
- <text class="font_3">{{ homeFrom.status }}</text>
- </view>
- <!-- <view class="flex-row items-center space-x-6">-->
- <!-- <text class="font_3 text_6">45%</text>-->
- <!-- <image class="shrink-0 image_7" src="../../static/home/homeIconPower.png" />-->
- <!-- </view>-->
- </view>
- </view>
- <view class="flex-row items-center section_5 space-x-4">
- <image class="shrink-0 image_8" src="../../static/home/homeIconChange.png"/>
- <text class="font_3">切换</text>
- </view>
- </view>
- <view class="flex-row justify-center self-center home-device-status space-x-8">
- <text class="font_4 text_7">当前状态</text>
- <text class="font_4">{{ sleepStatus }}</text>
- </view>
- <!-- <view>-->
- <!-- <uni-steps :options="list1" :active="active" />-->
- <!-- </view>-->
- <!-- <view class="flex-row self-center items-center home-device-setting">-->
- <!-- <image-->
- <!-- class="shrink-0 image_8"-->
- <!-- src="../../static/home/homeIconSet.png"-->
- <!-- />-->
- <!-- <text>设置目标</text>-->
- <!-- </view>-->
- </view>
- <view class="home-report flex-col group_5 space-y-40">
- <view class="flex-col home-header space-y-6">
- <view class="flex-row items-center space-x-8">
- <text class="font_4 text_8">睡眠报告</text>
- <view class="flex-row items-center section_7">
- <text class="font_5 text_9">去看看</text>
- <image
- class="shrink-0 image_9"
- src="../../static/home/homeIconGO.png"
- />
- </view>
- </view>
- <view class="flex-row items-center space-x-10">
- <text class="font_5 text_3 text_10">小U已为您生成最后一份睡眠报告</text>
- <text class="font_5 text_3 text_11">2021-08-24</text>
- </view>
- </view>
- </view>
- <view class="flex-col space-y-40 home-data">
- <view class="flex-row group_6 equal-division">
- <view class="flex-row group_7 space-x-6 home-data-item equal-division-item">
- <view class="flex-col shrink-0 self-stretch group_9 space-y-20">
- <view class="flex-row items-center space-x-4">
- <image
- class="shrink-0 image_10"
- src="../../static/home/homeIconHeart.png"
- />
- <text class="font_1">心率</text>
- </view>
- <text class="self-center font_6">73</text>
- </view>
- <text class="self-start font_7 text_14">次/分</text>
- </view>
- <view class="flex-row justify-center group_8 space-x-6 home-data-item equal-division-item">
- <view class="flex-col space-y-20">
- <view class="flex-row space-x-4">
- <image
- class="shrink-0 image_4"
- src="../../static/home/homeIconBreath.png"
- />
- <text class="font_1 text_12">呼吸</text>
- </view>
- <text class="self-center font_6 text_13">24</text>
- </view>
- <text class="self-start font_7 text_15">次/分</text>
- </view>
- </view>
- </view>
- <view class="cu-card article">
- <view class="cu-item shadow chartsBgColor">
- <view class="title"><view class="text-cut text-lg text-gray">心率 <text class="text-green margin-left">{{ pjxl }} 分钟/次</text></view></view>
- <view class="content">
- <view class="echarts-wrap">
- <mpvue-echarts class="ec-canvas" canvasId="canvasChart-1" ref="xinlvRefChart" @onInit="onInit1"></mpvue-echarts>
- </view>
- </view>
- </view>
- </view>
- <view class="cu-card article">
- <view class="cu-item shadow chartsBgColor">
- <view class="title"><view class="text-cut text-lg text-white">呼吸<text class="text-orange margin-left">{{ pjhx }} 分钟/次</text></view></view>
- <view class="content">
- <view class="echarts-wrap">
- <mpvue-echarts class="ec-canvas" canvasId="canvasChart-2" ref="huxiRefChart" @onInit="onInit2"></mpvue-echarts>
- </view>
- </view>
- </view>
- </view>
- <view class="flex-col home-alert space-y-4">
- <view class="flex-row items-center space-x-4 home-alert-header">
- <image
- class="image_10"
- src="../../static/home/homeIconHeart.png"
- />
- <text class="font_1">实时预警</text>
- </view>
- <view v-if="list_alerts.length === 0" @click="handleAlertSetting" class="flex-row items-center home_blank_alert space-x-16">
- <image
- class="image_8"
- src="../../static/home/homeIconGift.png"
- />
- <view class="flex-col items-start flex-auto space-y-4">
- <text class="font_5">昨晚您的睡眠质量很好</text>
- <text class="font_5">暂时没有预警信息</text>
- </view>
- </view>
- <view v-else @click="handleAlertSetting" class="flex-col home-alert-list">
- <view class="flex-row justify-between items-center list-item" :key="i" v-for="(item, i) in list_alerts">
- <view class="flex-row items-center space-x-6">
- <image
- class="shrink-0 image_11"
- src="../../static/home/homeIconAlert.png"
- />
- <text class="font_8">{{ formatSosType(item.warn_type) }}</text>
- <text class="font_9 text_16">{{ formatSosTime(item.warn_time) }}</text>
- </view>
- <view class="flex-row items-baseline space-x-4">
- <text class="font_10">{{ item.warn_desc }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- <tab-bar currentPage="home" /> -->
- </view>
- </template>
- <script>
- import echarts from '@/static/echarts.min.js'
- import mpvueEcharts from '@/components/mpvue-echarts/src/echarts.vue'
- import Storage from '@/utils/storage'
- import * as API_deviceMemberBind from '@/api/device_member_bind'
- export default {
- components: {
- mpvueEcharts
- },
- data() {
- return {
- deviceAdded: false,
- list_alerts: [],
- active: 4,
- list1: [{
- title: '昨日就寝 11:24PM'
- }, {
- title: '就寝目标 11:00PM'
- }, {
- title: '起床目标 7:00AM'
- }, {
- title: '今日起床 7:14AM'
- }],
- chartObj1: null, // 心率图表
- chartObj2: null, // 呼吸图表
- myData1: [], // 心率数据
- myData2: [], // 呼吸数据
- myCount1: 0, // 心率x轴数字
- myCount2: 0, // 呼吸x轴数字
- allXl: 0, // 总心率
- pjxl: 0, // 平均心率
- allHx: 0, // 总呼吸
- pjhx: 0, // 平均呼吸
- sleepStatus: '离床',
- connecting: false,
- connected: false,
- mySocketTask: null,
- homeFrom: {
- nowDevice: '', // 当前设备
- status: '离线'
- },
- deviceList: [], // 设备列表
- lastMsgTime: 0, // 最后一次设备消息时间
- memberId: 50289 // 先写死
- };
- },
- onLoad() {
- this.API_getDeviceList()
- },
- onUnload() {
- this.mySocketTask.onClose(res => {
- this.connected = false
- clearInterval(this.timer)
- })
- },
- methods: {
- API_getDeviceList() {
- const _this = this
- API_deviceMemberBind.getDeviceByDtypeAndMemberId({dtype: '睡眠床垫', memberId: this.memberId}).then(res => {
- if (res.length === 0) {
- _this.deviceAdded = false
- } else {
- _this.deviceAdded = true
- _this.deviceList = res
- _this.homeFrom.nowDevice = res[0].imei
- Storage.setItem("nowChangeDevice", _this.homeFrom.nowDevice)
- _this.init()
- }
- })
- },
- init() {
- const _this = this
- setTimeout(() => {
- _this.nowChart1()
- _this.nowChart2()
- _this.connect()
- }, 800)
- },
- connect() {
- let _this = this
- if (this.connected || this.connecting) {
- uni.showModal({
- content: '正在连接或者已经连接,请勿重复连接!',
- showCancel: false
- });
- return false
- }
- this.connecting = true
- // let wsUrl = api.base.replace('http', 'ws')
- this.mySocketTask = uni.connectSocket({
- url: 'ws://wdkl.natapp1.cc/sleep_report/monitor/' + this.memberId,
- success(res) {
- // 这里是接口调用成功的回调,不是连接成功的回调,请注意
- },
- fail(err) {
- // 这里是接口调用失败的回调,不是连接失败的回调,请注意
- }
- })
- this.mySocketTask.onOpen(res => {
- this.connecting = false
- this.connected = true
- uni.hideLoading()
- let _this = this
- this.timer = setInterval(function () { //每隔5秒钟发送一次心跳,避免websocket连接因超时而自动断开
- if (Date.parse(new Date()) - _this.lastMsgTime > 5000) { // 5秒没有收到新消息,则判断为离线
- _this.homeFrom.status = '离线'
- _this.sleepStatus = '离线'
- _this.pjxl = '--'
- _this.pjhx = '--'
- }
- _this.mySocketTask.send({data: 'ping'})
- }, 30000) // 30秒的心跳包
- })
- this.mySocketTask.onError(err => {
- this.connecting = false
- this.connected = false
- uni.hideLoading()
- uni.showModal({
- content: '连接失败,可能是websocket服务不可用,请稍后再试',
- showCancel: false
- })
- console.log('onError', err)
- })
- this.mySocketTask.onMessage(res => {
- let msg = res.data
- // console.log('收到消息:', msg)
- if (msg.length === 30) {
- if (this.homeFrom.nowDevice !== msg.substring(2, 14)) {
- return
- }
- this.homeFrom.status = '在线'
- this.lastMsgTime = Date.parse(new Date())
- this.getValue1(parseInt(msg.substring(22, 24), 16))
- this.getValue2(parseInt(msg.substring(24, 26), 16))
- switch (msg.substring(26, 28)) {
- case "03":
- this.sleepStatus = '在床'
- break;
- case "04":
- this.sleepStatus = '离床'
- break;
- case "05":
- this.sleepStatus = '打鼾'
- break;
- case "06":
- this.sleepStatus = '体动'
- break;
- default:
- break;
- }
- } else {
- const data = JSON.parse(res.data)
- console.log('收到消息为:', data)
- if (data.sn && this.homeFrom.nowDevice === data.sn) {
- this.list_alerts.push(data)
- }
- }
- })
- this.mySocketTask.onClose(res => {
- this.connected = false
- this.msg = false
- clearInterval(this.timer)
- })
- },
- nowChart1() {
- this.onInit1(this.chartObj1)
- let canvas = this.$refs.xinlvRefChart.canvas
- echarts.setCanvasCreator(() => canvas)
- this.myChart1 = echarts.init(canvas, 'halloween', {
- width: this.chartObj1.width,
- height: this.chartObj1.height
- })
- this.options1 = Object.assign(this.getOptions('#FFFFFF', 800), {})
- this.options1.series.forEach((item) => {
- item.data = this.myData1
- })
- this.myChart1.setOption(this.options1)
- },
- nowChart2() {
- this.onInit2(this.chartObj2);
- let canvas = this.$refs.huxiRefChart.canvas;
- echarts.setCanvasCreator(() => canvas);
- this.myChart2 = echarts.init(canvas, 'halloween', {
- width: this.chartObj2.width,
- height: this.chartObj2.height
- });
- this.options2 = Object.assign(this.getOptions('#06f5d2', 400), {})
- this.options2.series.forEach((item) => {
- item.data = this.myData2
- })
- this.myChart2.setOption(this.options2)
- },
- onInit1(e) {
- this.chartObj1 = e
- },
- onInit2(e) {
- this.chartObj2 = e
- },
- getOptions(color, xMax) {
- return {
- visualMap: [
- {
- show: false,
- type: 'continuous',
- seriesIndex: 0,
- min: 0,
- max: 300,
- },
- ],
- color: color,
- title: {
- left: 'left',
- // text: title,
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- animation: false,
- },
- },
- grid: {
- top: '15%',
- bottom: '10%',
- },
- xAxis: {
- type: 'category',
- boundaryGap: [0, '100%'],
- show: false, // 不显示x轴
- splitLine: {
- show: false,
- },
- triggerEvent: true
- },
- yAxis: {
- type: 'value',
- boundaryGap: [0, '100%'],
- min: 0,
- max: xMax,
- // max: 'dataMax', // 取数据在该轴上的最大值作为最大刻度
- splitLine: {
- show: false, // 是否显示分隔线
- },
- axisLine: {
- show: false, // 是否显示坐标轴轴线
- lineStyle:{
- color:'#FFFFFF',
- width:1, //x轴线的宽度
- }
- },
- },
- series: [
- {
- type: 'line',
- showSymbol: false,
- hoverAnimation: false,
- data: [],
- },
- ]
- }
- },
- getValue1(value) {
- // console.log("心率是", value)
- this.pjxl = value
- if (this.myData1.length > 60) {
- this.myData1.splice(0,5)
- }
- if (value !== 0) {
- for (let i = 0; i < 5; i++) {
- this.myCount1 ++;
- value = parseInt(Math.random(100) * 500 + 300)
- this.myData1.push([this.myCount1, value])
- }
- } else {
- for (let i = 0; i < 5; i++) {
- this.myCount1 ++;
- value = 410 + parseInt(Math.random() * 10 - 5)
- this.myData1.push([this.myCount1, value])
- }
- }
- this.myChart1.setOption(this.options1)
- },
- getValue2(value) {
- // console.log("呼吸值是", value)
- this.pjhx = value
- if (this.myData2.length > 60) {
- this.myData2.splice(0,5)
- }
- if (value === 0) {
- for (let i = 0; i < 5; i++) {
- this.myCount2 ++;
- value = 220 + parseInt(Math.random() * 10 - 5)
- this.myData2.push([this.myCount2, value])
- }
- } else {
- value = parseInt((Math.random(10) * 300 + 100))
- for (let i = 0; i < 5; i++) {
- this.myCount2 ++;
- value += parseInt(Math.random() * 10 - 5)
- this.myData2.push([this.myCount2, value])
- }
- }
- this.myChart2.setOption(this.options2)
- },
- handleAlertSetting() {
- uni.navigateTo({
- url: "/pages/alertSetting/alertSetting?imei=" + this.homeFrom.nowDevice
- });
- },
- formatSosType(value) {
- switch (value) {
- case 1:
- return '心率过速'
- case 2:
- return '心率过缓'
- case 3:
- return '呼吸过速'
- case 4:
- return '呼吸过缓'
- case 5:
- return '离床预警'
- case 6:
- return '一键预警'
- case 7:
- return '离线预警'
- default:
- break;
- }
- },
- formatSosTime(value) {
- return value.substring(10, value.length - 3)
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .echarts-wrap {
- width: 100%;
- height: 150px;
- /*padding: 10upx;*/
- margin-bottom: 0.3rem
- }
- .chartsBgColor{
- background: linear-gradient(90deg, rgba(86, 17, 247, 0.5) 0%, #4d9efa 100%);
- }
- .equal-division {
- .equal-division-item {
- padding: 0.25rem 0.38rem 0;
- flex: 1 1 10.81rem;
- }
- }
- .home_add_devive {
- margin-right: 1.25rem;
- margin: 1rem;
- padding: 3.75rem 0;
- background-color: #0233c699;
- border-radius: 1rem;
- backdrop-filter: blur(0.63rem);
- width: 20.94rem;
- .image_4 {
- margin-left: 6.38rem;
- width: 1.5rem;
- height: 1.5rem;
- }
- .text_5 {
- color: #ffffff;
- font-size: 1.5rem;
- font-family: PingFangSC;
- line-height: 1.38rem;
- }
- }
- .space-x-10 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 0.63rem;
- }
- }
- .home_ad {
- margin-left: 2.25rem;
- background: url(../../static/home/homeBg2.png);
- background-repeat: no-repeat;
- background-size: contain;
- .text_6 {
- padding: 0.13rem 0;
- color: #ffffff;
- font-size: 1rem;
- font-family: PingFangSC;
- line-height: 0.94rem;
- }
- .section_4 {
- padding: 0.13rem 0.38rem;
- background-image: linear-gradient(90deg, #2c25f799 0%, #061599 100%);
- border-radius: 0.44rem;
- width: 2.88rem;
- height: 0.88rem;
- .font_2 {
- font-size: 0.69rem;
- font-family: PingFangSC;
- line-height: 0.63rem;
- color: #ffffff;
- }
- .text_7 {
- font-size: 0.63rem;
- line-height: 0.56rem;
- }
- .image_5 {
- width: 0.19rem;
- height: 0.31rem;
- }
- }
- }
- .space-x-6 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 0.38rem;
- }
- }
- .group_5 {
- padding-left: 1rem;
- padding-right: 1rem;
- .font_2 {
- font-size: 0.69rem;
- font-family: PingFangSC;
- line-height: 0.63rem;
- color: #ffffff;
- }
- .text_8 {
- font-size: 0.63rem;
- line-height: 0.59rem;
- opacity: 0.6;
- }
- .home_blank_heart {
- margin-top: 1rem;
- opacity: 1;
- border-radius: 16px;
- background: linear-gradient(180deg, rgba(52, 26, 75, 1) 0%, rgba(22, 125, 242, 1) 100%);
- backdrop-filter: blur(20px);
- padding:1rem 0rem 2rem 1rem;
- .group_7 {
- padding-bottom: 1.13rem;
- .image_6 {
- width: 1.13rem;
- height: 0.88rem;
- }
- .text_9 {
- line-height: 1.03rem;
- }
- }
- .view {
- margin-right: -20.13rem;
- }
- .text_10 {
- margin-right: 18.75rem;
- margin-top: 1rem;
- }
- }
- .home_blank_breath {
- margin-top: 1rem;
- opacity: 1;
- border-radius: 16px;
- background: linear-gradient(180deg, rgba(52, 26, 75, 1) 0%, rgba(22, 125, 242, 1) 100%);
- backdrop-filter: blur(20px);
- padding:1rem 0rem 2rem 1rem;
- .group_10 {
- padding-bottom: 1.25rem;
- .image_7 {
- width: 1.13rem;
- height: 1.06rem;
- }
- .text_12 {
- line-height: 1rem;
- }
- }
- .view_2 {
- margin-right: -20rem;
- }
- .text_13 {
- margin-right: 18.63rem;
- margin-top: 1rem;
- }
- }
- .space-x-4 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 0.25rem;
- }
- }
- .font_1 {
- font-size: 1.13rem;
- font-family: PingFangSC;
- line-height: 1.06rem;
- color: #ffffff;
- }
- .section_5 {
- background-color: #ffffff1a;
- width: 15.94rem;
- height: 0.063rem;
- }
- .font_3 {
- font-size: 2.5rem;
- font-family: PingFangSC;
- line-height: 0.19rem;
- color: #ffffff;
- }
- .group_8 {
- margin-top: 1.38rem;
- padding-left: 0.63rem;
- .font_4 {
- font-size: 0.69rem;
- font-family: PingFangSC;
- line-height: 0.63rem;
- color: #ffffff80;
- }
- .text_11 {
- font-size: 0.75rem;
- line-height: 0.69rem;
- }
- }
- }
- .home_blank_alert {
- margin: 1rem 1.25rem 0;
- padding: 0.94rem;
- background-color: #02299ecc;
- border-radius: 1rem;
- .image_8 {
- width: 7.06rem;
- height: 4.94rem;
- }
- .space-y-4 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-top: 0.25rem;
- }
- .font_5 {
- font-size: 0.88rem;
- font-family: PingFangSC;
- line-height: 1.06rem;
- color: #167df2;
- }
- }
- }
- .space-x-16 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 1rem;
- }
- }
- .container-bg {
- position: fixed;
- left: -130px;
- top: -130px;
- width: 480px;
- height: 344px;
- opacity: 1;
- overflow: hidden;
- border-radius: 63px;
- -webkit-transform: rotate(-315deg);
- transform: rotate(-315deg);
- background: linear-gradient(90deg, rgba(86, 17, 247, 0.5) 0%, #4d9efa 100%);
- }
- .home-container {
- padding-bottom: 2rem;
- background-color: #000000;
- width: 100%;
- overflow-y: auto;
- overflow-x: hidden;
- height: 100%;
- .home-module {
- padding: 1.75rem 0 3.38rem;
- overflow-y: auto;
- z-index: 100;
- .home-header {
- padding: 0 1.25rem;
- .home-header-title {
- color: #ffffff;
- font-size: 1.25rem;
- font-family: PingFangSC;
- line-height: 1.16rem;
- }
- .text_8 {
- color: #ffffff;
- opacity: 1;
- }
- .text_3 {
- opacity: 0.6;
- }
- .home-header-subtitle {
- line-height: 0.72rem;
- }
- .space-x-10 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 0.63rem;
- }
- .text_10 {
- line-height: 0.59rem;
- }
- .text_11 {
- line-height: 0.47rem;
- }
- }
- }
- .space-y-10 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-top: 0.63rem;
- }
- }
- .home-device {
- margin: 1rem 1.25rem;
- padding-bottom: 2rem;
- background-color: #0233c699;
- border-radius: 1rem;
- backdrop-filter: blur(0.63rem);
- .home-device-setting {
- width: 70px;
- height: 20px;
- opacity: 1;
- border-radius: 7px;
- background: linear-gradient(90deg, rgba(255, 35, 247, 1) 0%, rgba(91, 30, 154, 1) 100%);
- .image_8 {
- width: 10px;
- height: 10px;
- }
- font-size: 10px;
- font-weight: 400;
- line-height: 10px;
- color: rgba(255, 255, 255, 1);
- padding: 0.3rem;
- }
- .home-device-header {
- background-color: #ffffff33;
- border-radius: 1rem 1rem 0px 0px;
- .equal-division {
- padding: 0 1rem;
- .equal-division-item {
- padding: 0.38rem 0;
- .text_5 {
- opacity: 0.5;
- }
- }
- .space-x-14 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 0.88rem;
- }
- }
- }
- .section_5 {
- padding: 0.38rem 0.5rem;
- background-image: linear-gradient(90deg, #2c25f799 0%, #061599 100%);
- border-radius: 0px 1rem 0px 0px;
- height: 1.5rem;
- .image_8 {
- width: 0.75rem;
- height: 0.75rem;
- }
- }
- }
- .home-device-status {
- padding: 0.25rem 0 0.25rem 0.25rem;
- background-color: #ffffff33;
- border-radius: 0.75rem;
- width: 7.88rem;
- .text_7 {
- opacity: 0.4;
- }
- }
- }
- .space-y-15 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-top: 0.94rem;
- }
- }
- .font_3 {
- font-size: 0.75rem;
- font-family: PingFangSC;
- line-height: 0.69rem;
- color: #ffffff;
- }
- .home-report {
- margin: 0 1.25rem;
- padding: 1rem 0;
- background-image: url(../../static/home/homeReportBg.png);
- background-size: contain;
- background-repeat: no-repeat;
- .space-y-6 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-top: 0.38rem;
- }
- }
- }
- .home-ad {
- margin: 0 1.25rem;
- padding: 1rem 0;
- background-image: url(../../static/home/homeBg2.png);
- background-size: contain;
- background-repeat: no-repeat;
- .space-y-6 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-top: 0.38rem;
- }
- }
- }
- .home-data {
- margin: 0rem 1.25rem;
- padding: 1rem 0rem;
- .home-data-item {
- padding: 1rem 0rem;
- margin: 0 0.3rem;
- opacity: 1;
- border-radius: 16px;
- background: linear-gradient(180deg, rgba(52, 26, 75, 0.65) 0%, rgba(22, 125, 242, 1) 100%);
- backdrop-filter: blur(20px);
- }
- }
- .group_6 {
- overflow-x: hidden;
- width: 100%;
- .group_7 {
- overflow-x: hidden;
- width: 10rem;
- .group_9 {
- margin-left: 2.25rem;
- }
- .text_14 {
- margin-top: 3.5rem;
- }
- }
- .group_8 {
- width: 10rem;
- .text_15 {
- margin-top: 3.63rem;
- }
- }
- .font_6 {
- font-size: 3rem;
- font-family: PingFangSC;
- line-height: 2.19rem;
- color: #ffffff;
- }
- .font_7 {
- font-size: 0.75rem;
- font-family: PingFangSC;
- line-height: 0.69rem;
- color: #ffffff80;
- }
- }
- .space-y-40 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-top: 2.5rem;
- }
- }
- .space-x-8 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 0.5rem;
- }
- .text_8 {
- padding: 0.13rem 0;
- }
- .section_7 {
- padding: 0.13rem 0.38rem;
- background-image: linear-gradient(90deg, #ff23f7 0%, #5b1e9a 100%);
- border-radius: 0.44rem;
- height: 0.88rem;
- .text_9 {
- line-height: 0.56rem;
- }
- .image_9 {
- width: 0.19rem;
- height: 0.31rem;
- }
- }
- }
- .font_4 {
- font-size: 1rem;
- font-family: PingFangSC;
- line-height: 0.94rem;
- color: #ffffff;
- }
- .font_5 {
- font-size: 0.63rem;
- font-family: PingFangSC;
- color: #ffffff;
- }
- .space-x-6 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 0.38rem;
- }
- .text_6 {
- line-height: 0.56rem;
- }
- .image_7 {
- width: 1.31rem;
- height: 0.69rem;
- }
- .image_11 {
- width: 1.13rem;
- height: 0.94rem;
- }
- .font_9 {
- font-size: 0.88rem;
- font-family: PingFangSC;
- line-height: 0.69rem;
- color: #ced5dc;
- }
- .text_16 {
- line-height: 0.63rem;
- }
- }
- .space-x-4 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-left: 0.25rem;
- }
- .image_6 {
- width: 0.94rem;
- height: 0.75rem;
- }
- .image_10 {
- width: 1.13rem;
- height: 0.88rem;
- }
- .font_1 {
- font-size: 1.13rem;
- font-family: PingFangSC;
- line-height: 1.03rem;
- color: #ffffff;
- }
- .image_4 {
- width: 1.13rem;
- height: 1.06rem;
- }
- .text_12 {
- line-height: 1rem;
- }
- .font_10 {
- font-size: 1.13rem;
- font-family: PingFangSC;
- line-height: 0.81rem;
- color: #ff465a;
- }
- }
- .home-alert {
- margin: 0 1.25rem;
- padding: 1rem 0.88rem 0.13rem;
- background-color: #0233c6cc;
- border-radius: 1rem;
- .home-alert-header {
- }
- .home-alert-list {
- .list-item {
- padding: 0.88rem 0;
- border-bottom: solid 0.063rem #ffffff1a;
- }
- }
- }
- .space-y-4 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-top: 0.25rem;
- }
- }
- .font_8 {
- font-size: 0.88rem;
- font-family: PingFangSC;
- line-height: 0.81rem;
- color: #ffffff;
- }
- }
- .space-y-20 {
- & > view:not(:first-child),
- & > text:not(:first-child),
- & > image:not(:first-child) {
- margin-top: 1.25rem;
- }
- .text_13 {
- line-height: 2.16rem;
- }
- }
- }
- </style>
|