index.vue 23 KB

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