Commit 03822fc5 by 李伟康

学习中心拦截

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