index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  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="@https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/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="@https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/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://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.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. getBmi() {
  266. let fat = ""
  267. if(this.recordInfo && JSON.stringify(this.recordInfo) != "{}") {
  268. if(!this.$isEmpty(this.recordInfo.weight) && !this.$isEmpty(this.recordInfo.weight)) {
  269. // 计算BMI值
  270. this.recordInfo.bmi = Math.round(this.recordInfo.weight / Math.pow(this.recordInfo.height / 100, 2));
  271. // 判断体重状态
  272. if (this.recordInfo.bmi < 18.5) {
  273. fat = "偏瘦";
  274. } else if (this.recordInfo.bmi < 24) {
  275. fat = "正常";
  276. } else if (this.recordInfo.bmi < 28) {
  277. fat = "超重";
  278. } else {
  279. fat = "肥胖";
  280. }
  281. // 添加推荐体重
  282. // let lowerBound = 18.5 * Math.pow(this.recordInfo.weight / 100, 2);
  283. // let upperBound = 24 * Math.pow(this.recordInfo.weight / 100, 2);
  284. }
  285. } else {
  286. this.recordInfo.bmi = ""
  287. }
  288. this.fat = fat
  289. },
  290. getHealthLife() {
  291. const param = {
  292. userId: this.user.userId
  293. }
  294. HealthLife(param).then(res => {
  295. if (res.code == 200 && res.data) {
  296. this.livingHabits[0].desc = res.data && res.data.eat ? this.resetData(JSON.parse(res.data.eat)) : ''
  297. this.livingHabits[1].desc = res.data && res.data.sleep ? this.resetData(JSON.parse(res.data.sleep)) : ''
  298. this.livingHabits[2].desc = res.data && res.data.sport ? this.resetData(JSON.parse(res.data.sport)) : ''
  299. }
  300. },
  301. rej => {}
  302. )
  303. },
  304. // 健康档案
  305. getMyRecord() {
  306. myRecord().then(res => {
  307. if (res.code == 200) {
  308. if(res.data) {
  309. this.hasRecord = true
  310. this.recordInfo = res.data
  311. this.healthRecordsList[0].desc = res.data.healthHistory ? this.resetData(JSON.parse(res.data.healthHistory)) : ""
  312. this.healthRecordsList[1].desc = res.data.symptomHistory ? this.resetData(JSON.parse(res.data.symptomHistory)) : ""
  313. this.healthRecordsList[2].desc = res.data.familyHistory ? this.resetData(JSON.parse(res.data.familyHistory)) : ""
  314. this.healthRecordsList[3].desc = res.data.drugHistory ? this.resetData(JSON.parse(res.data.drugHistory)) : ""
  315. this.healthRecordsList[4].desc = res.data.allergyHistory ? this.resetData(JSON.parse(res.data.allergyHistory)) : ""
  316. } else {
  317. this.hasRecord = false
  318. this.handelHealthRecord(1)
  319. }
  320. } else {
  321. uni.showToast({
  322. icon:'none',
  323. title: res.msg,
  324. });
  325. }
  326. this.getBmi()
  327. },
  328. rej => {}
  329. )
  330. },
  331. resetData(data) {
  332. let set = new Set();
  333. data.forEach(item => {
  334. item.question.forEach(it => {
  335. if (item.value.includes(it.name)) {
  336. if (it.isWrite == 1 && it.writeVal) {
  337. const str = it.name + "(" + it.writeVal + ")";
  338. set.add(str);
  339. } else {
  340. set.add(it.name);
  341. }
  342. } else if(item.name == '平时应酬' && it.name === '每周多少次'){
  343. if (it.writeVal) {
  344. const str = "每周" + it.writeVal + "次";
  345. set.add(str);
  346. }
  347. }
  348. });
  349. });
  350. return Array.from(set).join(",");
  351. },
  352. // 健康数据列表
  353. getHealthDataList() {
  354. const param = {
  355. pageNum: 1,
  356. pageSize: 10,
  357. userId: this.user.userId
  358. }
  359. HealthDataList(param).then(res => {
  360. if (res.code == 200 && res.data && res.data.length > 0) {
  361. this.healthData[0].data = res.data[0].bloodSugar
  362. this.healthData[0].date = res.data[0].creatTime
  363. } else {
  364. this.healthData[0].data = ""
  365. this.healthData[0].date = ""
  366. }
  367. },
  368. rej => {}
  369. );
  370. },
  371. handelHealthRecord(type) {
  372. if (type == 1) {
  373. uni.redirectTo({
  374. url: "./add"
  375. })
  376. } else {
  377. uni.navigateTo({
  378. url: "./add"
  379. })
  380. }
  381. },
  382. handleEditHealth(item,type) {
  383. // type 1:修改健康史相关 2:修改生活习惯
  384. if(type == 2 ) {
  385. uni.navigateTo({
  386. url: "./add?formType="+item.type
  387. })
  388. } else {
  389. uni.navigateTo({
  390. url: "./edit?id="+this.recordInfo.id + "&formType="+item.type
  391. })
  392. }
  393. },
  394. handleEdit(type) {
  395. if (type == "height") {
  396. this.title = "身高"
  397. this.placeholder = "请输入身高"
  398. this.inputValue = this.recordInfo.height || undefined
  399. } else if (type == "weight") {
  400. this.title = "体重"
  401. this.placeholder = "请输入体重"
  402. this.inputValue = this.recordInfo.weight || undefined
  403. }
  404. this.show=true;
  405. },
  406. close() {
  407. console.log(1)
  408. this.show=false;
  409. },
  410. // 修改身高/体重
  411. handleSubmit() {
  412. if(this.title == "身高") {
  413. // 判断字符串为正整数
  414. const reg = /^[1-9]\d*$/
  415. if(!reg.test(this.inputValue)) {
  416. uni.showToast({
  417. title: "请输入正确的身高",
  418. icon: "none"
  419. })
  420. return
  421. }
  422. }
  423. if(this.title == "体重") {
  424. // 判断字符串为数字且保留一位小数
  425. const reg = /^\d+(\.\d{1})?$/
  426. if(!reg.test(this.inputValue) || this.inputValue == 0) {
  427. uni.showToast({
  428. title: "请输入正确的体重",
  429. icon: "none"
  430. })
  431. return
  432. }
  433. }
  434. const param = {
  435. id: Number(this.recordInfo.id || 0),
  436. weight: this.title == "体重" ? this.inputValue : undefined,
  437. height: this.title == "身高" ? this.inputValue : undefined,
  438. };
  439. editRecord(param).then(res => {
  440. this.btnLoading = false
  441. if (res.code == 200) {
  442. this.recordInfo.weight = this.title == "体重" ? this.inputValue : this.recordInfo.weight
  443. this.recordInfo.height = this.title == "身高" ? this.inputValue : this.recordInfo.height
  444. this.getBmi()
  445. this.close()
  446. } else {
  447. uni.showToast({
  448. title: res.msg,
  449. icon: "none"
  450. })
  451. }
  452. },
  453. rej => {}
  454. )
  455. },
  456. clearInput(event) {
  457. this.inputValue = event.detail.value;
  458. if (event.detail.value.length > 0) {
  459. this.showClearIcon = true;
  460. } else {
  461. this.showClearIcon = false;
  462. }
  463. },
  464. clearIcon() {
  465. this.inputValue = '';
  466. this.showClearIcon = false;
  467. },
  468. }
  469. }
  470. </script>
  471. <style scoped lang="scss">
  472. .uni-nav-bar {
  473. position: fixed;
  474. top: 0;
  475. left: 0;
  476. width: 100%;
  477. z-index: 999;
  478. overflow: hidden;
  479. .uni-nav-bar_bg {
  480. width: 100%;
  481. position: absolute;
  482. top: 0;
  483. left: 0;
  484. }
  485. }
  486. .nav-bar{
  487. .grace-page-header {
  488. position: fixed;
  489. width: 100%;
  490. left: 0;
  491. top: 0;
  492. z-index: 98;
  493. border-bottom: 0px solid #FFFFFF;
  494. .grace-page-status-bar {
  495. width: 100%;
  496. height: 0;
  497. }
  498. .grace-page-header-nav {
  499. width: 100%;
  500. display: flex;
  501. flex-direction: row;
  502. flex-wrap: nowrap;
  503. align-items: center;
  504. justify-content: space-between;
  505. }
  506. }
  507. .title {
  508. font-family: PingFang SC, PingFang SC;
  509. font-weight: 500;
  510. font-size: 32rpx;
  511. color: #222222;
  512. line-height: 44rpx;
  513. }
  514. .content-header {
  515. height: 80rpx;
  516. padding: 0 24rpx;
  517. display: flex;
  518. flex-direction: row;
  519. align-items: center;
  520. justify-content: space-between;
  521. &-l {
  522. font-family: PingFang SC, PingFang SC;
  523. font-weight: 500;
  524. font-size: 26rpx;
  525. color: #FFFFFF;
  526. line-height: 28rpx;
  527. display: flex;
  528. flex-direction: row;
  529. align-items: center;
  530. justify-content: flex-start;
  531. .address {
  532. width: 20rpx;
  533. height: 30rpx;
  534. margin-right: 6rpx;
  535. }
  536. }
  537. &-title{
  538. display: flex;
  539. flex: 1;
  540. justify-content: center;
  541. align-items: center;
  542. font-size: 34rpx;
  543. font-weight: 444;
  544. color: #fff;
  545. }
  546. }
  547. }
  548. .container {
  549. position: relative;
  550. .jkda_top_bg {
  551. position: absolute;
  552. top: 0;
  553. left: 0;
  554. width: 100%;
  555. height: 300rpx;
  556. }
  557. &-body {
  558. position: relative;
  559. padding: 32rpx 24rpx;
  560. // #ifndef H5
  561. padding-top: calc(32rpx);
  562. // #endif
  563. // #ifdef H5
  564. padding-top: calc(var(--status-bar-height) + 100rpx);
  565. // #endif
  566. padding-bottom: calc(var(--window-bottom) + 170rpx);
  567. }
  568. }
  569. .popbox {
  570. background-color: #fff;
  571. // width: 630rpx;
  572. padding: 40rpx;
  573. box-sizing: border-box;
  574. border-radius: 32rpx 32rpx 32rpx 32rpx;
  575. overflow: hidden;
  576. font-family: PingFang SC, PingFang SC;
  577. font-weight: 500;
  578. &-title {
  579. font-size: 34rpx;
  580. color: #333333;
  581. text-align: center;
  582. }
  583. .uni-input-wrapper {
  584. width: 100%;
  585. height: 78rpx;
  586. margin-top: 36rpx;
  587. box-sizing: border-box;
  588. background: #FFFFFF;
  589. border-radius: 16rpx 16rpx 16rpx 16rpx;
  590. border: 2rpx solid #ECECEC;
  591. padding: 0 24rpx;
  592. display: flex;
  593. flex-direction: row;
  594. align-items: center;
  595. justify-content: space-between;
  596. .uni-icon {
  597. flex-shrink: 0;
  598. width: 32rpx;
  599. height: 32rpx;
  600. }
  601. }
  602. &-footer {
  603. margin-top: 40rpx;
  604. display: flex;
  605. flex-direction: row;
  606. align-items: center;
  607. justify-content: space-between;
  608. &-btn {
  609. width: 248rpx;
  610. height: 84rpx;
  611. border-radius: 42rpx 42rpx 42rpx 42rpx;
  612. font-size: 32rpx;
  613. vertical-align: middle;
  614. line-height: auto;
  615. align-items: center;
  616. text-align: center;
  617. &::after {
  618. border: none;
  619. }
  620. }
  621. .cancel {
  622. background: #F4F4F4;
  623. color: #757575;
  624. }
  625. .confirm {
  626. background: #FF5C03;
  627. color: #FFFFFF;
  628. }
  629. }
  630. }
  631. .userbox {
  632. margin-top: 80rpx;
  633. padding: 32rpx;
  634. background: #FFFFFF;
  635. border-radius: 16rpx 16rpx 16rpx 16rpx;
  636. display: flex;
  637. flex-direction: row;
  638. align-items: center;
  639. justify-content: space-between;
  640. &-headimg {
  641. flex-shrink: 0;
  642. width: 140rpx;
  643. height: 140rpx;
  644. image{
  645. width: 140rpx;
  646. height: 140rpx;
  647. border-radius: 50%;
  648. }
  649. }
  650. &-left {
  651. flex-shrink: 0;
  652. flex: 1;
  653. display: flex;
  654. flex-direction: row;
  655. align-items: center;
  656. justify-content: flex-start;
  657. }
  658. &-info {
  659. margin-left: 24rpx;
  660. font-family: PingFang SC, PingFang SC;
  661. font-weight: 600;
  662. font-size: 32rpx;
  663. color: #222222;
  664. &-tag {
  665. margin-top: 30rpx;
  666. font-weight: 400;
  667. font-size: 22rpx;
  668. color: #FF5C03;
  669. display: flex;
  670. flex-direction: row;
  671. align-items: center;
  672. justify-content: flex-start;
  673. view {
  674. min-width: 62rpx;
  675. height: 42rpx;
  676. padding: 0 20rpx;
  677. box-sizing: border-box;
  678. background: #FCF0E7;
  679. border-radius: 24rpx 24rpx 24rpx 24rpx;
  680. text-align: center;
  681. line-height: 42rpx;
  682. margin-right: 14rpx;
  683. }
  684. }
  685. }
  686. &-right {
  687. margin-left: 24rpx;
  688. image {
  689. width: 48rpx;
  690. height: 48rpx;
  691. }
  692. }
  693. }
  694. .box-title {
  695. height: 80rpx;
  696. line-height: 80rpx;
  697. border-radius: 16rpx 16rpx 16rpx 16rpx;
  698. font-family: PingFang SC, PingFang SC;
  699. font-weight: 500;
  700. font-size: 36rpx;
  701. color: #222222;
  702. margin: 20rpx 0;
  703. display: flex;
  704. flex-direction: row;
  705. align-items: center;
  706. justify-content: space-between;
  707. &-right {
  708. flex-shrink: 0;
  709. min-width: 240rpx;
  710. height: 64rpx;
  711. padding: 0 32rpx;
  712. box-sizing: border-box;
  713. background: #FFFFFF;
  714. border-radius: 32rpx 32rpx 32rpx 32rpx;
  715. font-size: 24rpx;
  716. color: #FF5C03;
  717. display: flex;
  718. flex-direction: row;
  719. align-items: center;
  720. justify-content: center;
  721. image {
  722. width: 24rpx;
  723. height: 24rpx;
  724. margin-right: 8rpx;
  725. }
  726. }
  727. }
  728. .cardbox {
  729. display: flex;
  730. flex-direction: row;
  731. align-items: center;
  732. justify-content: flex-start;
  733. flex-wrap: wrap;
  734. gap: 16rpx 14rpx;
  735. &-item {
  736. width: 344rpx;
  737. min-height: 264rpx;
  738. background: #FFFFFF;
  739. border-radius: 16rpx 16rpx 16rpx 16rpx;
  740. padding: 24rpx 24rpx 24rpx 24rpx;
  741. box-sizing: border-box;
  742. overflow: hidden;
  743. }
  744. .bmibox-tagbox {
  745. min-width: 72rpx;
  746. height: 40rpx;
  747. }
  748. .bmibox {
  749. &-tag {
  750. min-width: 72rpx;
  751. height: 40rpx;
  752. line-height: 40rpx;
  753. text-align: center;
  754. padding: 0 12rpx;
  755. box-sizing: border-box;
  756. display: inline-block;
  757. background: #FCF0E7;
  758. border-radius: 8rpx 8rpx 8rpx 8rpx;
  759. font-family: PingFang SC, PingFang SC;
  760. font-weight: 400;
  761. font-size: 24rpx;
  762. color: #FF5C03;
  763. }
  764. &-info {
  765. display: flex;
  766. flex-direction: row;
  767. align-items: center;
  768. justify-content: flex-start;
  769. font-family: PingFang SC, PingFang SC;
  770. font-weight: 400;
  771. font-size: 24rpx;
  772. color: #999999;
  773. }
  774. &-infolabel {
  775. min-width: 48rpx;
  776. flex-shrink: 0;
  777. }
  778. &-infoval {
  779. flex: 1;
  780. padding: 0 12rpx;
  781. text-align: center;
  782. font-weight: 500;
  783. color: #222222;
  784. }
  785. &-edit {
  786. width: 32rpx;
  787. height: 32rpx;
  788. flex-shrink: 0;
  789. }
  790. }
  791. &-maintitle {
  792. margin-bottom: 4rpx;
  793. font-weight: 600;
  794. font-size: 30rpx;
  795. color: #333333;
  796. }
  797. &-title {
  798. flex-direction: row;
  799. align-items: center;
  800. justify-content: space-between;
  801. font-weight: 400;
  802. font-size: 24rpx;
  803. color: #999999;
  804. image {
  805. width: 72rpx;
  806. height: 72rpx;
  807. flex-shrink: 0;
  808. }
  809. }
  810. .resnum {
  811. font-family: DIN, DIN;
  812. font-weight: 500;
  813. font-size: 64rpx;
  814. }
  815. &-res {
  816. height: 78rpx;
  817. margin: 20rpx 0 6rpx;
  818. font-family: PingFang SC, PingFang SC;
  819. font-weight: 600;
  820. font-size: 48rpx;
  821. color: #333333;
  822. }
  823. &-time {
  824. font-weight: 400;
  825. font-size: 22rpx;
  826. color: #999999;
  827. }
  828. }
  829. .health-item {
  830. width: 343rpx;
  831. height: 224rpx;
  832. padding: 24rpx;
  833. box-sizing: border-box;
  834. background: #FFFFFF;
  835. border-radius: 16rpx 16rpx 16rpx 16rpx;
  836. overflow: hidden;
  837. position: relative;
  838. font-family: PingFang SC, PingFang SC;
  839. font-weight: 400;
  840. font-size: 24rpx;
  841. color: #999999;
  842. }
  843. .health-item-info {
  844. position: relative;
  845. }
  846. .health-bgicon {
  847. position: absolute;
  848. right: 0;
  849. bottom: 0;
  850. width: 168rpx;
  851. height: 168rpx;
  852. }
  853. .text-overflow {
  854. word-break:break-all;
  855. overflow: hidden;
  856. text-overflow: ellipsis;
  857. display: -webkit-box;
  858. -webkit-line-clamp: 4;
  859. -webkit-box-orient: vertical;
  860. }
  861. .footer {
  862. width: 100%;
  863. height: 152rpx;
  864. padding: 20rpx 24rpx;
  865. box-sizing: border-box;
  866. background: #FFFFFF;
  867. box-shadow: 0rpx -6rpx 8rpx 0rpx rgba(114, 114, 114, 0.1);
  868. position: fixed;
  869. bottom: var(--window-bottom);
  870. left: 0;
  871. &-btn {
  872. height: 112rpx;
  873. background: #FF5C03;
  874. border-radius: 16rpx 16rpx 16rpx 16rpx;
  875. font-family: PingFang SC, PingFang SC;
  876. font-weight: 600;
  877. font-size: 34rpx;
  878. color: #FFFFFF;
  879. line-height: 112rpx;
  880. text-align: center;
  881. }
  882. }
  883. </style>