index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879
  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,123,26);color: white;border-radius: 5px;font-size: 10px;width: 120rpx;" @click="goBack">
  4. 断开连接
  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: #0E9F9B;color: white;border-radius: 5px;font-size: 10px;width: 120rpx;" @click="modifyPwd">
  7. 修改密码
  8. </view>
  9. <view class="header">
  10. <view class="header-img" v-if="portDetail.portStatus == 2">
  11. <image :src="imgUrl+'/chargedetail/chonging.png'">
  12. </image>
  13. </view>
  14. <view class="header-img" v-if="portDetail.portStatus != 2">
  15. <image :src="imgUrl+'/chargedetail/chongoff.png'">
  16. </image>
  17. </view>
  18. <view class="header-status-desc" v-if="portDetail.portStatus == 2">
  19. 充电中
  20. </view>
  21. <view class="header-status-desc" style="color: #B2B2B2" v-if="portDetail.portStatus != 2">
  22. 未充电
  23. </view>
  24. <view class="header-status chong-active" v-if="portDetail.portStatus == 1">
  25. 充电枪未连接
  26. </view>
  27. <view class="header-status chong-active" v-if="portDetail.portStatus == 0">
  28. 正在读取状态
  29. </view>
  30. <view class="header-status chong-active" v-if="portDetail.portStatus == 5">
  31. 充电枪已连接
  32. </view>
  33. <view class="header-status chong-active" v-if="portDetail.portStatus == 2">
  34. 充电枪已连接
  35. </view>
  36. <view class="header-status chong-active" v-if="portDetail.portStatus == 6">
  37. 充电枪已预约
  38. </view>
  39. </view>
  40. <view class="port" @click="showPort = true">
  41. <view class="port-image">
  42. <image class="btn-image" :src="imgUrl+'/index/device.png'" >
  43. </image>
  44. </view>
  45. <view class="port-text">
  46. 当前端口:
  47. </view>
  48. <view class="port-num">
  49. <view>
  50. {{portList[0][choosePort-1]["text"]}}
  51. </view>
  52. </view>
  53. <view class="port-icon">
  54. <image class="btn-image" :src="imgUrl+'/index/right.png'" >
  55. </image>
  56. </view>
  57. </view>
  58. <view class="plan" @click="planCharge">
  59. <view class="port-image">
  60. <image class="btn-image" :src="imgUrl+'/index/clock.png'" >
  61. </image>
  62. </view>
  63. <view class="port-text" v-if="portDetail.portStatus == 6" style="top:16px">
  64. 已预约
  65. </view>
  66. <view class="port-text" style="top:24px" v-else>
  67. 点击预约充电
  68. </view>
  69. <view class="port-num" style="top:48px;font-size: 12px" v-if="portDetail.portStatus == 6">
  70. 点击取消预约
  71. </view>
  72. <view class="port-icon" v-if="portDetail.portStatus !=6">
  73. <image class="btn-image" :src="imgUrl+'/index/right.png'" >
  74. </image>
  75. </view>
  76. <view class="port-icon" v-if="portDetail.portStatus == 6" style="width: 18px;height: 18px;right:1px;">
  77. <image class="btn-image" :src="imgUrl+'/index/del.png'" >
  78. </image>
  79. </view>
  80. </view>
  81. <view class="info-body">
  82. <view>
  83. <view class="info-content">
  84. <view class="info-content-value">{{ portDetail.voltage }}V</view>
  85. <view class="info-content-text">
  86. 充电电压
  87. </view>
  88. </view>
  89. <view class="info-content">
  90. <view class="info-content-value" v-if="portDetail.voltage == 0">0A</view>
  91. <view class="info-content-value" v-else>{{portDetail.POWER/portDetail.voltage}}A</view>
  92. <view class="info-content-text">
  93. 充电电流
  94. </view>
  95. </view>
  96. <view class="info-content">
  97. <view class="info-content-value">{{portDetail.dev_temper}}℃</view>
  98. <view class="info-content-text">
  99. 设备温度
  100. </view>
  101. </view>
  102. <view class="info-content">
  103. <view class="info-content-value">{{portDetail.wire_temper}}℃</view>
  104. <view class="info-content-text">
  105. 线路温度
  106. </view>
  107. </view>
  108. </view>
  109. <view class="body-bottom">
  110. <view class="info-content">
  111. <view class="info-content-value">{{ portDetail.time }}分钟</view>
  112. <view class="info-content-text">
  113. 已冲时间
  114. </view>
  115. </view>
  116. <view class="info-content">
  117. <view class="info-content-value">{{ portDetail.power }}W</view>
  118. <view class="info-content-text">
  119. 充电功率
  120. </view>
  121. </view>
  122. <view class="info-content">
  123. <view class="info-content-value">{{ portDetail.elec }} 度</view>
  124. <view class="info-content-text">
  125. 已冲电量
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <u-picker @cancel="showPort=false" @confirm="confirmPort" :show="showPort" :columns="portList" keyName="text"></u-picker>
  131. <view class="bottom-control">
  132. <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus == 2">
  133. <image class="btn-image" :src="imgUrl+'/control/stop.png'" >
  134. </image>
  135. <view>停止充电</view>
  136. </view>
  137. <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus != 2">
  138. <image class="btn-image" :src="imgUrl+'/control/charge.png'" >
  139. </image>
  140. <view>立即充电</view>
  141. </view>
  142. <view class="control-btn" @click="getInfo">
  143. <image class="btn-image" :src="imgUrl+'/control/getstatus.png'" >
  144. </image>
  145. <view>获取状态</view>
  146. </view>
  147. <view class="control-btn" @click="toSet">
  148. <image class="btn-image" :src="imgUrl+'/control/control.png'" >
  149. </image>
  150. <view>设备控制</view>
  151. </view>
  152. <!-- <view class="control-btn">-->
  153. <!-- <image class="btn-image" :src="imgUrl+'/control/record.png'" >-->
  154. <!-- </image>-->
  155. <!-- <view>使用记录</view>-->
  156. <!-- </view>-->
  157. </view>
  158. <u-picker @cancel="cancelPicker" @confirm="confirm" :show="showPlan" :columns="planCols" @change="changeHandler"></u-picker>
  159. <u-modal :show="showPwd" @confirm="inputPwd" @cancel="cancel" :showCancelButton="true" title="修改密码" >
  160. <view class="slot-content">
  161. <view>
  162. <u--input
  163. type="number"
  164. placeholder="原密码"
  165. border="surround"
  166. v-model="oldPwd"
  167. ></u--input>
  168. </view>
  169. <view style="margin-top:5px">
  170. <u--input
  171. type="number"
  172. placeholder="6位数字新密码"
  173. border="surround"
  174. v-model="pwd"
  175. ></u--input>
  176. </view>
  177. </view>
  178. </u-modal>
  179. </view>
  180. </template>
  181. <script>
  182. import {getDeviceInfo,getPortDetail,startCharge,stopCharge,sendPortDetailCmd,checkStatusChange,getPlanInfo,cancelPlan,parseDataObj,planCharge,getPwd,setPwd} from "@/utils/weitiandi/device/device.js";
  183. // #ifdef APP
  184. import ecUI from '@/utils/ecUI.js'
  185. import ecBLE from '@/utils/ecBLE/ecBLE.js'
  186. // #endif
  187. // #ifdef MP
  188. const ecUI = require('@/utils/ecUI.js')
  189. const ecBLE = require('@/utils/ecBLE/ecBLE.js')
  190. // #endif
  191. let ctx
  192. let isCheckScroll = true
  193. let isCheckRevHex = false
  194. let isCheckSendHex = false
  195. let sendData = ''
  196. export default {
  197. data() {
  198. return {
  199. oldPwd:"",
  200. pwd:"",
  201. showPwd:false,
  202. planCols:[ ],
  203. columnData:[],
  204. showPlan:false,
  205. deviceInfo:{},
  206. visitTime:"",
  207. timer:null,
  208. showPort:false,
  209. portDetail:{portStatus:0,POWER:0,voltage:0},
  210. statusTimer:"",
  211. connected:false,
  212. scriptTask:null,
  213. choosePort:1,
  214. portList:[[{port:1,text:"端口一"}]],
  215. planInfo:null,
  216. days:["","周一","周二","周三","周四","周五","周六","周日"],
  217. textRevData: '',
  218. picker:null,
  219. firstInit:false,
  220. hasRight:false,
  221. startAutoCharge:true,
  222. }
  223. },
  224. computed: {
  225. imgUrl() {
  226. return getApp().globalData.config.imgUrl;
  227. }
  228. },
  229. onLoad(opt) {
  230. this.deviceInfo.deviceId = opt.id;
  231. this.deviceInfo.ccid = opt.ccid;
  232. this.deviceInfo.qrcode = opt.qrcode;
  233. this.checkPassword();
  234. },
  235. onShow(){
  236. this.buletooth();
  237. },
  238. onUnload (){
  239. this.closeSocket();
  240. },
  241. methods: {
  242. cancel(){
  243. this.showPwd = false;
  244. },
  245. modifyPwd(){
  246. this.showPwd = true;
  247. },
  248. inputPwd(){
  249. let rightPwd = uni.getStorageSync("pwd");
  250. if(!this.oldPwd){
  251. this.$modal.showToast("原密码不能为空");
  252. return;
  253. }
  254. if(rightPwd != this.oldPwd){
  255. this.$modal.showToast("原密码不能对");
  256. return;
  257. }
  258. if(!this.pwd){
  259. this.$modal.showToast("密码不能为空");
  260. }else {
  261. setPwd(this.pwd);
  262. this.$modal.showToast("密码修改成功");
  263. this.goBack();
  264. }
  265. },
  266. confirm(e) {
  267. let value = e.value;
  268. console.log('confirm', value)
  269. let day = value[0];
  270. let date = new Date();
  271. let nowDay = date.getDate();
  272. let hour = value[1]+"";
  273. hour = parseInt(hour.substr(0,hour.length-1),10);
  274. let min = value[2]+"";
  275. min = parseInt(min.substr(0,min.length-1),10);
  276. let todayTotalMin = 0;
  277. let planDate = {min:min,hour:hour};
  278. let nowHour = date.getHours();
  279. let nowMin = date.getMinutes();
  280. let nowDate ={min:nowMin,hour:nowHour};
  281. if("今日" == day){
  282. todayTotalMin = this.getGapMin(planDate,nowDate)
  283. }else {
  284. let nowHour = date.getHours();
  285. let min = date.getMinutes();
  286. let maxDate ={min:59,hour:23};
  287. todayTotalMin = this.getGapMin(maxDate,nowDate);
  288. let minDate = {min:0,hour:0};
  289. todayTotalMin +=this.getGapMin(planDate,minDate);
  290. }
  291. console.log(todayTotalMin);
  292. this.cancelPicker();
  293. if(todayTotalMin<=0 || todayTotalMin>1440){
  294. this.$modal.showToast("最大预约时间为24小时");
  295. }else{
  296. planCharge(this.choosePort,todayTotalMin).then(res=>{
  297. this.getInfo(true);
  298. });
  299. }
  300. },
  301. getGapMin(date1,date2){
  302. let min1 = date1.min;
  303. let hour1 = date1.hour;
  304. let min2 = date2.min;
  305. let hour2 = date2.hour;
  306. let total1 = min1+hour1*60;
  307. let total2 = min2+hour2*60;
  308. return total1-total2;
  309. },
  310. cancelPicker(e) {
  311. this.showPlan = false
  312. },
  313. changeHandler(e){
  314. const {
  315. columnIndex,
  316. value,
  317. values, // values为当前变化列的数组内容
  318. index,
  319. // 微信小程序无法将picker实例传出来,只能通过ref操作
  320. picker = this.$refs.uPicker
  321. } = e
  322. let day = e.value[0];
  323. // 当第一列值发生变化时,变化第二列(后一列)对应的选项
  324. this.picker = picker;
  325. if (columnIndex === 0) {
  326. // picker为选择器this实例,变化第二列对应的选项
  327. if(day == "今日"){
  328. picker.setColumnValues(1, this.columnData[1])
  329. }else{
  330. picker.setColumnValues(1, this.columnData[0])
  331. }
  332. }
  333. },
  334. checkPassword(){
  335. },
  336. recon(){
  337. let self = this;
  338. ecUI.showLoading('设备连接中')
  339. let blueid = uni.getStorageSync('blueid');
  340. ecBLE.onBLEConnectionStateChange(res => {
  341. ecUI.hideLoading()
  342. if (res.ok) {
  343. self.buletooth();
  344. } else {
  345. uni.removeStorageSync('blueid');
  346. ecUI.showModal(
  347. '提示',
  348. '连接失败,errCode=' + res.errCode + ',errMsg=' + res.errMsg
  349. )
  350. }
  351. })
  352. ecBLE.createBLEConnection(blueid);
  353. },
  354. buletooth(){
  355. let self = this;
  356. ctx = this
  357. isCheckScroll = true
  358. isCheckRevHex = false
  359. isCheckSendHex = false
  360. sendData = ''
  361. //on disconnect
  362. ecBLE.onBLEConnectionStateChange(() => {
  363. uni.showModal({
  364. title: '提示',
  365. content: '蓝牙断开连接',
  366. confirmText:"点击重连",
  367. showCancel:false,
  368. success: function (res) {
  369. if (res.confirm) {
  370. self.recon()
  371. } else if (res.cancel) {
  372. console.log('用户点击取消');
  373. }
  374. }
  375. });
  376. })
  377. //receive data
  378. ecBLE.onBLECharacteristicValueChange((str, strHex) => {
  379. isCheckRevHex = true;
  380. let data =
  381. (isCheckRevHex ? strHex.replace(/[0-9a-fA-F]{2}/g, ' $&') : str)
  382. // console.log(data)
  383. self.$modal.closeLoading();
  384. console.log("收到消息:"+data);
  385. //AA 67 0D 05 00 00 00 00 00 00 00 00 00 25 E2 00 80
  386. data = parseDataObj(data);
  387. self.messageCallback(data);
  388. })
  389. self.getInfo();
  390. },
  391. messageCallback(data){
  392. let self = this;
  393. console.log(data);
  394. let type = data.type;
  395. let real_data = data.real_data;
  396. if(type == 103){
  397. self.portDetail = real_data
  398. self.portList = [[]];
  399. let port_first_status = self.portDetail["port_first_status"];
  400. let port_second_status = self.portDetail["port_second_status"]
  401. if(port_first_status){
  402. self.portList[0].push({port:1,text:"端口一"});
  403. }
  404. if(port_second_status){
  405. self.portList[0].push({port:2,text:"端口二"});
  406. }
  407. let choosePort = self.choosePort
  408. if(choosePort == 1){
  409. self.portDetail.portStatus = port_first_status;
  410. }else if(choosePort == 2){
  411. self.portDetail.portStatus = port_second_status;
  412. }
  413. self.$modal.closeLoading();
  414. }
  415. if(type == 116){
  416. self.$modal.closeLoading();
  417. self.getInfo();
  418. }
  419. if(type == 113){
  420. self.$modal.closeLoading();
  421. self.getInfo();
  422. }
  423. if(type == 96){
  424. }
  425. self.$forceUpdate();
  426. console.log('收到服务器内容:' + JSON.stringify(data));
  427. if(!this.firstInit){
  428. this.firstInit = true;
  429. if(self.portDetail.portStatus == 5){
  430. self.startCharge();
  431. }
  432. }
  433. },
  434. planCharge(){
  435. if(this.portDetail.portStatus == 6){
  436. this.$modal.confirm("确认取消预约?").then(res=>{
  437. this.cancelPlan();
  438. })
  439. }else{
  440. this.toPlan()
  441. }
  442. },
  443. sendBlueData(){
  444. ecBLE.writeBLECharacteristicValue(tempSendData, false)
  445. },
  446. cancelPlan(){
  447. cancelPlan(this.choosePort).then(res=>{
  448. this.$modal.msg("取消成功");
  449. this.getInfo(true);
  450. })
  451. },
  452. getPlanInfo(){
  453. getPlanInfo(this.deviceInfo.deviceId,this.choosePort).then(res=>{
  454. let data = res.data;
  455. if(data != null){
  456. let planType = data.planType;
  457. if(planType == 1){//单次预约
  458. let planInfo = {};
  459. planInfo.runTime = data.runTime;
  460. this.planInfo = planInfo;
  461. this.planInfo.id = data.id;
  462. }else{
  463. let planInfo = {};
  464. planInfo.runTime = data.runTime;
  465. let repeatDays = data.repeatDays;
  466. let days = repeatDays.split(",")
  467. let strs = "";
  468. for (let i = 0; i < days.length; i++) {
  469. if(strs.length>0){
  470. strs+=",";
  471. }
  472. strs +=this.days[days[i]];
  473. }
  474. this.planInfo = planInfo;
  475. this.planInfo.runTime = strs+" "+data.repeatTime;
  476. this.planInfo.id = data.id;
  477. }
  478. }
  479. })
  480. },
  481. confirmPort(e){
  482. let value = e.value[0]
  483. this.choosePort = value.port;
  484. this.showPort = false;
  485. this.getInfo()
  486. },
  487. initSocket(key){
  488. let self = this;
  489. },
  490. toSet(){
  491. // this.closeSocket();
  492. uni.navigateTo({
  493. url: '/pages/weitiandi/bluetooth/setting'
  494. });
  495. },
  496. toPlan(){
  497. let arr = [];
  498. let date = new Date();
  499. let min = date.getMinutes();
  500. let hour = date.getHours();
  501. let arr1 = ["今日", "明日"];
  502. let arr2 = []
  503. let arr3 = [];
  504. let arr4 = [];
  505. for (let i = 0; i < hour; i++) {
  506. arr2.push(i+"时")
  507. }
  508. this.columnData[0] = arr2;
  509. for (let i = hour+1; i < 24; i++) {
  510. arr3.push(i+"时")
  511. }
  512. this.columnData[1] = arr3;
  513. for (let i = 0; i <= 59; i++) {
  514. arr4.push(i+"分")
  515. }
  516. this.planCols = [arr1, arr3, arr4]
  517. this.showPlan = true;
  518. },
  519. trigger(){
  520. let portStatus = this.portDetail.portStatus;
  521. if(portStatus == 2){//需要停止充电
  522. this.$modal.confirm("需要停止充电么?").then(res=>{
  523. this.stopCharge();
  524. })
  525. }else{
  526. if(portStatus == 1){
  527. this.$modal.msg("请先将充电枪插入后再点击充电");
  528. }
  529. if(portStatus == 5){
  530. this.$modal.confirm("确认开始充电么?").then(res=>{
  531. this.startCharge();
  532. })
  533. }else {
  534. this.$modal.msg("端口无法开始充电");
  535. }
  536. }
  537. },
  538. getInfo(flag) {
  539. // let str = "AA 67 0D 01 00 00 00 00 00 00 00 00 00 25 E2 00 80";
  540. // let data = parseDataObj(str);
  541. // this.messageCallback(data);
  542. //
  543. //
  544. this.$modal.loading("正在获取状态,请稍等...");
  545. if(flag){
  546. setTimeout(function (){
  547. sendPortDetailCmd().then(res => {
  548. })
  549. },500)
  550. }else{
  551. sendPortDetailCmd().then(res => {
  552. })
  553. }
  554. },
  555. stopCharge(){
  556. let self = this;
  557. this.deviceInfo.port = this.choosePort;
  558. stopCharge(this.deviceInfo).then(()=>{
  559. self.$modal.loading("停止成功");
  560. setTimeout((()=>{
  561. self.getInfo();
  562. }),1000);
  563. })
  564. },
  565. startCharge(){
  566. let self = this;
  567. this.deviceInfo.port = this.choosePort;
  568. startCharge(this.deviceInfo).then(res=>{
  569. self.$modal.loading("启动成功");
  570. setTimeout((()=>{
  571. self.getInfo();
  572. }),1000);
  573. })
  574. },
  575. getPortInfo(){
  576. this.startPortDetailTimer();
  577. },
  578. startPortDetailTimer(){
  579. let self = this;
  580. this.timer = setTimeout(function (){
  581. getPortDetail(self.deviceInfo,self.visitTime).then(res=>{
  582. let data = res.data;
  583. if(data != null){
  584. self.portDetail = data;
  585. self.checkStatusCheck();
  586. self.$modal.closeLoading();
  587. }else{
  588. self.startPortDetailTimer();
  589. }
  590. });
  591. },1000);
  592. },
  593. checkStatusCheck(){
  594. this.statusChangeTimer();
  595. },
  596. checkOnPage(){
  597. var pages = getCurrentPages() // 获取栈实例
  598. let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
  599. if("pages/weitiandi/device/index" != currentRoute){
  600. return false;
  601. }
  602. return true;
  603. },
  604. goBack(){
  605. this.closeSocket();
  606. uni.navigateBack({
  607. });
  608. },
  609. closeSocket(){
  610. ecBLE.onBLEConnectionStateChange(() => {})
  611. ecBLE.onBLECharacteristicValueChange(() => {})
  612. ecBLE.closeBLEConnection()
  613. uni.removeStorageSync('blueid');
  614. },
  615. statusChangeTimer(){
  616. let self = this;
  617. this.statusTimer = setTimeout(function(){
  618. if(!this.checkOnPage()){
  619. return;
  620. }
  621. checkStatusChange(self.deviceInfo,self.visitTime).then(res=>{
  622. let data = res.data;
  623. if(data != null){
  624. self.getInfo();
  625. }else{
  626. self.statusChangeTimer();
  627. }
  628. });
  629. },3000);
  630. }
  631. }
  632. }
  633. </script>
  634. <style>
  635. .container {
  636. background: rgb(249, 252, 255);
  637. inset: 0;
  638. position: absolute;
  639. }
  640. .header {
  641. position: relative;
  642. margin-top:4vw;
  643. }
  644. .header-status-desc {
  645. position: absolute;
  646. text-align: center;
  647. width: 100%;
  648. bottom:1vh;
  649. font-size: 5vw;
  650. font-weight: bold;
  651. color: #0E9F9B;
  652. margin-bottom: 5vw;
  653. }
  654. .header-status {
  655. font-weight: bold;
  656. text-align: center;
  657. }
  658. .chong-active {
  659. color: #0E9F9B
  660. }
  661. .header-img {
  662. width: 100%;
  663. padding: 5% 10%;
  664. text-align: center;
  665. }
  666. .header-img image {
  667. width: 100%;
  668. height: 23vh;
  669. }
  670. .info-body{
  671. background: #0E9F9B;
  672. height: 20vh;
  673. margin: 0 2%;
  674. border-radius: 1vw;
  675. margin-top:2vh;
  676. color: #F8FCFF;
  677. line-height: 3vh;
  678. }
  679. .info-content{
  680. display: inline-block;
  681. width: 23%;
  682. text-align: center;
  683. margin: 1%;
  684. margin-top:2.5vh;
  685. }
  686. .info-content-value{
  687. font-weight: bold;
  688. }
  689. .info-content-text{
  690. }
  691. .info-summary{
  692. display: flex;
  693. flex-direction: row;
  694. text-align: center;
  695. margin:3vh 0;
  696. }
  697. .summary{
  698. width: 33%;
  699. line-height: 2.5vh;
  700. }
  701. .charge-num{
  702. color: #0E9F9B;
  703. font-weight: bold;
  704. font-size: 4.5vw;
  705. }
  706. .charge-title{
  707. color: #B2B2B2;
  708. font-weight: 400;
  709. }
  710. .btn-image{
  711. width: 90%;
  712. height: 100%;
  713. }
  714. .info-bottom-btn{
  715. display: flex;
  716. flex-direction: row;
  717. text-align: center;
  718. position: relative;
  719. margin-top: 10vh
  720. ;
  721. }
  722. .btn-area{
  723. width: 50%;
  724. height: 50px;
  725. }
  726. .left{
  727. position: relative;
  728. left: 10px;
  729. text-align: right;
  730. }
  731. .right{
  732. text-align: left;
  733. position: relative;
  734. right: 10px;
  735. }
  736. .info-plan{
  737. text-align: center;
  738. color: #0E9F9B;
  739. margin-top:1vh;
  740. font-weight: 400;
  741. }
  742. .setting{
  743. position: fixed;
  744. right: -1px;
  745. top: 10vh;
  746. z-index: 999;
  747. background: rgb(227,243,245);
  748. color: #0E9F9B;
  749. font-size: 10px;
  750. border-radius: 5px;
  751. padding: 3px;
  752. }
  753. .port{
  754. height: 70px;
  755. background: #F8FCFF;
  756. border: 0px solid #F8FCFF;
  757. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  758. border-radius: 4px;
  759. margin:0 10px;
  760. position: relative;
  761. margin-top:10px;
  762. }
  763. .plan{
  764. height: 70px;
  765. background: #F8FCFF;
  766. border: 0px solid #F8FCFF;
  767. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  768. border-radius: 4px;
  769. margin:0 10px;
  770. position: relative;
  771. margin-top:15px;
  772. }
  773. .port-image{
  774. height: 40px;
  775. width: 40px;
  776. position: absolute;
  777. top:15px;
  778. left:20px;
  779. }
  780. .port-text{
  781. position: absolute;
  782. top:13px;
  783. left:75px;
  784. font-weight: bold;
  785. }
  786. .port-num{
  787. position: absolute;
  788. top:38px;
  789. left:75px;
  790. color: #B2B2B2;
  791. }
  792. .port-icon{
  793. position: absolute;
  794. top:30px;
  795. right:5px;
  796. width: 10px;
  797. height: 16px;
  798. }
  799. .port-icon image{
  800. width: 90%;
  801. }
  802. .body-bottom{
  803. padding:0 22px;
  804. }
  805. .body-bottom .info-content{
  806. width: 30%;
  807. }
  808. .bottom-control{
  809. height: 22vh;
  810. margin: 0 2%;
  811. margin-top:2vh;
  812. line-height: 3vh;
  813. background: #F8FCFF;
  814. border: 0px solid #F8FCFF;
  815. box-shadow: 0px 0px 6px 1px rgba(101,101,101,0.29);
  816. border-radius: 4px;
  817. padding:3%;
  818. }
  819. .control-btn{
  820. display: inline-block;;
  821. height: 60px;
  822. width: 25%;
  823. padding:10px 20px;
  824. text-align: center;
  825. font-size: 12px;
  826. color: black;
  827. }
  828. .control-btn .btn-image{
  829. }
  830. </style>