| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666 |
- <template>
- <view class="content">
- <!-- 个人信息 -->
- <view :style="{height:statusBarHeight}"></view>
- <view class="top-box" >
- <!-- <view class="back-box x-f">
- <image src="/static/image/device/back_icon32.png"></image>
- <view @click="goBack()">返回</view>
- </view> -->
- <view class="back x-c" @click="$navBack()">
- <image src='/static/image/new/icon_back.svg'></image>
- 返回
- </view>
- <view class="tab-box">
- 健康报告
- </view>
- <!-- <view :style="{width: width < height ?'18px':'102px'}"></view> -->
- </view>
- <view class="user-info">
- <view class="info-box">
- <view class="left">
- <view class="head-box">
- <image class="img" src="@/static/images/pages_watch/images/my_heads_icon.png" mode="aspectFill">
- </image>
- </view>
- <view class="info">
- <text class="name one-t">{{userInfo.username}}</text>
- <div class="info-top">
- <text class="sex">性别:{{userInfo.sex==1?'男':userInfo.sex==0?'女':'-'}}</text>
- <text>年龄:{{userInfo.age|| '-'}}岁</text>
- </div>
- <div class="phone">
- 手机号:{{userInfo.phone|| '-'}}
- </div>
- </view>
- </view>
- <!-- <image class="right" src="@/static/image/my/icon_edit.png" mode="aspectFill" @click="editInfo"></image> -->
- </view>
- <view class="userinfo-list x-bc">
- <view class="userinfo-item x-bc">
- <view>
- <view>身高</view>
- <view style="margin-top: 8rpx;"><text class="num">{{userInfo.height || '--'}}</text>cm</view>
- </view>
- <image src="@/static/images/pages_watch/icons/height_icon.png" mode="aspectFill"></image>
- </view>
- <view class="userinfo-item x-bc">
- <view>
- <view>体重</view>
- <view style="margin-top: 8rpx;"><text class="num">{{userInfo.weight || '--'}}</text>kg</view>
- </view>
- <image src="@/static/images/pages_watch/icons/weight_icon.png" mode="aspectFill"></image>
- </view>
- </view>
- <!-- <view class="userinfo-list x-bc">
- <view class="userinfo-item">
- <view>
- <view>既往病史</view>
- <view style="margin-top: 8rpx;height: 80rpx;" class="two-t"><text
- class="txt">{{userInfo.previousMedicalHistory|| '--'}}</text></view>
- </view>
-
- </view>
- <view class="userinfo-item">
- <view>
- <view>过敏史</view>
- <view style="margin-top: 8rpx;height: 80rpx;" class="two-t"><text
- class="txt">{{userInfo.historyOfAllergies|| '--'}}</text></view>
- </view>
-
- </view>
- </view> -->
- </view>
- <!-- 详细信息 -->
- <view class="info-detail">
- <view class="item">
- <view class="x-bc">
- <text class="label">舌诊</text>
- <text class="time">{{infoTongue.createTime||'-'}}</text>
- </view>
- <view class="content" v-if="infoTongue">
- <view class="desc">
- {{infoTongue.taiseName||'无'}}:{{infoTongue.taiseDesc||'-'}}
- </view>
- <view class="desc">
- {{infoTongue.shemianName||'无'}}:{{infoTongue.shemianDesc||'-'}}
- </view>
- <view class="desc">
- {{infoTongue.botai==1?"有剥苔":"未见剥苔"}}:{{infoTongue.botaiDesc||'-'}}
- </view>
- <view class="desc">
- {{infoTongue.liewen==1?"有裂纹":"未见裂纹"}}:{{infoTongue.liewenDesc||'-'}}
- </view>
- <view class="desc">
- {{infoTongue.chihen==1?"有齿痕":"未见齿痕"}}:{{infoTongue.chihenDesc||'-'}}
- </view>
- </view>
- </view>
- <view class="item column">
- <view class="left">
- <view class="x-bc">
- <text class="label">面诊</text>
- <text class="time">{{formatCreateTime(infoSurface.createTime)||'-'}}</text>
- </view>
- <view class="content">
- <view class="desc">
- 面色:{{infoSurface.complexionResult||'-'}}
- </view>
- <view class="desc">
- 区域色斑:{{infoSurface.spotProblems||'-'}}
- </view>
- <view class="desc">
- 浮肿特征:{{infoSurface.swellingProblems||'-'}}
- </view>
- <view class="desc">
- 光泽度:{{infoSurface.glowResult||'-'}}
- </view>
- </view>
- </view>
- </view>
- <view class="item">
- <view class="x-bc">
- <text class="label">脉诊</text>
- <text class="time">{{infoPulse.createTime||'-'}}</text>
- </view>
- <view class="content">
- <view class="desc">
- 左手:{{leftHandResult}}
- </view>
- <view class="desc">
- 右手:{{rightHandResult}}
- </view>
- <view class="desc">
- 脉搏总结:{{infoPulse.pulseSummary||'-'}}
- </view>
- </view>
- </view>
- </view>
- <view class="footer" @click="addApp">
- <text>更多报告详情,请下载芳华未来APP</text>
- </view>
- <view v-if="isCode" class="mask">
- <view class="popup-container2">
- <view class="title-t">扫码下载APP</view>
- <!-- <view class="title-r">点击确认查看检测报告</view> -->
- <image style="width: 200px;height: 200px;margin-bottom: 20px;" src="@/static/images/afangh.png"></image>
- <view class="btn-r" @click="closeP">关闭</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- getUserInfoByUserId,
- selectQueryFsUser,
- getDiagnosis
- } from '@/api/user.js';
- export default {
- data() {
- return {
- statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 'px',
- avatar: "",
- nickName: "",
- deptName: "",
- postNames: "",
- phonenumber: "",
- email: "",
- sex: "",
- isShow: false,
- isCode:false,
- userId: undefined,
- userInfo: {},
- infoTongue: {},
- infoSurface: {},
- infoPulse: {},
- leftHandResult:null,
- rightHandResult:null,
- userId:null
- }
- },
- onLoad(options) {
- if (options.userId) {
- this.userId=options.userId
- this.getDiagnosis(this.userId)
- }
- //this.getDiagnosis('4054874814')
- },
- onShow() {
- },
- methods: {
- goBack(){
- uni.navigateBack({
- delta:1
- })
- },
- formatCreateTime(rawTime) {
- // 先处理“无时间”的情况,返回默认值 "-"
- if (!rawTime) return "-";
- const date = new Date(rawTime); // 将原始时间转为 Date 对象
- const year = date.getFullYear();
- const month = String(date.getMonth() + 1).padStart(2, "0"); // 月份从0开始,补0成两位数
- const day = String(date.getDate()).padStart(2, "0"); // 日期补0
- const hour = String(date.getHours()).padStart(2, "0"); // 小时补0
- const minute = String(date.getMinutes()).padStart(2, "0"); // 分钟补0
- const second = String(date.getSeconds()).padStart(2, "0");
- // 返回最终格式(可按需调整,如只显示日期则去掉 hour:minute)
- return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
- },
- closeP(){
- this.isCode=false
- },
- addApp() {
- this.isCode=true
- // let platform = uni.getSystemInfoSync().platform;
- // // let isAndroid=platform=="android";
- // if (platform === 'android') {
- // // #ifdef H5
- // window.open("https://m.malink.cn/s/2UZjMz", '_blank');
- // // #endif
- // } else if(platform === 'ios'){
- // // #ifdef H5
- // window.open("https://apps.apple.com/cn/app/%E8%8A%B3%E5%8D%8E%E6%9C%AA%E6%9D%A5/id6738688148",
- // '_blank');
- // // #endif
- // }
- },
- selectQueryFsUser(userId) {
- uni.showLoading({
- title: '加载中'
- })
- var data = {
- userId: userId
- };
- selectQueryFsUser(data).then(
- res => {
- if (res.code == 200) {
- this.userInfo = res.data
- uni.hideLoading()
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- uni.hideLoading()
- }
- },
- rej => {}
- );
- },
- getDiagnosis(userId) {
- uni.showLoading({
- title: '加载中'
- })
- var data = {
- userId: userId
- };
- getDiagnosis(data).then(
- res => {
- if (res.code == 200) {
- this.userInfo = res.data.user
- this.infoSurface = res.data.HealthSurface?res.data.HealthSurface:'暂无信息'
- this.infoTongue = res.data.HealthTongue?res.data.HealthTongue:'暂无信息'
- this.infoPulse = res.data.HealthPulse?res.data.HealthPulse:'暂无信息'
- this.leftHandResult=res.data.HealthPulse.leftHandResult?JSON.parse(res.data.HealthPulse.leftHandResult).leftHandResult:'-'
- this.rightHandResult=res.data.HealthPulse.rightHandResult?JSON.parse(res.data.HealthPulse.rightHandResult).rightHandResult:'-'
- uni.hideLoading()
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- uni.hideLoading()
- }
- },
- rej => {}
- );
- },
- }
- }
- </script>
- <style scoped lang="scss">
- page {
- background: #D8F6EF !important;
- }
- .back {
- width: 140px;
- height: 48px;
- background: rgba(255, 255, 255, 0.64);
- border-radius: 45px 45px 45px 45px;
- border: 2px solid #FFFFFF;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 22px;
- color: #327E6F;
-
- image {
- margin-right: 4px;
- width: 24px;
- height: 24px;
- }
- }
- .top-box {
- padding: 0 24rpx;
- margin-top: 20px;
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 30px;
-
- .title {
- font-family: Source Han Serif CN, Source Han Serif CN;
- font-weight: bold;
- font-size: 30px;
- color: #37C3A0;
- text-align: center;
- }
- .tab-box{
- font-size: 36rpx;
- color: #37C3A0;
- }
- .back-box {
- width: 102px;
- height: 47px;
- background: #FFFFFF;
- border-radius: 6px 6px 6px 6px;
- border: 1px solid #37C3A0;
- // padding: 12px 8px;
- justify-content: center;
-
- view {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 18px;
- color: #37C3A0;
- text-align: center;
- margin-left: 10px;
- }
-
- // position: absolute;
- // left: 30px;
- image {
- width: 24px;
- height: 24px;
- }
- }
-
- .select {
- min-width: 160px;
- height: 47px;
- background: #FFFFFF;
- border-radius: 6px 6px 6px 6px;
- border: 1px solid #37C3A0;
- padding: 12px;
- display: flex;
- align-items: center;
- justify-content: center;
-
- image {
- width: 24px;
- height: 24px;
-
- &:last-child {
- width: 12px;
- height: 12px;
- }
- }
-
- .date {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .text {
- margin-left: 10px;
- margin-right: 10px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 18px;
- color: #37C3A0;
- text-align: center;
- }
- }
- }
- .mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- justify-content: center;
- align-items: center;
- z-index: 999;
- animation: fadeIn 0.3s ease;
- }
- /* 弹窗容器样式 */
- .popup-container2 {
- //width: 50%;
- min-height: 250px;
- background: #FBF4EE;
- border-radius: 12px;
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
- animation: scaleIn 0.3s ease;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- padding: 30px 50px;
- .title-t {
- font-size: 24px;
- font-weight: bold;
- color: #37C3A0;
- text-align: center;
- margin-bottom: 20px;
- }
- .title-r {
- font-size: 20px;
- color: #37C3A0;
- text-align: center;
- padding: 20px 0;
- }
- .btn-r {
- text-align: center;
- background: #37C3A0;
- font-size: 20px;
- color: #FBF4EE;
- border-radius: 12px;
- width: 100%;
- height: 50px;
- line-height: 50px;
- }
- }
- .one-t {
- white-space: nowrap;
- /* 强制文本不换行 */
- overflow: hidden;
- /* 隐藏超出容器的内容 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- .two-t {
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- /* 强制显示2行,超出部分省略 */
- overflow: hidden;
- }
- .content {
- padding-bottom: 30rpx;
- // 个人信息
- .user-info {
- // background: #FBF4EE;
- padding: 0 24rpx;
- .info-box {
- margin-top: 20rpx;
- margin-bottom: 20rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- background: #FFFFFF;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- .left {
- width: 100%;
- display: flex;
- align-items: center;
- padding: 20rpx;
- .head-box {
- width: 120rpx;
- height: 120rpx;
- line-height: 100rpx;
- font-size: 30rpx;
- text-align: center;
- margin-right: 20rpx;
- .img {
- border-radius: 50%;
- width: 100%;
- height: 100%;
- }
- }
- .info {
- width: calc(100% - 140rpx);
- height: 120rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- color: #333;
- .name {
- font-size: 30rpx;
- }
- .info-top {
- color: #999999;
- font-size: 24rpx;
- .sex {
- margin-right: 20rpx;
- }
- }
- .phone {
- font-size: 24rpx;
- color: #999999;
- }
- .title {
- font-size: 28rpx;
- }
- }
- }
- .right {
- width: 40rpx;
- height: 40rpx;
- }
- }
- .userinfo-list {
- margin: 0 -16rpx 0 0;
- .userinfo-item {
- flex: 1;
- min-height: 136rpx;
- padding: 24rpx;
- box-sizing: border-box;
- margin: 0 16rpx 16rpx 0;
- background: #FFFFFF;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- font-family: PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #757575;
- image {
- width: 56rpx;
- height: 56rpx;
- }
- .num {
- font-family: DIN, DIN;
- font-weight: 500;
- font-size: 36rpx;
- color: #333333;
- margin-right: 10rpx;
- }
- .txt {
- font-family: PingFang SC;
- font-weight: 500;
- font-size: 24rpx;
- color: #333333;
- }
- }
- }
- .comp-info {
- padding: 20rpx 0 40rpx;
- display: flex;
- align-items: center;
- .img {
- width: 30rpx;
- height: 30rpx;
- margin-right: 20rpx;
- }
- .text {
- font-size: 30rpx;
- color: #fff;
- }
- }
- }
- // 详细信息
- .info-detail {
- padding: 0 24rpx;
- margin-top: 20rpx;
- overflow: hidden;
- .item {
- margin-bottom: 20rpx;
- border-bottom: 1px solid #f7f7f7;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .label {
- font-size: 36rpx;
- font-weight: bold;
- margin-right: 20rpx;
- }
- .time {
- font-weight: 400;
- font-size: 24rpx;
- color: #666666;
- }
- .content {
- margin-top: 20rpx;
- padding: 20rpx;
- font-family: PingFang SC;
- font-weight: 400;
- font-size: 28rpx;
- background: #FFFFFF;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- border: 1px solid #FBF4EE;
- .desc {
- margin-bottom: 20rpx;
- padding-left: 20rpx;
- position: relative;
- line-height: 40rpx;
- &::before {
- content: '';
- position: absolute;
- z-index: 9;
- top: 15rpx;
- left: 0;
- width: 10rpx;
- height: 10rpx;
- background: #37C3A0;
- border-radius: 5rpx;
- }
- }
- }
- }
- }
- .footer {
- margin: 30rpx 20rpx 0;
- padding: 20rpx 0;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- background: #37C3A0;
- font-size: 28rpx;
- color: #fff;
- text-align: center;
- }
- }
- </style>
|