deviceControl.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. <template>
  2. <view class="device-detail">
  3. <view class="device-detail__header">
  4. <u-icon
  5. size="36"
  6. class="arrow-left"
  7. name="arrow-left"
  8. @click="handleBack"
  9. ></u-icon>
  10. {{ title }}
  11. </view>
  12. <view class="device-detail__body">
  13. <view class="tabs">
  14. <view class="tab-container">
  15. <view class="tab-item" v-if="myuser_type" :class="activeTab === 'pestAnalysis'?'active':''" @click="handleTabClick('pestAnalysis')">
  16. 管理员
  17. </view>
  18. <view class="tab-item" :class="activeTab === 'viewImage'?'active':''" @click="handleTabClick('viewImage')">
  19. 设置
  20. </view>
  21. </view>
  22. </view>
  23. <view class="device-detail-content" v-if="activeTab === 'pestAnalysis'">
  24. <view class="device-detail-item">
  25. <text class="device-detail-label">联网模块</text>
  26. <view class="device-detail-btn-container">
  27. <view class="device-detail-btn" @click="setDeviceContorl('dtu_update')">升级</view>
  28. <view class="device-detail-btn" @click="setDeviceContorl('dtu_reboot')">重启</view>
  29. <!-- <view class="device-detail-btn" @click="showMqttConfig">MQTT配置</view> -->
  30. </view>
  31. </view>
  32. <view class="device-detail-item">
  33. <text class="device-detail-label">板子设置</text>
  34. <view class="device-detail-btn-container">
  35. <!-- <view class="device-detail-btn">查看原始IMEI</view> -->
  36. <view class="device-detail-btn" @click="showMqttConfig('imei')">更改IMEI</view>
  37. </view>
  38. </view>
  39. <view class="device-detail-item">
  40. <text class="device-detail-label">强制操作</text>
  41. <view class="device-detail-btn-container">
  42. <view class="device-detail-btn force-btn" @click="setDeviceContorl('takephoto')">拍照</view>
  43. <view class="device-detail-btn force-btn" @click="setDeviceContorl('update')">升级</view>
  44. <view class="device-detail-btn force-btn" @click="setDeviceContorl('reboot')">重启</view>
  45. <view class="device-detail-btn force-btn" @click="setDeviceContorl('open_shake')">震动开启</view>
  46. <view class="device-detail-btn force-btn" @click="setDeviceContorl('close_shake')">震动关闭</view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="device-detail-content" style="padding-bottom: 50rpx" v-if="activeTab === 'viewImage'">
  51. <view class="device-detail-viewImage">
  52. <text class="device-detail-label">设备开关:</text>
  53. <u-switch :value="equipContrlForm.ds == '1'" @input="setDs" size="40" active-color="#0BBC58" active-value="1" inactive-value="0"></u-switch>
  54. </view>
  55. <view class="device-detail-viewImage">
  56. <text class="device-detail-label">定时模式</text>
  57. </view>
  58. <u-radio-group v-model="equipContrlForm.ts" @change="radioGroupChange" active-color="#0BBC58">
  59. <u-radio
  60. :name="0"
  61. >光控
  62. </u-radio>
  63. <u-radio
  64. :name="1"
  65. >时控
  66. </u-radio>
  67. </u-radio-group>
  68. <view class="device-detail-viewImage">
  69. <text class="device-detail-label">定时时长(h){{ equipContrlForm.tt }}</text>
  70. </view>
  71. <!-- <view class="slider-container">
  72. <view class="slider-min-value">0</view>
  73. <u-slider v-model="equipContrlForm.tt" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  74. <view class="slider-max-value">100</view>
  75. </view> -->
  76. <view class="slider-container">
  77. <view class="slider-min-value">1</view>
  78. <view
  79. class="custom-progress"
  80. @touchstart.stop="onSliderTouchStart($event, 'tt', 1, 10)"
  81. @touchmove.stop.prevent="onSliderTouchMove($event, 1, 10)"
  82. @touchend.stop="onSliderTouchEnd"
  83. @tap.stop="onSliderTap($event, 'tt', 1, 10)"
  84. >
  85. <view class="progress-track">
  86. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.tt, 1, 10) + '%' }"></view>
  87. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.tt, 1, 10) + '%' }"></view>
  88. </view>
  89. </view>
  90. <view class="slider-max-value">10</view>
  91. </view>
  92. <view class="device-detail-viewImage">
  93. <text class="device-detail-label">落虫时间(min){{ equipContrlForm.collt }}</text>
  94. </view>
  95. <!-- <view class="slider-container">
  96. <view class="slider-min-value">0</view>
  97. <u-slider v-model="equipContrlForm.collt" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  98. <view class="slider-max-value">100</view>
  99. </view> -->
  100. <view class="slider-container">
  101. <view class="slider-min-value">1</view>
  102. <view
  103. class="custom-progress"
  104. @touchstart.stop="onSliderTouchStart($event, 'collt', 1, 20)"
  105. @touchmove.stop.prevent="onSliderTouchMove($event, 1, 20)"
  106. @touchend.stop="onSliderTouchEnd"
  107. @tap.stop="onSliderTap($event, 'collt', 1, 20)"
  108. >
  109. <view class="progress-track">
  110. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.collt, 1, 20) + '%' }"></view>
  111. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.collt, 1, 20) + '%' }"></view>
  112. </view>
  113. </view>
  114. <view class="slider-max-value">20</view>
  115. </view>
  116. <view class="device-detail-viewImage">
  117. <text class="device-detail-label">加热时间(min){{ equipContrlForm.htim }}</text>
  118. </view>
  119. <!-- <view class="slider-container">
  120. <view class="slider-min-value">0</view>
  121. <u-slider v-model="equipContrlForm.htim" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  122. <view class="slider-max-value">100</view>
  123. </view> -->
  124. <view class="slider-container">
  125. <view class="slider-min-value">1</view>
  126. <view
  127. class="custom-progress"
  128. @touchstart.stop="onSliderTouchStart($event, 'htim', 1, 20)"
  129. @touchmove.stop.prevent="onSliderTouchMove($event, 1, 20)"
  130. @touchend.stop="onSliderTouchEnd"
  131. @tap.stop="onSliderTap($event, 'htim', 1, 20)"
  132. >
  133. <view class="progress-track">
  134. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.htim, 1, 20) + '%' }"></view>
  135. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.htim, 1, 20) + '%' }"></view>
  136. </view>
  137. </view>
  138. <view class="slider-max-value">20</view>
  139. </view>
  140. <view class="device-detail-viewImage">
  141. <text class="device-detail-label">加热温度(℃){{ equipContrlForm.hst }}</text>
  142. </view>
  143. <!-- <view class="slider-container">
  144. <view class="slider-min-value">0</view>
  145. <u-slider v-model="equipContrlForm.hst" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  146. <view class="slider-max-value">100</view>
  147. </view> -->
  148. <view class="slider-container">
  149. <view class="slider-min-value">75</view>
  150. <view
  151. class="custom-progress"
  152. @touchstart.stop="onSliderTouchStart($event, 'hst', 75, 120)"
  153. @touchmove.stop.prevent="onSliderTouchMove($event, 75, 120)"
  154. @touchend.stop="onSliderTouchEnd"
  155. @tap.stop="onSliderTap($event, 'hst', 75, 120)"
  156. >
  157. <view class="progress-track">
  158. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.hst, 75, 120) + '%' }"></view>
  159. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.hst, 75, 120) + '%' }"></view>
  160. </view>
  161. </view>
  162. <view class="slider-max-value">120</view>
  163. </view>
  164. <view class="device-detail-viewImage">
  165. <text class="device-detail-label">高温保护阀值(℃){{ equipContrlForm.tph }}</text>
  166. </view>
  167. <!-- <view class="slider-container">
  168. <view class="slider-min-value">0</view>
  169. <u-slider v-model="equipContrlForm.tph" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  170. <view class="slider-max-value">100</view>
  171. </view> -->
  172. <view class="slider-container">
  173. <view class="slider-min-value">50</view>
  174. <view
  175. class="custom-progress"
  176. @touchstart.stop="onSliderTouchStart($event, 'tph', 50, 70)"
  177. @touchmove.stop.prevent="onSliderTouchMove($event, 50, 70)"
  178. @touchend.stop="onSliderTouchEnd"
  179. @tap.stop="onSliderTap($event, 'tph', 50, 70)"
  180. >
  181. <view class="progress-track">
  182. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.tph, 50, 70) + '%' }"></view>
  183. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.tph, 50, 70) + '%' }"></view>
  184. </view>
  185. </view>
  186. <view class="slider-max-value">70</view>
  187. </view>
  188. <view class="device-detail-viewImage">
  189. <text class="device-detail-label">低温保护阀值(℃){{ equipContrlForm.tpl }}</text>
  190. </view>
  191. <!-- <view class="slider-container">
  192. <view class="slider-min-value">0</view>
  193. <u-slider v-model="equipContrlForm.tpl" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  194. <view class="slider-max-value">100</view>
  195. </view> -->
  196. <view class="slider-container">
  197. <view class="slider-min-value">-30</view>
  198. <view
  199. class="custom-progress"
  200. @touchstart.stop="onSliderTouchStart($event, 'tpl', -30, 20)"
  201. @touchmove.stop.prevent="onSliderTouchMove($event, -30, 20)"
  202. @touchend.stop="onSliderTouchEnd"
  203. @tap.stop="onSliderTap($event, 'tpl', -30, 20)"
  204. >
  205. <view class="progress-track">
  206. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.tpl, -30, 20) + '%' }"></view>
  207. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.tpl, -30, 20) + '%' }"></view>
  208. </view>
  209. </view>
  210. <view class="slider-max-value">20</view>
  211. </view>
  212. <view class="device-detail-viewImage">
  213. <text class="device-detail-label">数据上传间隔(min){{ equipContrlForm.datt }}</text>
  214. </view>
  215. <!-- <view class="slider-container">
  216. <view class="slider-min-value">0</view>
  217. <u-slider v-model="equipContrlForm.datt" class="slider" max="100" min="0" active-color="#0BBC58"></u-slider>
  218. <view class="slider-max-value">100</view>
  219. </view> -->
  220. <view class="slider-container">
  221. <view class="slider-min-value">10</view>
  222. <view
  223. class="custom-progress"
  224. @touchstart.stop="onSliderTouchStart($event, 'datt', 10, 60)"
  225. @touchmove.stop.prevent="onSliderTouchMove($event, 10, 60)"
  226. @touchend.stop="onSliderTouchEnd"
  227. @tap.stop="onSliderTap($event, 'datt', 10, 60)"
  228. >
  229. <view class="progress-track">
  230. <view class="progress-fill" :style="{ width: getProgressWidth(equipContrlForm.datt, 10, 60) + '%' }"></view>
  231. <view class="progress-thumb" :style="{ left: getProgressWidth(equipContrlForm.datt, 10, 60) + '%' }"></view>
  232. </view>
  233. </view>
  234. <view class="slider-max-value">60</view>
  235. </view>
  236. </view>
  237. </view>
  238. <view class="device-detail-btn-footer" v-if="activeTab === 'viewImage'">
  239. <view class="device-detail-btn" @click="saveSettings">保存</view>
  240. </view>
  241. <u-popup v-model="show" mode="bottom">
  242. <view class="device-detail-content" style="height: 50vh">
  243. <view class="device-detail-item">
  244. <text class="device-detail-label">请输入imei</text>
  245. <u-input v-model="equipContrlForm.imei" placeholder="请输入imei"></u-input>
  246. </view>
  247. </view>
  248. <view class="device-detail-btn-footer">
  249. <view class="device-detail-btn" @click="setDeviceContorl('imei')">保存</view>
  250. </view>
  251. </u-popup>
  252. </view>
  253. </template>
  254. <script>
  255. export default {
  256. data(){
  257. return {
  258. value: 10,
  259. imageList: [],
  260. equipContrlForm: {},
  261. time: '',
  262. device_model: '',
  263. activeTab: 'pestAnalysis',
  264. title: '设置控制',
  265. myuser_type: false,
  266. deviceType: '',
  267. location: '',
  268. d_id: '',
  269. show: false,
  270. checked: false
  271. }
  272. },
  273. onLoad(options){
  274. this.d_id = options.d_id
  275. this.device_model = options.device_model || ''
  276. this.getControlDeviceConfigInfo()
  277. uni.getStorage({
  278. key:"myuser_type",
  279. success:(res)=>{
  280. if(Number(res.data) == 1){
  281. this.myuser_type = true
  282. this.activeTab = 'pestAnalysis'
  283. }else{
  284. this.activeTab = 'viewImage'
  285. }
  286. }
  287. })
  288. },
  289. methods: {
  290. getProgressWidth(value, min, max) {
  291. if (max === min) return 0
  292. return ((value - min) / (max - min)) * 100
  293. },
  294. onSliderTouchStart(e, field, min, max) {
  295. this.sliderField = field
  296. this.sliderMin = min
  297. this.sliderMax = max
  298. const query = uni.createSelectorQuery().in(this)
  299. query.select('.custom-progress').boundingClientRect(rect => {
  300. this.sliderRect = rect
  301. }).exec()
  302. this.updateSliderValue(e.touches[0].clientX, field, min, max)
  303. },
  304. onSliderTouchMove(e, min, max) {
  305. if (!this.sliderField || !this.sliderRect) return
  306. this.updateSliderValue(e.touches[0].clientX, this.sliderField, min, max)
  307. },
  308. onSliderTouchEnd() {
  309. this.sliderField = ''
  310. },
  311. onSliderTap(e, field, min, max) {
  312. const query = uni.createSelectorQuery().in(this)
  313. query.select('.custom-progress').boundingClientRect(rect => {
  314. this.sliderRect = rect
  315. this.updateSliderValue(e.detail.x + rect.left, field, min, max)
  316. }).exec()
  317. },
  318. updateSliderValue(clientX, field, min, max) {
  319. if (!this.sliderRect) return
  320. let ratio = (clientX - this.sliderRect.left) / this.sliderRect.width
  321. ratio = Math.max(0, Math.min(1, ratio))
  322. const value = Math.round(min + ratio * (max - min))
  323. this.$set(this.equipContrlForm, field, value)
  324. },
  325. // u-switch 的 v-model 只会写入布尔值(active-value/inactive-value 仅作用于 change 事件),
  326. // 这里手动映射回后端约定的 '1'/'0' 字符串
  327. setDs(val) {
  328. this.$set(this.equipContrlForm, 'ds', val ? '1' : '0')
  329. },
  330. handleBack() {
  331. uni.navigateBack({
  332. delta: 1
  333. });
  334. },
  335. handleTabClick(tab) {
  336. this.activeTab = tab;
  337. },
  338. showMqttConfig(){
  339. this.show = true;
  340. },
  341. closeMqttConfig(){
  342. this.show = false;
  343. },
  344. async setDeviceContorl(type){
  345. const data = {
  346. device_type_id: 3,
  347. d_id: this.d_id,
  348. cmd: type,
  349. }
  350. if(type === 'imei'){
  351. data.imei = this.equipContrlForm.imei
  352. }else{
  353. delete data.imei
  354. }
  355. this.$myRequest({
  356. url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
  357. method: 'POST',
  358. data
  359. }).then(res => {
  360. this.closeMqttConfig()
  361. if (res) {
  362. uni.showToast({
  363. title: '设备控制修改成功!',
  364. icon: 'success',
  365. });
  366. } else {
  367. uni.showToast({
  368. title: '设备控制修改失败',
  369. icon: 'error',
  370. });
  371. }
  372. });
  373. },
  374. saveSettings(){
  375. let newForm = Object.assign({}, this.equipContrlForm) // 深拷贝
  376. newForm.st = newForm.st + ''
  377. newForm.et = newForm.et + ''
  378. newForm.st && newForm.st.slice(0, 2).charAt(0) != '0'
  379. ? newForm.st.slice(0, 2)
  380. : newForm.st.slice(1, 2)
  381. newForm.et =
  382. newForm.et && newForm.et.slice(0, 2).charAt(0) != '0'
  383. ? newForm.et.slice(0, 2)
  384. : newForm.et.slice(1, 2)
  385. for (let k in newForm) {
  386. if (typeof newForm[k] === 'number') {
  387. newForm[k] = newForm[k] + ''
  388. }
  389. }
  390. newForm.st = newForm.st.replace(':00', '')
  391. this.$myRequest({
  392. url: '/api/api_gateway?method=forecast.send_control.device_control',
  393. method: 'POST',
  394. data: {
  395. device_type_id: 3,
  396. device_model: this.device_model,
  397. d_id: this.d_id,
  398. config: JSON.stringify(newForm)
  399. }
  400. }).then(res => {
  401. if (res) {
  402. // 设备控制修改成功
  403. uni.showToast({
  404. title: '设备控制修改成功!',
  405. icon: 'success',
  406. });
  407. } else {
  408. uni.showToast({
  409. title: '设备控制修改失败',
  410. icon: 'error',
  411. });
  412. }
  413. })
  414. },
  415. async getControlDeviceConfigInfo(){
  416. const res = await this.$myRequest({
  417. url: '/api/api_gateway?method=forecast.send_control.device_control_info',
  418. method: 'POST',
  419. data: {
  420. d_id: this.d_id,
  421. cmd:'paramconf'
  422. },
  423. });
  424. this.equipContrlForm = res
  425. },
  426. }
  427. }
  428. </script>
  429. <style scoped lang="scss">
  430. .device-detail {
  431. display: flex;
  432. width: 100%;
  433. height: calc(100vh - 112rpx);
  434. padding-top: 112rpx;
  435. flex-direction: column;
  436. align-items: center;
  437. background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
  438. .device-detail__header {
  439. width: 100%;
  440. font-size: 28rpx;
  441. color: #999;
  442. color: #042118;
  443. font-family: 'Source Han Sans CN VF';
  444. font-weight: 700;
  445. position: relative;
  446. text-align: center;
  447. .arrow-left {
  448. position: absolute;
  449. left: 32rpx;
  450. margin-right: 12rpx;
  451. }
  452. }
  453. .device-detail__body {
  454. width: calc(100% - 64rpx);
  455. margin: 0 auto;
  456. border-radius: 16rpx;
  457. overflow-x: hidden;
  458. overflow-y: auto;
  459. // 隐藏滚动条
  460. -ms-overflow-style: none;
  461. scrollbar-width: none;
  462. }
  463. .tabs {
  464. margin: 24rpx 0;
  465. border-radius: 16rpx;
  466. padding: 16rpx 0;
  467. padding-top: 0;
  468. .tab-container{
  469. display: flex;
  470. width: 100%;
  471. height: 88rpx;
  472. line-height: 88rpx;
  473. text-align: center;
  474. font-size: 28rpx;
  475. font-weight: 700;
  476. color: #042118;
  477. font-family: 'Source Han Sans CN VF';
  478. }
  479. .tab-item {
  480. margin-right: 40rpx;
  481. color:#999999;
  482. }
  483. .active{
  484. position: relative;
  485. color: #303133;
  486. text-align: center;
  487. font-family: "Source Han Sans CN VF";
  488. font-size: 28rpx;
  489. font-weight: 700;
  490. &::after {
  491. content: '';
  492. position: absolute;
  493. bottom: 10rpx;
  494. left: 50%;
  495. transform: translateX(-50%);
  496. width: 100%;
  497. height: 36rpx;
  498. border-bottom: 6rpx solid #303133;
  499. }
  500. }
  501. }
  502. .device-detail-content{
  503. display: flex;
  504. padding: 24rpx 32rpx;
  505. flex-direction: column;
  506. align-items: flex-start;
  507. gap: 20rpx;
  508. border-radius: 16rpx;
  509. background: #FFF;
  510. .device-detail-item{
  511. .device-detail-label{
  512. color: #303133;
  513. font-family: "Source Han Sans CN VF";
  514. font-size: 28rpx;
  515. font-weight: 400;
  516. }
  517. .device-detail-btn-container{
  518. display: flex;
  519. gap: 24rpx;
  520. margin-top: 12rpx;
  521. }
  522. .device-detail-btn{
  523. display: flex;
  524. padding: 10rpx 16rpx;
  525. justify-content: center;
  526. align-items: center;
  527. gap: 16rpx;
  528. border-radius: 16rpx;
  529. background: #0BBC58;
  530. color: #ffffff;
  531. font-family: "Source Han Sans CN VF";
  532. font-size: 24rpx;
  533. font-weight: 400;
  534. }
  535. .force-btn{
  536. background: #FB4E52;
  537. }
  538. }
  539. .device-detail-viewImage{
  540. width: 100%;
  541. display: flex;
  542. justify-content: space-between;
  543. align-items: center;
  544. padding-bottom: 20rpx;
  545. }
  546. }
  547. .slider-container{
  548. position: relative;
  549. margin-bottom: 20rpx;
  550. .slider-min-value{
  551. position: absolute;
  552. left: 0;
  553. top: -50rpx;
  554. }
  555. .slider{
  556. width: 600rpx;
  557. }
  558. .slider-max-value{
  559. position: absolute;
  560. right: 0;
  561. top: -50rpx;
  562. }
  563. }
  564. .custom-progress{
  565. width: 600rpx;
  566. padding: 0;
  567. .progress-track{
  568. position: relative;
  569. height: 12rpx;
  570. background-color: #ebedf0;
  571. border-radius: 6rpx;
  572. }
  573. .progress-fill{
  574. position: absolute;
  575. left: 0;
  576. top: 0;
  577. height: 100%;
  578. background-color: #0BBC58;
  579. border-radius: 6rpx;
  580. transition: width 0.2s;
  581. }
  582. .progress-thumb{
  583. position: absolute;
  584. top: 50%;
  585. width: 28rpx;
  586. height: 28rpx;
  587. margin-left: -14rpx;
  588. margin-top: -14rpx;
  589. border-radius: 50%;
  590. background-color: #fff;
  591. box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  592. transition: left 0.2s;
  593. }
  594. }
  595. .device-detail-btn-footer{
  596. position: fixed;
  597. bottom: 0;
  598. left: 0;
  599. width: 100%;
  600. height: 112rpx;
  601. line-height: 112rpx;
  602. text-align: center;
  603. font-size: 28rpx;
  604. font-weight: 700;
  605. color: #042118;
  606. font-family: 'Source Han Sans CN VF';
  607. background: #ffffff;
  608. display: flex;
  609. justify-content: center;
  610. align-items: center;
  611. .device-detail-btn{
  612. display: flex;
  613. height: 80rpx;
  614. width: 90%;
  615. margin: 0 auto;
  616. padding: 0rpx 20rpx;
  617. justify-content: center;
  618. align-items: center;
  619. gap: 8rpx;
  620. border-radius: 16rpx;
  621. background:#0BBC58;
  622. color: #ffffff;
  623. text-align: center;
  624. font-family: "Source Han Sans CN VF";
  625. font-size: 14px;
  626. font-style: normal;
  627. font-weight: 500;
  628. }
  629. }
  630. }
  631. </style>