shareAir.vue 21 KB

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