提交 2730253a authored 作者: lihuihui's avatar lihuihui

updata

上级 731b1c5c
......@@ -27,10 +27,6 @@ export default class API {
return window.G.$instance_vue
}
isWeapp() {
return this.$store.state.isWeapp
}
/* 重新封装 请求时的执行函数 */
_request (_config = {}) {
/* 具体执行请求成功后业务逻辑前,先执行该方法 */
......@@ -98,18 +94,16 @@ export default class API {
const { status, data } = res.response
if (data) {
if (status === 402) {
console.log(this.isWeapp)
if (this.isWeapp) {
if (window.G.$instance_vue.$store.state.isWeapp) {
wx.miniProgram.navigateTo({ url: `/pages/web/index?src=${window.location.origin}/pay` })
} else {
window.G.$instance_vue.$router.replace({
path: '/pay'
})
}
// const routeData = window.G.$instance_vue.$router.resolve({
// name: 'pay'
// window.G.$instance_vue.$router.replace({
// path: '/pay'
// })
// window.open(routeData.href, '_blank')
}
}
err = new Error(JSON.stringify(res.response))
......
......@@ -27,8 +27,8 @@
<div v-else class="txt">您离成功还有一段距离,继续努力!</div>
</div>
<div class="nl-btn" v-if="title == '能力自测'">
<div class="btn" @click="$router.go(-1)">重做测试</div>
<div class="btn">学习课程</div>
<div class="btn" @click="goAbilityExam">重做测试</div>
<div class="btn" @click="goCourse">学习课程</div>
</div>
<div class="card">
<div class="tit">答题卡:</div>
......@@ -89,7 +89,7 @@
</div>
<div class="st-btn" v-if="title === '随堂测试'">
<div class="btn" @click="go(1)">全部解析</div>
<div class="btn" @click="go(-1)">解析</div>
<div class="btn" @click="go(-1)">解析</div>
</div>
</div>
</div>
......@@ -128,7 +128,31 @@ export default {
// this.title
this.initData()
},
computed: {
isWeapp() {
return this.$store.state.isWeapp
}
},
methods: {
goAbilityExam() {
this.$router.push({
path: '/exam/answer',
query: {
type: 1,
is_create: 1,
papersUrl: 'zy/v2/examination/examination-papers'
}
})
},
goCourse() {
if (this.isWeapp) {
wx.miniProgram.navigateTo({ url: `/pages/web/index?src=${window.location.origin}/course/learn` })
} else {
this.$router.push({
path: '/course/learn'
})
}
},
go(id) {
const param = this.$route.query
param.id = id
......
......@@ -5,7 +5,7 @@
<div class="time">{{ remainingTime }}</div>
<div class="tag-box">
<span @click="signQuestion" v-if="isExamEnd">标记</span>
<span @click="showCard">答题卡</span>
<span @click="showCard" v-if="isExamEnd">答题卡</span>
<span @click="submitShowPop" v-if="isExamEnd">交卷</span>
</div>
</div>
......@@ -283,9 +283,20 @@ export default {
sec--
if (sec === 0) {
clearInterval(this.clockCount)
this.remainingTime = '00:00:00'
this.timePopIsShow = true
return false
}
if (sec === 600) {
Toast({
duration: 1000,
message: '距离考试结束还有10分钟!'
})
const body = document.querySelector('body')
body.addEventListener('click', (e) => {
Toast.clear()
}, false)
}
this.remainingTime = this.secondToDate(sec)
}
this.questionsData.sheet.duration++
......@@ -407,6 +418,7 @@ export default {
} else {
this.questionsData = res
}
console.log(this.questionsData)
window.localStorage.userId = res.user_id
this.remainingTime = this.secondToDate(times)
this.setClock(times)
......@@ -614,6 +626,7 @@ export default {
}
}
.exp{
margin-top: .4rem;
overflow: hidden;
p{
float: left;
......
......@@ -58,7 +58,14 @@ png图片,可以方便你直接应用到自己的设计作品中,我们
</template>
</ul>
</div>
<div v-show="tabNav.navIndex === 2">3</div>
<div v-show="tabNav.navIndex === 2" class="tab3">
<ul>
<li>
<div class="tit">啊啊啊啊</div>
<van-icon name="arrow" class="arr"/>
</li>
</ul>
</div>
</div>
<div class="exam_submit" v-if="isExamPop">
<div class="pop">
......@@ -330,6 +337,25 @@ export default {
}
}
}
.tab3{
ul{
li{
display: flex;
padding: .4rem 0;
border-bottom: .01rem solid #eee;
align-items: center;
.tit{
width: 6.15rem;
color: rgba(34,34,34,1);
font-size: .3rem;
font-weight: bold;
}
.arr{
margin-left: auto;
}
}
}
}
}
}
.exam_submit{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论