status.vue 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133
  1. <template>
  2. <view class="container">
  3. <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">
  4. {{$t('charge.break')}}
  5. </view>
  6. <view 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">
  7. {{$t('charge.modifypwd')}}
  8. </view>
  9. <view style=";position: relative;height: 250px;margin-top:2vh;">
  10. <view class="dtop">
  11. <view class="can">
  12. <view class="box">
  13. <!--view class="top_ball one"></view-->
  14. <!--view class="top_ball two"></view-->
  15. <view class="three">
  16. <view class="four"></view>
  17. <view class="five"></view>
  18. <view class="six"></view>
  19. </view>
  20. <view class="dot"></view>
  21. <view class="dot"></view>
  22. <view class="dot"></view>
  23. <view class="dot"></view>
  24. <view class="dot"></view>
  25. </view>
  26. <!-- <canvas id="c">-->
  27. <!-- </canvas>-->
  28. <view class="stip">
  29. <view class="p0" st="">{$device['sn']}</view>
  30. <view class="p1">
  31. <view v-if="portDetail.portStatus == 2">
  32. {{$t('charge.charging')}}
  33. </view>
  34. <view v-if="portDetail.portStatus == 6">
  35. {{$t('charge.planed')}}
  36. </view>
  37. <view v-if="portDetail.portStatus == 2">
  38. {{$t('charge.connected')}}
  39. </view>
  40. <view v-else>
  41. {{$t('charge.nocharge')}}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="dstatus">
  49. <view class="ditem">
  50. <image class="itemimg" src="/static/images/new/tmp.png"/>
  51. <view class="item-value">{{portDetail.dev_temper}}℃</view>
  52. <span class="item-text">{{$t('charge.devtemper')}}</span>
  53. </view>
  54. <view class="ditem">
  55. <image class="itemimg" src="/static/images/new/dianya.png"/>
  56. <view class="item-value">{{ portDetail.voltage }}V</view>
  57. <span class="item-text">{{$t('charge.voltage')}}</span>
  58. </view>
  59. <view class="ditem">
  60. <image class="itemimg" src="/static/images/new/dianliu.png"/>
  61. <view class="item-value" v-if="portDetail.voltage == 0">0A</view>
  62. <view class="item-value" v-else>{{portDetail.POWER/portDetail.voltage}}A</view>
  63. <span class="item-text">{{$t('charge.current')}}</span>
  64. </view>
  65. <view class="ditem">
  66. <image class="itemimg" src="/static/images/new/shjian.png"/>
  67. <view class="item-value">{{ portDetail.time }}分钟</view>
  68. <span class="item-text">{{$t('charge.chargetime')}}</span>
  69. </view>
  70. <view class="ditem">
  71. <image class="itemimg" src="/static/images/new/gonglv.png"/>
  72. <view class="item-value">{{ portDetail.power }}W</view>
  73. <span class="item-text">{{$t('charge.power')}}</span>
  74. </view>
  75. <view class="ditem">
  76. <image class="itemimg" src="/static/images/new/dianliang.png"/>
  77. <view class="item-value">{{ portDetail.elec }} 度</view>
  78. <span class="item-text">{{$t('charge.elec')}}</span>
  79. </view>
  80. </view>
  81. <view class="dbtns">
  82. <view class="start" @click="toPage">
  83. <image style="width:25px;height: 25px;margin-right: 5px;" src="/static/images/new/start.png"/>
  84. <span>{{$t('charge.startcharge')}}</span>
  85. </view>
  86. <view class="get" @click="getInfo">
  87. <image style="width:25px;height: 25px;margin-right: 5px;" src="/static/images/new/get.png"/>
  88. <span>{{$t('charge.getinfo')}}</span>
  89. </view>
  90. </view>
  91. <view class="dtip">
  92. <view style="margin:10px 0px;color: #1A87FF;"><img style="width: 13px;height: 13px" src="/static/images/new/tip.png">温馨提示</view>
  93. <view>1,桩控制最大输出电流,当功率没有达到请检查车的状态或者车的设置;</view>
  94. <view>2,启动充电-&gt;设备管理- 可设置设备最大输出电流</view>
  95. <view>3,为保障您远程启动正常充电,请确保枪头完全连接充电口,同时确认您的爱车处于立即充电状态下;</view>
  96. <view>4,注意规范安全充电,停好车,锁好车。</view>
  97. </view>
  98. <u-picker @cancel="showPort=false" @confirm="confirmPort" :show="showPort" :columns="portList" keyName="text"></u-picker>
  99. <u-picker @cancel="cancelPicker" @confirm="confirm" :show="showPlan" :columns="planCols" @change="changeHandler"></u-picker>
  100. <u-modal :show="showPwd" @confirm="inputPwd" @cancel="cancel" :showCancelButton="true" :title="$t('charge.modifypwd')" >
  101. <view class="slot-content">
  102. <view>
  103. <u--input
  104. type="number"
  105. :placeholder="$t('charge.oldpwd')"
  106. border="surround"
  107. v-model="oldPwd"
  108. ></u--input>
  109. </view>
  110. <view style="margin-top:5px">
  111. <u--input
  112. type="number"
  113. :placeholder="$t('charge.newpwd')"
  114. border="surround"
  115. v-model="pwd"
  116. ></u--input>
  117. </view>
  118. </view>
  119. </u-modal>
  120. </view>
  121. </template>
  122. <script>
  123. import {getDeviceInfo,getPortDetail,startCharge,stopCharge,sendPortDetailCmd,checkStatusChange,getPlanInfo,cancelPlan,parseDataObj,planCharge,getPwd,setPwd} from "@/utils/weitiandi/device/device.js";
  124. // #ifdef APP
  125. import ecUI from '@/utils/ecUI.js'
  126. import ecBLE from '@/utils/ecBLE/ecBLE.js'
  127. // #endif
  128. // #ifdef MP
  129. const ecUI = require('@/utils/ecUI.js')
  130. const ecBLE = require('@/utils/ecBLE/ecBLE.js')
  131. // #endif
  132. let ctx
  133. let isCheckScroll = true
  134. let isCheckRevHex = false
  135. let isCheckSendHex = false
  136. let sendData = ''
  137. export default {
  138. data() {
  139. return {
  140. oldPwd:"",
  141. pwd:"",
  142. showPwd:false,
  143. planCols:[ ],
  144. columnData:[],
  145. showPlan:false,
  146. deviceInfo:{},
  147. visitTime:"",
  148. timer:null,
  149. showPort:false,
  150. portDetail:{portStatus:0,POWER:0,voltage:0},
  151. statusTimer:"",
  152. connected:false,
  153. scriptTask:null,
  154. choosePort:1,
  155. portList:[[{port:1,text:"端口一"}]],
  156. planInfo:null,
  157. days:["","周一","周二","周三","周四","周五","周六","周日"],
  158. textRevData: '',
  159. picker:null,
  160. firstInit:false,
  161. hasRight:false,
  162. startAutoCharge:true,
  163. }
  164. },
  165. computed: {
  166. imgUrl() {
  167. return getApp().globalData.config.imgUrl;
  168. }
  169. },
  170. onLoad(opt) {
  171. this.deviceInfo.deviceId = opt.id;
  172. this.deviceInfo.ccid = opt.ccid;
  173. this.deviceInfo.qrcode = opt.qrcode;
  174. this.checkPassword();
  175. },
  176. onShow(){
  177. this.buletooth();
  178. },
  179. onUnload (){
  180. this.closeSocket();
  181. },
  182. methods: {
  183. toPage(){
  184. uni.navigateTo({
  185. url: '/pages/weitiandi/bluetooth/index'
  186. });
  187. },
  188. cancel(){
  189. this.showPwd = false;
  190. },
  191. modifyPwd(){
  192. this.showPwd = true;
  193. },
  194. inputPwd(){
  195. let rightPwd = uni.getStorageSync("pwd");
  196. if(!this.oldPwd){
  197. this.$modal.showToast("原密码不能为空");
  198. return;
  199. }
  200. if(rightPwd != this.oldPwd){
  201. this.$modal.showToast("原密码不能对");
  202. return;
  203. }
  204. if(!this.pwd){
  205. this.$modal.showToast("密码不能为空");
  206. }else {
  207. setPwd(this.pwd);
  208. this.$modal.showToast("密码修改成功");
  209. this.goBack();
  210. }
  211. },
  212. confirm(e) {
  213. let value = e.value;
  214. console.log('confirm', value)
  215. let day = value[0];
  216. let date = new Date();
  217. let nowDay = date.getDate();
  218. let hour = value[1]+"";
  219. hour = parseInt(hour.substr(0,hour.length-1),10);
  220. let min = value[2]+"";
  221. min = parseInt(min.substr(0,min.length-1),10);
  222. let todayTotalMin = 0;
  223. let planDate = {min:min,hour:hour};
  224. let nowHour = date.getHours();
  225. let nowMin = date.getMinutes();
  226. let nowDate ={min:nowMin,hour:nowHour};
  227. if("今日" == day){
  228. todayTotalMin = this.getGapMin(planDate,nowDate)
  229. }else {
  230. let nowHour = date.getHours();
  231. let min = date.getMinutes();
  232. let maxDate ={min:59,hour:23};
  233. todayTotalMin = this.getGapMin(maxDate,nowDate);
  234. let minDate = {min:0,hour:0};
  235. todayTotalMin +=this.getGapMin(planDate,minDate);
  236. }
  237. console.log(todayTotalMin);
  238. this.cancelPicker();
  239. if(todayTotalMin<=0 || todayTotalMin>1440){
  240. this.$modal.showToast("最大预约时间为24小时");
  241. }else{
  242. planCharge(this.choosePort,todayTotalMin).then(res=>{
  243. this.getInfo(true);
  244. });
  245. }
  246. },
  247. getGapMin(date1,date2){
  248. let min1 = date1.min;
  249. let hour1 = date1.hour;
  250. let min2 = date2.min;
  251. let hour2 = date2.hour;
  252. let total1 = min1+hour1*60;
  253. let total2 = min2+hour2*60;
  254. return total1-total2;
  255. },
  256. cancelPicker(e) {
  257. this.showPlan = false
  258. },
  259. changeHandler(e){
  260. const {
  261. columnIndex,
  262. value,
  263. values, // values为当前变化列的数组内容
  264. index,
  265. // 微信小程序无法将picker实例传出来,只能通过ref操作
  266. picker = this.$refs.uPicker
  267. } = e
  268. let day = e.value[0];
  269. // 当第一列值发生变化时,变化第二列(后一列)对应的选项
  270. this.picker = picker;
  271. if (columnIndex === 0) {
  272. // picker为选择器this实例,变化第二列对应的选项
  273. if(day == "今日"){
  274. picker.setColumnValues(1, this.columnData[1])
  275. }else{
  276. picker.setColumnValues(1, this.columnData[0])
  277. }
  278. }
  279. },
  280. checkPassword(){
  281. },
  282. recon(){
  283. let self = this;
  284. ecUI.showLoading('设备连接中')
  285. let blueid = uni.getStorageSync('blueid');
  286. ecBLE.onBLEConnectionStateChange(res => {
  287. ecUI.hideLoading()
  288. if (res.ok) {
  289. self.buletooth();
  290. } else {
  291. uni.removeStorageSync('blueid');
  292. ecUI.showModal(
  293. '提示',
  294. '连接失败,errCode=' + res.errCode + ',errMsg=' + res.errMsg
  295. )
  296. }
  297. })
  298. ecBLE.createBLEConnection(blueid);
  299. },
  300. buletooth(){
  301. let self = this;
  302. ctx = this
  303. isCheckScroll = true
  304. isCheckRevHex = false
  305. isCheckSendHex = false
  306. sendData = ''
  307. //on disconnect
  308. ecBLE.onBLEConnectionStateChange(() => {
  309. uni.showModal({
  310. title: '提示',
  311. content: '蓝牙断开连接',
  312. confirmText:"点击重连",
  313. showCancel:false,
  314. success: function (res) {
  315. if (res.confirm) {
  316. self.recon()
  317. } else if (res.cancel) {
  318. console.log('用户点击取消');
  319. }
  320. }
  321. });
  322. })
  323. //receive data
  324. ecBLE.onBLECharacteristicValueChange((str, strHex) => {
  325. isCheckRevHex = true;
  326. let data =
  327. (isCheckRevHex ? strHex.replace(/[0-9a-fA-F]{2}/g, ' $&') : str)
  328. // console.log(data)
  329. self.$modal.closeLoading();
  330. console.log("收到消息:"+data);
  331. //AA 67 0D 05 00 00 00 00 00 00 00 00 00 25 E2 00 80
  332. data = parseDataObj(data);
  333. self.messageCallback(data);
  334. })
  335. self.getInfo();
  336. },
  337. messageCallback(data){
  338. let self = this;
  339. console.log(data);
  340. let type = data.type;
  341. let real_data = data.real_data;
  342. if(type == 103){
  343. self.portDetail = real_data
  344. self.portList = [[]];
  345. let port_first_status = self.portDetail["port_first_status"];
  346. let port_second_status = self.portDetail["port_second_status"]
  347. if(port_first_status){
  348. self.portList[0].push({port:1,text:"端口一"});
  349. }
  350. if(port_second_status){
  351. self.portList[0].push({port:2,text:"端口二"});
  352. }
  353. let choosePort = self.choosePort
  354. if(choosePort == 1){
  355. self.portDetail.portStatus = port_first_status;
  356. }else if(choosePort == 2){
  357. self.portDetail.portStatus = port_second_status;
  358. }
  359. self.$modal.closeLoading();
  360. }
  361. if(type == 116){
  362. self.$modal.closeLoading();
  363. self.getInfo();
  364. }
  365. if(type == 113){
  366. self.$modal.closeLoading();
  367. self.getInfo();
  368. }
  369. if(type == 96){
  370. }
  371. self.$forceUpdate();
  372. console.log('收到服务器内容:' + JSON.stringify(data));
  373. if(!this.firstInit){
  374. this.firstInit = true;
  375. if(self.portDetail.portStatus == 5){
  376. self.startCharge();
  377. }
  378. }
  379. },
  380. planCharge(){
  381. if(this.portDetail.portStatus == 6){
  382. this.$modal.confirm("确认取消预约?").then(res=>{
  383. this.cancelPlan();
  384. })
  385. }else{
  386. this.toPlan()
  387. }
  388. },
  389. sendBlueData(){
  390. ecBLE.writeBLECharacteristicValue(tempSendData, false)
  391. },
  392. cancelPlan(){
  393. cancelPlan(this.choosePort).then(res=>{
  394. this.$modal.msg("取消成功");
  395. this.getInfo(true);
  396. })
  397. },
  398. getPlanInfo(){
  399. getPlanInfo(this.deviceInfo.deviceId,this.choosePort).then(res=>{
  400. let data = res.data;
  401. if(data != null){
  402. let planType = data.planType;
  403. if(planType == 1){//单次预约
  404. let planInfo = {};
  405. planInfo.runTime = data.runTime;
  406. this.planInfo = planInfo;
  407. this.planInfo.id = data.id;
  408. }else{
  409. let planInfo = {};
  410. planInfo.runTime = data.runTime;
  411. let repeatDays = data.repeatDays;
  412. let days = repeatDays.split(",")
  413. let strs = "";
  414. for (let i = 0; i < days.length; i++) {
  415. if(strs.length>0){
  416. strs+=",";
  417. }
  418. strs +=this.days[days[i]];
  419. }
  420. this.planInfo = planInfo;
  421. this.planInfo.runTime = strs+" "+data.repeatTime;
  422. this.planInfo.id = data.id;
  423. }
  424. }
  425. })
  426. },
  427. confirmPort(e){
  428. let value = e.value[0]
  429. this.choosePort = value.port;
  430. this.showPort = false;
  431. this.getInfo()
  432. },
  433. initSocket(key){
  434. let self = this;
  435. },
  436. toSet(){
  437. // this.closeSocket();
  438. uni.navigateTo({
  439. url: '/pages/weitiandi/bluetooth/setting'
  440. });
  441. },
  442. toPlan(){
  443. let arr = [];
  444. let date = new Date();
  445. let min = date.getMinutes();
  446. let hour = date.getHours();
  447. let arr1 = ["今日", "明日"];
  448. let arr2 = []
  449. let arr3 = [];
  450. let arr4 = [];
  451. for (let i = 0; i < hour; i++) {
  452. arr2.push(i+"时")
  453. }
  454. this.columnData[0] = arr2;
  455. for (let i = hour+1; i < 24; i++) {
  456. arr3.push(i+"时")
  457. }
  458. this.columnData[1] = arr3;
  459. for (let i = 0; i <= 59; i++) {
  460. arr4.push(i+"分")
  461. }
  462. this.planCols = [arr1, arr3, arr4]
  463. this.showPlan = true;
  464. },
  465. trigger(){
  466. let portStatus = this.portDetail.portStatus;
  467. if(portStatus == 2){//需要停止充电
  468. this.$modal.confirm("需要停止充电么?").then(res=>{
  469. this.stopCharge();
  470. })
  471. }else{
  472. if(portStatus == 1){
  473. this.$modal.msg("请先将充电枪插入后再点击充电");
  474. }
  475. if(portStatus == 5){
  476. this.$modal.confirm("确认开始充电么?").then(res=>{
  477. this.startCharge();
  478. })
  479. }else {
  480. this.$modal.msg("端口无法开始充电");
  481. }
  482. }
  483. },
  484. getInfo(flag) {
  485. // let str = "AA 67 0D 01 00 00 00 00 00 00 00 00 00 25 E2 00 80";
  486. // let data = parseDataObj(str);
  487. // this.messageCallback(data);
  488. //
  489. //
  490. this.$modal.loading("正在获取状态,请稍等...");
  491. if(flag){
  492. setTimeout(function (){
  493. sendPortDetailCmd().then(res => {
  494. })
  495. },500)
  496. }else{
  497. sendPortDetailCmd().then(res => {
  498. })
  499. }
  500. },
  501. stopCharge(){
  502. let self = this;
  503. this.deviceInfo.port = this.choosePort;
  504. stopCharge(this.deviceInfo).then(()=>{
  505. self.$modal.loading("停止成功");
  506. setTimeout((()=>{
  507. self.getInfo();
  508. }),1000);
  509. })
  510. },
  511. startCharge(){
  512. let self = this;
  513. this.deviceInfo.port = this.choosePort;
  514. startCharge(this.deviceInfo).then(res=>{
  515. self.$modal.loading("启动成功");
  516. setTimeout((()=>{
  517. self.getInfo();
  518. }),1000);
  519. })
  520. },
  521. getPortInfo(){
  522. this.startPortDetailTimer();
  523. },
  524. startPortDetailTimer(){
  525. let self = this;
  526. this.timer = setTimeout(function (){
  527. getPortDetail(self.deviceInfo,self.visitTime).then(res=>{
  528. let data = res.data;
  529. if(data != null){
  530. self.portDetail = data;
  531. self.checkStatusCheck();
  532. self.$modal.closeLoading();
  533. }else{
  534. self.startPortDetailTimer();
  535. }
  536. });
  537. },1000);
  538. },
  539. checkStatusCheck(){
  540. this.statusChangeTimer();
  541. },
  542. checkOnPage(){
  543. var pages = getCurrentPages() // 获取栈实例
  544. let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
  545. if("pages/weitiandi/device/index" != currentRoute){
  546. return false;
  547. }
  548. return true;
  549. },
  550. goBack(){
  551. this.closeSocket();
  552. uni.navigateBack({
  553. });
  554. },
  555. closeSocket(){
  556. ecBLE.onBLEConnectionStateChange(() => {})
  557. ecBLE.onBLECharacteristicValueChange(() => {})
  558. ecBLE.closeBLEConnection()
  559. uni.removeStorageSync('blueid');
  560. },
  561. statusChangeTimer(){
  562. let self = this;
  563. this.statusTimer = setTimeout(function(){
  564. if(!this.checkOnPage()){
  565. return;
  566. }
  567. checkStatusChange(self.deviceInfo,self.visitTime).then(res=>{
  568. let data = res.data;
  569. if(data != null){
  570. self.getInfo();
  571. }else{
  572. self.statusChangeTimer();
  573. }
  574. });
  575. },3000);
  576. }
  577. }
  578. }
  579. </script>
  580. <style>
  581. .container {
  582. background: rgb(249, 252, 255);
  583. inset: 0;
  584. position: absolute;
  585. }
  586. .header {
  587. position: relative;
  588. margin-top:4vw;
  589. }
  590. .header-status-desc {
  591. position: absolute;
  592. text-align: center;
  593. width: 100%;
  594. bottom:1vh;
  595. font-size: 5vw;
  596. font-weight: bold;
  597. color: #0E9F9B;
  598. margin-bottom: 5vw;
  599. }
  600. .header-status {
  601. font-weight: bold;
  602. text-align: center;
  603. }
  604. .chong-active {
  605. color: #0E9F9B
  606. }
  607. .header-img {
  608. width: 100%;
  609. padding: 5% 10%;
  610. text-align: center;
  611. }
  612. .header-img image {
  613. width: 100%;
  614. height: 23vh;
  615. }
  616. .info-body{
  617. background: #0E9F9B;
  618. height: 20vh;
  619. margin: 0 2%;
  620. border-radius: 1vw;
  621. margin-top:2vh;
  622. color: #F8FCFF;
  623. line-height: 3vh;
  624. }
  625. .info-content{
  626. display: inline-block;
  627. width: 23%;
  628. text-align: center;
  629. margin: 1%;
  630. margin-top:2.5vh;
  631. }
  632. .info-content-value{
  633. font-weight: bold;
  634. }
  635. .info-content-text{
  636. }
  637. .info-summary{
  638. display: flex;
  639. flex-direction: row;
  640. text-align: center;
  641. margin:3vh 0;
  642. }
  643. .summary{
  644. width: 33%;
  645. line-height: 2.5vh;
  646. }
  647. .charge-num{
  648. color: #0E9F9B;
  649. font-weight: bold;
  650. font-size: 4.5vw;
  651. }
  652. .charge-title{
  653. color: #B2B2B2;
  654. font-weight: 400;
  655. }
  656. .btn-image{
  657. width: 90%;
  658. height: 100%;
  659. }
  660. .info-bottom-btn{
  661. display: flex;
  662. flex-direction: row;
  663. text-align: center;
  664. position: relative;
  665. margin-top: 10vh
  666. ;
  667. }
  668. .btn-area{
  669. width: 50%;
  670. height: 50px;
  671. }
  672. .left{
  673. position: relative;
  674. left: 10px;
  675. text-align: right;
  676. }
  677. .right{
  678. text-align: left;
  679. position: relative;
  680. right: 10px;
  681. }
  682. .info-plan{
  683. text-align: center;
  684. color: #0E9F9B;
  685. margin-top:1vh;
  686. font-weight: 400;
  687. }
  688. .setting{
  689. position: fixed;
  690. right: -1px;
  691. top: 10vh;
  692. z-index: 999;
  693. background: rgb(227,243,245);
  694. color: #0E9F9B;
  695. font-size: 10px;
  696. border-radius: 5px;
  697. padding: 3px;
  698. }
  699. .port{
  700. height: 70px;
  701. background: #F8FCFF;
  702. border: 0px solid #F8FCFF;
  703. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  704. border-radius: 4px;
  705. margin:0 10px;
  706. position: relative;
  707. margin-top:10px;
  708. }
  709. .plan{
  710. height: 70px;
  711. background: #F8FCFF;
  712. border: 0px solid #F8FCFF;
  713. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  714. border-radius: 4px;
  715. margin:0 10px;
  716. position: relative;
  717. margin-top:15px;
  718. }
  719. .port-image{
  720. height: 40px;
  721. width: 40px;
  722. position: absolute;
  723. top:15px;
  724. left:20px;
  725. }
  726. .port-text{
  727. position: absolute;
  728. top:13px;
  729. left:75px;
  730. font-weight: bold;
  731. }
  732. .port-num{
  733. position: absolute;
  734. top:38px;
  735. left:75px;
  736. color: #B2B2B2;
  737. }
  738. .port-icon{
  739. position: absolute;
  740. top:30px;
  741. right:5px;
  742. width: 10px;
  743. height: 16px;
  744. }
  745. .port-icon image{
  746. width: 90%;
  747. }
  748. .body-bottom{
  749. padding:0 22px;
  750. }
  751. .body-bottom .info-content{
  752. width: 30%;
  753. }
  754. .bottom-control{
  755. height: 22vh;
  756. margin: 0 2%;
  757. margin-top:2vh;
  758. line-height: 3vh;
  759. background: #F8FCFF;
  760. border: 0px solid #F8FCFF;
  761. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  762. border-radius: 4px;
  763. padding:3%;
  764. }
  765. .control-btn{
  766. display: inline-block;;
  767. height: 60px;
  768. width: 25%;
  769. padding:10px 20px;
  770. text-align: center;
  771. font-size: 12px;
  772. color: black;
  773. }
  774. .control-btn .btn-image{
  775. }
  776. #box {
  777. /* width: 300px; */
  778. height: 280px;
  779. position: relative;
  780. /* 背景色 */
  781. /* background: #f7f6f6; */
  782. overflow: hidden;
  783. /* padding: 50px 0; */
  784. box-sizing: border-box;
  785. ;
  786. }
  787. .box {
  788. width: 100%;
  789. height: 100%;
  790. position: absolute;
  791. display: flex;
  792. justify-content: center;
  793. /* 此处尽量不要设置背景色,可以选择在父标签上设置背景色,否则没有黏黏的效果 */
  794. filter: url("#goo");
  795. }
  796. /* 电量文字 */
  797. .text {
  798. font-weight: 200;
  799. font-size: 20px;
  800. margin-top: 5px;
  801. text-align: center;
  802. color: #ff6600;
  803. }
  804. /* 电量文字 */
  805. .text span {
  806. font-size: 15px;
  807. }
  808. /* 顶部的两个旋转小球 */
  809. .top_ball {
  810. width: 200px;
  811. height: 200px;
  812. border-radius: 35%;
  813. opacity: 0.5;
  814. position: absolute;
  815. top: 20px;
  816. z-index: 10;
  817. /* 从中心向外剪切圆,相当于掏空 */
  818. -webkit-mask: radial-gradient(transparent 95px, white 0px);
  819. }
  820. /* 顶部的两个旋转小球 */
  821. .top_ball.one {
  822. background: var(--c);
  823. animation: ballZhuan 5s linear infinite;
  824. }
  825. /* 顶部的两个旋转小球 */
  826. .top_ball.two {
  827. background: var(--c);
  828. animation: ballZhuan 8s linear infinite;
  829. }
  830. .three {
  831. width: 170px;
  832. height: 170px;
  833. border-radius: 300px;
  834. opacity: 1;
  835. position: absolute;
  836. top: 20px;
  837. z-index: 10;
  838. /* 从中心向外剪切圆,相当于掏空 */
  839. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  840. background: #ffffff;
  841. /* animation: ballZhuan 9s linear infinite; */
  842. overflow: hidden;
  843. box-shadow: 0px 0px 19px 1px #2196f3;
  844. }
  845. .four {
  846. width: 200px;
  847. height: 200px;
  848. border-radius: 80px;
  849. opacity: 0.3;
  850. position: absolute;
  851. top: 10px;
  852. z-index: 10;
  853. /* 从中心向外剪切圆,相当于掏空 */
  854. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  855. background: #2196f3;
  856. animation: ballZhuan1 linear infinite;
  857. animation-duration: 11s;
  858. }
  859. .five {
  860. width: 270px;
  861. height: 270px;
  862. border-radius: 99px;
  863. opacity: 0.6;
  864. position: absolute;
  865. top: 30px;
  866. z-index: 10;
  867. /* 从中心向外剪切圆,相当于掏空 */
  868. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  869. background: #2196f3;
  870. animation: ballZhuan1 linear infinite;
  871. /* transform: rotate(120deg); */
  872. animation-duration: 9s;
  873. left: -67px;
  874. }
  875. .six {
  876. width: 270px;
  877. height: 270px;
  878. border-radius: 99px;
  879. opacity: 0.6;
  880. position: absolute;
  881. top:30px;
  882. z-index: 10;
  883. /* 从中心向外剪切圆,相当于掏空 */
  884. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  885. background: #2196f3;
  886. animation: ballZhuan1 7s linear infinite;
  887. /* transform: rotate(120deg); */
  888. right: -67px;
  889. }
  890. @keyframes ballZhuan {
  891. 100% {
  892. transform: rotate(360deg);
  893. }
  894. }
  895. @keyframes ballZhuan1 {
  896. 100% {
  897. transform: rotate(360deg);
  898. }
  899. }
  900. /* 底部的小球 */
  901. .dot {
  902. display: block;
  903. width: 20px;
  904. height: 20px;
  905. border-radius: 50%;
  906. background: rgba(101,192,255,0.28);
  907. position: absolute;
  908. z-index: 1000;
  909. bottom: -50px;
  910. }
  911. .dot:nth-of-type(1) {
  912. width: 40px;
  913. height: 40px;
  914. right: 116px;
  915. animation: dotMove 5s linear infinite;
  916. }
  917. .dot:nth-of-type(2) {
  918. width: 50px;
  919. height: 50px;
  920. left: 120px;
  921. animation: dotMove 4s linear infinite;
  922. }
  923. .dot:nth-of-type(3) {
  924. animation: dotMove 2s linear infinite;
  925. }
  926. .dot:nth-of-type(4) {
  927. width: 15px;
  928. height: 15px;
  929. left: 130px;
  930. animation: dotMove 2s linear infinite;
  931. }
  932. .dot:nth-of-type(5) {
  933. width: 30px;
  934. height: 30px;
  935. animation: dotMove 3s linear infinite;
  936. }
  937. @keyframes dotMove {
  938. 0% {
  939. transform: translateY(0px);
  940. opacity: 1;
  941. }
  942. 98% {
  943. opacity: 1;
  944. }
  945. 100% {
  946. transform: translateY(-260px);
  947. opacity: 0;
  948. }
  949. }
  950. .w-flex {
  951. display: -webkit-box;
  952. display: -webkit-flex;
  953. display: flex;
  954. padding: 0px 25px;
  955. }
  956. .w-flex__item {
  957. -webkit-box-flex: 1;
  958. -webkit-flex: 1;
  959. flex: 1;
  960. }
  961. .w-item{
  962. text-align: center;
  963. padding: 5px;
  964. }
  965. .w-item-tit{
  966. font-size: 14px;
  967. color: #888;
  968. }
  969. .w-item-num{
  970. font-size: 18px;
  971. color: #111;
  972. }
  973. .can{
  974. position: relative;
  975. z-index: 0;
  976. width: 211px;
  977. height: 211px;
  978. background-image: url(/static/images/new/quan.png);
  979. background-size: cover;
  980. display: flex;
  981. justify-content: center;
  982. align-items: center;
  983. }
  984. .dtop{
  985. background: url(/static/images/new/box1.png);
  986. background-size: cover;
  987. width: 260px;
  988. height: 236px;
  989. display: flex;
  990. justify-content: center;
  991. align-items: center;
  992. left: 25%;
  993. position: relative;
  994. }
  995. .dstatus{
  996. margin-top: 0.1rem;
  997. display: flex;
  998. flex-wrap: wrap;
  999. justify-content: space-evenly;
  1000. align-content: center;
  1001. }
  1002. .ditem{
  1003. width: 30%;
  1004. display: flex;
  1005. flex-direction: column;
  1006. align-items: center;
  1007. margin-bottom: 0.3rem;
  1008. margin-top: 10px;
  1009. }
  1010. .itemimg{
  1011. width: 50px;
  1012. height: 50px;
  1013. }
  1014. .item-value{
  1015. font-weight: bold;
  1016. font-size: 19px;
  1017. margin:4px 0;
  1018. }
  1019. .item-text{
  1020. font-size: 13px;
  1021. margin:1px 0;
  1022. color: #999999;
  1023. }
  1024. .start{
  1025. background: #1A87FF;
  1026. color: #fff;
  1027. width: 45%;
  1028. height: 50px;
  1029. min-height: 40px;
  1030. border-radius: 50px;
  1031. display: flex;
  1032. justify-content: center;
  1033. align-items: center;
  1034. font-size: 20px;
  1035. font-weight: bold;
  1036. }
  1037. .dbtns{
  1038. display: flex;
  1039. margin-top:10px;
  1040. justify-content: space-between;
  1041. padding: 0 30px;
  1042. }
  1043. .get{
  1044. background: #fff;
  1045. border: 1px solid #1A87FF;
  1046. color: #1A87FF;
  1047. width: 45%;
  1048. height: 50px;
  1049. min-height: 40px;
  1050. border-radius: 50px;
  1051. display: flex;
  1052. justify-content: center;
  1053. align-items: center;
  1054. font-size: 20px;
  1055. font-weight: bold;
  1056. }
  1057. .dtip{
  1058. margin: 20px 20px;
  1059. padding: 10px;
  1060. background: rgba(127,200,251,0.1);
  1061. border: 1px solid #7FC8FB;
  1062. box-shadow: 0 2px 8px 0 rgba(0,0,0,0.19);
  1063. border-radius: 5px;
  1064. font-size: 17px;
  1065. font-weight: 400;
  1066. color: #B8B9BA;
  1067. margin-bottom: 10px;
  1068. }
  1069. </style>