3 changed files with 99 additions and 3 deletions
@ -0,0 +1,83 @@ |
|||||
|
<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> |
||||
Loading…
Reference in new issue