You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.1 KiB
84 lines
2.1 KiB
|
3 years ago
|
<template>
|
||
|
|
<view>
|
||
|
|
<span class="title">演练回顾</span>
|
||
|
|
<view class="background-info">
|
||
|
|
您已完成“{{sceneName}}”场景中 “{{roleName}}”〞角色挑战的共计{{total}}道题目,,每道题目和您选择的答案详情如下:
|
||
|
|
</view>
|
||
|
|
<scroll-view class="question-info" scroll-y>
|
||
|
|
<view class="question-list">
|
||
|
|
<view class="question-item" v-for="(item, i) in questionList" :key="i" @click="itemClickHandler(item)">
|
||
|
|
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</scroll-view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
"sceneName":"",
|
||
|
|
"roleName":"",
|
||
|
|
"total":0,
|
||
|
|
"questionFreId":"",
|
||
|
|
questionList:[]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
onLoad(options) {
|
||
|
|
this.questionFreId = options.questionFreId
|
||
|
|
this.getQuestionList()
|
||
|
|
this.getRelationInfo()
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
async getQuestionList() {
|
||
|
|
const {
|
||
|
|
data: res
|
||
|
|
} = await uni.$http.post('/small/questionAnswer/listAll',{questionFreId:this.questionFreId})
|
||
|
|
if (!res.success) return uni.$showMsg()
|
||
|
|
this.questionList = res.data
|
||
|
|
this.total = res.data.length
|
||
|
|
//uni.$showMsg('数据请求成功!')
|
||
|
|
},
|
||
|
|
async getRelationInfo() {
|
||
|
|
const {
|
||
|
|
data: res
|
||
|
|
} = await uni.$http.post('/small/questionFre/getRelationInfo',this.questionFreId)
|
||
|
|
if (!res.success) return uni.$showMsg()
|
||
|
|
if (res.data != null) {
|
||
|
|
this.roleName = res.data.sceneRole != null ? res.data.sceneRole.name : ""
|
||
|
|
this.sceneName = res.data.sceneManage != null ? res.data.sceneManage.name : ""
|
||
|
|
this.backgroundImg = res.data.file.length!=0 ? uni.$http.baseUrl +res.data.file[0].uploadPath : ""
|
||
|
|
}
|
||
|
|
//uni.$showMsg('数据请求成功!')
|
||
|
|
},
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style>
|
||
|
|
.title{
|
||
|
|
margin-left: 40%;
|
||
|
|
font-size: 20px;
|
||
|
|
}
|
||
|
|
.background-info{
|
||
|
|
border: 1px solid lightgreen;
|
||
|
|
width: 96%;
|
||
|
|
margin-left: 2%;
|
||
|
|
height: 200rpx;
|
||
|
|
border-radius: 10px;
|
||
|
|
}
|
||
|
|
.question-info{
|
||
|
|
border: 1px solid lightgreen;
|
||
|
|
width: 96%;
|
||
|
|
margin-top: 5%;
|
||
|
|
margin-left: 2%;
|
||
|
|
height: 880rpx;
|
||
|
|
border-radius: 10px;
|
||
|
|
}
|
||
|
|
.question-num{
|
||
|
|
width: 96%;
|
||
|
|
height: 60rpx;
|
||
|
|
}
|
||
|
|
</style>
|