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" />
</view>
</view>
<!-- 进度1 基本信息 -->
<view>
<!-- 进度1 基本信息页面展示 性别 -->
@@ -84,6 +85,7 @@
</view>
</view>
</view>
<!-- 进度2 健康目标 -->
<view>
<!-- 减脂类型 -->
@@ -154,7 +156,6 @@
</view>
<!-- 进度3 行为习惯 -->
<!-- 减脂类型 -->
<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" />

View File

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

View File

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

View File

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