Commit c20410bf by 李伟康

学习拦截

1 parent f1a43d99
......@@ -129,6 +129,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.4620630861040068) calc(100vmin * (1173 / 768) * -0.4079283887468031);}
.icon-js-icon { width: calc(100vmin * (1173 / 768) * 0.05456095481670929); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.3674339300937766) calc(100vmin * (1173 / 768) * -0.3269394714407502);}
.icon-learn-bg { width: calc(100vmin * (1173 / 768) * 0.18073316283034954); height: calc(100vmin * (1173 / 768) * 0.05285592497868713);
background-position: calc(100vmin * (1173 / 768) * -0.15302642796248933) calc(100vmin * (1173 / 768) * -0.13256606990622335);}
.icon-level { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.3674339300937766) calc(100vmin * (1173 / 768) * -0.5839727195225917);}
.icon-locker-icon { width: calc(100vmin * (1173 / 768) * 0.1466325660699062); height: calc(100vmin * (1173 / 768) * 0.20119352088661552);
......@@ -314,6 +316,4 @@
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.5490196078431373) calc(100vmin * (1173 / 768) * -0.624467178175618);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.36061381074168797);}
.icon-learn-bg { width: calc(100vmin * (1173 / 768) * 0.18073316283034954); height: calc(100vmin * (1173 / 768) * 0.05285592497868713);
background-position: calc(100vmin * (1173 / 768) * -0.15302642796248933) calc(100vmin * (1173 / 768) * -0.13256606990622335);}
\ No newline at end of file
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.36061381074168797);}
\ No newline at end of file
......@@ -31,7 +31,7 @@
</view>
<learn-popup
ref="learn"
content="您有新的学习任务待完成,请及时处理。\n坚持学习助您能力提升!"
content="您还没有完成本次对练考核,\n是否确定退出?"
@cancel="cancel"
@confirm="confirm"
/>
......@@ -49,7 +49,9 @@ export default {
return {
url: '',
title: '广联AI集市',
wv: null
wv: null,
studyId: '',
presuppositionProblem: ''
}
},
computed: {
......@@ -58,6 +60,9 @@ 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 = {
......@@ -65,28 +70,29 @@ export default {
2: '比亚迪',
3: '其他'
}[channelType]
this.url = `${options.url}?no_header=1&business_type=${ bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${options.domain}&presuppositionProblem=${options.presuppositionProblem}`
if(options.practice_status) {
this.url += `&practice_status=${options.practice_status}`
}
if(options.businessType) {
this.url += `&businessType=${options.businessType}`
}
if(options.brandType) {
this.url += `&brandType=${options.brandType}`
}
if(options.date) {
this.url += `&date=${options.date}`
}
console.log(this.url,999)
// this.url='http://assistant.test.glsx.com.cn/chat/jHpvpOmuMWPxYxKo?business_type=12&brand=%E9%97%AE%E7%95%8C&one_id=266&platformType=2&no_header=1&domain=http://aiassistant.test.glsx.com.cn'
setTimeout(() => {
const currentWebview = this.$scope.$getAppWebview()
const wv = currentWebview.children()[0]
if (wv) {
wv.setStyle({ top: '10%',height:'90%'})
}
}, 1000)
this.url = `${options.url}?no_header=1&business_type=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${options.domain}&presuppositionProblem=${options.presuppositionProblem}`
if (options.practice_status) {
this.url += `&practice_status=${options.practice_status}`
}
if (options.businessType) {
this.url += `&businessType=${options.businessType}`
}
if (options.brandType) {
this.url += `&brandType=${options.brandType}`
}
if (options.date) {
this.url += `&date=${options.date}`
}
console.log(this.url, 999)
// this.url='http://assistant.test.glsx.com.cn/chat/jHpvpOmuMWPxYxKo?business_type=12&brand=%E9%97%AE%E7%95%8C&one_id=266&platformType=2&no_header=1&domain=http://aiassistant.test.glsx.com.cn'
setTimeout(() => {
const currentWebview = this.$scope.$getAppWebview()
const wv = currentWebview.children()[0]
if (wv) {
this.wv = wv
wv.setStyle({ top: '10%', height: '90%' })
}
}, 1000)
},
onBackPress (options) {
if (options.from === 'backbutton') {
......@@ -101,19 +107,33 @@ export default {
mounted () {
},
methods: {
back () {
this.learnRef.open()
this.wv.setVisible(false)
// uni.$api.commonApi.getStudyCompleteStatus()
console.log('back')
// uni.navigateBack()
// uni.$emit('aiBack')
// uni.$emit('pageBack')
async back () {
try {
const { studyId ,presuppositionProblem} = 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){
this.learnRef.open()
this.wv.setVisible(false)
}else {
uni.navigateBack()
uni.$emit('refreshStudyList')
}
} else throw false
} catch (error) {
uni.hideLoading()
this.confirm()
}
},
cancel () {
this.wv.setVisible(true)
},
confirm(){
confirm () {
uni.navigateBack()
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!