| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202 |
- <template>
- <view class="container">
- <view style="height: 20px;line-height:15px;padding: 2px;text-align: center;position: fixed;right: -5px;top:30px;z-index: 9999;background: rgb(243,157,116);color: white;border-radius: 5px;font-size: 10px;width: 120rpx;" @click="goBack">
- {{$t('charge.break')}}
- </view>
- <view v-if="locale == 'en'" style="height: 40px;line-height:15px;padding: 2px;text-align: center;position: fixed;right: -5px;top:120px;z-index: 9999;background: #1A87FF;color: white;border-radius: 5px;font-size: 10px;width: 120rpx;" @click="modifyPwd">
- {{$t('charge.modifypwd')}}
- </view>
- <view v-else style="height: 20px;line-height:15px;padding: 2px;text-align: center;position: fixed;right: -5px;top:120px;z-index: 9999;background: #1A87FF;color: white;border-radius: 5px;font-size: 10px;width: 120rpx;" @click="modifyPwd">
- {{$t('charge.modifypwd')}}
- </view>
- <view style=";position: relative;height: 250px;margin-top:2vh;">
- <view class="dtop">
- <view class="can">
- <view class="box">
- <view class="three">
- <view class="four"></view>
- <view class="five"></view>
- <view class="six"></view>
- </view>
- <view class="dot"></view>
- <view class="dot"></view>
- <view class="dot"></view>
- <view class="dot"></view>
- <view class="dot"></view>
- </view>
- <!-- <canvas id="c">-->
- <!-- </canvas>-->
- <view class="stip">
- <view class="p0" st="">{{i18('设备号')}}:{{uuid}}</view>
- <view class="p1">
- <view v-if="portDetail.portStatus == 2">
- {{$t('charge.charging')}}
- </view>
- <view v-else-if="portDetail.portStatus == 6">
- {{$t('charge.planed')}}
- </view>
- <view v-else-if="portDetail.portStatus == 5">
- {{$t('charge.connected')}}
- </view>
- <view v-else>
- {{$t('charge.nocharge')}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="dstatus">
- <view class="ditem">
- <image class="itemimg" src="/static/images/new/tmp.png"/>
- <view class="item-value">{{portDetail.dev_temper}}℃</view>
- <span class="item-text">{{$t('charge.devtemper')}}</span>
- </view>
- <view class="ditem">
- <image class="itemimg" src="/static/images/new/dianya.png"/>
- <view class="item-value">{{ portDetail.voltage }}V</view>
- <span class="item-text">{{$t('charge.voltage')}}</span>
- </view>
- <view class="ditem">
- <image class="itemimg" src="/static/images/new/dianliu.png"/>
- <view class="item-value" v-if="portDetail.voltage == 0">0A</view>
- <view class="item-value" v-else>{{portDetail.POWER/portDetail.voltage}}A</view>
- <span class="item-text">{{$t('charge.current')}}</span>
- </view>
- <view class="ditem">
- <image class="itemimg" src="/static/images/new/shjian.png"/>
- <view class="item-value">{{ portDetail.time }}{{ i18('分钟') }}</view>
- <span class="item-text">{{$t('charge.chargetime')}}</span>
- </view>
- <view class="ditem">
- <image class="itemimg" src="/static/images/new/gonglv.png"/>
- <view class="item-value">{{ portDetail.power }}W</view>
- <span class="item-text">{{$t('charge.power')}}</span>
- </view>
- <view class="ditem">
- <image class="itemimg" src="/static/images/new/dianliang.png"/>
- <view class="item-value">{{ portDetail.elec }} {{ i18('度') }}</view>
- <span class="item-text">{{$t('charge.elec')}}</span>
- </view>
- </view>
- <view class="dbtns">
- <view class="start" @click="toPage">
- <image style="width:25px;height: 25px;margin-right: 5px;" src="/static/images/new/start.png"/>
- <span>{{$t('charge.startcharge')}}</span>
- </view>
- <view class="get" @click="getInfo">
- <image style="width:25px;height: 25px;margin-right: 5px;" src="/static/images/new/get.png"/>
- <span>{{$t('charge.getinfo')}}</span>
- </view>
- </view>
- <view class="dtip">
- <view style="margin:10px 0px;color: #1A87FF;"><img style="width: 13px;height: 13px" src="/static/images/new/tip.png">{{i18('温馨提示')}}</view>
- <view>1,{{i18('桩控制最大输出电流,当功率没有达到请检查车的状态或者车的设置')}};</view>
- <view>2,{{i18('启动充电->设备管理->可设置设备最大输出电流')}}</view>
- <view>3,{{i18('为保障您远程启动正常充电,请确保枪头完全连接充电口,同时确认您的爱车处于立即充电状态下')}};</view>
- <view>4,{{i18('注意规范安全充电,停好车,锁好车。')}}</view>
- </view>
- <u-picker @cancel="showPort=false" @confirm="confirmPort" :show="showPort" :columns="portList" keyName="text"></u-picker>
- <u-picker @cancel="cancelPicker" @confirm="confirm" :show="showPlan" :columns="planCols" @change="changeHandler"></u-picker>
- <u-modal :show="showPwd" :confirmText="i18('确认')" :cancelText="i18('取消')" @confirm="inputPwd" @cancel="cancel" :showCancelButton="true" :title="$t('charge.modifypwd')" >
- <view class="slot-content">
- <view>
- <u--input
- type="number"
- :placeholder="$t('charge.oldpwd')"
- border="surround"
- v-model="oldPwd"
- ></u--input>
- </view>
- <view style="margin-top:5px">
- <u--input
- type="number"
- :placeholder="$t('charge.newpwd')"
- border="surround"
- v-model="pwd"
- ></u--input>
- </view>
- </view>
- </u-modal>
- <u-modal :show="showInitPwd" :confirmText="i18('确认')" :cancelText="i18('取消')" @confirm="inputPwd" @cancel="cancel" :showCancelButton="true" :title="i18('当前密码为初始密码,请修改')" >
- <view class="slot-content">
- <view style="margin-bottom:10px;">
- {{i18('请保存好设备序列号。可用于找回密码')}}
- </view>
- <view style="margin-bottom:10px;text-decoration: underline" @click="copyPwd">
- {{i18('设备序列号')}} :{{uuid}}
- </view>
- <view>
- <u--input
- type="number"
- :placeholder="$t('charge.oldpwd')"
- border="surround"
- v-model="oldPwd"
- ></u--input>
- </view>
- <view style="margin-top:5px">
- <u--input
- type="number"
- :placeholder="$t('charge.newpwd')"
- border="surround"
- v-model="pwd"
- ></u--input>
- </view>
- </view>
- </u-modal>
- </view>
- </template>
- <script>
- import {getDeviceInfo,getPortDetail,startCharge,stopCharge,sendPortDetailCmd,checkStatusChange,getPlanInfo,cancelPlan,parseDataObj,planCharge,getPwd,setPwd,getUUID} from "@/utils/weitiandi/device/device.js";
- // #ifdef APP
- import ecUI from '@/utils/ecUI.js'
- import ecBLE from '@/utils/ecBLE/ecBLE.js'
- // #endif
- // #ifdef MP
- const ecUI = require('@/utils/ecUI.js')
- const ecBLE = require('@/utils/ecBLE/ecBLE.js')
- // #endif
- import i18 from '@/utils/i18.js'
- let ctx
- let isCheckScroll = true
- let isCheckRevHex = false
- let isCheckSendHex = false
- let sendData = ''
- export default {
- data() {
- return {
- locale:"",
- oldPwd:"",
- pwd:"",
- showPwd:false,
- planCols:[ ],
- columnData:[],
- showPlan:false,
- deviceInfo:{},
- visitTime:"",
- timer:null,
- showPort:false,
- portDetail:{portStatus:0,POWER:0,voltage:0},
- statusTimer:"",
- connected:false,
- scriptTask:null,
- choosePort:1,
- portList:[[{port:1,text:"端口一"}]],
- planInfo:null,
- days:["","周一","周二","周三","周四","周五","周六","周日"],
- textRevData: '',
- picker:null,
- firstInit:false,
- hasRight:false,
- startAutoCharge:true,
- initPwd:"123456",
- showInitPwd:false,
- uuid:"",
- }
- },
- computed: {
- imgUrl() {
- return getApp().globalData.config.imgUrl;
- }
- },
- onLoad() {
- this.locale = uni.getLocale();
- console.log("status comeing")
- this.checkPassword();
- },
- onShow(){
- uni.setNavigationBarTitle({
- title: this.$t('page.detail')
- })
- this.buletooth();
- },
- onUnload (){
- this.closeSocket();
- },
- methods: {
- copyPwd(){
- uni.setClipboardData({
- data: this.uuid,
- success: function () {
- this.$modal.showToast("复制成功");
- }
- });
- },
- i18(text){
- return i18(text)
- },
- toPage(){
- uni.navigateTo({
- url: '/pages/weitiandi/bluetooth/index'
- });
- },
- cancel(){
- this.showPwd = false;
- },
- modifyPwd(){
- this.showPwd = true;
- },
- inputPwd(){
- let rightPwd = uni.getStorageSync("pwd");
- if(!this.oldPwd){
- this.$modal.showToast("原密码不能为空");
- return;
- }
- if(rightPwd != this.oldPwd){
- this.$modal.showToast("原密码不对");
- return;
- }
- if(this.pwd == "000000"){
- this.$modal.showToast("密码不能设置为000000");
- return;
- }
- if(this.pwd == "123456"){
- this.$modal.showToast("密码不能设置为123456");
- return;
- }
- if(!this.pwd){
- this.$modal.showToast("密码不能为空");
- }else {
- setPwd(this.pwd);
- this.oldPwd = this.pwd;
- uni.removeStorageSync("pwd");
- this.$modal.showToast("密码修改成功");
- this.showPwd = false;
- this.showInitPwd = false;
- // this.goBack();
- }
- },
- confirm(e) {
- let value = e.value;
- console.log('confirm', value)
- let day = value[0];
- let date = new Date();
- let nowDay = date.getDate();
- let hour = value[1]+"";
- hour = parseInt(hour.substr(0,hour.length-1),10);
- let min = value[2]+"";
- min = parseInt(min.substr(0,min.length-1),10);
- let todayTotalMin = 0;
- let planDate = {min:min,hour:hour};
- let nowHour = date.getHours();
- let nowMin = date.getMinutes();
- let nowDate ={min:nowMin,hour:nowHour};
- if("今日" == day){
- todayTotalMin = this.getGapMin(planDate,nowDate)
- }else {
- let nowHour = date.getHours();
- let min = date.getMinutes();
- let maxDate ={min:59,hour:23};
- todayTotalMin = this.getGapMin(maxDate,nowDate);
- let minDate = {min:0,hour:0};
- todayTotalMin +=this.getGapMin(planDate,minDate);
- }
- console.log(todayTotalMin);
- this.cancelPicker();
- if(todayTotalMin<=0 || todayTotalMin>1440){
- this.$modal.showToast("最大预约时间为24小时");
- }else{
- planCharge(this.choosePort,todayTotalMin).then(res=>{
- this.getInfo(true);
- });
- }
- },
- getGapMin(date1,date2){
- let min1 = date1.min;
- let hour1 = date1.hour;
- let min2 = date2.min;
- let hour2 = date2.hour;
- let total1 = min1+hour1*60;
- let total2 = min2+hour2*60;
- return total1-total2;
- },
- cancelPicker(e) {
- this.showPlan = false
- },
- changeHandler(e){
- const {
- columnIndex,
- value,
- values, // values为当前变化列的数组内容
- index,
- // 微信小程序无法将picker实例传出来,只能通过ref操作
- picker = this.$refs.uPicker
- } = e
- let day = e.value[0];
- // 当第一列值发生变化时,变化第二列(后一列)对应的选项
- this.picker = picker;
- if (columnIndex === 0) {
- // picker为选择器this实例,变化第二列对应的选项
- if(day == "今日"){
- picker.setColumnValues(1, this.columnData[1])
- }else{
- picker.setColumnValues(1, this.columnData[0])
- }
- }
- },
- checkPassword(){
- setTimeout(function (){
- getUUID();
- },500);
- let rightPwd = uni.getStorageSync("pwd");
- if(rightPwd === this.initPwd){
- this.showInitPwd = true;
- this.oldPwd = rightPwd;
- }
- },
- recon(){
- let self = this;
- ecUI.showLoading('设备连接中')
- let blueid = uni.getStorageSync('blueid');
- ecBLE.onBLEConnectionStateChange(res => {
- ecUI.hideLoading()
- if (res.ok) {
- self.buletooth();
- } else {
- uni.removeStorageSync('blueid');
- ecUI.showModal(
- '提示',
- '连接失败,errCode=' + res.errCode + ',errMsg=' + res.errMsg
- )
- }
- })
- ecBLE.createBLEConnection(blueid);
- },
- buletooth(){
- let self = this;
- ctx = this
- isCheckScroll = true
- isCheckRevHex = false
- isCheckSendHex = false
- sendData = ''
- //on disconnect
- ecBLE.onBLEConnectionStateChange(() => {
- uni.showModal({
- title: '提示',
- content: '蓝牙断开连接',
- confirmText:"点击重连",
- showCancel:false,
- success: function (res) {
- if (res.confirm) {
- uni.reLaunch({
- url: '/pages/bluetooth/index/index'
- });
- // self.recon()
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- })
- //receive data
- ecBLE.onBLECharacteristicValueChange((str, strHex) => {
- isCheckRevHex = true;
- let data =
- (isCheckRevHex ? strHex.replace(/[0-9a-fA-F]{2}/g, ' $&') : str)
- // console.log(data)
- self.$modal.closeLoading();
- console.log("收到消息:"+data);
- //AA 67 0D 05 00 00 00 00 00 00 00 00 00 25 E2 00 80
- data = parseDataObj(data);
- self.messageCallback(data);
- })
- self.getInfo();
- },
- messageCallback(data){
- let self = this;
- console.log(data);
- let type = data.type;
- let real_data = data.real_data;
- if(type == 103){
- self.portDetail = real_data
- self.portList = [[]];
- let port_first_status = self.portDetail["port_first_status"];
- let port_second_status = self.portDetail["port_second_status"]
- if(port_first_status){
- self.portList[0].push({port:1,text:"端口一"});
- }
- if(port_second_status){
- self.portList[0].push({port:2,text:"端口二"});
- }
- let choosePort = self.choosePort
- if(choosePort == 1){
- self.portDetail.portStatus = port_first_status;
- }else if(choosePort == 2){
- self.portDetail.portStatus = port_second_status;
- }
- self.$modal.closeLoading();
- }
- if(type == 116){
- self.$modal.closeLoading();
- self.getInfo();
- }
- if(type == 113){
- self.$modal.closeLoading();
- self.getInfo();
- }
- if(type == 96){
- }
- if(type == 253){
- self.$modal.closeLoading();
- self.uuid = real_data.substr(0,6);
- }
- self.$forceUpdate();
- console.log('收到服务器内容:' + JSON.stringify(data));
- if(!this.firstInit){
- this.firstInit = true;
- let autoCharge = self.getAutoChargeValue()
- if(self.portDetail.portStatus == 5 && autoCharge == 1){
- self.startCharge();
- }
- }
- },
- getAutoChargeValue(){
- let autoCharge = uni.getStorageSync("autoCharge");
- if(!autoCharge ){
- autoCharge = 1;
- }
- return autoCharge;
- },
- planCharge(){
- if(this.portDetail.portStatus == 6){
- this.$modal.confirm("确认取消预约?").then(res=>{
- this.cancelPlan();
- })
- }else{
- this.toPlan()
- }
- },
- sendBlueData(){
- ecBLE.writeBLECharacteristicValue(tempSendData, false)
- },
- cancelPlan(){
- cancelPlan(this.choosePort).then(res=>{
- this.$modal.msg("取消成功");
- this.getInfo(true);
- })
- },
- getPlanInfo(){
- getPlanInfo(this.deviceInfo.deviceId,this.choosePort).then(res=>{
- let data = res.data;
- if(data != null){
- let planType = data.planType;
- if(planType == 1){//单次预约
- let planInfo = {};
- planInfo.runTime = data.runTime;
- this.planInfo = planInfo;
- this.planInfo.id = data.id;
- }else{
- let planInfo = {};
- planInfo.runTime = data.runTime;
- let repeatDays = data.repeatDays;
- let days = repeatDays.split(",")
- let strs = "";
- for (let i = 0; i < days.length; i++) {
- if(strs.length>0){
- strs+=",";
- }
- strs +=this.days[days[i]];
- }
- this.planInfo = planInfo;
- this.planInfo.runTime = strs+" "+data.repeatTime;
- this.planInfo.id = data.id;
- }
- }
- })
- },
- confirmPort(e){
- let value = e.value[0]
- this.choosePort = value.port;
- this.showPort = false;
- this.getInfo()
- },
- initSocket(key){
- let self = this;
- },
- toSet(){
- // this.closeSocket();
- uni.navigateTo({
- url: '/pages/weitiandi/bluetooth/setting'
- });
- },
- toPlan(){
- let arr = [];
- let date = new Date();
- let min = date.getMinutes();
- let hour = date.getHours();
- let arr1 = ["今日", "明日"];
- let arr2 = []
- let arr3 = [];
- let arr4 = [];
- for (let i = 0; i < hour; i++) {
- arr2.push(i+"时")
- }
- this.columnData[0] = arr2;
- for (let i = hour+1; i < 24; i++) {
- arr3.push(i+"时")
- }
- this.columnData[1] = arr3;
- for (let i = 0; i <= 59; i++) {
- arr4.push(i+"分")
- }
- this.planCols = [arr1, arr3, arr4]
- this.showPlan = true;
- },
- trigger(){
- let portStatus = this.portDetail.portStatus;
- if(portStatus == 2){//需要停止充电
- this.$modal.confirm("需要停止充电么?").then(res=>{
- this.stopCharge();
- })
- }else{
- if(portStatus == 1){
- this.$modal.msg("请先将充电枪插入后再点击充电");
- }
- if(portStatus == 5){
- this.$modal.confirm("确认开始充电么?").then(res=>{
- this.startCharge();
- })
- }else {
- this.$modal.msg("端口无法开始充电");
- }
- }
- },
- getInfo(flag) {
- // let str = "AA 67 0D 01 00 00 00 00 00 00 00 00 00 25 E2 00 80";
- // let data = parseDataObj(str);
- // this.messageCallback(data);
- //
- //
- this.$modal.loading("正在获取状态,请稍等...");
- if(flag){
- setTimeout(function (){
- sendPortDetailCmd().then(res => {
- })
- },500)
- }else{
- sendPortDetailCmd().then(res => {
- })
- }
- },
- stopCharge(){
- let self = this;
- this.deviceInfo.port = this.choosePort;
- stopCharge(this.deviceInfo).then(()=>{
- self.$modal.loading("停止成功");
- setTimeout((()=>{
- self.getInfo();
- }),1000);
- })
- },
- startCharge(){
- let self = this;
- this.deviceInfo.port = this.choosePort;
- startCharge(this.deviceInfo).then(res=>{
- self.$modal.loading("启动成功");
- setTimeout((()=>{
- self.getInfo();
- }),1000);
- })
- },
- getPortInfo(){
- this.startPortDetailTimer();
- },
- startPortDetailTimer(){
- let self = this;
- this.timer = setTimeout(function (){
- getPortDetail(self.deviceInfo,self.visitTime).then(res=>{
- let data = res.data;
- if(data != null){
- self.portDetail = data;
- self.checkStatusCheck();
- self.$modal.closeLoading();
- }else{
- self.startPortDetailTimer();
- }
- });
- },1000);
- },
- checkStatusCheck(){
- this.statusChangeTimer();
- },
- checkOnPage(){
- var pages = getCurrentPages() // 获取栈实例
- let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
- if("pages/weitiandi/device/index" != currentRoute){
- return false;
- }
- return true;
- },
- goBack(){
- this.closeSocket();
- uni.navigateBack({
- });
- },
- closeSocket(){
- ecBLE.onBLEConnectionStateChange(() => {})
- ecBLE.onBLECharacteristicValueChange(() => {})
- ecBLE.closeBLEConnection()
- uni.removeStorageSync('blueid');
- },
- statusChangeTimer(){
- let self = this;
- this.statusTimer = setTimeout(function(){
- if(!this.checkOnPage()){
- return;
- }
- checkStatusChange(self.deviceInfo,self.visitTime).then(res=>{
- let data = res.data;
- if(data != null){
- self.getInfo();
- }else{
- self.statusChangeTimer();
- }
- });
- },3000);
- }
- }
- }
- </script>
- <style>
- .container {
- background: rgb(249, 252, 255);
- inset: 0;
- position: absolute;
- }
- .header {
- position: relative;
- margin-top:4vw;
- }
- .header-status-desc {
- position: absolute;
- text-align: center;
- width: 100%;
- bottom:1vh;
- font-size: 5vw;
- font-weight: bold;
- color: #0E9F9B;
- margin-bottom: 5vw;
- }
- .header-status {
- font-weight: bold;
- text-align: center;
- }
- .chong-active {
- color: #0E9F9B
- }
- .header-img {
- width: 100%;
- padding: 5% 10%;
- text-align: center;
- }
- .header-img image {
- width: 100%;
- height: 23vh;
- }
- .info-body{
- background: #0E9F9B;
- height: 20vh;
- margin: 0 2%;
- border-radius: 1vw;
- margin-top:2vh;
- color: #F8FCFF;
- line-height: 3vh;
- }
- .info-content{
- display: inline-block;
- width: 23%;
- text-align: center;
- margin: 1%;
- margin-top:2.5vh;
- }
- .info-content-value{
- font-weight: bold;
- }
- .info-content-text{
- }
- .info-summary{
- display: flex;
- flex-direction: row;
- text-align: center;
- margin:3vh 0;
- }
- .summary{
- width: 33%;
- line-height: 2.5vh;
- }
- .charge-num{
- color: #0E9F9B;
- font-weight: bold;
- font-size: 4.5vw;
- }
- .charge-title{
- color: #B2B2B2;
- font-weight: 400;
- }
- .btn-image{
- width: 90%;
- height: 100%;
- }
- .info-bottom-btn{
- display: flex;
- flex-direction: row;
- text-align: center;
- position: relative;
- margin-top: 10vh
- ;
- }
- .btn-area{
- width: 50%;
- height: 50px;
- }
- .left{
- position: relative;
- left: 10px;
- text-align: right;
- }
- .right{
- text-align: left;
- position: relative;
- right: 10px;
- }
- .info-plan{
- text-align: center;
- color: #0E9F9B;
- margin-top:1vh;
- font-weight: 400;
- }
- .setting{
- position: fixed;
- right: -1px;
- top: 10vh;
- z-index: 999;
- background: rgb(227,243,245);
- color: #0E9F9B;
- font-size: 10px;
- border-radius: 5px;
- padding: 3px;
- }
- .port{
- height: 70px;
- background: #F8FCFF;
- border: 0px solid #F8FCFF;
- box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
- border-radius: 4px;
- margin:0 10px;
- position: relative;
- margin-top:10px;
- }
- .plan{
- height: 70px;
- background: #F8FCFF;
- border: 0px solid #F8FCFF;
- box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
- border-radius: 4px;
- margin:0 10px;
- position: relative;
- margin-top:15px;
- }
- .port-image{
- height: 40px;
- width: 40px;
- position: absolute;
- top:15px;
- left:20px;
- }
- .port-text{
- position: absolute;
- top:13px;
- left:75px;
- font-weight: bold;
- }
- .port-num{
- position: absolute;
- top:38px;
- left:75px;
- color: #B2B2B2;
- }
- .port-icon{
- position: absolute;
- top:30px;
- right:5px;
- width: 10px;
- height: 16px;
- }
- .port-icon image{
- width: 90%;
- }
- .body-bottom{
- padding:0 22px;
- }
- .body-bottom .info-content{
- width: 30%;
- }
- .bottom-control{
- height: 22vh;
- margin: 0 2%;
- margin-top:2vh;
- line-height: 3vh;
- background: #F8FCFF;
- border: 0px solid #F8FCFF;
- box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
- border-radius: 4px;
- padding:3%;
- }
- .control-btn{
- display: inline-block;;
- height: 60px;
- width: 25%;
- padding:10px 20px;
- text-align: center;
- font-size: 12px;
- color: black;
- }
- .control-btn .btn-image{
- }
- #box {
- /* width: 300px; */
- height: 280px;
- position: relative;
- /* 背景色 */
- /* background: #f7f6f6; */
- overflow: hidden;
- /* padding: 50px 0; */
- box-sizing: border-box;
- ;
- }
- .box {
- width: 100%;
- height: 100%;
- position: absolute;
- display: flex;
- justify-content: center;
- /* 此处尽量不要设置背景色,可以选择在父标签上设置背景色,否则没有黏黏的效果 */
- filter: url("#goo");
- }
- /* 电量文字 */
- .text {
- font-weight: 200;
- font-size: 20px;
- margin-top: 5px;
- text-align: center;
- color: #ff6600;
- }
- /* 电量文字 */
- .text span {
- font-size: 15px;
- }
- .three {
- width: 170px;
- height: 170px;
- border-radius: 300px;
- opacity: 1;
- position: absolute;
- top: 20px;
- z-index: 10;
- /* 从中心向外剪切圆,相当于掏空 */
- /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
- background: #ffffff;
- /* animation: ballZhuan 9s linear infinite; */
- overflow: hidden;
- box-shadow: 0px 0px 19px 1px #2196f3;
- }
- .four {
- width: 200px;
- height: 200px;
- border-radius: 80px;
- opacity: 0.3;
- position: absolute;
- top: 10px;
- z-index: 10;
- /* 从中心向外剪切圆,相当于掏空 */
- /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
- background: #2196f3;
- animation: ballZhuan1 linear infinite;
- animation-duration: 11s;
- }
- .five {
- width: 270px;
- height: 270px;
- border-radius: 99px;
- opacity: 0.6;
- position: absolute;
- top: 30px;
- z-index: 10;
- /* 从中心向外剪切圆,相当于掏空 */
- /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
- background: #2196f3;
- animation: ballZhuan1 linear infinite;
- /* transform: rotate(120deg); */
- animation-duration: 9s;
- left: -67px;
- }
- .six {
- width: 270px;
- height: 270px;
- border-radius: 99px;
- opacity: 0.6;
- position: absolute;
- top:30px;
- z-index: 10;
- /* 从中心向外剪切圆,相当于掏空 */
- /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
- background: #2196f3;
- animation: ballZhuan1 7s linear infinite;
- /* transform: rotate(120deg); */
- right: -67px;
- }
- @keyframes ballZhuan {
- 100% {
- transform: rotate(360deg);
- }
- }
- @keyframes ballZhuan1 {
- 100% {
- transform: rotate(360deg);
- }
- }
- /* 底部的小球 */
- .dot {
- display: block;
- width: 20px;
- height: 20px;
- border-radius: 50%;
- background: rgba(101,192,255,0.28);
- position: absolute;
- z-index: 1000;
- bottom: -50px;
- }
- .dot:nth-of-type(1) {
- width: 40px;
- height: 40px;
- right: 116px;
- animation: dotMove 5s linear infinite;
- }
- .dot:nth-of-type(2) {
- width: 50px;
- height: 50px;
- left: 120px;
- animation: dotMove 4s linear infinite;
- }
- .dot:nth-of-type(3) {
- animation: dotMove 2s linear infinite;
- }
- .dot:nth-of-type(4) {
- width: 15px;
- height: 15px;
- left: 130px;
- animation: dotMove 2s linear infinite;
- }
- .dot:nth-of-type(5) {
- width: 30px;
- height: 30px;
- animation: dotMove 3s linear infinite;
- }
- @keyframes dotMove {
- 0% {
- transform: translateY(0px);
- opacity: 1;
- }
- 98% {
- opacity: 1;
- }
- 100% {
- transform: translateY(-260px);
- opacity: 0;
- }
- }
- .w-flex {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- padding: 0px 25px;
- }
- .w-flex__item {
- -webkit-box-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- }
- .w-item{
- text-align: center;
- padding: 5px;
- }
- .w-item-tit{
- font-size: 14px;
- color: #888;
- }
- .w-item-num{
- font-size: 18px;
- color: #111;
- }
- .can{
- position: relative;
- z-index: 0;
- width: 211px;
- height: 211px;
- background-image: url(/static/images/new/quan.png);
- background-size: cover;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .dtop{
- background: url(/static/images/new/box1.png);
- background-size: cover;
- width: 260px;
- height: 236px;
- display: flex;
- justify-content: center;
- align-items: center;
- left: 15%;
- position: relative;
- }
- .dstatus{
- margin-top: 0.1rem;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-evenly;
- align-content: center;
- }
- .ditem{
- width: 30%;
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-bottom: 0.3rem;
- margin-top: 10px;
- }
- .itemimg{
- width: 50px;
- height: 50px;
- }
- .item-value{
- font-weight: bold;
- font-size: 19px;
- margin:4px 0;
- }
- .item-text{
- font-size: 13px;
- margin:1px 0;
- color: #999999;
- }
- .start{
- background: #1A87FF;
- color: #fff;
- width: 45%;
- height: 50px;
- min-height: 40px;
- border-radius: 50px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 20px;
- font-weight: bold;
- }
- .dbtns{
- display: flex;
- margin-top:10px;
- justify-content: space-between;
- padding: 0 30px;
- }
- .get{
- background: #fff;
- border: 1px solid #1A87FF;
- color: #1A87FF;
- width: 45%;
- height: 50px;
- min-height: 40px;
- border-radius: 50px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 20px;
- font-weight: bold;
- }
- .dtip{
- margin: 20px 20px;
- padding: 10px;
- background: rgba(127,200,251,0.1);
- border: 1px solid #7FC8FB;
- box-shadow: 0 2px 8px 0 rgba(0,0,0,0.19);
- border-radius: 5px;
- font-size: 17px;
- font-weight: 400;
- color: #B8B9BA;
- margin-bottom: 10px;
- }
- .p1{
- font-size: 20px;
- color: white;
- font-weight: bold;
- margin-top:10px;
- }
- .stip{
- text-align: center;
- z-index: 9999;
- }
- </style>
|