index.vue 23 KB

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