watchIndex.vue 39 KB

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