status.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119
  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="three">
  14. <view class="four"></view>
  15. <view class="five"></view>
  16. <view class="six"></view>
  17. </view>
  18. <view class="dot"></view>
  19. <view class="dot"></view>
  20. <view class="dot"></view>
  21. <view class="dot"></view>
  22. <view class="dot"></view>
  23. </view>
  24. <!-- <canvas id="c">-->
  25. <!-- </canvas>-->
  26. <view class="stip">
  27. <view class="p0" st=""></view>
  28. <view class="p1">
  29. <view v-if="portDetail.portStatus == 2">
  30. {{$t('charge.charging')}}
  31. </view>
  32. <view v-if="portDetail.portStatus == 6">
  33. {{$t('charge.planed')}}
  34. </view>
  35. <view v-if="portDetail.portStatus == 2">
  36. {{$t('charge.connected')}}
  37. </view>
  38. <view v-else>
  39. {{$t('charge.nocharge')}}
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="dstatus">
  47. <view class="ditem">
  48. <image class="itemimg" src="/static/images/new/tmp.png"/>
  49. <view class="item-value">{{portDetail.dev_temper}}℃</view>
  50. <span class="item-text">{{$t('charge.devtemper')}}</span>
  51. </view>
  52. <view class="ditem">
  53. <image class="itemimg" src="/static/images/new/dianya.png"/>
  54. <view class="item-value">{{ portDetail.voltage }}V</view>
  55. <span class="item-text">{{$t('charge.voltage')}}</span>
  56. </view>
  57. <view class="ditem">
  58. <image class="itemimg" src="/static/images/new/dianliu.png"/>
  59. <view class="item-value" v-if="portDetail.voltage == 0">0A</view>
  60. <view class="item-value" v-else>{{portDetail.POWER/portDetail.voltage}}A</view>
  61. <span class="item-text">{{$t('charge.current')}}</span>
  62. </view>
  63. <view class="ditem">
  64. <image class="itemimg" src="/static/images/new/shjian.png"/>
  65. <view class="item-value">{{ portDetail.time }}{{ i18('分钟') }}</view>
  66. <span class="item-text">{{$t('charge.chargetime')}}</span>
  67. </view>
  68. <view class="ditem">
  69. <image class="itemimg" src="/static/images/new/gonglv.png"/>
  70. <view class="item-value">{{ portDetail.power }}W</view>
  71. <span class="item-text">{{$t('charge.power')}}</span>
  72. </view>
  73. <view class="ditem">
  74. <image class="itemimg" src="/static/images/new/dianliang.png"/>
  75. <view class="item-value">{{ portDetail.elec }} {{ i18('度') }}</view>
  76. <span class="item-text">{{$t('charge.elec')}}</span>
  77. </view>
  78. </view>
  79. <view class="dbtns">
  80. <view class="start" @click="toPage">
  81. <image style="width:25px;height: 25px;margin-right: 5px;" src="/static/images/new/start.png"/>
  82. <span>{{$t('charge.startcharge')}}</span>
  83. </view>
  84. <view class="get" @click="getInfo">
  85. <image style="width:25px;height: 25px;margin-right: 5px;" src="/static/images/new/get.png"/>
  86. <span>{{$t('charge.getinfo')}}</span>
  87. </view>
  88. </view>
  89. <view class="dtip">
  90. <view style="margin:10px 0px;color: #1A87FF;"><img style="width: 13px;height: 13px" src="/static/images/new/tip.png">{{i18('温馨提示')}}</view>
  91. <view>1,{{i18('桩控制最大输出电流,当功率没有达到请检查车的状态或者车的设置')}};</view>
  92. <view>2,{{i18('启动充电-&gt;设备管理->可设置设备最大输出电流')}}</view>
  93. <view>3,{{i18('为保障您远程启动正常充电,请确保枪头完全连接充电口,同时确认您的爱车处于立即充电状态下')}};</view>
  94. <view>4,{{i18('注意规范安全充电,停好车,锁好车。')}}</view>
  95. </view>
  96. <u-picker @cancel="showPort=false" @confirm="confirmPort" :show="showPort" :columns="portList" keyName="text"></u-picker>
  97. <u-picker @cancel="cancelPicker" @confirm="confirm" :show="showPlan" :columns="planCols" @change="changeHandler"></u-picker>
  98. <u-modal :show="showPwd" :confirmText="i18('确认')" :cancelText="i18('取消')" @confirm="inputPwd" @cancel="cancel" :showCancelButton="true" :title="$t('charge.modifypwd')" >
  99. <view class="slot-content">
  100. <view>
  101. <u--input
  102. type="number"
  103. :placeholder="$t('charge.oldpwd')"
  104. border="surround"
  105. v-model="oldPwd"
  106. ></u--input>
  107. </view>
  108. <view style="margin-top:5px">
  109. <u--input
  110. type="number"
  111. :placeholder="$t('charge.newpwd')"
  112. border="surround"
  113. v-model="pwd"
  114. ></u--input>
  115. </view>
  116. </view>
  117. </u-modal>
  118. </view>
  119. </template>
  120. <script>
  121. import {getDeviceInfo,getPortDetail,startCharge,stopCharge,sendPortDetailCmd,checkStatusChange,getPlanInfo,cancelPlan,parseDataObj,planCharge,getPwd,setPwd} from "@/utils/weitiandi/device/device.js";
  122. // #ifdef APP
  123. import ecUI from '@/utils/ecUI.js'
  124. import ecBLE from '@/utils/ecBLE/ecBLE.js'
  125. // #endif
  126. // #ifdef MP
  127. const ecUI = require('@/utils/ecUI.js')
  128. const ecBLE = require('@/utils/ecBLE/ecBLE.js')
  129. // #endif
  130. import i18 from '@/utils/i18.js'
  131. let ctx
  132. let isCheckScroll = true
  133. let isCheckRevHex = false
  134. let isCheckSendHex = false
  135. let sendData = ''
  136. export default {
  137. data() {
  138. return {
  139. oldPwd:"",
  140. pwd:"",
  141. showPwd:false,
  142. planCols:[ ],
  143. columnData:[],
  144. showPlan:false,
  145. deviceInfo:{},
  146. visitTime:"",
  147. timer:null,
  148. showPort:false,
  149. portDetail:{portStatus:0,POWER:0,voltage:0},
  150. statusTimer:"",
  151. connected:false,
  152. scriptTask:null,
  153. choosePort:1,
  154. portList:[[{port:1,text:"端口一"}]],
  155. planInfo:null,
  156. days:["","周一","周二","周三","周四","周五","周六","周日"],
  157. textRevData: '',
  158. picker:null,
  159. firstInit:false,
  160. hasRight:false,
  161. startAutoCharge:true,
  162. }
  163. },
  164. computed: {
  165. imgUrl() {
  166. return getApp().globalData.config.imgUrl;
  167. }
  168. },
  169. onLoad() {
  170. console.log("status comeing")
  171. this.checkPassword();
  172. },
  173. onShow(){
  174. this.buletooth();
  175. },
  176. onUnload (){
  177. this.closeSocket();
  178. },
  179. methods: {
  180. i18(text){
  181. return i18(text)
  182. },
  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. .three {
  809. width: 170px;
  810. height: 170px;
  811. border-radius: 300px;
  812. opacity: 1;
  813. position: absolute;
  814. top: 20px;
  815. z-index: 10;
  816. /* 从中心向外剪切圆,相当于掏空 */
  817. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  818. background: #ffffff;
  819. /* animation: ballZhuan 9s linear infinite; */
  820. overflow: hidden;
  821. box-shadow: 0px 0px 19px 1px #2196f3;
  822. }
  823. .four {
  824. width: 200px;
  825. height: 200px;
  826. border-radius: 80px;
  827. opacity: 0.3;
  828. position: absolute;
  829. top: 10px;
  830. z-index: 10;
  831. /* 从中心向外剪切圆,相当于掏空 */
  832. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  833. background: #2196f3;
  834. animation: ballZhuan1 linear infinite;
  835. animation-duration: 11s;
  836. }
  837. .five {
  838. width: 270px;
  839. height: 270px;
  840. border-radius: 99px;
  841. opacity: 0.6;
  842. position: absolute;
  843. top: 30px;
  844. z-index: 10;
  845. /* 从中心向外剪切圆,相当于掏空 */
  846. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  847. background: #2196f3;
  848. animation: ballZhuan1 linear infinite;
  849. /* transform: rotate(120deg); */
  850. animation-duration: 9s;
  851. left: -67px;
  852. }
  853. .six {
  854. width: 270px;
  855. height: 270px;
  856. border-radius: 99px;
  857. opacity: 0.6;
  858. position: absolute;
  859. top:30px;
  860. z-index: 10;
  861. /* 从中心向外剪切圆,相当于掏空 */
  862. /* -webkit-mask: radial-gradient(transparent 95px, white 0px); */
  863. background: #2196f3;
  864. animation: ballZhuan1 7s linear infinite;
  865. /* transform: rotate(120deg); */
  866. right: -67px;
  867. }
  868. @keyframes ballZhuan {
  869. 100% {
  870. transform: rotate(360deg);
  871. }
  872. }
  873. @keyframes ballZhuan1 {
  874. 100% {
  875. transform: rotate(360deg);
  876. }
  877. }
  878. /* 底部的小球 */
  879. .dot {
  880. display: block;
  881. width: 20px;
  882. height: 20px;
  883. border-radius: 50%;
  884. background: rgba(101,192,255,0.28);
  885. position: absolute;
  886. z-index: 1000;
  887. bottom: -50px;
  888. }
  889. .dot:nth-of-type(1) {
  890. width: 40px;
  891. height: 40px;
  892. right: 116px;
  893. animation: dotMove 5s linear infinite;
  894. }
  895. .dot:nth-of-type(2) {
  896. width: 50px;
  897. height: 50px;
  898. left: 120px;
  899. animation: dotMove 4s linear infinite;
  900. }
  901. .dot:nth-of-type(3) {
  902. animation: dotMove 2s linear infinite;
  903. }
  904. .dot:nth-of-type(4) {
  905. width: 15px;
  906. height: 15px;
  907. left: 130px;
  908. animation: dotMove 2s linear infinite;
  909. }
  910. .dot:nth-of-type(5) {
  911. width: 30px;
  912. height: 30px;
  913. animation: dotMove 3s linear infinite;
  914. }
  915. @keyframes dotMove {
  916. 0% {
  917. transform: translateY(0px);
  918. opacity: 1;
  919. }
  920. 98% {
  921. opacity: 1;
  922. }
  923. 100% {
  924. transform: translateY(-260px);
  925. opacity: 0;
  926. }
  927. }
  928. .w-flex {
  929. display: -webkit-box;
  930. display: -webkit-flex;
  931. display: flex;
  932. padding: 0px 25px;
  933. }
  934. .w-flex__item {
  935. -webkit-box-flex: 1;
  936. -webkit-flex: 1;
  937. flex: 1;
  938. }
  939. .w-item{
  940. text-align: center;
  941. padding: 5px;
  942. }
  943. .w-item-tit{
  944. font-size: 14px;
  945. color: #888;
  946. }
  947. .w-item-num{
  948. font-size: 18px;
  949. color: #111;
  950. }
  951. .can{
  952. position: relative;
  953. z-index: 0;
  954. width: 211px;
  955. height: 211px;
  956. background-image: url(/static/images/new/quan.png);
  957. background-size: cover;
  958. display: flex;
  959. justify-content: center;
  960. align-items: center;
  961. }
  962. .dtop{
  963. background: url(/static/images/new/box1.png);
  964. background-size: cover;
  965. width: 260px;
  966. height: 236px;
  967. display: flex;
  968. justify-content: center;
  969. align-items: center;
  970. left: 25%;
  971. position: relative;
  972. }
  973. .dstatus{
  974. margin-top: 0.1rem;
  975. display: flex;
  976. flex-wrap: wrap;
  977. justify-content: space-evenly;
  978. align-content: center;
  979. }
  980. .ditem{
  981. width: 30%;
  982. display: flex;
  983. flex-direction: column;
  984. align-items: center;
  985. margin-bottom: 0.3rem;
  986. margin-top: 10px;
  987. }
  988. .itemimg{
  989. width: 50px;
  990. height: 50px;
  991. }
  992. .item-value{
  993. font-weight: bold;
  994. font-size: 19px;
  995. margin:4px 0;
  996. }
  997. .item-text{
  998. font-size: 13px;
  999. margin:1px 0;
  1000. color: #999999;
  1001. }
  1002. .start{
  1003. background: #1A87FF;
  1004. color: #fff;
  1005. width: 45%;
  1006. height: 50px;
  1007. min-height: 40px;
  1008. border-radius: 50px;
  1009. display: flex;
  1010. justify-content: center;
  1011. align-items: center;
  1012. font-size: 20px;
  1013. font-weight: bold;
  1014. }
  1015. .dbtns{
  1016. display: flex;
  1017. margin-top:10px;
  1018. justify-content: space-between;
  1019. padding: 0 30px;
  1020. }
  1021. .get{
  1022. background: #fff;
  1023. border: 1px solid #1A87FF;
  1024. color: #1A87FF;
  1025. width: 45%;
  1026. height: 50px;
  1027. min-height: 40px;
  1028. border-radius: 50px;
  1029. display: flex;
  1030. justify-content: center;
  1031. align-items: center;
  1032. font-size: 20px;
  1033. font-weight: bold;
  1034. }
  1035. .dtip{
  1036. margin: 20px 20px;
  1037. padding: 10px;
  1038. background: rgba(127,200,251,0.1);
  1039. border: 1px solid #7FC8FB;
  1040. box-shadow: 0 2px 8px 0 rgba(0,0,0,0.19);
  1041. border-radius: 5px;
  1042. font-size: 17px;
  1043. font-weight: 400;
  1044. color: #B8B9BA;
  1045. margin-bottom: 10px;
  1046. }
  1047. .p1{
  1048. font-size: 20px;
  1049. color: white;
  1050. font-weight: bold;
  1051. margin-top:10px;
  1052. }
  1053. .stip{
  1054. text-align: center;
  1055. z-index: 9999;
  1056. }
  1057. </style>