index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. <template>
  2. <div id="playing_container">
  3. <!-- 计费面板模块-->
  4. <div class="game_panel padding-top-sm">
  5. <van-row gutter="16">
  6. <van-col
  7. span="8"
  8. offset="2"
  9. >
  10. <view class="text-sm">
  11. <text class="title">本次游玩时间</text>
  12. </view>
  13. <view class="text-lg padding-top">
  14. <text class="count_down_text">{{ played_time_text }}</text>
  15. </view>
  16. </van-col>
  17. <van-col
  18. span="10"
  19. offset="4"
  20. >
  21. <view class="text-sm">
  22. <text class="title">计费模式</text>
  23. <text class="type padding-left-sm">{{ mode_item.name }}</text>
  24. </view>
  25. <button
  26. class="cu-btn bg-red text-white margin-top-sm"
  27. @click="game_finished"
  28. >
  29. <img
  30. src="https://img.shuimuai.com/m_duankainaohuan.png"
  31. class="cut_brain_icon"
  32. alt=""
  33. />
  34. <text class="padding-lr cut_text text-sm">结束游戏</text>
  35. </button>
  36. </van-col>
  37. </van-row>
  38. </div>
  39. <!-- 设备状态-->
  40. <div class="game_status padding-tb">
  41. <van-row>
  42. <van-col
  43. span="10"
  44. offset="2"
  45. >
  46. <div
  47. class="flex flex-direction align-center justify-center"
  48. v-if="device_bg"
  49. >
  50. <img
  51. src="https://img.shuimuai.com/web/touhuanzhuangtai_2.png"
  52. alt=""
  53. class="device_img"
  54. />
  55. <text class="text-default">已经正确佩戴</text>
  56. </div>
  57. <div
  58. class="flex flex-direction align-center justify-center"
  59. v-else
  60. >
  61. <img
  62. src="https://img.shuimuai.com/web/touhuanzhuangtai_3.png"
  63. alt=""
  64. class="device_img"
  65. />
  66. <text class="text-default">未正确佩戴</text>
  67. </div>
  68. </van-col>
  69. <van-col span="10">
  70. <div class="flex flex-direction align-center justify-center">
  71. <view class="elc_power_container">
  72. <img
  73. src="https://img.shuimuai.com/web/dianchi_3.png"
  74. alt=""
  75. :style="{ width: device_power + '%' }"
  76. class="device_elc"
  77. />
  78. </view>
  79. <text class="text-default">{{ device_power }}%</text>
  80. <text class="text-default">设备电量</text>
  81. </div>
  82. </van-col>
  83. <!-- <van-col span="2">
  84. <div class="flex flex-direction align-center justify-center">
  85. <view>
  86. <text>-{{ rssi }}dbm</text>
  87. </view>
  88. <view>
  89. <text class="text-default">信号强度</text>
  90. </view>
  91. </div>
  92. </van-col> -->
  93. </van-row>
  94. </div>
  95. <!-- 环形实时数据 -->
  96. <div class="circle_container">
  97. <van-circle :value="online_att" layer-color="#49465E" color="#FFB400" stroke-width="7" :speed="0">
  98. <view class="circle_text">
  99. <text class="online_att_txt">
  100. {{ online_att }}
  101. </text>
  102. <view class="online_desc">
  103. <!-- <text class="online_desc">-->
  104. {{ online_att_desc }}
  105. <!-- </text>-->
  106. </view>
  107. </view>
  108. </van-circle>
  109. <van-circle :value="online_med" layer-color="#49465E" color="#40FF31" stroke-width="7" :speed="0">
  110. <view class="circle_text">
  111. <text class="online_med_txt">
  112. {{ online_med }}
  113. </text>
  114. <view class="online_desc">
  115. <!-- <text class="online_desc">-->
  116. {{ online_med_desc }}
  117. <!-- </text>-->
  118. </view>
  119. </view>
  120. </van-circle>
  121. </div>
  122. <!-- 图标模块-->
  123. <div class="ec_container">
  124. <view class="chart_view_first margin-tb-xl">
  125. <view class="bar">
  126. <view>
  127. <view class="line"></view>
  128. <view class="title">大脑状态</view>
  129. </view>
  130. <view class="label">
  131. <view>
  132. <view class="dot dot-orange"></view>
  133. <view class="name">Att(专注度)</view>
  134. </view>
  135. <view>
  136. <view class="dot dot-med"></view>
  137. <view class="name">Med(放松度)</view>
  138. </view>
  139. <view>
  140. <view class="dot dot-amp"></view>
  141. <view class="name">Amp (和谐度)</view>
  142. </view>
  143. </view>
  144. </view>
  145. <view class="chart">
  146. <mpvue-echarts
  147. :echarts="echarts"
  148. :onInit="attCharts"
  149. canvasId="canvasId-demo1"
  150. />
  151. </view>
  152. </view>
  153. <view class="chart_view_second margin-tb-xl">
  154. <view class="bar">
  155. <view>
  156. <view class="line"></view>
  157. <view class="title">基本脑波</view>
  158. </view>
  159. <view class="label">
  160. <van-row>
  161. <van-col span="8">
  162. <view>
  163. <view class="dot dot-delta"></view>
  164. <view class="name">Delta</view>
  165. </view>
  166. </van-col>
  167. <van-col span="8">
  168. <view>
  169. <view class="dot dot-theta"></view>
  170. <view class="name">Theta</view>
  171. </view>
  172. </van-col>
  173. <van-col span="8">
  174. <view>
  175. <view class="dot dot-low-beta"></view>
  176. <view class="name">Low_Beta</view>
  177. </view>
  178. </van-col>
  179. <van-col span="8">
  180. <view>
  181. <view class="dot dot-high-beta"></view>
  182. <view class="name">High_Beta</view>
  183. </view>
  184. </van-col>
  185. <van-col span="8">
  186. <view>
  187. <view class="dot dot-low-alpha"></view>
  188. <view class="name">Low_Alpha</view>
  189. </view>
  190. </van-col>
  191. <van-col span="8">
  192. <view>
  193. <view class="dot dot-high-alpah"></view>
  194. <view class="name">High_Alpha</view>
  195. </view>
  196. </van-col>
  197. </van-row>
  198. </view>
  199. </view>
  200. <view class="chart">
  201. <mpvue-echarts
  202. :echarts="echarts"
  203. :onInit="medCharts"
  204. canvasId="canvasId-demo2"
  205. />
  206. </view>
  207. </view>
  208. </div>
  209. <van-dialog id="van-dialog"/>
  210. <van-toast id="van-toast"/>
  211. <van-notify id="van-notify"/>
  212. </div>
  213. </template>
  214. <script>
  215. import util, {formatSeconds} from "../../utils/index";
  216. import bluetooth from "../../utils/bluetooth";
  217. import game_store from "@/store/game";
  218. import Toast from "../../../static/vant/toast/toast";
  219. import {gameAddLine, gameEnd} from "../../requests/game";
  220. import mpvueEcharts from "mpvue-echarts";
  221. import echarts from "../../../static/echarts.min";
  222. var att_charts, med_charts, $this;
  223. // 大脑图表初始化
  224. function initAttChart(canvas, width, height) {
  225. att_charts = echarts.init(canvas, null, {
  226. width: width,
  227. height: height,
  228. });
  229. canvas.setChart(att_charts);
  230. let option = {}; // ECharts 配置项
  231. att_charts.setOption(option);
  232. return att_charts; // 返回 chart 后可以自动绑定触摸操作
  233. }
  234. // 我的设备图表初始化
  235. function initMedChart(canvas, width, height) {
  236. med_charts = echarts.init(canvas, null, {
  237. width: width,
  238. height: height,
  239. });
  240. canvas.setChart(med_charts);
  241. let option = {}; // ECharts 配置项
  242. med_charts.setOption(option);
  243. return med_charts; // 返回 chart 后可以自动绑定触摸操作
  244. }
  245. export default {
  246. name: "index_container",
  247. components: {
  248. mpvueEcharts,
  249. },
  250. data() {
  251. return {
  252. // 折线图
  253. echarts,
  254. attCharts: initAttChart,
  255. medCharts: initMedChart,
  256. // 使用类型 1次数 2时间 0未选择
  257. mode: 0,
  258. timeData: {},
  259. mode_item: {},
  260. device_power: 100,
  261. user_info: {},
  262. //设备值
  263. _deviceId: "",
  264. _serviceId: "",
  265. _characteristicId: "",
  266. toy_index: 0,
  267. toy_id: 0,
  268. toy: {},
  269. toy_hex: "",
  270. play_time: 0,
  271. //实时的专注值和放松度
  272. online_att: 0,
  273. online_att_desc: "",
  274. online_med: 0,
  275. online_med_desc: "",
  276. //图标数据集合
  277. att_list: [],
  278. med_list: [],
  279. //和谐度
  280. amp_list: [],
  281. delta_list: [],
  282. theta_list: [],
  283. low_alphas: [],
  284. high_alphas: [],
  285. low_betas: [],
  286. high_betas: [],
  287. cates: [],
  288. //临时数据集合
  289. attList: [],
  290. medList: [],
  291. //和谐度
  292. ampList: [],
  293. deltaList: [],
  294. alphaList: [],
  295. betaList: [],
  296. thetaList: [],
  297. lowalphas: [],
  298. highalphas: [],
  299. lowbetas: [],
  300. highbetas: [],
  301. //判断是否结束游戏
  302. is_end: false,
  303. // 消耗的时间
  304. played_time: null,
  305. played_time_text: "--:--",
  306. //结束游戏时选择类型的时间
  307. over_play_time: 0,
  308. // 检测佩戴是否正确
  309. device_bg: true,
  310. // 蓝牙信号强度
  311. rssi: 0,
  312. game_status: 0,
  313. };
  314. },
  315. methods: {
  316. //游戏结束方法
  317. game_finished() {
  318. bluetooth.sendEnd();
  319. $this.$emit("closePop", true);
  320. //取消监听低功耗蓝牙设备
  321. wx.offBLECharacteristicValueChange();
  322. //设置游戏状态为 停止游戏
  323. game_store.getters.getGameStatus() == 0
  324. ? game_store.setters.setGameStatus(0)
  325. : game_store.setters.setGameStatus(3);
  326. //游戏结束重置游戏时间
  327. wx.removeStorageSync("play_time");
  328. //删除游戏专注数据
  329. game_store.remover.rmGameAttMedDatas();
  330. //删除隐藏时间
  331. game_store.remover.rmHideTime();
  332. //游戏结束重置游戏模式
  333. // game_store.setters.setMode(0);
  334. //删除游戏得id
  335. game_store.setters.removeToyHex();
  336. // 结束游戏在提交报告函数里
  337. $this.post_data();
  338. $this.game_over();
  339. Toast.loading({
  340. forbidClick: true,
  341. mask: true,
  342. message: "正在生成报告...",
  343. duration: 2000,
  344. onClose() {
  345. $this.to_report();
  346. }
  347. });
  348. },
  349. to_report() {
  350. mpvue.redirectTo({
  351. url: "/pages/report/main",
  352. success() {
  353. $this.timeData = {};
  354. $this.attList = [];
  355. $this.medList = [];
  356. $this.ampList = [];
  357. },
  358. });
  359. },
  360. // 开始游戏
  361. start_game() {
  362. wx.setKeepScreenOn({
  363. keepScreenOn: true,
  364. });
  365. bluetooth.watchingDevice($this);
  366. bluetooth.sendControl();
  367. },
  368. // ArrayBuffer转16进度字符串示例
  369. ab2hex(buffer) {
  370. var hexArr = Array.prototype.map.call(new Uint8Array(buffer), function (
  371. bit
  372. ) {
  373. return ("00" + bit.toString(16)).slice(-2);
  374. });
  375. return hexArr.join("");
  376. },
  377. // 往后端推送一次定时数据
  378. post_data() {
  379. //判断数据长度大于理想状态 需要对数组进行切割 逐个提交数据
  380. let $params = {
  381. game_record_id: game_store.getters.getGameRecordId(),
  382. //数据段长度小于65 单个提交
  383. line: $this.attList.join(','),
  384. line_med: $this.medList.join(','),
  385. amp: $this.ampList.join(','),
  386. delta: $this.deltaList.join(','),
  387. theta: $this.thetaList.join(','),
  388. low_alpha: $this.lowalphas.join(','),
  389. high_alpha: $this.highalphas.join(','),
  390. low_beta: $this.lowbetas.join(','),
  391. high_beta: $this.highbetas.join(','),
  392. };
  393. if (!$params.line) {
  394. return false;
  395. }
  396. gameAddLine($params).then((res) => {
  397. let $data = res.data;
  398. if ($data.code == 0) {
  399. $this.attList = [];
  400. $this.ampList = [];
  401. $this.medList = [];
  402. $this.deltaList = [];
  403. $this.thetaList = [];
  404. $this.lowalphas = [];
  405. $this.highalphas = [];
  406. $this.lowbetas = [];
  407. $this.highbetas = [];
  408. }
  409. });
  410. },
  411. // 结束游戏
  412. game_over() {
  413. $this.over_play_time = game_store.getters.getOverPlayTime();
  414. $this.played_time = $this.played_time >= 0 ? $this.played_time : 0;
  415. let $params = {
  416. game_record_id: game_store.getters.getGameRecordId(),
  417. type: $this.mode,
  418. // play_time: $this.play_time - Math.abs($this.played_time),
  419. play_time: $this.over_play_time - $this.played_time,
  420. };
  421. //
  422. gameEnd($params).then((res) => {
  423. let $data = res.data;
  424. $this.played_time = null;
  425. //设置未结束游戏
  426. $this.is_end = false;
  427. $this.att_list = [];
  428. $this.med_list = [];
  429. $this.amp_list = [];
  430. $this.delta_list = [];
  431. $this.theta_list = [];
  432. $this.low_alphas = [];
  433. $this.high_alphas = [];
  434. $this.low_betas = [];
  435. $this.high_betas = [];
  436. //游戏结束重置游戏卡卷类型时间和卡卷类型
  437. wx.removeStorageSync("over_play_time");
  438. game_store.setters.setMode(0);
  439. });
  440. },
  441. // 处理游戏中数据的方法
  442. do_datas: function ($data) {
  443. $this.online_att = $data["att"];
  444. $this.online_med = $data["med"];
  445. let $att_msg = "";
  446. if ($data["att"] >= 1 && $data['att'] < 40) {
  447. $att_msg = "专注力不足";
  448. } else if ($data['att'] < 60) {
  449. $att_msg = "一般专注";
  450. } else if ($data['att'] < 80) {
  451. $att_msg = "高度专注";
  452. } else if ($data['att'] <= 100) {
  453. $att_msg = "深度专注";
  454. }
  455. $this.online_att_desc = $att_msg;
  456. let $med_msg = "";
  457. if ($data["med"] >= 1 && $data['med'] < 40) {
  458. $med_msg = "放松度不足";
  459. } else if ($data['med'] < 60) {
  460. $med_msg = "一般放松";
  461. } else if ($data['med'] < 80) {
  462. $med_msg = "高度放松";
  463. } else if ($data['med'] <= 100) {
  464. $med_msg = "深度放松";
  465. }
  466. $this.online_med_desc = $med_msg;
  467. $this.att_list.push($data["att"]);
  468. $this.med_list.push($data["med"]);
  469. $this.amp_list.push(Math.abs($data["att"] - $data["med"]));
  470. $this.delta_list.push($data['delta']);
  471. $this.theta_list.push($data['theta']);
  472. $this.low_alphas.push($data['low_alpha']);
  473. $this.high_alphas.push($data['high_alpha']);
  474. $this.low_betas.push($data['low_beta']);
  475. $this.high_betas.push($data['high_beta']);
  476. if ($this.att_list.length > 15) {
  477. $this.att_list.shift();
  478. $this.med_list.shift();
  479. $this.amp_list.shift();
  480. $this.delta_list.shift();
  481. $this.theta_list.shift();
  482. $this.low_alphas.shift();
  483. $this.high_alphas.shift();
  484. $this.low_betas.shift();
  485. $this.high_betas.shift();
  486. }
  487. $this.attList.push($data["att"]);
  488. $this.medList.push($data["med"]);
  489. $this.ampList.push(Math.abs($data["att"] - $data["med"]));
  490. $this.deltaList.push($data["delta"]);
  491. $this.thetaList.push($data["theta"]);
  492. $this.lowalphas.push($data['low_alpha']);
  493. $this.highalphas.push($data['high_alpha']);
  494. $this.lowbetas.push($data['low_beta']);
  495. $this.highbetas.push($data['high_beta']);
  496. game_store.setters.setGameAttMedDatas({
  497. attList: $this.attList,
  498. medList: $this.medList,
  499. ampList: $this.ampList,
  500. deltaList: $this.deltaList,
  501. thetaList: $this.thetaList,
  502. lowalphasList: $this.lowalphas,
  503. highalphasList: $this.highalphas,
  504. lowbetasList: $this.lowbetas,
  505. highbetasList: $this.highbetas
  506. });
  507. //判断是否隐藏 隐藏则不绘画
  508. let $hide_status = game_store.getters.getHideStatus();
  509. if (!$hide_status) {
  510. //通过专注放松度 画图
  511. let $option = util.getLineOption($this.att_list, $this.med_list, $this.amp_list);
  512. att_charts.setOption($option);
  513. //通过基本脑波发送数据
  514. let $base_option = util.getBaseOption(
  515. $this.delta_list,
  516. $this.theta_list,
  517. $this.low_alphas,
  518. $this.high_alphas,
  519. $this.low_betas,
  520. $this.high_betas
  521. );
  522. med_charts.setOption($base_option);
  523. }
  524. },
  525. //计算游玩时间
  526. calThePlayedTime() {
  527. //筛选模式
  528. $this.mode = game_store.getters.getMode();
  529. let mode_list = [
  530. {
  531. id: 1,
  532. name: "次卡(10分钟)",
  533. },
  534. {
  535. id: 2,
  536. name: "会员时间消费",
  537. },
  538. ];
  539. //可玩时间 (剩余时长)
  540. $this.play_time = game_store.getters.getPlayTime();
  541. //已经玩了多长时间
  542. $this.played_time = game_store.getters.getPlayedTime()
  543. ? game_store.getters.getPlayedTime()
  544. : game_store.getters.getPlayTime();
  545. $this.mode_item = {};
  546. $this.mode_item = mode_list[$this.mode - 1];
  547. },
  548. RandDomNum() {
  549. $this.online_att = Math.round(Math.random() * 100);
  550. $this.online_med = Math.round(Math.random() * 100);
  551. }
  552. },
  553. mounted() {
  554. $this._deviceId = game_store.getters.getDeviceId();
  555. $this._serviceId = game_store.getters.getServiceId();
  556. $this._characteristicId = game_store.getters.getCharacterId();
  557. // setTimeout(() => {
  558. $this.game_status = game_store.getters.getGameStatus();
  559. // }, 1000)
  560. //判断是否结束游戏
  561. if ($this.is_end == true) {
  562. $this.game_finished();
  563. } else {
  564. $this.calThePlayedTime();
  565. $this.start_game();
  566. //打开蓝牙监听
  567. bluetooth.watch_bluetooth_status($this);
  568. }
  569. },
  570. created() {
  571. $this = this;
  572. },
  573. // 加载完成后、后台切到前台或重新进入页面时触发
  574. onShow() {
  575. // 判断可游玩时间是否小于 0
  576. game_store.setters.setHideStatus(false);
  577. if ($this.played_time == 0) {
  578. $this.game_finished();
  579. } else {
  580. wx.getSystemInfoAsync({
  581. success(res) {
  582. if (res.platform != "android") {
  583. //获取 拉到后台得时间
  584. let $hide_time = game_store.getters.getHideTime();
  585. if ($hide_time) {
  586. //获取当前时间
  587. let $now = Math.round(new Date() / 1000);
  588. //获得后台到当前时间差
  589. let $residue = $now - $hide_time;
  590. //将原来的游玩时间+上 时间差
  591. let $played_time = $this.played_time * 1 - $residue * 1;
  592. //判断时间差
  593. if ($residue > $this.played_time) {
  594. $this.game_finished();
  595. }
  596. //重新设置游玩时间
  597. game_store.setters.setPlayedTime($played_time);
  598. $this.calThePlayedTime();
  599. }
  600. }
  601. },
  602. });
  603. }
  604. },
  605. onLoad(options) {
  606. if (options.end == 1) {
  607. $this.is_end = true;
  608. }
  609. },
  610. // 页面从前台切换到后台或者去别的页面时候触发的
  611. onHide() {
  612. game_store.setters.setHideStatus(true);
  613. game_store.setters.setHideTime(Math.round(new Date() / 1000));
  614. },
  615. // 页面卸载时候触发的生命周期
  616. onUnload() {
  617. console.log("小程序被销毁");
  618. if (!$this.is_end) {
  619. //停止传输数据
  620. bluetooth.sendEnd();
  621. wx.offBLECharacteristicValueChange();
  622. //存储时间
  623. game_store.setters.setPlayedTime($this.played_time);
  624. //设置未结束游戏
  625. $this.is_end = false;
  626. }
  627. },
  628. };
  629. </script>
  630. <style scoped>
  631. #playing_container {
  632. width: 100%;
  633. background: linear-gradient(
  634. 0deg,
  635. rgba(40, 157, 206, 0.51),
  636. rgba(135, 145, 226, 0.26)
  637. );
  638. background-color: #46425e;
  639. padding: 5px;
  640. height: 850px;
  641. }
  642. .game_panel {
  643. width: 100%;
  644. height: 76px;
  645. background: #46425e;
  646. box-shadow: 0px 3px 4px 0px #302d43;
  647. border-radius: 11px;
  648. margin: 0px auto;
  649. }
  650. .game_panel .title {
  651. color: #9a96b7;
  652. }
  653. .game_panel .type {
  654. color: #ffffff;
  655. }
  656. .cut_brain_icon {
  657. width: 11px;
  658. height: 11px;
  659. }
  660. .device_img {
  661. width: 36px;
  662. height: 36px;
  663. }
  664. .text-default {
  665. color: #9a95b7;
  666. font-size: 10px;
  667. }
  668. /*电量显示*/
  669. .elc_power_container {
  670. width: 28px;
  671. border: #9a95b7 3px solid;
  672. border-radius: 5px;
  673. height: 22px;
  674. }
  675. .device_elc {
  676. height: 18px;
  677. }
  678. /* 节标题 */
  679. .bar {
  680. width: 100%;
  681. height: 15px;
  682. display: flex;
  683. align-items: center;
  684. justify-content: space-between;
  685. padding: 0 7px;
  686. box-sizing: border-box;
  687. margin: 11px 0;
  688. }
  689. .bar view {
  690. display: flex;
  691. align-items: center;
  692. justify-content: start;
  693. }
  694. .bar .line {
  695. width: 4px;
  696. height: 15px;
  697. background-color: #ffb400;
  698. margin-right: 7px;
  699. }
  700. .bar .title {
  701. color: #fff;
  702. font-size: 15px;
  703. }
  704. .label {
  705. width: 250px;
  706. color: #9a95b7;
  707. font-size: 10px;
  708. }
  709. /*点图*/
  710. .dot {
  711. width: 8px;
  712. height: 8px;
  713. border-radius: 50%;
  714. margin-right: 4px;
  715. margin-left: 15px;
  716. }
  717. .dot-orange {
  718. background: #ffb400;
  719. }
  720. .dot-pink {
  721. background: #d4327a;
  722. }
  723. .dot-blue {
  724. background: #00ccff;
  725. }
  726. .dot-green {
  727. background: #0cda2e;
  728. }
  729. .dot-yellow {
  730. background: #d1d310;
  731. }
  732. .dot-orange-yellow {
  733. background: #f8a117;
  734. }
  735. /* 图表 */
  736. #mychart-dom-multi-line {
  737. width: 100%;
  738. height: 175px;
  739. }
  740. #mychart-dom-multi-line-med {
  741. width: 100%;
  742. height: 100px;
  743. }
  744. /*弹窗模块*/
  745. .err_container {
  746. width: 260px;
  747. height: 300px;
  748. border-radius: 5px;
  749. }
  750. /*标题*/
  751. .err_container .title {
  752. font-size: 20px;
  753. font-weight: bold;
  754. color: #4c4c4c;
  755. line-height: 24px;
  756. }
  757. /*子标题*/
  758. .err_container .sub-title {
  759. font-size: 12px;
  760. font-family: Microsoft YaHei;
  761. font-weight: 400;
  762. color: #4b4b4b;
  763. line-height: 24px;
  764. }
  765. .err_img {
  766. width: 73px;
  767. height: 83px;
  768. }
  769. .chart_view_first {
  770. position: relative;
  771. bottom: 10px;
  772. }
  773. .chart_view_second {
  774. position: relative;
  775. bottom: 5px;
  776. }
  777. /*倒计时样式*/
  778. .count_down_text {
  779. font-size: 35px;
  780. font-family: PingFang SC;
  781. font-weight: 400;
  782. color: #fff;
  783. line-height: 28px;
  784. }
  785. .chart {
  786. width: 360px;
  787. height: 193px;
  788. background: #302d43;
  789. opacity: 0.6;
  790. border-radius: 10px;
  791. }
  792. /* 提高dialog提示的层级 */
  793. #van-dialog {
  794. z-index: 10000001 !important;
  795. }
  796. .dot-amp {
  797. background: #D4327A;
  798. }
  799. .dot-med {
  800. background: #40FF31;
  801. }
  802. .circle_container {
  803. width: 100%;
  804. height: 150px;
  805. background: #302D43;
  806. opacity: 0.6;
  807. border-radius: 20px;
  808. display: flex;
  809. justify-content: space-around;
  810. align-items: center;
  811. }
  812. .circle_text {
  813. width: 100%;
  814. padding-bottom: 50px;
  815. padding-bottom: 50px;
  816. }
  817. .online_att_txt {
  818. font-size: 40px;
  819. font-family: Arial;
  820. font-weight: bold;
  821. color: #FAB615;
  822. /*height: 186px;*/
  823. }
  824. .online_med_txt {
  825. font-size: 40px;
  826. font-family: Arial;
  827. font-weight: bold;
  828. color: #40FF31;
  829. /*height: 186px;*/
  830. }
  831. .online_desc {
  832. font-size: 12px;
  833. font-weight: 400;
  834. color: #FFFFFF;
  835. }
  836. .dot-delta {
  837. background-color: #FF77B3;
  838. }
  839. .dot-theta {
  840. background-color: #FFE838;
  841. }
  842. .dot-low-beta {
  843. background-color: #0060F1;
  844. }
  845. .dot-high-beta {
  846. background-color: #00CCFF;
  847. }
  848. .dot-low-alpha {
  849. background-color: #38FF49;
  850. }
  851. .dot-high-alpah {
  852. background-color: #00AD0E;
  853. }
  854. </style>