This commit is contained in:
2022-01-14 16:42:54 +08:00
parent 623709bfff
commit 85847171d4
4 changed files with 169 additions and 190 deletions

View File

@@ -23,6 +23,7 @@
<u-line-progress :percentage="percentplan3" activeColor="#34ce98" width="200rpx" class="line-progress" :showText="false" /> <u-line-progress :percentage="percentplan3" activeColor="#34ce98" width="200rpx" class="line-progress" :showText="false" />
</view> </view>
</view> </view>
<!-- 进度1 基本信息 --> <!-- 进度1 基本信息 -->
<view> <view>
<!-- 进度1 基本信息页面展示 性别 --> <!-- 进度1 基本信息页面展示 性别 -->
@@ -84,6 +85,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 进度2 健康目标 --> <!-- 进度2 健康目标 -->
<view> <view>
<!-- 减脂类型 --> <!-- 减脂类型 -->
@@ -154,7 +156,6 @@
</view> </view>
<!-- 进度3 行为习惯 --> <!-- 进度3 行为习惯 -->
<!-- 减脂类型 --> <!-- 减脂类型 -->
<view v-if="behaviorShow" class="plan-content target-content"> <view v-if="behaviorShow" class="plan-content target-content">
<u-image class="sex-item-avatar" width="100rpx" height="100rpx" :src="require('../../static/imgs/avatar-1.png')" :lazy-load="true" shape="circle" /> <u-image class="sex-item-avatar" width="100rpx" height="100rpx" :src="require('../../static/imgs/avatar-1.png')" :lazy-load="true" shape="circle" />

View File

@@ -125,7 +125,7 @@ export default {
.catch(err => { .catch(err => {
uni.showToast({ uni.showToast({
title: err.message title: err.message
}) });
}); });
} }
} }

View File

@@ -52,7 +52,7 @@ export default {
}); });
}, },
toResult() { toResult() {
console.log('点击了测试') console.log('点击了测试');
uni.navigateTo({ uni.navigateTo({
url: `/pages/evaluation/result?id=${this.$Route.query.id}` url: `/pages/evaluation/result?id=${this.$Route.query.id}`
}); });

View File

@@ -7,21 +7,10 @@
--> -->
<template> <template>
<view class="evaluation-list "> <view class="evaluation-list ">
<view <view class="evaluation-item" v-for="(item, index) in evalList" :key="index">
class="evaluation-item"
v-for="(item,index) in evalList"
:key="index"
>
<!-- 评测列表主要内容 标题 图片 描述 --> <!-- 评测列表主要内容 标题 图片 描述 -->
<view class="--content"> <view class="--content">
<u-image <u-image class="content-img" width="170rpx" height="170rpx" radius="20rpx" :src="item.cover ? item.cover : require('../../static/imgs/test.png')" :lazy-load="true" />
class="content-img"
width="170rpx"
height="170rpx"
radius="20rpx"
:src="item.cover?item.cover:require('../../static/imgs/test.png')"
:lazy-load="true"
/>
<view class="title-des"> <view class="title-des">
<view class="title">{{ item.title }}</view> <view class="title">{{ item.title }}</view>
<view class="des">{{ item.description || '--' }}</view> <view class="des">{{ item.description || '--' }}</view>
@@ -29,32 +18,21 @@
</view> </view>
<!-- 分数 --> <!-- 分数 -->
<view <view class="score" v-if="item.is_answer">
class="score" <span>{{ item.answer.total }}</span>
v-if="item.is_answer"
><span>{{item.answer.total}}</span></view> </view>
<!-- 评测状态 --> <!-- 评测状态 -->
<view class="--status"> <view class="--status">
<!-- 已测试展示 状态--> <!-- 已测试展示 状态-->
<view <view class="status" v-if="item.is_answer">
class="status" <span class="dian">·</span>
v-if="item.is_answer" {{ item.remark }}
>
<span class="dian">·</span>{{item.remark}}
</view>
<view
v-if="item.is_answer"
class="history"
@click="toResult(item)"
>
查看历史结果
</view> </view>
<view v-if="item.is_answer" class="history" @click="toResult(item)">查看历史结果</view>
<!-- 未测试展示 状态--> <!-- 未测试展示 状态-->
<view <view class="status" v-if="!item.is_answer">
class="status"
v-if="!item.is_answer"
>
<span class="dian">·</span> <span class="dian">·</span>
<span class="person">{{ item.remark }}</span> <span class="person">{{ item.remark }}</span>
人已测 | 约4~8分钟 人已测 | 约4~8分钟
@@ -79,11 +57,11 @@
</template> </template>
<script> <script>
import { evaluations } from "@/apis/interfaces/evaluation.js"; import { evaluations } from '@/apis/interfaces/evaluation.js';
export default { export default {
data() { data() {
return { return {
evalList: [], evalList: []
}; };
}, },
onShow() { onShow() {
@@ -92,23 +70,23 @@ export default {
methods: { methods: {
// 测试列表 // 测试列表
getList() { getList() {
evaluations().then((res) => { evaluations().then(res => {
this.evalList = res; this.evalList = res;
}); });
}, },
// nowEva // nowEva
nowEva(item) { nowEva(item) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/evaluation/introduce?id=${item.evaluation_id}`, url: `/pages/evaluation/introduce?id=${item.evaluation_id}`
}); });
}, },
//测评结果 //测评结果
toResult(item) { toResult(item) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/evaluation/result?id=${item.evaluation_id}`, url: `/pages/evaluation/result?id=${item.evaluation_id}`
}); });
}, }
}, }
}; };
</script> </script>