Browse Source

演练回顾

h5_css
yanyan 3 years ago
parent
commit
fbb19d5a19
  1. 8
      pages.json
  2. 11
      subpkg/complete/complete.vue
  3. 83
      subpkg/review/review.vue

8
pages.json

@ -146,6 +146,14 @@
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
},
{
"path" : "review/review",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
}]
}],
"globalStyle": {

11
subpkg/complete/complete.vue

@ -24,7 +24,7 @@
<view class="perinfo">
<view class="myitem">
<span><button open-type="share"></button>炫耀一下</span>
<span>演练回顾</span>
<span @click="review()">演练回顾</span>
<span @click="reChallenge()">重新挑战</span>
</view>
</view>
@ -70,7 +70,7 @@
this.answer = this.questionList[0].answer;
}
uni.$showMsg('数据请求成功!')
//uni.$showMsg('')
},
async getRecordList() {
const {
@ -79,7 +79,7 @@
if (!res.success) return uni.$showMsg()
this.recordList = res.data
uni.$showMsg('数据请求成功!')
//uni.$showMsg('')
},
backIndex(){
uni.switchTab({
@ -91,6 +91,11 @@
url: '/subpkg/rechallenge/rechallenge?questionFreId='+this.questionFreId
})
},
review(){
uni.navigateTo({
url: '/subpkg/review/review?questionFreId='+this.questionFreId
})
},
itemClickHandler(item) {
if(item !== ""){
this.ask= item.ask

83
subpkg/review/review.vue

@ -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…
Cancel
Save