KindergartenAppletUI/pages/home/home.vue
2022-08-25 09:57:30 +08:00

165 lines
3.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="content">
<view class="test">幼儿体质检测记录</view>
<view class="score" v-for="item in StudentScore">
<view class="th">
<view class="itemName">{{item.batchName}}</view>
<view class="time">{{item.createTime}}</view>
</view>
<view class="th">
<view class="overallScore">综合得分:{{item.totalFraction}}</view>
<view class="report">查看报告</view>
</view>
</view>
<!-- <view class="score">
<view class="th">
<view class="itemName">弹跳</view>
<view class="time">2022/8/16</view>
</view>
<view class="th">
<view class="overallScore">综合得分89</view>
<view class="report">查看报告</view>
</view>
</view>
-->
</view>
</template>
<script>
import {
getStudentScore
} from '@/api/index/index.js'
export default {
data() {
return {
yonghuwx: [],
studentId: '',
StudentScore: [],
}
},
onLoad(options) {
console.log(options)
this.studentId=options.studentId
this.getStudentScore()
},
methods: {
getStudentScore() {
getStudentScore(this.studentId).then(res => {
console.log((res))
this.StudentScore = res.data;
})
},
getPhoneNumberp(val) {
wx.login({
provider: 'weixin',
success: function(loginRes) {
console.log(loginRes)
}
});
},
wxGetUserInfo() {
let that = this;
uni.getUserProfile({
desc: "获取用户信息",
lang: "zh_CN",
success(res) {
console.log(res)
that.yonghuwx = res.userInfo
},
fail(res) {
//失败则返回home页面
},
});
},
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
background-color: #ffffff;
min-height: 100vh;
background-image: linear-gradient(#55C5E3,#fff);
}
/* 测试成绩 */
.test {
width: 380rpx;
height: 104rpx;
line-height: 104rpx;
font-size: 40rpx;
/* background-color: #ffffff; */
color: #4486e8;
border-radius: 30%;
margin-top: 80rpx;
text-align: center;
margin-bottom: 50rpx;
}
.score {
/* position: absolute; */
width: 700rpx;
height: 205rpx;
background-color: #eef9fc;
color: #707374;
margin-bottom: 40rpx;
border-radius: 20rpx;
}
.itemName {
height: 100rpx;
width: 50%;
border-right: lightsteelblue 2rpx solid;
line-height: 50px;
/* padding-bottom: 15px; */
border-bottom: lightsteelblue 2rpx solid;
text-align: center;
}
.time {
height: 100rpx;
width: 50%;
line-height: 100rpx;
/* padding-bottom: 15px; */
border-bottom: lightsteelblue 2rpx solid;
/* margin-top: -51px; */
/* margin-left: 158px; */
text-align: center;
}
.overallScore {
height: 100rpx;
width: 50%;
border-right: lightsteelblue 2rpx solid;
line-height: 100rpx;
/* padding-bottom: 15px; */
/* border-bottom: #eeecec 1px solid; */
text-align: center;
}
.report {
height: 100rpx;
width: 50%;
line-height: 100rpx;
text-align: center;
}
.th {
/* background-color: orange; */
display: flex;
justify-content: flex-start;
/* border-top:lightsteelblue 1px solid; */
}
</style>