shareAir.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. <template>
  2. <view class="container">
  3. <uni-swiper-dot :info="imgUrl" :current="current" field="content" :mode="dotMode">
  4. <swiper class="swiper-box" @change="swiper_change" autoplay :interval="3000" :duration="500">
  5. <swiper-item v-for="(item ,index) in imgUrl" :key="index">
  6. <image :src="item.url" mode="aspectFill"></image>
  7. </swiper-item>
  8. </swiper>
  9. </uni-swiper-dot>
  10. <view class="line"></view>
  11. <view class="nav">
  12. <navigator class="btn" url="/pagesAir/stdBookMgr/stdBookMgr" hover-class="navigator-hover">
  13. <view class="btn-icon-tzgl">
  14. <image src="../static/images/tzgl.png" mode=""></image>
  15. <text>台账管理</text>
  16. </view>
  17. <view class="txt-right">
  18. <text> </text>
  19. <uni-icons type="forward" color="#c7c9ce" size="26"></uni-icons>
  20. </view>
  21. </navigator>
  22. <navigator class="btn" url="/pagesAir/accountBalance/accountBalance" hover-class="navigator-hover">
  23. <view class="btn-icon">
  24. <image src="../static/images/yhye.png" mode=""></image>
  25. <text>账户余额</text>
  26. </view>
  27. <view class="txt-right">
  28. <text>{{balance}}</text>
  29. <uni-icons type="forward" color="#c7c9ce" size="26"></uni-icons>
  30. </view>
  31. </navigator>
  32. </view>
  33. <view class="line"></view>
  34. <view class="add-air" v-if="isList === false" :style="{height: screenHeight}">
  35. <view class="add-content">
  36. <view class="add-left">
  37. <navigator url="../addAir/addAir" class="add-btn">
  38. <uni-icons type="plus" color="white" size="30"></uni-icons>
  39. <view>添加</view>
  40. </navigator>
  41. <view class="add-tip">
  42. <view class="txt-add-air">添加空调</view>
  43. <view class="txt-tip">点击添加设备</view>
  44. <view class="txt-tip">可添加多个设备</view>
  45. </view>
  46. </view>
  47. <view class="add-right">
  48. <image src="../static/images/air-pic.png" mode="aspectFit"></image>
  49. </view>
  50. </view>
  51. <view class="add-bg">
  52. <image src="../static/images/qidong.png" mode="aspectFit"></image>
  53. </view>
  54. </view>
  55. <view class="list-air" v-else>
  56. <scroll-view scroll-y="true" :style="{height: screenHeight}" @scrolltoupper="scroll_to_upper"
  57. @scrolltolower="scroll_to_lower">
  58. <view class="list-items" v-for="(item, index) in airs" :key="index">
  59. <view v-if="item.on" class="item-air" @longpress="itemLongPress($event, 1, item.air_ip)">
  60. <view class="item-left">
  61. <view class="item-icon">
  62. <view class="circle1"></view>
  63. <view class="circle2"></view>
  64. <view class="circle3"></view>
  65. </view>
  66. <view class="item-title">{{item.name}}</view>
  67. <view class="item-info">
  68. <text class="item-info-left">{{item.info}}</text>
  69. <text>启用时长:</text><text>{{item.time}}</text>
  70. </view>
  71. </view>
  72. <view class="item-right" @tap="btn_click(index, item.air_ip, item.name, item.info)">
  73. <view class="item-btn">
  74. <image src="../static/images/power-off.png" mode="aspectFit"></image>
  75. <view class="item-txt-off">
  76. 关闭
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <view v-else class="item-air" @longpress="itemLongPress($event, 0, item.air_ip)" :ref="index">
  82. <view class="item-left">
  83. <view class="item-icon">
  84. <view class="circle1"></view>
  85. <view class="circle2"></view>
  86. <view class="circle3"></view>
  87. </view>
  88. <view class="item-title">{{item.name}}</view>
  89. <view class="item-info">
  90. <text class="item-info-left">{{item.info}}</text>
  91. <image src="../static/images/power-off.png" mode="" class="item-info-icon"></image>
  92. <text>未启用</text>
  93. </view>
  94. </view>
  95. <view class="item-right" @tap="btn_click(index, item.air_ip, item.name, item.info)"
  96. :ref="index">
  97. <view class="item-btn">
  98. <image src="../static/images/power-on.png" mode="aspectFit"></image>
  99. <view class="item-txt-on">
  100. 启动
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <navigator url="../addAir/addAir" class="add-air-bottom">
  107. <uni-icons type="plus" size="30" color="#4B8DFB"></uni-icons>
  108. <view class="add-btn-bottom">添加</view>
  109. </navigator>
  110. </scroll-view>
  111. </view>
  112. </view>
  113. </template>
  114. <script>
  115. export default {
  116. data() {
  117. return {
  118. ceshi: 'air',
  119. userinfo: {}, // 用户信息
  120. stu_number: '', // 学号
  121. id_card: '', // 身份证号
  122. order_num: '', // 订单号
  123. // 滚动横幅的数据
  124. imgUrl: [{
  125. url: this.$code_base_url + '/image/1.png'
  126. },
  127. {
  128. url: this.$code_base_url + '/image/2.png'
  129. },
  130. {
  131. url: this.$code_base_url + '/image/3.png'
  132. }
  133. ],
  134. current: 0, // 开始显示第几个
  135. balance: 0.0.toFixed(2), // 余额
  136. airs: [], // 已经添加的空调列表数据
  137. dotMode: 'round', // 显示控制点样式
  138. isList: false, // 是否显示添加的空调列表
  139. screenHeight: '' // 屏幕的高度
  140. };
  141. },
  142. onLoad(options) {
  143. // 选择绑定了的空调
  144. let airs_selected = uni.getStorageSync('airs_selected')
  145. if (airs_selected.length > 0) {
  146. // 使用存储的列表
  147. this.airs = airs_selected
  148. // 显示添加的空调列表
  149. this.isList = true
  150. }
  151. // 获取基本信息
  152. this.get_base_info(options, 'onLoad')
  153. },
  154. onShow() {
  155. // 从新计算高度
  156. this.calc_screen_height()
  157. // 监听全局的自定义事件,事件由 uni.$emit 触发,但仅触发一次,在第一次触发之后移除该监听器。
  158. // 绑定空调
  159. uni.$once('selectAirs', data => {
  160. // console.log(data.airs);
  161. let arrAirs = data.airs.trim().split(',')
  162. for (var i = 0; i < arrAirs.length; i++) {
  163. let tmpAirs = arrAirs[i].split('|')
  164. let t = tmpAirs[1].split('-')
  165. let tf = true
  166. for (var j = 0; j < this.airs.length; j++) {
  167. if (this.airs[j].air_ip == tmpAirs[2]) {
  168. tf = false
  169. }
  170. }
  171. // 存在则不添加到数组和缓存
  172. if (true === tf) {
  173. this.airs.push({
  174. air_ip: tmpAirs[2],
  175. name: tmpAirs[0] + ' ' + t[0],
  176. info: t[1],
  177. time: '',
  178. on: false
  179. })
  180. }
  181. }
  182. // 如果选的空调不为空,则显示添加的空调列表
  183. if (this.airs.length > 0) {
  184. this.airs.sort((a, b)=> a.name.localeCompare(b.name))
  185. // 显示添加的空调列表
  186. this.isList = true
  187. }
  188. // 存储空调列表
  189. uni.setStorageSync('airs_selected', this.airs)
  190. // 移除全局自定义事件监听器。
  191. uni.$off('selectAirs')
  192. })
  193. },
  194. methods: {
  195. /**
  196. * 查询绑定的空调
  197. */
  198. async select_banding_airs() {
  199. const res = await this.$myRequest({
  200. host: this.ceshi,
  201. url: '/airManage/usersqueryAir.action',
  202. method: 'POST',
  203. header: {
  204. 'content-type': 'application/x-www-form-urlencoded'
  205. },
  206. data: {
  207. sfzh: this.id_card
  208. }
  209. })
  210. // console.log(res.data);
  211. if (res.data.code == 200) {
  212. let data = res.data.data
  213. // console.log(this.airs);
  214. // console.log(data);
  215. let len = this.airs
  216. for (var i = 0; i < this.airs.length; i++) {
  217. let tf = false
  218. for (var j = 0; j < data.length; j++) {
  219. if (this.airs[i].air_ip == data[j].air_ip) {
  220. tf = true
  221. }
  222. }
  223. if (tf !== true) {
  224. this.airs.slice(i, 1)
  225. }
  226. }
  227. if (len > this.airs.length) {
  228. // 存储空调列表
  229. uni.setStorageSync('airs_selected', this.airs)
  230. }
  231. } else {
  232. // 提示返回信息
  233. uni.showToast({
  234. title: res.data.message
  235. })
  236. }
  237. },
  238. /**
  239. * 获取基本信息
  240. */
  241. get_base_info(options, param) {
  242. // console.log(options);
  243. try {
  244. // 获取学号
  245. this.stu_number = this.$store.state.userInfo.card_number
  246. if (this.stu_number == '' || typeof(this.stu_number) == 'undefined') { // 学号不存在,可以从存储中拿用户信息
  247. const userinfo = uni.getStorageSync('userinfo_storage_key')
  248. if (userinfo) { // 拿学号
  249. this.stu_number = userinfo.card_number
  250. this.id_card = userinfo.id_card
  251. } else { // 还没有需要跳转到首页进行获取
  252. uni.navigateTo({
  253. url: '../index/index?from=' + options.from
  254. })
  255. uni.showToast({
  256. icon: 'none',
  257. title: '学号为空,请进行授权',
  258. duration: 3000
  259. });
  260. return
  261. }
  262. } else { // 学号已经存在,可以从存储中拿用户信息
  263. this.userinfo = JSON.stringify(uni.getStorageSync('userinfo_storage_key'))
  264. }
  265. } catch (e) {
  266. console.log('获取基本信息:' + e.message);
  267. }
  268. // 获取code
  269. this.getCode(options, param)
  270. },
  271. /**
  272. * 获得code
  273. */
  274. getCode(options, param) {
  275. uni.login({
  276. success: (res) => {
  277. // console.log('getCode', res);
  278. if (res.code) {
  279. if (param == 'get_user_info') {
  280. this.getUserInfo(res.code)
  281. } else {
  282. // 请求服务器,获得openid
  283. this.getOpenId(options, res.code)
  284. }
  285. } else {
  286. uni.showToast({
  287. title: res.errMsg,
  288. icon: 'none'
  289. });
  290. }
  291. }
  292. })
  293. },
  294. /**
  295. * 请求服务器,获得openid
  296. */
  297. async getOpenId(options, param_code) {
  298. const res = await this.$myRequest({
  299. host: this.ceshi,
  300. url: '/airManage/usersopenid.action',
  301. method: 'POST',
  302. header: {
  303. 'content-type': 'application/x-www-form-urlencoded'
  304. },
  305. data: {
  306. code: param_code,
  307. userinfo: this.userinfo
  308. }
  309. })
  310. // console.log(res.data);
  311. if (res.data.code == 200) {
  312. // 查询用户基本信息
  313. this.getCode(options, 'get_user_info')
  314. // 绑定成功,提示返回信息,但没必要提示
  315. // uni.showToast({
  316. // title: res.data.message
  317. // })
  318. } else if (res.data.code == 205) {
  319. // 查询用户基本信息
  320. this.getCode(options, 'get_user_info')
  321. // 用户已经存在,但没必要提示
  322. // uni.showToast({
  323. // title: res.data.message
  324. // })
  325. } else {
  326. // 提示返回信息
  327. uni.showToast({
  328. title: res.data.message
  329. })
  330. if (options && typeof(options.from) != 'undefined' && typeof(options.from) != '') {
  331. uni.navigateTo({
  332. url: '../index/index?from=' + options.from
  333. })
  334. } else {
  335. uni.redirectTo({
  336. url: '../index/index?from=0'
  337. });
  338. }
  339. }
  340. },
  341. /**
  342. * 获取用户基本信息
  343. * @param {Object} code
  344. */
  345. async getUserInfo(code) {
  346. const res = await this.$myRequest({
  347. host: this.ceshi,
  348. url: '/airManage/usersget_user.action',
  349. method: 'POST',
  350. header: {
  351. 'content-type': 'application/x-www-form-urlencoded'
  352. },
  353. data: {
  354. code: code
  355. }
  356. })
  357. // console.log(res.data);
  358. if (res.data.code == 200) {
  359. // 余额
  360. this.balance = res.data.data.balance.toFixed(2)
  361. this.id_card = res.data.data.sfzh
  362. this.select_banding_airs()
  363. } else {
  364. uni.showToast({
  365. title: res.data.message
  366. })
  367. }
  368. },
  369. /**
  370. * 长按可删除
  371. * @param {Object} e
  372. * @param {Object} val
  373. */
  374. itemLongPress(e, val, air_ip) {
  375. // console.log(e, val, air_ip);
  376. if (val == 0) {
  377. let index = e.currentTarget.dataset.ref
  378. uni.showModal({
  379. title: '提示',
  380. content: '是否删除该空调?',
  381. success: (res) => {
  382. if (res.confirm) {
  383. // 删除指定下标的元素
  384. this.airs.splice(index, 1)
  385. // 更新存储
  386. uni.setStorageSync('airs_selected', this.airs)
  387. // 解绑空调
  388. this.unbangding_airs(air_ip)
  389. }
  390. }
  391. })
  392. } else {
  393. uni.showToast({
  394. title: '使用中不能删除',
  395. icon: 'error',
  396. duration: 1000
  397. })
  398. }
  399. },
  400. /**
  401. * 解绑空调
  402. * @param {Object} air_ip
  403. */
  404. async unbangding_airs(air_ip) {
  405. const res = await this.$myRequest({
  406. host: this.ceshi,
  407. url: '/airManage/usersdelAir.action',
  408. method: 'POST',
  409. header: {
  410. 'content-type': 'application/x-www-form-urlencoded'
  411. },
  412. data: {
  413. sfzh: this.id_card,
  414. air_ip: air_ip
  415. }
  416. })
  417. // console.log(res.data);
  418. if (res.data.code == 200) {
  419. uni.showToast({
  420. title: res.data.message
  421. })
  422. } else {
  423. uni.showToast({
  424. title: res.data.message
  425. })
  426. }
  427. },
  428. /**
  429. * 单击了启动或关闭按钮
  430. * @param {Object} e
  431. */
  432. btn_click(index, air_ip, name, info) {
  433. // console.log(index, air_ip, name, info);
  434. let tmp = name.split('-');
  435. let build = tmp[1],
  436. floors = tmp[2],
  437. dom = tmp[3] + '-' + tmp[4].split(' ')[0];
  438. // 未获取到索引
  439. if (typeof index === 'undefined') {
  440. return
  441. }
  442. if (this.airs[index].on) {
  443. uni.showModal({
  444. title: '提示',
  445. content: '确认【关闭】空调吗?',
  446. success: (res) => {
  447. if (res.confirm) {
  448. // 【关闭】空调
  449. this.close_airs(index, air_ip)
  450. }
  451. }
  452. });
  453. } else {
  454. uni.showModal({
  455. title: '提示',
  456. content: '确认【启动】空调吗?',
  457. success: (res) => {
  458. if (res.confirm) {
  459. // 【启动】空调
  460. uni.login({
  461. success: (res) => {
  462. // console.log('getCode', res);
  463. if (res.code) {
  464. // 调用接口,开启空调
  465. this.open_airs(res.code, index, air_ip, build, floors,
  466. dom,
  467. info)
  468. } else {
  469. uni.showToast({
  470. title: res.errMsg,
  471. icon: 'none'
  472. });
  473. }
  474. }
  475. })
  476. }
  477. }
  478. });
  479. }
  480. },
  481. /**
  482. * 关闭空调
  483. * @param {Object} index
  484. * @param {Object} air_ip
  485. */
  486. async close_airs(index, air_ip) {
  487. if (this.order_num == '') {
  488. uni.showToast({
  489. title: '未获得单号'
  490. })
  491. return
  492. }
  493. if (this.this.id_card == '') {
  494. uni.showToast({
  495. title: '未获得身份证号'
  496. })
  497. return
  498. }
  499. const res = await this.$myRequest({
  500. host: this.ceshi,
  501. url: '/airManage/consumeend.action',
  502. method: 'POST',
  503. header: {
  504. 'content-type': 'application/x-www-form-urlencoded'
  505. },
  506. data: {
  507. sfzh: this.id_card,
  508. order_num: this.order_num,
  509. clientId: air_ip
  510. }
  511. })
  512. console.log(res.data);
  513. if (res.data.code == 200) {
  514. uni.showToast({
  515. title: res.data.message
  516. })
  517. // 显示已经关闭图标
  518. this.airs[index].on = false
  519. } else {
  520. uni.showToast({
  521. title: res.data.message
  522. })
  523. }
  524. },
  525. /**
  526. * 启动空调
  527. * @param {Object} code
  528. * @param {Object} index
  529. * @param {Object} air_ip
  530. * @param {Object} build
  531. * @param {Object} floors
  532. * @param {Object} dom
  533. * @param {Object} air_config
  534. */
  535. async open_airs(code, index, air_ip, build, floors, dom, air_config) {
  536. const res = await this.$myRequest({
  537. host: this.ceshi,
  538. url: '/airManage/consumestart.action',
  539. method: 'POST',
  540. header: {
  541. 'content-type': 'application/x-www-form-urlencoded'
  542. },
  543. data: {
  544. code: code,
  545. air_ip: air_ip,
  546. build: build,
  547. floors: floors,
  548. dom: dom,
  549. air_config: air_config
  550. }
  551. })
  552. console.log(res.data);
  553. if (res.data.code == 200) {
  554. uni.showToast({
  555. title: res.data.message
  556. })
  557. // 显示已经开启图标
  558. this.airs[index].on = true
  559. this.order_num = res.data.data.order_num
  560. } else {
  561. uni.showToast({
  562. title: res.data.message
  563. })
  564. }
  565. },
  566. /**
  567. * 滚动到顶部提示
  568. */
  569. scroll_to_upper() {
  570. uni.showToast({
  571. title: '到顶了!',
  572. icon: 'none',
  573. duration: 500
  574. })
  575. },
  576. /**
  577. * 滚动到底部提示
  578. */
  579. scroll_to_lower() {
  580. uni.showToast({
  581. title: '到底了!',
  582. icon: 'none',
  583. duration: 500
  584. })
  585. },
  586. /**
  587. * 轮播图发生改变
  588. * @param {Object} e
  589. */
  590. swiper_change(e) {
  591. // console.log(e.detail.current);
  592. this.current = e.detail.current;
  593. },
  594. /**
  595. * 计算屏幕的高度, 适配屏幕的高度
  596. */
  597. calc_screen_height() {
  598. uni.getSystemInfo({
  599. success: res => {
  600. let h = 0;
  601. if (this.isList === true) {
  602. h = ((res.screenHeight * (750 / res.windowWidth)) - 640) //将px 转换rpx
  603. } else {
  604. h = ((res.screenHeight * (750 / res.windowWidth)) - 740) //将px 转换rpx
  605. }
  606. this.screenHeight = Math.floor(h) + 'rpx'
  607. }
  608. });
  609. }
  610. }
  611. }
  612. </script>
  613. <style lang="scss" scoped>
  614. .container {
  615. display: flex;
  616. flex-direction: column;
  617. font-size: 28rpx;
  618. font-family: "Microsoft YaHei-3970(82674968)";
  619. width: 730rpx;
  620. padding: 10rpx;
  621. .swiper-box {
  622. height: 150px;
  623. width: 100%;
  624. }
  625. swiper-item {
  626. /* #ifndef APP-NVUE */
  627. display: flex;
  628. /* #endif */
  629. flex-direction: column;
  630. justify-content: center;
  631. align-items: center;
  632. height: 100%;
  633. image {
  634. height: 100%;
  635. width: 100%;
  636. border-radius: 8rpx;
  637. }
  638. }
  639. .line {
  640. height: 20rpx;
  641. }
  642. .nav {
  643. display: flex;
  644. justify-content: space-between;
  645. .btn {
  646. display: flex;
  647. justify-content: space-between;
  648. align-items: center;
  649. width: 338rpx;
  650. height: 100rpx;
  651. padding: 5rpx 10rpx;
  652. border-radius: 8rpx;
  653. background-color: #eaefff;
  654. .btn-icon-tzgl {
  655. display: flex;
  656. align-items: center;
  657. image {
  658. width: 40rpx;
  659. height: 40rpx;
  660. padding: 10rpx;
  661. }
  662. }
  663. .btn-icon {
  664. display: flex;
  665. align-items: center;
  666. image {
  667. width: 60rpx;
  668. height: 60rpx;
  669. }
  670. }
  671. .txt-right {
  672. display: flex;
  673. align-items: center;
  674. }
  675. }
  676. }
  677. .add-air {
  678. border-radius: 8rpx;
  679. padding: 60rpx 10rpx;
  680. background-color: #F1F1F1;
  681. .add-content {
  682. display: flex;
  683. justify-content: space-around;
  684. align-items: center;
  685. margin-bottom: 20rpx;
  686. .add-left {
  687. display: flex;
  688. .add-btn {
  689. display: flex;
  690. flex-direction: column;
  691. justify-content: center;
  692. align-items: center;
  693. margin-right: 20rpx;
  694. width: 120rpx;
  695. height: 120rpx;
  696. border-radius: 20rpx;
  697. background-color: #2979ff;
  698. color: #ffffff;
  699. }
  700. .add-tip {
  701. display: flex;
  702. flex-direction: column;
  703. justify-content: space-around;
  704. .txt-add-air {
  705. font-size: 40rpx;
  706. font-weight: bold;
  707. }
  708. .txt-tip {
  709. font-size: 20rpx;
  710. color: #8f939c;
  711. }
  712. }
  713. }
  714. .add-right {
  715. width: 300rpx;
  716. height: 100rpx;
  717. border-radius: 10rpx;
  718. image {
  719. width: 300rpx;
  720. height: 100rpx;
  721. }
  722. }
  723. }
  724. .add-bg {
  725. display: flex;
  726. justify-content: center;
  727. align-items: center;
  728. padding-top: 90rpx;
  729. image {
  730. width: 400rpx;
  731. height: 400rpx;
  732. }
  733. }
  734. }
  735. .list-air {
  736. border-radius: 8rpx;
  737. padding: 10rpx 10rpx;
  738. background-color: #e9e9eb;
  739. .list-items {
  740. display: flex;
  741. flex-direction: column;
  742. .item-air {
  743. display: flex;
  744. justify-content: space-between;
  745. padding: 30rpx 20rpx;
  746. border-bottom: 1px solid #c3c8d4;
  747. .item-left {
  748. display: flex;
  749. flex-direction: column;
  750. justify-content: space-around;
  751. .item-icon {
  752. display: flex;
  753. align-items: center;
  754. .circle1 {
  755. width: 16rpx;
  756. height: 16rpx;
  757. border-radius: 8rpx;
  758. background-color: #18bc37;
  759. }
  760. .circle2 {
  761. width: 12rpx;
  762. height: 12rpx;
  763. border-radius: 6rpx;
  764. background-color: #18bc37;
  765. margin: 0 10rpx;
  766. }
  767. .circle3 {
  768. display: inline-block;
  769. width: 8rpx;
  770. height: 8rpx;
  771. border-radius: 4rpx;
  772. background-color: #18bc37;
  773. }
  774. }
  775. .item-title {
  776. font-size: 32rpx;
  777. font-weight: bold;
  778. padding-bottom: 12rpx;
  779. }
  780. .item-info {
  781. display: flex;
  782. color: #8f939c;
  783. .item-info-left {
  784. padding-right: 20rpx;
  785. }
  786. .item-info-icon {
  787. width: 40rpx;
  788. height: 40rpx;
  789. margin-right: 8rpx;
  790. }
  791. }
  792. }
  793. .item-right {
  794. .item-btn {
  795. display: flex;
  796. flex-direction: column;
  797. justify-content: center;
  798. align-items: center;
  799. margin-left: 20rpx;
  800. width: 100rpx;
  801. height: 100rpx;
  802. border: 1px solid #d9deeb;
  803. border-radius: 50rpx;
  804. box-shadow: 4rpx 4rpx 5rpx #c8cdd8;
  805. background-image: linear-gradient(-45deg, #F2F4F2, #DFDFDF);
  806. image {
  807. width: 50rpx;
  808. height: 50rpx;
  809. }
  810. .item-txt-on {
  811. font-size: 24rpx;
  812. font-weight: bold;
  813. color: #4B8DFB;
  814. }
  815. .item-txt-off {
  816. font-size: 24rpx;
  817. font-weight: bold;
  818. color: #8A8A8A;
  819. }
  820. }
  821. }
  822. }
  823. }
  824. .add-air-bottom {
  825. display: flex;
  826. justify-content: center;
  827. margin: 20rpx 0;
  828. padding: 20rpx 0;
  829. width: 160rpx;
  830. border-radius: 10rpx;
  831. .add-btn-bottom {
  832. font-size: 40rpx;
  833. color: #4B8DFB;
  834. padding-left: 8rpx;
  835. }
  836. }
  837. }
  838. }
  839. </style>