Commit c20410bf by 李伟康

学习拦截

1 parent f1a43d99
...@@ -129,6 +129,8 @@ ...@@ -129,6 +129,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.4620630861040068) calc(100vmin * (1173 / 768) * -0.4079283887468031);} 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); .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);} 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); .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);} 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); .icon-locker-icon { width: calc(100vmin * (1173 / 768) * 0.1466325660699062); height: calc(100vmin * (1173 / 768) * 0.20119352088661552);
...@@ -314,6 +316,4 @@ ...@@ -314,6 +316,4 @@
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489); .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);} 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); .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 \ 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 \ No newline at end of file
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</view> </view>
<learn-popup <learn-popup
ref="learn" ref="learn"
content="您有新的学习任务待完成,请及时处理。\n坚持学习助您能力提升!" content="您还没有完成本次对练考核,\n是否确定退出?"
@cancel="cancel" @cancel="cancel"
@confirm="confirm" @confirm="confirm"
/> />
...@@ -49,7 +49,9 @@ export default { ...@@ -49,7 +49,9 @@ export default {
return { return {
url: '', url: '',
title: '广联AI集市', title: '广联AI集市',
wv: null wv: null,
studyId: '',
presuppositionProblem: ''
} }
}, },
computed: { computed: {
...@@ -58,6 +60,9 @@ export default { ...@@ -58,6 +60,9 @@ export default {
}, },
}, },
onLoad (options) { 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 { 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 = {
...@@ -65,28 +70,29 @@ export default { ...@@ -65,28 +70,29 @@ export default {
2: '比亚迪', 2: '比亚迪',
3: '其他' 3: '其他'
}[channelType] }[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}` 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) { if (options.practice_status) {
this.url += `&practice_status=${options.practice_status}` this.url += `&practice_status=${options.practice_status}`
} }
if(options.businessType) { if (options.businessType) {
this.url += `&businessType=${options.businessType}` this.url += `&businessType=${options.businessType}`
} }
if(options.brandType) { if (options.brandType) {
this.url += `&brandType=${options.brandType}` this.url += `&brandType=${options.brandType}`
} }
if(options.date) { if (options.date) {
this.url += `&date=${options.date}` this.url += `&date=${options.date}`
} }
console.log(this.url,999) 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' // 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(() => { setTimeout(() => {
const currentWebview = this.$scope.$getAppWebview() const currentWebview = this.$scope.$getAppWebview()
const wv = currentWebview.children()[0] const wv = currentWebview.children()[0]
if (wv) { if (wv) {
wv.setStyle({ top: '10%',height:'90%'}) this.wv = wv
} wv.setStyle({ top: '10%', height: '90%' })
}, 1000) }
}, 1000)
}, },
onBackPress (options) { onBackPress (options) {
if (options.from === 'backbutton') { if (options.from === 'backbutton') {
...@@ -101,19 +107,33 @@ export default { ...@@ -101,19 +107,33 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
back () { async back () {
this.learnRef.open() try {
this.wv.setVisible(false) const { studyId ,presuppositionProblem} = this
// uni.$api.commonApi.getStudyCompleteStatus() if (studyId) {
console.log('back') uni.showLoading()
// uni.navigateBack() const { aiReviewReport } = await uni.$api.commonApi.getShortCourseDetail({ id: this.studyId })
// uni.$emit('aiBack') let item = aiReviewReport.find(e => e.tagName == presuppositionProblem)
// uni.$emit('pageBack') 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 () { cancel () {
this.wv.setVisible(true) this.wv.setVisible(true)
}, },
confirm(){ confirm () {
uni.navigateBack() uni.navigateBack()
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!