KindergartenAppletUI/pages/home/home.vue
2022-08-30 16:02:31 +08:00

161 lines
3.0 KiB
Vue

<template>
<view class="content">
<view class="test">幼儿体质检测记录</view>
<view class="score" v-for="item in StudentScore">
<view class="">
<view class="itemName">批次名称:{{item.batchName}}</view>
</view>
<view class="th">
<view class="overallScore">综合得分:{{item.totalFraction}}</view>
<view class="time">时间:{{item.createTime}}</view>
</view>
<view class="report">查看报告</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: 306rpx;
background-color: #eef9fc;
/* background-color: red; */
color: #707374;
margin-bottom: 70rpx;
border-radius: 20rpx;
font-size: 33rpx;
}
.itemName {
height: 100rpx;
/* width: 50%; */
/* border-right: lightsteelblue 2rpx solid; */
line-height: 55px;
/* padding-bottom: 15px; */
border-bottom: lightsteelblue 2rpx solid;
text-align: center;
/* padding-left: 40rpx; */
}
.overallScore {
height: 100rpx;
width: 50%;
border-right: lightsteelblue 2rpx solid;
line-height: 100rpx;
/* padding-bottom: 15px; */
border-bottom: lightsteelblue 2rpx solid;
text-align: center;
padding-left: 40rpx;
}
.time {
height: 100rpx;
width: 50%;
line-height: 100rpx;
border-bottom: lightsteelblue 2rpx solid;
text-align: center;
/* border-right: lightsteelblue 2rpx solid; */
/* background-color: #4486e8; */
/* float: left; */
}
.report {
height: 100rpx;
/* width: 50%; */
line-height: 100rpx;
text-align: center;
/* border-bottom: lightsteelblue 2rpx solid; */
/* margin-top: 100rpx; */
}
.th {
/* background-color: orange; */
display: flex;
justify-content: flex-start;
/* border-top:lightsteelblue 1px solid; */
}
</style>