From bb6aebd55fc9a8039e1c199ae1ea8af4eb547b1b Mon Sep 17 00:00:00 2001 From: queenwuli <942534046@qq.com> Date: Wed, 30 Dec 2020 10:32:41 +0800 Subject: [PATCH] gx --- hive-app/pages/member/skinDetectionDetail.vue | 112 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 56 insertions(+), 56 deletions(-) diff --git a/hive-app/pages/member/skinDetectionDetail.vue b/hive-app/pages/member/skinDetectionDetail.vue index b6618c7..a9c51a6 100644 --- a/hive-app/pages/member/skinDetectionDetail.vue +++ b/hive-app/pages/member/skinDetectionDetail.vue @@ -1,11 +1,9 @@ <template> <view> - <!-- #ifndef H5 --> - <view class="status_bar"></view> - <!-- #endif --> <view> <h-tabs class="tab" + :activeIndex="tabIndex" :tabData="tabs" :config="{ color: '#abb1cc', @@ -20,12 +18,12 @@ </view> <view class="content" v-if="tabIndex==0"> <view class="flex flex-v align-center font-13"> - <image class="content-header-img" src="../../static/images/head-img.jpg"></image> + <image class="content-header-img" :src="info.photo?info.photo:'../../static/images/default-avatar.png'"></image> <view class="flex mt-10"> - <text>姓名: 哦豁</text> - <text class="ml-10">性别: 女</text> + <text>姓名: {{info.vipName}}</text> + <text class="ml-10">性别: {{info.sex}}</text> </view> - <text class="mt-5 gray">生成时间: 2020-12-21 18:22</text> + <text class="mt-5 gray">生成时间: {{info.checkTime}}</text> </view> <view class="mt-20"> <view class="flex align-center"> @@ -33,13 +31,9 @@ <text class="font-15 font-bold">AI诊断结果(平均概率)</text> </view> <view class="font-13 flex ml-15 mt-10"> - <view class="flex align-center"> + <view class="flex align-center mr-20" v-for="item in info.diagnoseItems"> <text class="iconfont icondd small-dot red"></text> - <text>敏感肌肤: 50%</text> - </view> - <view class="flex align-center ml-20"> - <text class="iconfont icondd small-dot red"></text> - <text>衰老性皮肤: 50%</text> + <text>{{item.title}}: {{item.percentage}}%</text> </view> </view> </view> @@ -48,58 +42,52 @@ <text class="iconfont icondd big-dot"></text> <text class="font-15 font-bold">问题分析</text> </view> - <view class="flex problem-row align-center" v-for="item in 2"> + <view class="flex problem-row" v-for="item in info.analysisItems"> <view> - <image class="skin-img" src="../../static/images/head-img.jpg"></image> + <image class="skin-img" :src="item.img?item.img:'../../static/images/no-img.png'"></image> </view> <view class="flex flex-v"> <view> <text class="iconfont icondd small-dot"></text> - <text class="font-14">敏感肌肤</text> + <text class="font-14">{{item.title}}</text> </view> <text class="font-10 ml-10 mt-10 dark-gray">症状描述:</text> - <text class="font-10 ml-10 mt-5 gray">皮肤较薄,对外界刺激很敏感,敏感性症状可见于其他各种皮肤中,受到外界刺激时,会出现肌肤泛红,发热,瘙痒、刺痛等。</text> + <text class="font-10 ml-10 mt-5 gray">{{item.analysis}}</text> </view> </view> </view> </view> - <view class="content" v-else> - <view class="content-title center"> - <text class="font-16 font-bold blue">敏感肌肤</text> - </view> - <view class="flex content-row"> - <text class="iconfont icondd big-dot mt-10"></text> - <view class="flex flex-v content-row-right mr-10"> - <text class="font-15 font-bold">症状描述:</text> - <text class="gray mt-5 font-13">皮肤较薄,对外界刺激很敏感,敏感性症状可见于其他各种皮肤中,受到外界刺激时,会出现肌肤泛红,发热,瘙痒、刺痛等。</text> + <template v-else> + <view class="content" v-for="item in info.analysisItems"> + <view class="content-title center"> + <text class="font-16 font-bold blue">{{item.title}}</text> </view> - </view> - <view class="flex content-row"> - <text class="iconfont icondd big-dot mt-10"></text> - <view class="flex flex-v content-row-right mr-10"> - <text class="font-15 font-bold">建议护理:</text> - <text class="gray mt-5 font-13">使用肽妍多肽护理精华液深层清洁护理。</text> + <view class="flex content-row"> + <text class="iconfont icondd big-dot mt-10"></text> + <view class="flex flex-v content-row-right mr-10"> + <text class="font-15 font-bold">症状描述:</text> + <text class="gray mt-5 font-13">{{item.analysis}}</text> + </view> </view> - </view> - <view class="flex content-row"> - <text class="iconfont icondd big-dot mt-10"></text> - <view class="flex flex-v content-row-right mr-10"> - <text class="font-15 font-bold">建议使用产品:</text> - <view class="font-13 gray flex align-center mt-10"> - <text class="iconfont iconchanpin mr-5"></text> - <text>抗皱肽原液</text> + <view class="flex content-row"> + <text class="iconfont icondd big-dot mt-10"></text> + <view class="flex flex-v content-row-right mr-10"> + <text class="font-15 font-bold">建议护理:</text> + <text class="gray mt-5 font-13">{{item.solution}}。</text> </view> - <view class="font-13 gray flex align-center mt-10"> - <text class="iconfont iconchanpin mr-5"></text> - <text>眼部赋活肽原液</text> - </view> - <view class="font-13 gray flex align-center mt-10"> - <text class="iconfont iconchanpin mr-5"></text> - <text>多肽头皮护理营养精华液</text> + </view> + <view class="flex content-row"> + <text class="iconfont icondd big-dot mt-10"></text> + <view class="flex flex-v content-row-right mr-10"> + <text class="font-15 font-bold">建议使用产品:</text> + <view class="font-13 gray flex align-center mt-10" v-for="op in item.products"> + <text class="iconfont iconchanpin mr-5"></text> + <text>{{op}}</text> + </view> </view> </view> </view> - </view> + </template> </view> </template> @@ -113,25 +101,36 @@ return { tabs:[ { - state: 1, + state: 0, name: '问题分析' }, { - state: 2, + state: 1, name: '解决方案' } ], - tabIndex:0 + tabIndex:0, + info: {} } }, onLoad(options) { - uni.setNavigationBarTitle({ - title: options.title - }); + if(options.title){ + uni.setNavigationBarTitle({ + title: options.title + }); + } + this.loadInfo(options.id); }, methods:{ tabClick(index){ this.tabIndex=index + }, + loadInfo(id){ + this.$httpUtils.request('/api/skinCheck/findSkinCheckDetail/'+id).then((res) => { + if(res.status == 200){ + this.info = res.mapInfo.detail + } + }) } } } @@ -167,8 +166,8 @@ font-size: 10px; } .skin-img{ - width: 120px; - height: 120px; + width: 100px; + height: 100px; border-radius: 4px; } .problem-row{ @@ -185,6 +184,7 @@ padding-bottom: 10px; } .content-row-right{ + flex: 1; padding: 10px 0; border-bottom: 1px solid #EDEAF4; } -- Gitblit v1.9.1