index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936
  1. <template>
  2. <view class="container">
  3. <!-- <view class="uni-nav-bar">
  4. <uni-nav-bar fixed :statusBar="true" :border="false" title="健康档案" color="#fff" backgroundColor="transparent" left-icon="left" @click="$navBack()"></uni-nav-bar>
  5. <image class="uni-nav-bar_bg" src="@/static/images/healthRecords/jkda_top_bg.png" mode="widthFix"></image>
  6. </view> -->
  7. <image class="jkda_top_bg" :src="baseUrl+'/images/healthRecords/jkda_top_bg.png'" ></image>
  8. <view class="container-body">
  9. <view class="userbox">
  10. <view class="userbox-left">
  11. <view class="userbox-headimg">
  12. <image :src="defaultHeadimg" mode="aspectFill" style="width: 100%;height: 100%"></image>
  13. </view>
  14. <view class="userbox-info">
  15. <view>{{recordInfo.name || ""}}</view>
  16. <view class="userbox-info-tag">
  17. <view>{{recordInfo.sex == 1 ? '男':recordInfo.sex == 2 ? '女':'未知' }}</view>
  18. <view>{{recordInfo.age || "--"}}岁</view>
  19. </view>
  20. </view>
  21. </view>
  22. <!-- <view class="userbox-right">
  23. <image src="@/static/images/healthRecords/right_arrow_right_icon.png" mode="aspectFill"></image>
  24. </view> -->
  25. </view>
  26. <view class="box-title">
  27. <text>健康数据</text>
  28. <!-- <view class="box-title-right">
  29. <image :src="baseUrl+'/images/healthRecords/edit_add_orange_icon.png'" mode="aspectFill"></image>
  30. <text>绑定智能设备</text>
  31. </view> -->
  32. </view>
  33. <view class="cardbox">
  34. <view class="cardbox-item bmibox" style="height:auto;min-height: auto;">
  35. <view class="cardbox-title x-f">
  36. <view>
  37. <view class="cardbox-maintitle">BMI {{recordInfo.bmi || "--"}}</view>
  38. <view class="bmibox-tagbox"><view class="bmibox-tag" v-if="recordInfo.bmi">{{fat}}</view></view>
  39. </view>
  40. <image :src="baseUrl+'/images/healthRecords//BMI_icon.png'" mode="aspectFill"></image>
  41. </view>
  42. </view>
  43. <view class="cardbox-item bmibox" style="height:auto;min-height: auto;">
  44. <view class="bmibox-info">
  45. <text class="bmibox-infolabel">身高</text>
  46. <view class="bmibox-infoval">{{recordInfo.height || "--"}}cm</view>
  47. <image class="bmibox-edit" :src="baseUrl+'/images/healthRecords/services_edit_icon.png'"
  48. @click="handleEdit('height')"></image>
  49. </view>
  50. <view class="bmibox-info" style="margin-top: 12rpx;">
  51. <text class="bmibox-infolabel">体重</text>
  52. <view class="bmibox-infoval">{{recordInfo.weight || "--"}}kg</view>
  53. <image class="bmibox-edit" :src="baseUrl+'/images/healthRecords/services_edit_icon.png'"
  54. @click="handleEdit('weight')"></image>
  55. </view>
  56. </view>
  57. <!-- <view class="cardbox-item" v-for="(item,index) in healthData" :key="index">
  58. <view class="cardbox-title">
  59. <view>
  60. <view class="cardbox-maintitle">{{item.title}}</view>
  61. <view>{{item.desc}}</view>
  62. </view>
  63. <image :src="item.icon" mode="aspectFill"></image>
  64. </view>
  65. <view class="cardbox-res resnum">{{item.data || '--'}}</view>
  66. <view class="cardbox-time">{{item.date && item.date.substring(5,16)}}</view>
  67. </view> -->
  68. </view>
  69. <!-- 健康史 -->
  70. <view class="box-title">
  71. <text>健康史</text>
  72. </view>
  73. <view class="cardbox">
  74. <view class="health-item" v-for="(item,index) in healthRecordsList" :key="index" @click="handleEditHealth(item,1)">
  75. <image class="health-bgicon" :src="item.bgicon"></image>
  76. <view class="health-item-info">
  77. <view class="cardbox-maintitle" style="margin-bottom: 0;">{{item.title}}</view>
  78. <view class="text-overflow" style="margin-top: 20rpx;">{{item.desc || "尚未记录"}}</view>
  79. </view>
  80. </view>
  81. </view>
  82. <!-- 生活习惯 -->
  83. <view class="box-title">
  84. <text>生活习惯</text>
  85. </view>
  86. <view class="cardbox">
  87. <view class="health-item" v-for="(item,index) in livingHabits" :key="index" @click="handleEditHealth(item,2)">
  88. <image class="health-bgicon" :src="item.bgicon"></image>
  89. <view class="health-item-info">
  90. <view class="cardbox-maintitle" style="margin-bottom: 0;">{{item.title}}</view>
  91. <view class="text-overflow" style="margin-top: 20rpx;">{{item.desc || "尚未记录"}}</view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 修改身高体重弹窗 -->
  97. <u-popup :show="show" @close="close" >
  98. <view class="popbox">
  99. <view class="popbox-title">{{title}}</view>
  100. <view class="uni-input-wrapper">
  101. <input class="uni-input" type="number" focus :placeholder="placeholder" maxlength="5"
  102. :value="inputValue" @input="clearInput" />
  103. <image class="uni-icon" :src="baseUrl+'/images/healthRecords/input_close_icon.png'" v-if="showClearIcon"
  104. @click="clearIcon"></image>
  105. <text>{{title =="身高"?'cm':title =="体重"?'kg':''}}</text>
  106. </view>
  107. <view class="popbox-footer">
  108. <button class="popbox-footer-btn cancel" @click="close">取消</button>
  109. <button class="popbox-footer-btn confirm" :loading="btnLoading" :disabled="btnLoading"
  110. @click="handleSubmit">确认</button>
  111. </view>
  112. </view>
  113. </u-popup>
  114. <!-- footer -->
  115. <view class="footer" >
  116. <view class="footer-btn" @click="editHealthRecordLife">填写个人健康专属档案</view>
  117. </view>
  118. </view>
  119. </template>
  120. <script>
  121. import {getUserInfo} from '@/api/user';
  122. import {
  123. myRecord,
  124. HealthDataList,
  125. HealthLife,
  126. editRecord
  127. } from '@/api/healthRecords.js'
  128. export default {
  129. data() {
  130. return {
  131. show:false,
  132. baseUrl:uni.getStorageSync('requestPath'),
  133. opacity: 1,
  134. hasRecord: true, //是否填过档案
  135. user: {},
  136. fat: "",
  137. recordInfo: {},
  138. title: "身高",
  139. placeholder: "请输入身高",
  140. showClearIcon: false,
  141. inputValue: '',
  142. btnLoading: false,
  143. top:0,
  144. defaultHeadimg:uni.getStorageSync('requestPath')+"/images/healthRecords/my_heads_icon.png",
  145. healthData: [{
  146. title: '血糖',
  147. desc: '血糖健康监测',
  148. data: '',
  149. date: '',
  150. icon: uni.getStorageSync('requestPath')+"/images/healthRecords/blood_sugar_icon.png",
  151. }],
  152. healthRecordsList: [{
  153. title: '疾病史',
  154. type: "healthHistory",
  155. desc: '',
  156. bgicon: uni.getStorageSync('requestPath')+"/images/healthRecords/jbs_icon.png",
  157. }, {
  158. title: '症状史',
  159. type: "symptomHistory",
  160. desc: '',
  161. bgicon: uni.getStorageSync('requestPath')+"/images/healthRecords/zzs_icon.png",
  162. }, {
  163. title: '家族史',
  164. type: "familyHistory",
  165. desc: '',
  166. bgicon:uni.getStorageSync('requestPath')+"/images/healthRecords/jzs_icon.png",
  167. }, {
  168. title: '用药史',
  169. type: "drugHistory",
  170. desc: '',
  171. bgicon: uni.getStorageSync('requestPath')+"/images/healthRecords/yys_icon.png",
  172. }, {
  173. title: '过敏史',
  174. type: "allergyHistory",
  175. desc: '',
  176. bgicon: uni.getStorageSync('requestPath')+"/images/healthRecords/gms_icon.png",
  177. }],
  178. livingHabits: [{
  179. title: '饮食',
  180. desc: '',
  181. type: "dietList",
  182. bgicon:uni.getStorageSync('requestPath')+"/images/healthRecords/ys_icon.png",
  183. }, {
  184. title: '睡眠情况',
  185. desc: '',
  186. type: "sleepList",
  187. bgicon:uni.getStorageSync('requestPath')+"/images/healthRecords/smqk_icon.png",
  188. }, {
  189. title: '运动',
  190. desc: '',
  191. type: "sportList",
  192. bgicon: uni.getStorageSync('requestPath')+"/images/healthRecords/yd_icon.png",
  193. }],
  194. }
  195. },
  196. onLoad(option) {
  197. if(option.isShare!=null){
  198. this.companyId=option.companyId;
  199. this.companyUserId=option.companyUserId;
  200. }
  201. else{
  202. this.companyId=uni.getStorageSync('companyId');
  203. this.companyUserId=uni.getStorageSync('companyUserId');
  204. }
  205. this.baseUrl=uni.getStorageSync('requestPath')
  206. },
  207. onShow() {
  208. this.user = {}
  209. this.$isLogin().then(
  210. res => {
  211. if(res){
  212. this.getUserInfo();
  213. }
  214. },
  215. rej => {}
  216. );
  217. },
  218. onShareAppMessage(res) {
  219. //禁止二次转发--
  220. uni.showShareMenu({
  221. withShareTicket: true
  222. });
  223. wx.updateShareMenu({
  224. isPrivateMessage: true,
  225. withShareTicket: true,
  226. success(res) {
  227. console.log('updateShareMenu: ', res);
  228. },
  229. fail() {}
  230. });
  231. //禁止二次转发--end
  232. return {
  233. title: "健康档案",
  234. imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png',
  235. path: "/pages_user/healthRecords/index?isShare=1&companyId="+this.companyId+"&companyUserId="+this.companyUserId,
  236. }
  237. },
  238. methods: {
  239. editHealthRecordLife() {
  240. uni.navigateTo({
  241. url: "/pages_user/healthRecords/add?formType=healthLife"
  242. })
  243. },
  244. getUserInfo(){
  245. getUserInfo().then(
  246. res => {
  247. if(res.code==200){
  248. if(res.user!=null){
  249. this.user=res.user;
  250. this.defaultHeadimg=this.user.avatar;
  251. this.getMyRecord()
  252. // this.getHealthDataList()
  253. this.getHealthLife()
  254. }
  255. }else{
  256. uni.showToast({
  257. icon:'none',
  258. title: "请求失败",
  259. });
  260. }
  261. },
  262. rej => {}
  263. );
  264. },
  265. getImageUrl(url) {
  266. return new URL(url, import.meta.url).href;
  267. },
  268. getBmi() {
  269. let fat = ""
  270. if(this.recordInfo && JSON.stringify(this.recordInfo) != "{}") {
  271. if(!this.$isEmpty(this.recordInfo.weight) && !this.$isEmpty(this.recordInfo.weight)) {
  272. // 计算BMI值
  273. this.recordInfo.bmi = Math.round(this.recordInfo.weight / Math.pow(this.recordInfo.height / 100, 2));
  274. // 判断体重状态
  275. if (this.recordInfo.bmi < 18.5) {
  276. fat = "偏瘦";
  277. } else if (this.recordInfo.bmi < 24) {
  278. fat = "正常";
  279. } else if (this.recordInfo.bmi < 28) {
  280. fat = "超重";
  281. } else {
  282. fat = "肥胖";
  283. }
  284. // 添加推荐体重
  285. // let lowerBound = 18.5 * Math.pow(this.recordInfo.weight / 100, 2);
  286. // let upperBound = 24 * Math.pow(this.recordInfo.weight / 100, 2);
  287. }
  288. } else {
  289. this.recordInfo.bmi = ""
  290. }
  291. this.fat = fat
  292. },
  293. getHealthLife() {
  294. const param = {
  295. userId: this.user.userId
  296. }
  297. HealthLife(param).then(res => {
  298. if (res.code == 200 && res.data) {
  299. this.livingHabits[0].desc = res.data && res.data.eat ? this.resetData(JSON.parse(res.data.eat)) : ''
  300. this.livingHabits[1].desc = res.data && res.data.sleep ? this.resetData(JSON.parse(res.data.sleep)) : ''
  301. this.livingHabits[2].desc = res.data && res.data.sport ? this.resetData(JSON.parse(res.data.sport)) : ''
  302. }
  303. },
  304. rej => {}
  305. )
  306. },
  307. // 健康档案
  308. getMyRecord() {
  309. myRecord().then(res => {
  310. if (res.code == 200) {
  311. if(res.data) {
  312. this.hasRecord = true
  313. this.recordInfo = res.data
  314. this.healthRecordsList[0].desc = res.data.healthHistory ? this.resetData(JSON.parse(res.data.healthHistory)) : ""
  315. this.healthRecordsList[1].desc = res.data.symptomHistory ? this.resetData(JSON.parse(res.data.symptomHistory)) : ""
  316. this.healthRecordsList[2].desc = res.data.familyHistory ? this.resetData(JSON.parse(res.data.familyHistory)) : ""
  317. this.healthRecordsList[3].desc = res.data.drugHistory ? this.resetData(JSON.parse(res.data.drugHistory)) : ""
  318. this.healthRecordsList[4].desc = res.data.allergyHistory ? this.resetData(JSON.parse(res.data.allergyHistory)) : ""
  319. } else {
  320. this.hasRecord = false
  321. this.handelHealthRecord(1)
  322. }
  323. } else {
  324. uni.showToast({
  325. icon:'none',
  326. title: res.msg,
  327. });
  328. }
  329. this.getBmi()
  330. },
  331. rej => {}
  332. )
  333. },
  334. resetData(data) {
  335. let set = new Set();
  336. data.forEach(item => {
  337. item.question.forEach(it => {
  338. if (item.value.includes(it.name)) {
  339. if (it.isWrite == 1 && it.writeVal) {
  340. const str = it.name + "(" + it.writeVal + ")";
  341. set.add(str);
  342. } else {
  343. set.add(it.name);
  344. }
  345. } else if(item.name == '平时应酬' && it.name === '每周多少次'){
  346. if (it.writeVal) {
  347. const str = "每周" + it.writeVal + "次";
  348. set.add(str);
  349. }
  350. }
  351. });
  352. });
  353. return Array.from(set).join(",");
  354. },
  355. // 健康数据列表
  356. getHealthDataList() {
  357. const param = {
  358. pageNum: 1,
  359. pageSize: 10,
  360. userId: this.user.userId
  361. }
  362. HealthDataList(param).then(res => {
  363. if (res.code == 200 && res.data && res.data.length > 0) {
  364. this.healthData[0].data = res.data[0].bloodSugar
  365. this.healthData[0].date = res.data[0].creatTime
  366. } else {
  367. this.healthData[0].data = ""
  368. this.healthData[0].date = ""
  369. }
  370. },
  371. rej => {}
  372. );
  373. },
  374. handelHealthRecord(type) {
  375. if (type == 1) {
  376. uni.redirectTo({
  377. url: "./add"
  378. })
  379. } else {
  380. uni.navigateTo({
  381. url: "./add"
  382. })
  383. }
  384. },
  385. handleEditHealth(item,type) {
  386. // type 1:修改健康史相关 2:修改生活习惯
  387. if(type == 2 ) {
  388. uni.navigateTo({
  389. url: "./add?formType="+item.type
  390. })
  391. } else {
  392. uni.navigateTo({
  393. url: "./edit?id="+this.recordInfo.id + "&formType="+item.type
  394. })
  395. }
  396. },
  397. handleEdit(type) {
  398. if (type == "height") {
  399. this.title = "身高"
  400. this.placeholder = "请输入身高"
  401. this.inputValue = this.recordInfo.height || undefined
  402. } else if (type == "weight") {
  403. this.title = "体重"
  404. this.placeholder = "请输入体重"
  405. this.inputValue = this.recordInfo.weight || undefined
  406. }
  407. this.show=true;
  408. },
  409. close() {
  410. console.log(1)
  411. this.show=false;
  412. },
  413. // 修改身高/体重
  414. handleSubmit() {
  415. if(this.title == "身高") {
  416. // 判断字符串为正整数
  417. const reg = /^[1-9]\d*$/
  418. if(!reg.test(this.inputValue)) {
  419. uni.showToast({
  420. title: "请输入正确的身高",
  421. icon: "none"
  422. })
  423. return
  424. }
  425. }
  426. if(this.title == "体重") {
  427. // 判断字符串为数字且保留一位小数
  428. const reg = /^\d+(\.\d{1})?$/
  429. if(!reg.test(this.inputValue) || this.inputValue == 0) {
  430. uni.showToast({
  431. title: "请输入正确的体重",
  432. icon: "none"
  433. })
  434. return
  435. }
  436. }
  437. const param = {
  438. id: Number(this.recordInfo.id || 0),
  439. weight: this.title == "体重" ? this.inputValue : undefined,
  440. height: this.title == "身高" ? this.inputValue : undefined,
  441. };
  442. editRecord(param).then(res => {
  443. this.btnLoading = false
  444. if (res.code == 200) {
  445. this.recordInfo.weight = this.title == "体重" ? this.inputValue : this.recordInfo.weight
  446. this.recordInfo.height = this.title == "身高" ? this.inputValue : this.recordInfo.height
  447. this.getBmi()
  448. this.close()
  449. } else {
  450. uni.showToast({
  451. title: res.msg,
  452. icon: "none"
  453. })
  454. }
  455. },
  456. rej => {}
  457. )
  458. },
  459. clearInput(event) {
  460. this.inputValue = event.detail.value;
  461. if (event.detail.value.length > 0) {
  462. this.showClearIcon = true;
  463. } else {
  464. this.showClearIcon = false;
  465. }
  466. },
  467. clearIcon() {
  468. this.inputValue = '';
  469. this.showClearIcon = false;
  470. },
  471. }
  472. }
  473. </script>
  474. <style scoped lang="scss">
  475. .uni-nav-bar {
  476. position: fixed;
  477. top: 0;
  478. left: 0;
  479. width: 100%;
  480. z-index: 999;
  481. overflow: hidden;
  482. .uni-nav-bar_bg {
  483. width: 100%;
  484. position: absolute;
  485. top: 0;
  486. left: 0;
  487. }
  488. }
  489. .nav-bar{
  490. .grace-page-header {
  491. position: fixed;
  492. width: 100%;
  493. left: 0;
  494. top: 0;
  495. z-index: 98;
  496. border-bottom: 0px solid #FFFFFF;
  497. .grace-page-status-bar {
  498. width: 100%;
  499. height: 0;
  500. }
  501. .grace-page-header-nav {
  502. width: 100%;
  503. display: flex;
  504. flex-direction: row;
  505. flex-wrap: nowrap;
  506. align-items: center;
  507. justify-content: space-between;
  508. }
  509. }
  510. .title {
  511. font-family: PingFang SC, PingFang SC;
  512. font-weight: 500;
  513. font-size: 32rpx;
  514. color: #222222;
  515. line-height: 44rpx;
  516. }
  517. .content-header {
  518. height: 80rpx;
  519. padding: 0 24rpx;
  520. display: flex;
  521. flex-direction: row;
  522. align-items: center;
  523. justify-content: space-between;
  524. &-l {
  525. font-family: PingFang SC, PingFang SC;
  526. font-weight: 500;
  527. font-size: 26rpx;
  528. color: #FFFFFF;
  529. line-height: 28rpx;
  530. display: flex;
  531. flex-direction: row;
  532. align-items: center;
  533. justify-content: flex-start;
  534. .address {
  535. width: 20rpx;
  536. height: 30rpx;
  537. margin-right: 6rpx;
  538. }
  539. }
  540. &-title{
  541. display: flex;
  542. flex: 1;
  543. justify-content: center;
  544. align-items: center;
  545. font-size: 34rpx;
  546. font-weight: 444;
  547. color: #fff;
  548. }
  549. }
  550. }
  551. .container {
  552. position: relative;
  553. .jkda_top_bg {
  554. position: absolute;
  555. top: 0;
  556. left: 0;
  557. width: 100%;
  558. height: 300rpx;
  559. }
  560. &-body {
  561. position: relative;
  562. padding: 32rpx 24rpx;
  563. // #ifndef H5
  564. padding-top: calc(32rpx);
  565. // #endif
  566. // #ifdef H5
  567. padding-top: calc(var(--status-bar-height) + 100rpx);
  568. // #endif
  569. padding-bottom: calc(var(--window-bottom) + 170rpx);
  570. }
  571. }
  572. .popbox {
  573. background-color: #fff;
  574. // width: 630rpx;
  575. padding: 40rpx;
  576. box-sizing: border-box;
  577. border-radius: 32rpx 32rpx 32rpx 32rpx;
  578. overflow: hidden;
  579. font-family: PingFang SC, PingFang SC;
  580. font-weight: 500;
  581. &-title {
  582. font-size: 34rpx;
  583. color: #333333;
  584. text-align: center;
  585. }
  586. .uni-input-wrapper {
  587. width: 100%;
  588. height: 78rpx;
  589. margin-top: 36rpx;
  590. box-sizing: border-box;
  591. background: #FFFFFF;
  592. border-radius: 16rpx 16rpx 16rpx 16rpx;
  593. border: 2rpx solid #ECECEC;
  594. padding: 0 24rpx;
  595. display: flex;
  596. flex-direction: row;
  597. align-items: center;
  598. justify-content: space-between;
  599. .uni-icon {
  600. flex-shrink: 0;
  601. width: 32rpx;
  602. height: 32rpx;
  603. }
  604. }
  605. &-footer {
  606. margin-top: 40rpx;
  607. display: flex;
  608. flex-direction: row;
  609. align-items: center;
  610. justify-content: space-between;
  611. &-btn {
  612. width: 248rpx;
  613. height: 84rpx;
  614. border-radius: 42rpx 42rpx 42rpx 42rpx;
  615. font-size: 32rpx;
  616. vertical-align: middle;
  617. line-height: auto;
  618. align-items: center;
  619. text-align: center;
  620. &::after {
  621. border: none;
  622. }
  623. }
  624. .cancel {
  625. background: #F4F4F4;
  626. color: #757575;
  627. }
  628. .confirm {
  629. background: #FF5C03;
  630. color: #FFFFFF;
  631. }
  632. }
  633. }
  634. .userbox {
  635. margin-top: 80rpx;
  636. padding: 32rpx;
  637. background: #FFFFFF;
  638. border-radius: 16rpx 16rpx 16rpx 16rpx;
  639. display: flex;
  640. flex-direction: row;
  641. align-items: center;
  642. justify-content: space-between;
  643. &-headimg {
  644. flex-shrink: 0;
  645. width: 140rpx;
  646. height: 140rpx;
  647. image{
  648. width: 140rpx;
  649. height: 140rpx;
  650. border-radius: 50%;
  651. }
  652. }
  653. &-left {
  654. flex-shrink: 0;
  655. flex: 1;
  656. display: flex;
  657. flex-direction: row;
  658. align-items: center;
  659. justify-content: flex-start;
  660. }
  661. &-info {
  662. margin-left: 24rpx;
  663. font-family: PingFang SC, PingFang SC;
  664. font-weight: 600;
  665. font-size: 32rpx;
  666. color: #222222;
  667. &-tag {
  668. margin-top: 30rpx;
  669. font-weight: 400;
  670. font-size: 22rpx;
  671. color: #FF5C03;
  672. display: flex;
  673. flex-direction: row;
  674. align-items: center;
  675. justify-content: flex-start;
  676. view {
  677. min-width: 62rpx;
  678. height: 42rpx;
  679. padding: 0 20rpx;
  680. box-sizing: border-box;
  681. background: #FCF0E7;
  682. border-radius: 24rpx 24rpx 24rpx 24rpx;
  683. text-align: center;
  684. line-height: 42rpx;
  685. margin-right: 14rpx;
  686. }
  687. }
  688. }
  689. &-right {
  690. margin-left: 24rpx;
  691. image {
  692. width: 48rpx;
  693. height: 48rpx;
  694. }
  695. }
  696. }
  697. .box-title {
  698. height: 80rpx;
  699. line-height: 80rpx;
  700. border-radius: 16rpx 16rpx 16rpx 16rpx;
  701. font-family: PingFang SC, PingFang SC;
  702. font-weight: 500;
  703. font-size: 36rpx;
  704. color: #222222;
  705. margin: 20rpx 0;
  706. display: flex;
  707. flex-direction: row;
  708. align-items: center;
  709. justify-content: space-between;
  710. &-right {
  711. flex-shrink: 0;
  712. min-width: 240rpx;
  713. height: 64rpx;
  714. padding: 0 32rpx;
  715. box-sizing: border-box;
  716. background: #FFFFFF;
  717. border-radius: 32rpx 32rpx 32rpx 32rpx;
  718. font-size: 24rpx;
  719. color: #FF5C03;
  720. display: flex;
  721. flex-direction: row;
  722. align-items: center;
  723. justify-content: center;
  724. image {
  725. width: 24rpx;
  726. height: 24rpx;
  727. margin-right: 8rpx;
  728. }
  729. }
  730. }
  731. .cardbox {
  732. display: flex;
  733. flex-direction: row;
  734. align-items: center;
  735. justify-content: flex-start;
  736. flex-wrap: wrap;
  737. gap: 16rpx 14rpx;
  738. &-item {
  739. width: 344rpx;
  740. min-height: 264rpx;
  741. background: #FFFFFF;
  742. border-radius: 16rpx 16rpx 16rpx 16rpx;
  743. padding: 24rpx 24rpx 24rpx 24rpx;
  744. box-sizing: border-box;
  745. overflow: hidden;
  746. }
  747. .bmibox-tagbox {
  748. min-width: 72rpx;
  749. height: 40rpx;
  750. }
  751. .bmibox {
  752. &-tag {
  753. min-width: 72rpx;
  754. height: 40rpx;
  755. line-height: 40rpx;
  756. text-align: center;
  757. padding: 0 12rpx;
  758. box-sizing: border-box;
  759. display: inline-block;
  760. background: #FCF0E7;
  761. border-radius: 8rpx 8rpx 8rpx 8rpx;
  762. font-family: PingFang SC, PingFang SC;
  763. font-weight: 400;
  764. font-size: 24rpx;
  765. color: #FF5C03;
  766. }
  767. &-info {
  768. display: flex;
  769. flex-direction: row;
  770. align-items: center;
  771. justify-content: flex-start;
  772. font-family: PingFang SC, PingFang SC;
  773. font-weight: 400;
  774. font-size: 24rpx;
  775. color: #999999;
  776. }
  777. &-infolabel {
  778. min-width: 48rpx;
  779. flex-shrink: 0;
  780. }
  781. &-infoval {
  782. flex: 1;
  783. padding: 0 12rpx;
  784. text-align: center;
  785. font-weight: 500;
  786. color: #222222;
  787. }
  788. &-edit {
  789. width: 32rpx;
  790. height: 32rpx;
  791. flex-shrink: 0;
  792. }
  793. }
  794. &-maintitle {
  795. margin-bottom: 4rpx;
  796. font-weight: 600;
  797. font-size: 30rpx;
  798. color: #333333;
  799. }
  800. &-title {
  801. flex-direction: row;
  802. align-items: center;
  803. justify-content: space-between;
  804. font-weight: 400;
  805. font-size: 24rpx;
  806. color: #999999;
  807. image {
  808. width: 72rpx;
  809. height: 72rpx;
  810. flex-shrink: 0;
  811. }
  812. }
  813. .resnum {
  814. font-family: DIN, DIN;
  815. font-weight: 500;
  816. font-size: 64rpx;
  817. }
  818. &-res {
  819. height: 78rpx;
  820. margin: 20rpx 0 6rpx;
  821. font-family: PingFang SC, PingFang SC;
  822. font-weight: 600;
  823. font-size: 48rpx;
  824. color: #333333;
  825. }
  826. &-time {
  827. font-weight: 400;
  828. font-size: 22rpx;
  829. color: #999999;
  830. }
  831. }
  832. .health-item {
  833. width: 343rpx;
  834. height: 224rpx;
  835. padding: 24rpx;
  836. box-sizing: border-box;
  837. background: #FFFFFF;
  838. border-radius: 16rpx 16rpx 16rpx 16rpx;
  839. overflow: hidden;
  840. position: relative;
  841. font-family: PingFang SC, PingFang SC;
  842. font-weight: 400;
  843. font-size: 24rpx;
  844. color: #999999;
  845. }
  846. .health-item-info {
  847. position: relative;
  848. }
  849. .health-bgicon {
  850. position: absolute;
  851. right: 0;
  852. bottom: 0;
  853. width: 168rpx;
  854. height: 168rpx;
  855. }
  856. .text-overflow {
  857. word-break:break-all;
  858. overflow: hidden;
  859. text-overflow: ellipsis;
  860. display: -webkit-box;
  861. -webkit-line-clamp: 4;
  862. -webkit-box-orient: vertical;
  863. }
  864. .footer {
  865. width: 100%;
  866. height: 152rpx;
  867. padding: 20rpx 24rpx;
  868. box-sizing: border-box;
  869. background: #FFFFFF;
  870. box-shadow: 0rpx -6rpx 8rpx 0rpx rgba(114, 114, 114, 0.1);
  871. position: fixed;
  872. bottom: var(--window-bottom);
  873. left: 0;
  874. &-btn {
  875. height: 112rpx;
  876. background: #FF5C03;
  877. border-radius: 16rpx 16rpx 16rpx 16rpx;
  878. font-family: PingFang SC, PingFang SC;
  879. font-weight: 600;
  880. font-size: 34rpx;
  881. color: #FFFFFF;
  882. line-height: 112rpx;
  883. text-align: center;
  884. }
  885. }
  886. </style>