alertSetting.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. <template>
  2. <view class="flex-col justify-start page">
  3. <cu-custom isBack="true" bgColor="#000000"><view slot="content" style="color: #FFFFFF">UU睡眠</view></cu-custom>
  4. <time-slot
  5. ref="timeslot"
  6. :title="'选择时间段'"
  7. @confirm="confirmTime">
  8. </time-slot>
  9. <view class="flex-col justify-start section">
  10. <view class="flex-col section_2 space-y-32">
  11. <view class="flex-col">
  12. <text class="self-start font_1 text_2">心率异常提醒</text>
  13. <view class="flex-col section_6 view space-y-10">
  14. <view class="flex-row justify-between self-start equal-division">
  15. <view class="flex-row items-end space-x-4 items-center">
  16. <switch checked color="#1E09DE" style="transform:scale(0.7)"/>
  17. <text class="font_2">短信提醒</text>
  18. </view>
  19. <view class="flex-row items-end space-x-4 items-center">
  20. <switch color="#1E09DE" style="transform:scale(0.7)"/>
  21. <text class="font_2">电话语音</text>
  22. </view>
  23. </view>
  24. <view class="flex-col">
  25. <view class="flex-row justify-between items-center list-item" :key="i" v-for="(item, i) in list1">
  26. <text class="font_2 text_3">心率过速提醒值</text>
  27. <view class="flex-row items-center group_3 space-x-6">
  28. <picker @change="bindHeartPickerChange" :value="index" :range="array">
  29. <view class="uni-input">
  30. <text class="font_3">{{array[index]}}</text>
  31. <text class="font_4">次/分钟</text>
  32. <image
  33. class="shrink-0 image_7"
  34. src="../../static/iconRight.png"
  35. />
  36. </view>
  37. </picker>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="flex-col group_5 space-y-14">
  44. <text class="self-start font_1">呼吸率异常提醒</text>
  45. <view class="flex-col section_6 space-y-10">
  46. <view class="flex-row justify-between self-start equal-division">
  47. <view class="flex-row items-end space-x-4 items-center">
  48. <switch checked color="#1E09DE" style="transform:scale(0.7)"/>
  49. <text class="font_2">短信提醒</text>
  50. </view>
  51. <view class="flex-row items-end space-x-4 items-center">
  52. <switch checked color="#1E09DE" style="transform:scale(0.7)"/>
  53. <text class="font_2">电话语音</text>
  54. </view>
  55. </view>
  56. <view class="flex-col">
  57. <view class="flex-row justify-between items-center list-item" :key="i" v-for="(item, i) in list2">
  58. <text class="font_2 text_3">呼吸率过速提醒值</text>
  59. <view class="flex-row items-center space-x-6">
  60. <picker @change="bindBreathPickerChange" :value="index" :range="array">
  61. <view class="uni-input">
  62. <text class="font_3">{{array[index]}}</text>
  63. <text class="font_4">次/分钟</text>
  64. <image
  65. class="shrink-0 image_7"
  66. src="../../static/iconRight.png"
  67. />
  68. </view>
  69. </picker>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="flex-col group_5">
  76. <view class="flex-row items-center group_6 space-x-30">
  77. <text class="font_1">离床预警提醒</text>
  78. <text class="font_5 text_4">注:离床预警生效需要用户在床超过1小时。</text>
  79. </view>
  80. <view class="flex-col section_7 space-y-24">
  81. <view class="flex-row justify-between self-start equal-division">
  82. <view class="flex-row items-end space-x-4 items-center">
  83. <switch checked color="#1E09DE" style="transform:scale(0.7)"/>
  84. <text class="font_2">短信提醒</text>
  85. </view>
  86. <view class="flex-row items-end space-x-4 items-center">
  87. <switch color="#1E09DE" style="transform:scale(0.7)"/>
  88. <text class="font_2">电话语音</text>
  89. </view>
  90. </view>
  91. <view class="flex-col group_7">
  92. <view class="flex-row justify-between items-center group_8">
  93. <text class="font_2 text_3">离床预警区间</text>
  94. <view @click="handleTimeChoose" class="flex-row items-center group_9 space-x-20">
  95. <text class="font_3">22:00 - 6:00</text>
  96. <image
  97. class="shrink-0 image_7"
  98. src="../../static/iconRight.png"
  99. />
  100. </view>
  101. </view>
  102. <view class="flex-row justify-between items-center group_10">
  103. <text class="font_2 text_3">离床未归提醒</text>
  104. <view class="flex-row items-center group_11 space-x-8">
  105. <picker @change="bindBedPickerChange" :value="index" :range="array">
  106. <view class="uni-input">
  107. <text class="font_3">{{array[index]}}</text>
  108. <text class="font_4">分钟</text>
  109. <image
  110. class="shrink-0 image_7"
  111. src="../../static/iconRight.png"
  112. />
  113. </view>
  114. </picker>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <view class="flex-col group_5 space-y-14">
  121. <text class="self-start font_1">紧急求助开关</text>
  122. <view class="flex-col justify-start items-start section_8">
  123. <view class="flex-row space-x-6">
  124. <view class="flex-row items-center equal-division-item space-x-4">
  125. <switch checked color="#1E09DE" style="transform:scale(0.7)"/>
  126. <text class="font_2">短信提醒</text>
  127. </view>
  128. <view class="flex-row items-center equal-division-item space-x-4">
  129. <switch checked color="#1E09DE" style="transform:scale(0.7)"/>
  130. <text class="font_2">电话语音</text>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. <view class="flex-col group_5 space-y-20">
  136. <view class="flex-col space-y-12">
  137. <text class="self-start font_1 text_5">语音短信提示手机号码设置</text>
  138. <view class="flex-col space-y-4">
  139. <text class="font_5 text_6">
  140. 注:设置提醒手机号需注册“小云睡眠”小程序领取短信语言套餐包,才能发送短信语音提醒。
  141. </text>
  142. <view class="flex-col section_9">
  143. <view class="flex-row justify-between items-center list-item">
  144. <text class="font_2 text_8">号码1</text>
  145. <view class="flex-row items-center space-x-8">
  146. <input class="uni-input" placeholder-style="color:rgba(255, 255, 255, 0.5);text-align:right" type="number" placeholder="输入手机号码" />
  147. </view>
  148. </view>
  149. <view class="flex-row justify-center items-center list-item space-x-6">
  150. <image
  151. class="image_9"
  152. src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/649415135a7e3f0310661c1e/649415b654fe0000116ae544/16878800827365047681.png"
  153. />
  154. <text class="font_2">添加手机号码</text>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="flex-col justify-start items-center self-center button"><text class="text_9">保存设置</text></view>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. </template>
  165. <script>
  166. import timeSlot from "@/components/wanghexu-timeslot/wanghexu-timeslot.vue"
  167. export default {
  168. data() {
  169. return {
  170. value: 0,
  171. list1: [null, null],
  172. list2: [null, null],
  173. title: 'picker',
  174. array: ['90', '91', '92', '93', '94'],
  175. index: 0
  176. }
  177. },
  178. components: {
  179. timeSlot
  180. },
  181. methods: {
  182. handleInput() {
  183. this.$refs.inputDialog.open()
  184. },
  185. handleTimeChoose() {
  186. this.$refs.timeslot.open();
  187. },
  188. confirmTime(val) {
  189. },
  190. bindBreathPickerChange: function(e) {
  191. console.log('picker发送选择改变,携带值为', e.detail.value)
  192. this.index = e.detail.value
  193. },
  194. bindHeartPickerChange: function(e) {
  195. console.log('picker发送选择改变,携带值为', e.detail.value)
  196. this.index = e.detail.value
  197. },
  198. bindBedPickerChange: function(e) {
  199. console.log('picker发送选择改变,携带值为', e.detail.value)
  200. this.index = e.detail.value
  201. }
  202. }
  203. }
  204. </script>
  205. <style lang="scss" scoped>
  206. .page {
  207. background-color: #000000;
  208. width: 100%;
  209. overflow-y: auto;
  210. overflow-x: hidden;
  211. height: 100%;
  212. .section{
  213. background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/649415135a7e3f0310661c1e/649415b654fe0000116ae544/16878800827323657149.png');
  214. background-size: 100% 100%;
  215. background-repeat: no-repeat;
  216. .section_2 {
  217. padding-bottom: 1.25rem;
  218. background-image: linear-gradient(180deg, #1e1ef7f2 0%, #1dbff79c 100%);
  219. backdrop-filter: blur(0.19rem);
  220. .section_3 {
  221. padding: 1.13rem 0.44rem 0.38rem;
  222. background-color: #ffffff4d;
  223. .group {
  224. padding: 0 0.5rem;
  225. .image {
  226. width: 1.06rem;
  227. height: 0.69rem;
  228. }
  229. .image_2 {
  230. width: 0.94rem;
  231. height: 0.69rem;
  232. }
  233. .image_3 {
  234. width: 1.5rem;
  235. height: 0.72rem;
  236. }
  237. }
  238. .space-x-6-reverse {
  239. & > view:not(:last-child),
  240. & > text:not(:last-child),
  241. & > image:not(:last-child) {
  242. margin-right: 0.38rem;
  243. }
  244. }
  245. .group_2 {
  246. padding: 0.63rem 0 0.38rem;
  247. .text {
  248. font-size: 1.16rem;
  249. line-height: 1.06rem;
  250. }
  251. .section_4 {
  252. padding: 0.38rem 0.75rem;
  253. background-color: #ffffff99;
  254. border-radius: 1rem;
  255. border: solid 0.031rem #00000014;
  256. .image-wrapper {
  257. width: 1.19rem;
  258. .image_5 {
  259. width: 1.19rem;
  260. height: 0.44rem;
  261. }
  262. .image_4 {
  263. width: 1.13rem;
  264. height: 1.06rem;
  265. }
  266. }
  267. .section_5 {
  268. background-color: #00000033;
  269. width: 0.063rem;
  270. height: 1.16rem;
  271. }
  272. }
  273. .space-x-11 {
  274. & > view:not(:first-child),
  275. & > text:not(:first-child),
  276. & > image:not(:first-child) {
  277. margin-left: 0.69rem;
  278. }
  279. }
  280. .pos {
  281. position: absolute;
  282. right: 0;
  283. top: 50%;
  284. transform: translateY(-50%);
  285. }
  286. }
  287. }
  288. .space-y-22 {
  289. & > view:not(:first-child),
  290. & > text:not(:first-child),
  291. & > image:not(:first-child) {
  292. margin-top: 1.38rem;
  293. }
  294. }
  295. .font_1 {
  296. font-size: 1.13rem;
  297. font-family: PingFangSC;
  298. line-height: 1.03rem;
  299. color: #ffffff;
  300. }
  301. .text_2 {
  302. margin-left: 1.25rem;
  303. margin-top: 1.38rem;
  304. }
  305. .section_6 {
  306. padding: 0.94rem 0.63rem 0.13rem;
  307. background-color: #ffffff33;
  308. border-radius: 1rem;
  309. }
  310. .view {
  311. margin: 0.88rem 1.25rem 0;
  312. }
  313. .space-y-10 {
  314. & > view:not(:first-child),
  315. & > text:not(:first-child),
  316. & > image:not(:first-child) {
  317. margin-top: 0.63rem;
  318. }
  319. }
  320. .group_5 {
  321. padding: 0 1.25rem;
  322. .group_6 {
  323. padding-bottom: 0.88rem;
  324. .text_4 {
  325. line-height: 0.59rem;
  326. }
  327. }
  328. .space-x-30 {
  329. & > view:not(:first-child),
  330. & > text:not(:first-child),
  331. & > image:not(:first-child) {
  332. margin-left: 0.3rem;
  333. }
  334. }
  335. .section_7 {
  336. padding: 0.94rem 0.63rem 0;
  337. background-color: #ffffff33;
  338. border-radius: 1rem;
  339. .group_7 {
  340. border-bottom: solid 0.063rem #ffffff1a;
  341. .group_8 {
  342. padding-bottom: 0.88rem;
  343. border-bottom: solid 0.063rem #ffffff1a;
  344. .group_9 {
  345. margin-right: 0.19rem;
  346. }
  347. .space-x-20 {
  348. & > view:not(:first-child),
  349. & > text:not(:first-child),
  350. & > image:not(:first-child) {
  351. margin-left: 1.25rem;
  352. }
  353. }
  354. }
  355. .group_10 {
  356. padding: 0.88rem 0;
  357. .group_11 {
  358. margin-right: 0.19rem;
  359. }
  360. }
  361. }
  362. }
  363. .space-y-24 {
  364. & > view:not(:first-child),
  365. & > text:not(:first-child),
  366. & > image:not(:first-child) {
  367. margin-top: 1.5rem;
  368. }
  369. }
  370. .section_8 {
  371. padding: 0.63rem 0;
  372. background-color: #ffffff33;
  373. border-radius: 1rem;
  374. }
  375. .space-y-12 {
  376. & > view:not(:first-child),
  377. & > text:not(:first-child),
  378. & > image:not(:first-child) {
  379. margin-top: 0.75rem;
  380. }
  381. .text_5 {
  382. line-height: 1.06rem;
  383. }
  384. .space-y-4 {
  385. & > view:not(:first-child),
  386. & > text:not(:first-child),
  387. & > image:not(:first-child) {
  388. margin-top: 0.55rem;
  389. }
  390. .text_6 {
  391. line-height: 0.75rem;
  392. }
  393. .section_9 {
  394. padding: 0 0.63rem;
  395. background-color: #ffffff33;
  396. border-radius: 1rem;
  397. }
  398. }
  399. }
  400. .font_5 {
  401. font-size: 0.63rem;
  402. font-family: PingFangSC;
  403. color: #120399;
  404. }
  405. .space-x-8 {
  406. & > view:not(:first-child),
  407. & > text:not(:first-child),
  408. & > image:not(:first-child) {
  409. margin-left: 0.5rem;
  410. }
  411. .text_7 {
  412. color: #ffffff80;
  413. }
  414. .image_8 {
  415. width: 1.13rem;
  416. height: 1.13rem;
  417. }
  418. }
  419. .button {
  420. padding: 0.5rem 0;
  421. background-image: linear-gradient(90deg, #5611f780 0%, #1e1ef7f2 100%);
  422. border-radius: 1rem;
  423. width: 8.69rem;
  424. .text_9 {
  425. color: #ffffff;
  426. font-size: 1rem;
  427. font-family: PingFangSC;
  428. line-height: 0.94rem;
  429. }
  430. }
  431. }
  432. .space-y-14 {
  433. & > view:not(:first-child),
  434. & > text:not(:first-child),
  435. & > image:not(:first-child) {
  436. margin-top: 0.88rem;
  437. }
  438. }
  439. .equal-division {
  440. width: 12.5rem;
  441. }
  442. .font_2 {
  443. font-size: 0.88rem;
  444. font-family: PingFangSC;
  445. line-height: 0.81rem;
  446. color: #ffffff;
  447. }
  448. .text_3 {
  449. opacity: 0.8;
  450. }
  451. .font_3 {
  452. font-size: 1.13rem;
  453. font-family: PingFangSC;
  454. line-height: 0.81rem;
  455. color: #ffffff;
  456. }
  457. .image_7 {
  458. width: 0.38rem;
  459. height: 0.69rem;
  460. }
  461. .font_4 {
  462. font-size: 0.75rem;
  463. font-family: PingFangSC;
  464. line-height: 0.69rem;
  465. color: #ffffff;
  466. }
  467. .space-x-6 {
  468. & > view:not(:first-child),
  469. & > text:not(:first-child),
  470. & > image:not(:first-child) {
  471. margin-left: 0.38rem;
  472. }
  473. .equal-division-item {
  474. padding: 0.25rem 0.63rem;
  475. width: 6.84rem;
  476. }
  477. }
  478. .space-x-4 {
  479. & > view:not(:first-child),
  480. & > text:not(:first-child),
  481. & > image:not(:first-child) {
  482. margin-left: 0.25rem;
  483. }
  484. }
  485. .image_6 {
  486. width: 1.38rem;
  487. height: 0.88rem;
  488. }
  489. .space-y-20 {
  490. & > view:not(:first-child),
  491. & > text:not(:first-child),
  492. & > image:not(:first-child) {
  493. margin-top: 1.25rem;
  494. }
  495. }
  496. .list-item {
  497. padding: 0.88rem 0;
  498. border-bottom: solid 0.063rem #ffffff1a;
  499. .group_3 {
  500. margin-right: 0.19rem;
  501. }
  502. .text_8 {
  503. line-height: 0.78rem;
  504. }
  505. .image_9 {
  506. width: 0.88rem;
  507. height: 0.88rem;
  508. }
  509. }
  510. }
  511. .space-y-32 {
  512. & > view:not(:first-child),
  513. & > text:not(:first-child),
  514. & > image:not(:first-child) {
  515. margin-top: 2rem;
  516. }
  517. }
  518. }
  519. }
  520. @mixin flex {
  521. /* #ifndef APP-NVUE */
  522. display: flex;
  523. /* #endif */
  524. flex-direction: row;
  525. }
  526. @mixin height {
  527. /* #ifndef APP-NVUE */
  528. height: 100%;
  529. /* #endif */
  530. /* #ifdef APP-NVUE */
  531. flex: 1;
  532. /* #endif */
  533. }
  534. .box {
  535. @include flex;
  536. }
  537. .button {
  538. @include flex;
  539. align-items: center;
  540. justify-content: center;
  541. flex: 1;
  542. height: 35px;
  543. margin: 0 5px;
  544. border-radius: 5px;
  545. }
  546. .example-body {
  547. background-color: #fff;
  548. padding: 10px 0;
  549. }
  550. .button-text {
  551. color: #fff;
  552. font-size: 12px;
  553. }
  554. .popup-content {
  555. @include flex;
  556. align-items: center;
  557. justify-content: center;
  558. padding: 15px;
  559. height: 50px;
  560. background-color: #fff;
  561. }
  562. .popup-height {
  563. @include height;
  564. width: 200px;
  565. }
  566. .text {
  567. font-size: 12px;
  568. color: #333;
  569. }
  570. .popup-success {
  571. color: #fff;
  572. background-color: #e1f3d8;
  573. }
  574. .popup-warn {
  575. color: #fff;
  576. background-color: #faecd8;
  577. }
  578. .popup-error {
  579. color: #fff;
  580. background-color: #fde2e2;
  581. }
  582. .popup-info {
  583. color: #fff;
  584. background-color: #f2f6fc;
  585. }
  586. .success-text {
  587. color: #09bb07;
  588. }
  589. .warn-text {
  590. color: #e6a23c;
  591. }
  592. .error-text {
  593. color: #f56c6c;
  594. }
  595. .info-text {
  596. color: #909399;
  597. }
  598. .dialog,
  599. .share {
  600. /* #ifndef APP-NVUE */
  601. display: flex;
  602. /* #endif */
  603. flex-direction: column;
  604. }
  605. .dialog-box {
  606. padding: 10px;
  607. }
  608. .dialog .button,
  609. .share .button {
  610. /* #ifndef APP-NVUE */
  611. width: 100%;
  612. /* #endif */
  613. margin: 0;
  614. margin-top: 10px;
  615. padding: 3px 0;
  616. flex: 1;
  617. }
  618. .dialog-text {
  619. font-size: 14px;
  620. color: #333;
  621. }
  622. </style>