Commit 03822fc5 by 李伟康

学习中心拦截

1 parent c20410bf
......@@ -51,7 +51,6 @@ export default {
title: '广联AI集市',
wv: null,
studyId: '',
presuppositionProblem: ''
}
},
computed: {
......@@ -62,7 +61,6 @@ export default {
onLoad (options) {
if (options.studyId) this.studyId = options.studyId
if (options.pageTitle) this.title = options.pageTitle
if (options.presuppositionProblem) this.presuppositionProblem = options.presuppositionProblem
const { sceneType, uuid, phone, channelType = 1 } = uni.$storage.get('userInfo')
const bussinessType = sceneType == 0 ? 1 : 2 // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
const brand = {
......@@ -109,20 +107,19 @@ export default {
methods: {
async back () {
try {
const { studyId ,presuppositionProblem} = this
const { studyId } = this
if (studyId) {
uni.showLoading()
const { aiReviewReport } = await uni.$api.commonApi.getShortCourseDetail({ id: this.studyId })
let item = aiReviewReport.find(e => e.tagName == presuppositionProblem)
console.log(item)
uni.hideLoading()
if(item && item.examStatus != 2){
let open = false
aiReviewReport.map(e => {
if (e.examStatus != 2 && !open) open = true
})
if (open) {
this.learnRef.open()
this.wv.setVisible(false)
}else {
uni.navigateBack()
uni.$emit('refreshStudyList')
}
} else this.confirm()
} else throw false
} catch (error) {
......@@ -135,6 +132,7 @@ export default {
},
confirm () {
uni.navigateBack()
uni.$emit('refreshStudyList')
}
}
......
......@@ -336,8 +336,10 @@ export default {
}
},
async getShortCourseDetail (id) {
uni.showLoading()
this.studyId = id
const res = await uni.$api.commonApi.getShortCourseDetail({ id })
uni.hideLoading()
// const res = {
// staffName: '许小奇',
// position: '驻店销售,带教导师',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!