Browse Source

答题优化

h5_css
yanyan 3 years ago
parent
commit
cf5016e727
  1. 20
      components/s-video/s-video.vue
  2. 8
      pages.json
  3. 3
      subpkg/practice/practice.vue

20
components/s-video/s-video.vue

@ -25,6 +25,7 @@
</template>
<script>
import { mapMutations, mapState } from 'vuex'
export default {
name: "s-video",
data() {
@ -41,6 +42,16 @@
preQuestionId: "",
};
},
computed: {
...mapState('m_user', ['userId'])
},
watch:{
jsonId:{
handler:function(){
this.getBindJson();
}
}
},
props:{
jsonId: {
type: String,
@ -73,14 +84,17 @@
this.end = true;
this.answerList = [];
this.question = false;
uni.navigateTo({
url: '/subpkg/complete/complete'
})
}
},
nextQuestion(outId, obj) {
// 点击开始后先增加题次
if(2==outId) {
this.$api.addQuestionFre({
roleId : "1",
userId : "123"
roleId : this.jsonId,
userId : this.userId
})
.then(res => {
this.questionFreId = res.data;
@ -102,7 +116,7 @@
}
// 播放下一视频
this.hasNodeId(outId);
this.videoObj.videoUrl = 'http://localhost:85/'+this.videoObj.videoUrl
this.videoObj.videoUrl = uni.$http.baseUrl + this.videoObj.videoUrl
this.start = false;
this.question = false;
this.auto = true;

8
pages.json

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

3
subpkg/practice/practice.vue

@ -13,13 +13,12 @@
data() {
return {
page: "",
jsonId: "d1d4007d09c24b84ab79fd9e7d2337c6",
jsonId: "",
roleId:"",
};
},
onLoad(options) {
this.jsonId = options.roleId
this.$emit('getJsonId',this.jsonId)
},
onReady() {
this.QR();

Loading…
Cancel
Save