watchIndex.vue 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418
  1. <template>
  2. <view class="watch-con">
  3. <view class="userbox">
  4. <image class="home_top_bg" src="@/static/image/hall/home_top_bg.png" mode="widthFix"></image>
  5. <view class="user">
  6. <view class="user-navbox">
  7. <scroll-view class="tab-bar" :scroll-x="true" :show-scrollbar="false"
  8. :scroll-into-view="scrollInto">
  9. <view :class="selectUser == index ? 'user-navitem user-navitem-active':'user-navitem'" :id="'tab'+index"
  10. v-for="(item,index) in userList" :key="index" @click="handleUser(index)">
  11. <view>{{item.name}}</view>
  12. <view class="user-navbox-line" :style="{display: selectUser == index ? 'flex':'none'}">
  13. <image src="@/static/images/pages_watch/icons/tag_icon.png" mode="aspectFill"></image>
  14. </view>
  15. </view>
  16. </scroll-view>
  17. </view>
  18. <view class="user-family" @click="navigateToUrl('/pages_watch/index/myfamily/index')">
  19. <image src="@/static/images/pages_watch/icons/my_family_icon.png" mode="aspectFill"></image>
  20. <view>我的家人</view>
  21. </view>
  22. </view>
  23. </view>
  24. <mescroll-body ref="mescrollRef" @init="mescrollInit" top="0" bottom="0" :down="downOption" :up="upOption" @down="downCallback">
  25. <view class="watch-con-body">
  26. <!-- banner -->
  27. <swiper v-if="userList[selectUser] && userList[selectUser].deviceId && userList[selectUser].deviceId.length > 0" style="height: 350rpx;padding: 0 12rpx;box-sizing: border-box;"
  28. :current="activeTab" :duration="300" :previous-margin="userDeviceList.length > 0 &&activeTab == userDeviceList.length ? '92rpx':'0'" :next-margin="activeTab == userDeviceList.length ? '0':'92rpx'" @change="onSwiperChange">
  29. <swiper-item class="swiper-item" v-for="(item,index) in userDeviceList" :key="index">
  30. <view class="bindbox-banner" :style="{height: activeTab == index ?'308rpx':'260rpx'}">
  31. <view class="bindbox-head">
  32. <image class="bindbox-img" src="@/static/images/pages_watch/images/watch_icon.png" mode="aspectFill"></image>
  33. <view class="bindbox-headr" @tap="navigateToUrl('/pages_watch/index/targetInfo?selectUser='+selectUser+'&selectUserInfo='+ JSON.stringify(userList[selectUser]))">
  34. <view>
  35. <view class="bindbox-title textOne" v-show="selectUser == 0">
  36. {{item.user && item.user.nickName ? item.user.nickName : defaultName || '--' }}
  37. </view>
  38. <view class="bindbox-title textOne" v-show="selectUser != 0">
  39. {{userList[selectUser].name}}
  40. </view>
  41. <view>点击查看佩戴者信息</view>
  42. </view>
  43. <image src="@/static/images/pages_watch/icons/edit_white_arrow_right_icon.png"></image>
  44. </view>
  45. </view>
  46. <view class="bindbox-info">
  47. <view class="bindbox-info-l">
  48. <view class="bindbox-info-name">
  49. <view>手表</view>
  50. <view class="bindbox-info-desc">{{item.ble || '--'}}</view>
  51. </view>
  52. <view class="bindbox-info-status">
  53. <view>状态</view>
  54. <!-- 0-OFFLINE 1-ONLINE 2-UNACTIVE 3-DISABLE 4-NOT EXIST -->
  55. <view class="bindbox-info-desc">
  56. {{item.status == 1 ? '在线' : '离线'}}
  57. <navigator url="/pages_watch/index/equipment/offlineReason" hover-class="none" style="display: inherit;">
  58. <image class="question_mark_icon" src="@/static/images/pages_watch/icons/question_mark_icon.png" mode="aspectFill"></image>
  59. </navigator>
  60. </view>
  61. </view>
  62. </view>
  63. <view style="flex-shrink: 0;margin-left: 30rpx;">
  64. <view class="status_btn demonstrate_btn" style="margin-bottom: 20rpx;width: 192rpx;" @click="handleGuide">操作视频<image src="@/static/images/pages_watch/icons/edit_white_arrow_right_icon.png"></image>
  65. </view>
  66. <view class="bindbox-info-r" @tap="navigateToUrl('/pages_watch/index/equipment/index?selectUser='+selectUser)">
  67. 设备管理
  68. <image src="@/static/images/pages_watch/icons/arrow_right_orange_icon.png"></image>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </swiper-item>
  74. <swiper-item class="swiper-item">
  75. <view class="add-device" :style="{height: activeTab == userDeviceList.length ?'308rpx':'260rpx', width:activeTab == userDeviceList.length ?'308rpx':'260rpx'}" @click="handleBind">
  76. <view class="add-device-icon">
  77. <image src="@/static/images/pages_watch/icons/add_watch_icon.png" mode="aspectFill"></image>
  78. </view>
  79. <text>添加手表</text>
  80. </view>
  81. </swiper-item>
  82. </swiper>
  83. <view class="banner" v-else>
  84. <image class="banner_bg" src="@/static/images/pages_watch/images/gold_circle_bg.png" mode="heightFix"></image>
  85. <image class="banner_bg_watch" src="@/static/images/pages_watch/images/watch_img.png" mode="heightFix"></image>
  86. <view style="position: relative;z-index: 1;">
  87. <view class="status_text">未绑定</view>
  88. <view class="status_desc">还没绑定健康手表,扫描 手表二维码去绑定</view>
  89. <view class="status_btnbox">
  90. <button class="status_btn binding_btn" :loading="btnLoading" :disabled="btnLoading" @click="handleBind">
  91. {{btnLoading ? "绑定中...":"立即绑定"}}
  92. <image v-show="!btnLoading" src="@/static/images/pages_watch/icons/arrow_right_orange_icon.png"></image>
  93. </button>
  94. <view class="status_btn demonstrate_btn" @click="handleGuide">操作视频<image src="@/static/images/pages_watch/icons/edit_white_arrow_right_icon.png"></image>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <view style="padding: 0 24rpx;">
  100. <!-- 健康风险 -->
  101. <view class="health-risks" v-show="deviceId">
  102. <view class="health-risks-title">
  103. <view class="health-risks-titlel"><text>健康</text>风险</view>
  104. <view @tap="navigateToUrl('/pages_watch/message/detail?title=手表通知')" class="health-risks-titler" >
  105. <text>更多提醒</text>
  106. <text class="health-risks-msgnum" v-show="alarmTotal > 0">{{alarmTotal}}</text>
  107. <image src="@/static/images/pages_watch/icons/arrow_right_icon.png"></image>
  108. </view>
  109. </view>
  110. <view class="health-risks-msg">
  111. <view class="health-risks-msgitem" v-for="(item,index) in alarmInfoList" :key="index">
  112. <view class="textOne health-risks-msgtxt">{{item.description}}</view>
  113. <view class="health-risks-msgbtn" @tap="navigateToUrl('/pages_watch/message/detail?title=手表通知')">{{item.type == "event"? '去就医':"去查看"}}</view>
  114. </view>
  115. </view>
  116. </view>
  117. <view class="navbox">
  118. <view class="tongue-diagnosis" @tap="navigateToUrl('/pages/user/healthRecords/index','健康档案')">
  119. <view>
  120. <view class="tongue-diagnosis-title">健康档案</view>
  121. <view>为您精准诊断</view>
  122. </view>
  123. <image src="@/static/images/pages_watch/icons/jkda.png" mode="aspectFill"></image>
  124. </view>
  125. <!-- <view class="health-report" @tap="navigateToUrl('/pages_watch/health/healthReport?selectUser='+selectUser,'健康报告')">
  126. <view>
  127. <view class="health-report-title">健康报告</view>
  128. <view>分析健康状态</view>
  129. </view>
  130. <image src="@/static/images/pages_watch/icons/health_report_icon.png" mode="aspectFill"></image>
  131. </view> -->
  132. <view class="health-report" @tap="navigateToUrl('/pages_watch/health/healthWeekReport?selectUser='+selectUser,'健康周报')">
  133. <view>
  134. <view class="health-report-title">健康周报</view>
  135. <view>分析健康状态</view>
  136. </view>
  137. <image src="@/static/images/pages_watch/icons/health_report_icon.png" mode="aspectFill"></image>
  138. </view>
  139. </view>
  140. <!-- 健康检测 -->
  141. <view class="box-title">
  142. <text class="box-title-left">健康监测</text>
  143. <view class="box-title-right">
  144. <view class="box-title-rightedit" @tap="navigateToUrl('/pages_watch/healthMonitoring/index')">
  145. <image src="@/static/images/pages_watch/icons/edit_add_icon.png"></image>
  146. <text>编辑卡片</text>
  147. </view>
  148. </view>
  149. </view>
  150. <sports ref='sports' v-if="showSports"></sports>
  151. <view class="health-monitoring">
  152. <view class="health-monitoring-item" v-for="(item,index) in indexInfo" :key="index"
  153. @tap="handleMonitoring(item)">
  154. <view class="health-monitoring-title">
  155. <view>
  156. <view class="health-monitoring-maintitle">{{item.type.type}}</view>
  157. <view>{{item.type.title}}</view>
  158. </view>
  159. <image :src="item.type.icon" mode="aspectFill"></image>
  160. </view>
  161. <view class="health-monitoring-res resnum">{{item.data || '--'}}</view>
  162. <view class="health-monitoring-time">{{item.date && item.date.substring(5,16)}}</view>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. </mescroll-body>
  168. </view>
  169. </template>
  170. <script>
  171. import sports from "@/pages_watch/components/sports/sports.vue";
  172. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  173. import mescrollBody from "@/uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.vue";
  174. import permision from "@/utils/permission.js";
  175. import { getWatchUserInfo,getStatus,editUser,editMyfamily,editDevice } from "@/api/pages_watch/user.js";
  176. import { alarmInfo, queryIndexWatchData,getBatchData,getInfoByDeviceIds } from "@/api/pages_watch/index.js";
  177. import { getAppVersion } from '@/api/pages_watch/common.js';
  178. // import { appCheckUdate,openDownload } from '@/utils/APPUpdate.js'
  179. const avatar="/static/images/pages_watch/images/my_heads_icon.png";
  180. export default {
  181. mixins: [MescrollMixin], // 使用mixin
  182. components: {
  183. mescrollBody,
  184. sports
  185. },
  186. data() {
  187. return {
  188. avatar,
  189. mescroll: null,
  190. downOption: { //下拉刷新
  191. auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
  192. },
  193. upOption: { //上拉加载
  194. auto: false, // 不自动加载
  195. page: {
  196. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  197. size: 10 // 每页数据的数量
  198. },
  199. noMoreSize: 5, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
  200. empty: {
  201. tip: '~ 暂无疗法 ~' // 提示
  202. // btnText: '去看看'
  203. },
  204. use:false
  205. },
  206. userboxWidth: "",
  207. scrollInto: "tab0",
  208. activeTab: 0,
  209. userDeviceList: [],
  210. // 当前的设备编号
  211. deviceId: uni.getStorageSync("deviceId"),
  212. // 当前登录用户的信息
  213. userInfo: {},
  214. // 所有家庭成员(包括自己)
  215. userList: [{
  216. name: "自己",
  217. deviceId: [],
  218. relationship: ""
  219. }],
  220. // 选中的家庭成员
  221. selectUser: 0,
  222. // 立即绑定按钮loading
  223. btnLoading: false,
  224. // 健康风险
  225. alarmInfoList: [],
  226. // 健康风险未读提醒
  227. alarmTotal: 0,
  228. // 健康监测信息
  229. indexInfo: [
  230. {
  231. data: "",
  232. date: "",
  233. type: {
  234. type: "血糖",
  235. title: "血糖健康监测",
  236. icon: "/static/images/pages_watch/icons/blood_sugar_icon.png"
  237. }
  238. }
  239. ,{
  240. data: "",
  241. date: "",
  242. type: {
  243. type: "血压",
  244. title: "血压健康监测",
  245. icon:"/static/images/pages_watch/icons/blood_pressure_icon.png"
  246. }
  247. },{
  248. data: "",
  249. date: "",
  250. type: {
  251. type: "心率",
  252. title: "心脏健康管理",
  253. icon:"/static/images/pages_watch/icons/heart_rate_icon.png"
  254. }
  255. },{
  256. data: "",
  257. date: "",
  258. type: {
  259. type: "血氧",
  260. title: "血氧风险管控",
  261. icon:"/static/images/pages_watch/icons/blood_oxygen_icon.png"
  262. }
  263. },{
  264. data: "",
  265. date: "",
  266. type: {
  267. type: "体温",
  268. title: "体温健康监测",
  269. icon:"/static/images/pages_watch/icons/temperature_icon.png"
  270. }
  271. },{
  272. data: "",
  273. date: "",
  274. type: {
  275. type: "血脂",
  276. title: "血脂健康监测",
  277. icon:"/static/images/pages_watch/icons/blood_fat_icon.png"
  278. }
  279. },{
  280. data: "",
  281. date: "",
  282. type: {
  283. type: "尿酸",
  284. title: "尿酸健康监测",
  285. icon:"/static/images/pages_watch/icons/uric_acid_icon.png"
  286. }
  287. },{
  288. data: "",
  289. date: "",
  290. type: {
  291. type: "血酮",
  292. title: "血酮健康监测",
  293. icon:"/static/images/pages_watch/icons/blood_ketone_icon.png"
  294. }
  295. },
  296. ],
  297. isForce:false,
  298. showSports: false,
  299. defaultName: ''
  300. }
  301. },
  302. watch: {
  303. deviceId: {
  304. handler(oldVal,newVal) {
  305. this.getAlarmInfo()
  306. if(this.$refs.sports) {
  307. const isFamily = this.selectUser != 0
  308. this.$refs.sports.getServerData(isFamily)
  309. }
  310. },
  311. immediate: true
  312. }
  313. },
  314. created() {
  315. //#ifndef H5 || APP-PLUS
  316. this.userboxWidth = `width:${uni.getStorageSync('menuInfo').menuLeft}`
  317. //#endif
  318. uni.$on('getScanCodeInfo',(data)=>{
  319. const deviceId = data.imei || ""
  320. this.verifyDeviceId(data,deviceId)
  321. })
  322. },
  323. beforeDestroy() {
  324. uni.$off("getScanCodeInfo")
  325. },
  326. methods: {
  327. initReady() {
  328. },
  329. initShow() {
  330. this.showSports = true
  331. if (this.$isLogin()) {
  332. const acindex = this.userDeviceList.length > 0 && this.userDeviceList.length == this.activeTab ? this.userDeviceList.length - 1 : this.activeTab
  333. this.activeTab = acindex
  334. const user = uni.getStorageSync('userInfo') ? JSON.parse(uni.getStorageSync('userInfo')): {}
  335. this.defaultName = user.nickName
  336. this.getUser()
  337. this.getAlarmInfo()
  338. this.$nextTick(()=>{
  339. const isFamily = this.selectUser != 0
  340. this.$refs.sports.getServerData(isFamily)
  341. })
  342. } else {
  343. setTimeout(()=>{
  344. this.mescroll.endSuccess();
  345. }, 500)
  346. }
  347. // #ifdef APP-PLUS
  348. // this.checkUpdateApp();
  349. // #endif
  350. },
  351. mescrollInit(mescroll) {
  352. this.mescroll = mescroll;
  353. },
  354. /*下拉刷新的回调 */
  355. downCallback(mescroll) {
  356. this.initShow()
  357. },
  358. onChangeSubnav(e) {
  359. this.$emit("onChangeSubnav",e)
  360. },
  361. handleGuide() {
  362. uni.navigateTo({
  363. url: "/pages_watch/index/equipment/instructions"
  364. })
  365. },
  366. // swiper划动
  367. onSwiperChange(e) {
  368. this.activeTab = e.detail.current
  369. const acindex = this.userDeviceList.length > 0 && this.userDeviceList.length == this.activeTab ? this.userDeviceList.length - 1 : this.activeTab
  370. this.deviceId = this.userList[this.selectUser].deviceId[acindex] || ""
  371. uni.setStorageSync("deviceId",this.deviceId)
  372. // 所有成员的健康监测卡片展示类别一致
  373. this.getIndexInfo(this.userInfo.monitorDataTypeOrder)
  374. if(this.$refs.sports) {
  375. const isFamily = this.selectUser != 0
  376. this.$refs.sports.getServerData(isFamily)
  377. }
  378. },
  379. getUser() {
  380. getWatchUserInfo({isFamily: false}).then(res => {
  381. setTimeout(()=>{
  382. this.mescroll.endSuccess();
  383. }, 500)
  384. if (res.code == 200) {
  385. this.userInfo = res.user
  386. uni.setStorageSync("userWatchInfo", JSON.stringify(res.user))
  387. let otherDevice = this.userInfo.otherDevice ? JSON.parse(this.userInfo.otherDevice) : []
  388. otherDevice = otherDevice.map(item=>({
  389. ...item,
  390. deviceId: item.deviceId ? item.deviceId.split(',') : []
  391. }))
  392. const arry = [{
  393. name: "自己",
  394. deviceId: this.userInfo.deviceId || [],
  395. relationship: ""
  396. }]
  397. this.userList = arry.concat(otherDevice)
  398. if(this.$isEmpty(this.userList[this.selectUser])) {
  399. // 用户删除家人后没有选中的信息就选中第一个
  400. this.selectUser = 0
  401. this.activeTab = 0
  402. }
  403. this.deviceId = this.userList[this.selectUser].deviceId&&this.userList[this.selectUser].deviceId.length > 0 ? this.userList[this.selectUser].deviceId[this.activeTab] : ''
  404. uni.setStorageSync("deviceId",this.deviceId)
  405. this.getInfoByDeviceIds()
  406. this.getIndexInfo(this.userInfo.monitorDataTypeOrder)
  407. }
  408. }).catch(()=>{
  409. setTimeout(()=>{
  410. this.mescroll.endSuccess();
  411. }, 500)
  412. })
  413. },
  414. // 首页轮播绑定信息
  415. getInfoByDeviceIds() {
  416. let ids = this.userList[this.selectUser].deviceId
  417. if(ids&&ids.length> 0) {
  418. const param = {
  419. deviceIds: ids.join(','),
  420. isFamily: this.selectUser != 0
  421. }
  422. getInfoByDeviceIds(param).then(res=>{
  423. if(res.code == 200) {
  424. this.userDeviceList = res.data && res.data.length > 0 ? res.data : []
  425. }
  426. })
  427. } else {
  428. this.userDeviceList = []
  429. }
  430. },
  431. // 绑定
  432. async handleBind() {
  433. if (!this.$isLogin()) {
  434. this.$showLoginPage()
  435. } else {
  436. // #ifdef APP-PLUS
  437. if(!plus.runtime.isAgreePrivacy()) {
  438. uni.showToast({title: "请同意隐私政策",icon: "none"});
  439. return;
  440. }
  441. let status = await this.checkAppCamera()
  442. if(status == 1) {
  443. uni.navigateTo({
  444. url: '/pages_watch/healthMonitoring/scanCode?typeFun=getScanCodeInfo'
  445. })
  446. }
  447. // #endif
  448. // #ifdef MP-WEIXIN
  449. this.checkWXCamera()
  450. // #endif
  451. }
  452. },
  453. scanQRCode() {
  454. uni.scanCode({
  455. success(res) {
  456. if (res.result) {
  457. // 扫描成功,处理二维码内容
  458. console.log('扫描结果:', res.scanType,res.result);
  459. const scanInfo = JSON.parse(res.result)
  460. const deviceId = scanInfo.dev_info.imei || ""
  461. this.verifyDeviceId(scanInfo.dev_info,deviceId)
  462. } else {
  463. // 扫描失败
  464. uni.showToast({
  465. title: '扫描失败',
  466. icon: 'none'
  467. });
  468. }
  469. },
  470. fail() {}
  471. });
  472. },
  473. // 验证设备
  474. verifyDeviceId(scanInfo,deviceId) {
  475. // index,0表示自己,如果是自己绑定直接调用修改用户信息接口
  476. this.btnLoading = true
  477. if(this.selectUser == 0) {
  478. editDevice(scanInfo).then(res=>{
  479. this.btnLoading = false
  480. if(res.code == 200) {
  481. uni.showToast({
  482. title: res.msg,
  483. icon: "none",
  484. position: 'top',
  485. duration: 2000
  486. })
  487. this.getUser()
  488. } else {
  489. uni.showToast({
  490. title: res.msg,
  491. icon: "none",
  492. position: 'top',
  493. duration: 2000
  494. })
  495. }
  496. }).catch(err=>{
  497. this.btnLoading = false
  498. })
  499. } else {
  500. this.bindDeviceId(deviceId)
  501. // getStatus({deviceId: deviceId}).then(res=>{
  502. // if(res.code == 200) {
  503. // if(res.data === 0 || res.data === 1 || res.data === 2 || res.data === 3) {
  504. // this.bindDeviceId(deviceId)
  505. // } else {
  506. // this.btnLoading = false
  507. // uni.showToast({
  508. // title: '绑定失败',
  509. // icon: "none",
  510. // position: 'top',
  511. // duration: 2000
  512. // })
  513. // }
  514. // }else {
  515. // this.btnLoading = false
  516. // uni.showToast({
  517. // title: res.msg,
  518. // icon: "none",
  519. // position: 'top',
  520. // duration: 2000
  521. // })
  522. // }
  523. // }).catch(err=>{
  524. // this.btnLoading = false
  525. // })
  526. }
  527. },
  528. // 绑定设备
  529. bindDeviceId(deviceId) {
  530. let param = this.userList.map((item,idx)=>({
  531. ...item,
  532. deviceId: idx == this.selectUser && !item.deviceId.includes(deviceId) ? item.deviceId.concat([deviceId]).join(','): item.deviceId.join(',')
  533. }))
  534. // 去掉自己
  535. param.splice(0,1)
  536. editMyfamily({otherDevice: JSON.stringify(param)}).then(res=>{
  537. this.btnLoading = false
  538. if(res.code == 200) {
  539. uni.showToast({
  540. title: "绑定成功",
  541. icon: "none",
  542. position: 'top',
  543. duration: 2000
  544. })
  545. this.getUser()
  546. } else {
  547. uni.showToast({
  548. title: res.msg,
  549. icon: "none",
  550. position: 'top',
  551. duration: 2000
  552. })
  553. }
  554. }).catch(err => {
  555. this.btnLoading = false
  556. console.log('err', err);
  557. })
  558. },
  559. // 切换绑定的成员信息
  560. handleUser(index) {
  561. this.selectUser = index
  562. this.activeTab = 0
  563. this.scrollInto = 'tab' + index
  564. this.deviceId = this.userList[index].deviceId[this.activeTab] || ""
  565. uni.setStorageSync("deviceId",this.deviceId)
  566. this.getInfoByDeviceIds()
  567. // 所有成员的健康监测卡片展示类别一致
  568. this.getIndexInfo(this.userInfo.monitorDataTypeOrder)
  569. },
  570. navigateToUrl(url,title) {
  571. if (this.$isLogin()) {
  572. if(title == "健康周报" && !this.deviceId) {
  573. uni.showToast({
  574. title: "请先绑定设备",
  575. icon: "none"
  576. })
  577. return
  578. }
  579. uni.navigateTo({
  580. url: url
  581. })
  582. } else {
  583. this.$showLoginPage()
  584. }
  585. },
  586. // 健康风险预警信息
  587. getAlarmInfo() {
  588. if(!this.deviceId) {
  589. this.alarmInfoList = []
  590. this.alarmTotal = 0
  591. return
  592. }
  593. const param = {
  594. deviceId: this.deviceId,
  595. pageNum: 1,
  596. pageSize: 3,
  597. }
  598. alarmInfo(param).then((res) => {
  599. if (res.code == 200) {
  600. this.alarmInfoList = res.rows
  601. this.alarmTotal = res.unreadNum
  602. }
  603. }).catch((err) => {});
  604. },
  605. // 健康监测信息
  606. getIndexInfo(monitorDataTypeOrder) {
  607. if(!this.deviceId) {
  608. getBatchData({ids: monitorDataTypeOrder}).then(res => {
  609. if (res.code == 200) {
  610. this.indexInfo = res.data.map(item=>({
  611. data: "",
  612. date: "",
  613. type: item
  614. }))
  615. }
  616. }).catch((err) => {});
  617. } else {
  618. const param = {
  619. deviceId: this.deviceId,
  620. type: monitorDataTypeOrder
  621. }
  622. queryIndexWatchData(param).then(res => {
  623. if (res.code == 200) {
  624. this.indexInfo = res.data
  625. }
  626. }).catch((err) => {});
  627. }
  628. },
  629. handleMonitoring(item) {
  630. if (this.$isLogin()) {
  631. if(!this.deviceId) {
  632. uni.showToast({
  633. title: "请先绑定设备",
  634. icon: "none"
  635. })
  636. return
  637. }
  638. let url = ""
  639. switch (item.type.type) {
  640. case "血糖":
  641. url = "/pages_watch/healthMonitoring/bloodSugar"
  642. break;
  643. case "血压":
  644. url = "/pages_watch/healthMonitoring/bloodPressure"
  645. break;
  646. case "心率":
  647. url = "/pages_watch/healthMonitoring/heartRate"
  648. break;
  649. case "血氧":
  650. url = "/pages_watch/healthMonitoring/bloodOxygen"
  651. break;
  652. case "睡眠":
  653. url = "/pages_watch/healthMonitoring/sleep"
  654. break;
  655. case "舌诊":
  656. url = "/pages/user/tongue/tongueList"
  657. break;
  658. case "体温":
  659. url = "/pages_watch/healthMonitoring/bodyTemperature"
  660. break;
  661. case "尿酸":
  662. url = "/pages_watch/healthMonitoring/uricAcid"
  663. break;
  664. case "压力":
  665. url = "/pages_watch/healthMonitoring/pressure"
  666. break;
  667. default:
  668. url = ""
  669. break;
  670. }
  671. if (url) {
  672. uni.navigateTo({
  673. url: url
  674. })
  675. } else {
  676. uni.showToast({
  677. title: '功能开发中...',
  678. icon: 'none',
  679. position: 'top',
  680. duration: 2000
  681. })
  682. }
  683. } else {
  684. this.$showLoginPage()
  685. }
  686. },
  687. async checkAppCamera() {
  688. let status = permision.isIOS ? await permision.requestIOS("camera") : await permision.requestAndroid("android.permission.CAMERA")
  689. if(status === null || status == 1) {
  690. status == 1
  691. } else if(status == 2) {
  692. uni.showModal({
  693. content: "相机权限已关闭",
  694. showCancel: false,
  695. success: () => {}
  696. })
  697. } else if(status.code) {
  698. uni.showModal({
  699. content: status.message
  700. })
  701. } else {
  702. uni.showModal({
  703. content: "为了使用相机功能,请点击设置开启相机权限",
  704. confirmText: "设置",
  705. success: (res) => {
  706. if(res.confirm) {
  707. permision.gotoAppSetting()
  708. }
  709. }
  710. })
  711. }
  712. return status
  713. },
  714. checkWXCamera() {
  715. const that = this
  716. uni.getSetting({
  717. success(res) {
  718. // 判断是否拥有此权限进行拉起授权 和 重新授权功能
  719. if (!res.authSetting['scope.camera']) {
  720. // 未授权此项权限 拉起授界面
  721. uni.authorize({
  722. scope: 'scope.camera',
  723. success() {
  724. // 授权成功后 就可以执行 需要权限的 操作函数了
  725. // 使用已授权的功能
  726. that.scanQRCode();
  727. },
  728. fail(err) {
  729. /*
  730. 第一次拒绝授权后必须在 uni.authorize的fail中使用
  731. uni.openSetting 才能进入设置界面打开授权按钮
  732. */
  733. uni.showToast({
  734. title: '您拒绝了授权',
  735. icon: 'none'
  736. });
  737. // 这里必须经过一个confirm 不然也会出现问题(啥问题我也不知道)
  738. uni.showModal({
  739. title: '是否重新授权相机功能',
  740. success(res) {
  741. if (res.confirm) {
  742. uni.openSetting({
  743. success() {
  744. console.log('开启权限成功');
  745. },
  746. fail() {
  747. console.log('开启权限失败');
  748. }
  749. });
  750. } else if (res.cancel) {
  751. console.log('拒绝开启开启权限');
  752. }
  753. }
  754. });
  755. }
  756. });
  757. } else {
  758. that.scanQRCode()
  759. }
  760. }
  761. });
  762. },
  763. /* 检查更新 在线更新 */
  764. checkUpdateApp:function(){
  765. // 获取manifest.json里的配置信息
  766. if(this.isForce){
  767. return;
  768. }
  769. let that=this;
  770. this.isForce=true;
  771. plus.runtime.getProperty(plus.runtime.appid, function(widgetinfo) {
  772. // console.log("App widgetinfo:"+JSON.stringify(widgetinfo));
  773. // 可以根据manifest.json里的应用名称来进行针对性的APP升级
  774. // if (widgetinfo.name == that.$qconfig.appName) { //APP名称
  775. // 获取manifest.json里的版本号
  776. let platform = uni.getSystemInfoSync().platform;
  777. let isAndroid=platform=="android";
  778. let type=isAndroid?1:2;
  779. getAppVersion(type).then(srcData => {
  780. this.isForce=false;
  781. if(srcData.code==200){
  782. let data = srcData.data;
  783. let version = widgetinfo.versionCode,//用户当前版本
  784. appVersion = data.versionCode,//升级包版本
  785. appName = widgetinfo.name, //app名称
  786. updata = data.isForce,//是否强制热更新
  787. appurl = data.url,//升级包地址
  788. intro = data.note;//升级包提示
  789. //如果用户版本号小于升级包版本号,先升级
  790. let afterVer=that.$qconfig.isAppStore?data.appStoreUpdate:true;
  791. // let afterVer= true;
  792. if(data && (version < appVersion) && afterVer){
  793. uni.showModal({
  794. title:"更新提示",
  795. confirmText:"立即升级",
  796. content:intro,
  797. cancelText:'确定',
  798. confirmText:'取消',
  799. success: (res) => {
  800. if (res.cancel) {
  801. openDownload(srcData.data);
  802. } else if (res.confirm) {
  803. if(updata==1){
  804. console.log('用户点击取消');
  805. uni.showToast({
  806. title:"请先升级APP版本",
  807. icon:"none",
  808. duration:2000
  809. })
  810. //退出app
  811. setTimeout(function(){
  812. plus.runtime.quit();
  813. },2000)
  814. }
  815. }
  816. },
  817. fail: () => {
  818. uni.hideLoading();
  819. }
  820. })
  821. }
  822. }
  823. },
  824. rej => {}
  825. ).catch(()=>{
  826. //联网失败, 结束加载
  827. // this.mescroll.endErr();
  828. });
  829. // }
  830. });
  831. },
  832. }
  833. }
  834. </script>
  835. <style lang="scss" scoped>
  836. @mixin u-flex($flexD, $alignI, $justifyC) {
  837. display: flex;
  838. flex-direction: $flexD;
  839. align-items: $alignI;
  840. justify-content: $justifyC;
  841. }
  842. .indexSubsection {
  843. height: 88rpx;
  844. display: flex;
  845. align-items: center;
  846. justify-content: center;
  847. }
  848. .watch-con {
  849. padding-top: calc(var(--status-bar-height) + 44px + 88rpx);
  850. padding-bottom: var(--window-bottom);
  851. min-height: 100vh;
  852. box-sizing: border-box;
  853. background: linear-gradient(180deg, #FDF0DA 0%, #FDF4EB 75%, #F5F7FA 100%) no-repeat;
  854. background-size: 100% 504rpx;
  855. color: #222222;
  856. &-body {
  857. padding: 0 0 32rpx 0;
  858. }
  859. .userbox {
  860. width: 100%;
  861. overflow: hidden;
  862. position: fixed;
  863. z-index: 9999;
  864. left: 0;
  865. top: calc(var(--status-bar-height) + 44px);
  866. .home_top_bg {
  867. width: 100%;
  868. position: absolute !important;
  869. left: 0;
  870. top: -44px;
  871. z-index: 0;
  872. }
  873. }
  874. .tab-bar {
  875. width: 100%;
  876. flex-direction: row;
  877. white-space: nowrap;
  878. }
  879. .user {
  880. width: 100%;
  881. height: 88rpx;
  882. padding: 0 24rpx;
  883. box-sizing: border-box;
  884. @include u-flex(row, center, space-between);
  885. font-family: PingFang SC, PingFang SC;
  886. font-weight: 500;
  887. color: #222222;
  888. overflow: hidden;
  889. position: relative;
  890. &-navbox {
  891. flex: 1;
  892. margin-right: 20rpx;
  893. overflow: hidden;
  894. @include u-flex(row, center, flex-start);
  895. font-size: 32rpx;
  896. &-line {
  897. display: inherit;
  898. margin-top: 16rpx;
  899. image {
  900. width: 40rpx;
  901. height: 12rpx;
  902. }
  903. }
  904. }
  905. &-navitem {
  906. min-width: 90rpx;
  907. padding: 0 20rpx;
  908. box-sizing: border-box;
  909. text-align: center;
  910. @include u-flex(column, center, center);
  911. display: inline-flex;
  912. flex-wrap: nowrap;
  913. &-active {
  914. font-size: 40rpx;
  915. color: #2583EB;
  916. }
  917. }
  918. &-family {
  919. flex-shrink: 0;
  920. font-weight: 400;
  921. font-size: 20rpx;
  922. text-align: center;
  923. image {
  924. width: 32rpx;
  925. height: 32rpx;
  926. }
  927. }
  928. }
  929. .banner {
  930. height: 312rpx;
  931. padding: 32rpx;
  932. margin: 24rpx 24rpx 0 24rpx;
  933. overflow: hidden;
  934. background: linear-gradient(180deg, #a7d6ff 0%, #6AB1F4 100%);
  935. border-radius: 16rpx 16rpx 16rpx 16rpx;
  936. font-family: PingFang SC, PingFang SC;
  937. color: #FFFFFF;
  938. box-sizing: border-box;
  939. position: relative;
  940. .banner_bg {
  941. width: 414rpx;
  942. height: 312rpx;
  943. position: absolute !important;
  944. right: 0;
  945. top: 0;
  946. }
  947. .banner_bg_watch {
  948. width: 264rpx;
  949. height: 307rpx;
  950. position: absolute !important;
  951. right: 0;
  952. top: 0;
  953. }
  954. .status_text {
  955. padding-left: 28rpx;
  956. line-height: 60rpx;
  957. font-weight: 600;
  958. font-size: 48rpx;
  959. position: relative;
  960. &::after {
  961. content: "";
  962. width: 8rpx;
  963. height: 40rpx;
  964. background: #FFFFFF;
  965. border-radius: 4rpx 4rpx 4rpx 4rpx;
  966. position: absolute;
  967. left: 0;
  968. top: 50%;
  969. transform: translateY(-50%);
  970. }
  971. }
  972. .status_desc {
  973. width: 264rpx;
  974. padding-top: 20rpx;
  975. padding-bottom: 24rpx;
  976. font-weight: 400;
  977. font-size: 24rpx;
  978. line-height: 36rpx;
  979. }
  980. .status_btnbox{
  981. @include u-flex(row, center, flex-start);
  982. }
  983. .binding_btn {
  984. background: #FFFFFF;
  985. color: #2583EB;
  986. margin-right: 16rpx !important;
  987. }
  988. }
  989. .status_btn {
  990. width: 200rpx;
  991. height: 64rpx;
  992. line-height: 64rpx;
  993. border-radius: 36rpx 36rpx 36rpx 36rpx;
  994. @include u-flex(row, center, center);
  995. display: inline-flex;
  996. font-weight: 500;
  997. font-size: 26rpx;
  998. border: 2rpx solid #FFFFFF;
  999. box-sizing: border-box;
  1000. margin: 0;
  1001. &::after {
  1002. border: none;
  1003. }
  1004. image {
  1005. width: 32rpx;
  1006. height: 32rpx;
  1007. }
  1008. }
  1009. .demonstrate_btn {
  1010. image {
  1011. width: 48rpx !important;
  1012. height: 48rpx !important;
  1013. }
  1014. }
  1015. .swiper-item {
  1016. padding: 0 12rpx;
  1017. box-sizing: border-box;
  1018. height: 350rpx;
  1019. @include u-flex(row, center, flex-start);
  1020. }
  1021. .bindbox{
  1022. &-banner{
  1023. width: 100%;
  1024. min-width: 624rpx;
  1025. padding: 0 24rpx;
  1026. box-sizing: border-box;
  1027. @include u-flex(column, inherit, center);
  1028. background: linear-gradient( 180deg, #a7d6ff 0%, #6AB1F4 100%);
  1029. box-shadow: 0rpx 0rpx 14rpx 6rpx #a7d6ff;
  1030. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1031. overflow: hidden;
  1032. font-family: PingFang SC, PingFang SC;
  1033. font-weight: 400;
  1034. font-size: 24rpx;
  1035. color: #FFFFFF;
  1036. }
  1037. &-head {
  1038. width: 100%;
  1039. @include u-flex(row, center, flex-start);
  1040. }
  1041. &-img {
  1042. flex-shrink: 0;
  1043. width: 88rpx;
  1044. height: 88rpx;
  1045. padding: 8rpx;
  1046. box-sizing: border-box;
  1047. margin-right: 20rpx;
  1048. background: #FEF2E0;
  1049. border-radius: 50%;
  1050. }
  1051. &-headr {
  1052. flex: 1;
  1053. @include u-flex(row, center, space-between);
  1054. overflow: hidden;
  1055. image {
  1056. width: 48rpx;
  1057. height: 48rpx;
  1058. }
  1059. }
  1060. &-title {
  1061. font-weight: 600;
  1062. font-size: 36rpx;
  1063. line-height: 60rpx;
  1064. }
  1065. &-info {
  1066. width: 100%;
  1067. margin-top: 46rpx;
  1068. @include u-flex(row, center, space-between);
  1069. .question_mark_icon {
  1070. width: 24rpx;
  1071. height: 24rpx;
  1072. margin-left: 10rpx;
  1073. }
  1074. }
  1075. &-info-l {
  1076. flex: 1;
  1077. @include u-flex(row, center, flex-start);
  1078. }
  1079. &-info-desc {
  1080. margin-top: 18rpx;
  1081. font-weight: 500;
  1082. font-size: 28rpx;
  1083. color: #FFFFFF;
  1084. @include u-flex(row, center, center);
  1085. }
  1086. &-info-name {
  1087. text-align: center;
  1088. padding-right: 30rpx;
  1089. border-right: 2rpx solid rgba(255,255,255,0.2);
  1090. }
  1091. &-info-status {
  1092. padding-left: 30rpx;
  1093. text-align: center;
  1094. }
  1095. &-info-r {
  1096. width: 192rpx;
  1097. height: 64rpx;
  1098. background: #FFFFFF;
  1099. border-radius: 32rpx 32rpx 32rpx 32rpx;
  1100. font-family: PingFang SC, PingFang SC;
  1101. font-weight: 500;
  1102. font-size: 26rpx;
  1103. color: #2583EB;
  1104. line-height: 64rpx;
  1105. text-align: center;
  1106. @include u-flex(row, center, center);
  1107. image {
  1108. height: 32rpx;
  1109. width: 32rpx;
  1110. }
  1111. }
  1112. }
  1113. .add-device {
  1114. width: 308rpx;
  1115. height: 308rpx;
  1116. background: #FFFFFF;
  1117. box-shadow: 0rpx 0rpx 14rpx 8rpx rgba(236,115,69,0.1);
  1118. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1119. @include u-flex(column, center, center);
  1120. font-family: PingFang SC, PingFang SC;
  1121. font-weight: 400;
  1122. font-size: 28rpx;
  1123. color: #757575;
  1124. .add-device-icon {
  1125. width: 144rpx;
  1126. height: 144rpx;
  1127. margin-bottom: 16rpx;
  1128. border-radius: 32rpx 32rpx 32rpx 32rpx;
  1129. border: 4rpx dashed #2583EB;
  1130. @include u-flex(column, center, center);
  1131. image {
  1132. width: 56rpx;
  1133. height: 56rpx;
  1134. }
  1135. }
  1136. }
  1137. .health-risks {
  1138. margin-top: 20rpx;
  1139. padding: 4rpx 16rpx 16rpx 16rpx;
  1140. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1141. box-sizing: border-box;
  1142. background: linear-gradient(180deg, #ebf5ff 0%, #FFFFFF 100%);
  1143. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1144. border: 2rpx solid;
  1145. border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 1)) 2 2;
  1146. &-title {
  1147. padding: 20rpx 12rpx;
  1148. @include u-flex(row, center, space-between);
  1149. font-weight: 400;
  1150. font-size: 24rpx;
  1151. color: #757575;
  1152. }
  1153. &-titlel {
  1154. font-weight: 600;
  1155. font-size: 32rpx;
  1156. color: #333333;
  1157. text {
  1158. color: #2583EB;
  1159. }
  1160. }
  1161. &-titler {
  1162. @include u-flex(row, center, flex-start);
  1163. image {
  1164. width: 32rpx;
  1165. height: 32rpx;
  1166. flex-shrink: 0;
  1167. }
  1168. }
  1169. &-msgnum {
  1170. min-width: 46rpx;
  1171. height: 28rpx;
  1172. padding: 0 12rpx;
  1173. line-height: 28rpx;
  1174. box-sizing: border-box;
  1175. background: linear-gradient(136deg, #EE7D4E 0%, #E86235 100%);
  1176. border-radius: 14rpx 14rpx 14rpx 14rpx;
  1177. font-weight: 400;
  1178. font-size: 20rpx;
  1179. color: #FFFFFF;
  1180. margin: 0 8rpx;
  1181. flex-shrink: 0;
  1182. text-align: center;
  1183. }
  1184. &-msg {
  1185. padding: 20rpx 16rpx 0 16rpx;
  1186. background: #FFFFFF;
  1187. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1188. color: #333333;
  1189. font-weight: 400;
  1190. font-size: 26rpx;
  1191. }
  1192. &-msgitem {
  1193. margin-bottom: 20rpx;
  1194. @include u-flex(row, center, space-between);
  1195. }
  1196. &-msgtxt {
  1197. line-height: 52rpx;
  1198. padding-left: 26rpx;
  1199. position: relative;
  1200. &::before {
  1201. content: "";
  1202. width: 8rpx;
  1203. height: 8rpx;
  1204. background: rgba(255, 119, 0, 0.5);
  1205. border-radius: 50%;
  1206. position: absolute;
  1207. left: 0;
  1208. top: 50%;
  1209. transform: translateY(-50%);
  1210. }
  1211. }
  1212. &-msgbtn {
  1213. min-width: 108rpx;
  1214. height: 48rpx;
  1215. padding: 0 24rpx;
  1216. margin-left: 50rpx;
  1217. box-sizing: border-box;
  1218. line-height: 48rpx;
  1219. background: #ebf5ff;
  1220. border-radius: 26rpx 26rpx 26rpx 26rpx;
  1221. flex-shrink: 0;
  1222. font-weight: 500;
  1223. font-size: 20rpx;
  1224. color: #2583EB;
  1225. }
  1226. }
  1227. .navbox {
  1228. @include u-flex(row, center, flex-start);
  1229. // gap: 16rpx;
  1230. margin-top: 20rpx;
  1231. .tongue-diagnosis {
  1232. flex: 1;
  1233. height: 160rpx;
  1234. margin-right: 16rpx;
  1235. background: linear-gradient(180deg, #FBE2B0 0%, #FFCA80 100%);
  1236. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1237. font-weight: 400;
  1238. font-size: 26rpx;
  1239. color: #D36208;
  1240. padding: 0 24rpx;
  1241. @include u-flex(row, center, space-between);
  1242. image {
  1243. width: 97rpx;
  1244. height: 96rpx;
  1245. }
  1246. &-title {
  1247. font-weight: 600;
  1248. font-size: 32rpx;
  1249. margin-bottom: 10rpx;
  1250. }
  1251. }
  1252. .health-report {
  1253. flex: 1;
  1254. height: 160rpx;
  1255. padding: 0 24rpx;
  1256. background: linear-gradient(180deg, #D6E3FF 0%, #95AFFF 100%);
  1257. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1258. font-weight: 400;
  1259. font-size: 26rpx;
  1260. color: #455FAD;
  1261. @include u-flex(row, center, space-between);
  1262. image {
  1263. width: 99rpx;
  1264. height: 105rpx;
  1265. }
  1266. &-title {
  1267. font-weight: 600;
  1268. font-size: 32rpx;
  1269. margin-bottom: 10rpx;
  1270. }
  1271. }
  1272. }
  1273. .box-title {
  1274. height: 80rpx;
  1275. margin-top: 20rpx;
  1276. line-height: 80rpx;
  1277. font-weight: 500;
  1278. font-size: 36rpx;
  1279. color: #222222;
  1280. @include u-flex(row, center, space-between);
  1281. &-right {
  1282. flex-shrink: 0;
  1283. }
  1284. .arrow_right_icon {
  1285. font-weight: 400;
  1286. font-size: 24rpx;
  1287. color: #757575;
  1288. @include u-flex(row, center, flex-start);
  1289. image {
  1290. height: 48rpx;
  1291. width: 48rpx;
  1292. }
  1293. }
  1294. &-rightedit {
  1295. min-width: 192rpx;
  1296. height: 64rpx;
  1297. padding: 0 32rpx;
  1298. box-sizing: border-box;
  1299. background: #FFFFFF;
  1300. border-radius: 32rpx 32rpx 32rpx 32rpx;
  1301. font-weight: 500;
  1302. font-size: 24rpx;
  1303. color: #757575;
  1304. @include u-flex(row, center, center);
  1305. image {
  1306. width: 24rpx;
  1307. height: 24rpx;
  1308. margin-right: 4rpx;
  1309. }
  1310. }
  1311. }
  1312. .health-monitoring {
  1313. @include u-flex(row, center, flex-start);
  1314. flex-wrap: wrap;
  1315. // gap: 16rpx;
  1316. margin-bottom: -16rpx;
  1317. margin-right: -16rpx;
  1318. &-item {
  1319. width: 343rpx;
  1320. min-height: 264rpx;
  1321. margin: 0 16rpx 16rpx 0;
  1322. overflow: hidden;
  1323. background: #FFFFFF;
  1324. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1325. padding: 24rpx 34rpx 24rpx 24rpx;
  1326. box-sizing: border-box;
  1327. }
  1328. &-maintitle {
  1329. margin-bottom: 4rpx;
  1330. font-weight: 500;
  1331. font-size: 30rpx;
  1332. color: #333333;
  1333. }
  1334. &-title {
  1335. @include u-flex(row, center, space-between);
  1336. font-weight: 400;
  1337. font-size: 24rpx;
  1338. color: #999999;
  1339. image {
  1340. width: 72rpx;
  1341. height: 72rpx;
  1342. flex-shrink: 0;
  1343. }
  1344. }
  1345. .resnum {
  1346. font-family: DIN, DIN;
  1347. font-weight: 500;
  1348. font-size: 64rpx;
  1349. }
  1350. &-res {
  1351. height: 78rpx;
  1352. margin: 20rpx 0 6rpx;
  1353. font-family: PingFang SC, PingFang SC;
  1354. font-weight: 600;
  1355. font-size: 48rpx;
  1356. color: #333333;
  1357. }
  1358. &-time {
  1359. font-weight: 400;
  1360. font-size: 22rpx;
  1361. color: #999999;
  1362. }
  1363. }
  1364. }
  1365. </style>