mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-21 21:46:44 +08:00
Merge branch 'feature/GFRS-2097【待确定】培训系统优化' into dev
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
<template>
|
||||
<div class="loading-content flex justify-content-c align-items-c">
|
||||
<div class="context-core text-center line-height">
|
||||
正在跳转培训中心,请稍候
|
||||
<span>{{ time }}</span
|
||||
>秒。<br />
|
||||
<div class="next-step" @click="nextStep">点击跳转</div>
|
||||
正在跳转培训中心,请稍候...
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Image as VanImage, Lazyload, Grid, GridItem } from 'vant'
|
||||
import { Image as VanImage, Lazyload, Grid, GridItem, Toast } from 'vant'
|
||||
import { trainHomeUrl } from '@/api/ebiz/train/train.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
[Toast.name]: Toast,
|
||||
[VanImage.name]: VanImage,
|
||||
[Grid.name]: Grid,
|
||||
[GridItem.name]: GridItem,
|
||||
@@ -29,6 +27,12 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
Toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
duration: 0,
|
||||
loadingType: 'spinner'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.initThisPage()
|
||||
}, 1000)
|
||||
@@ -41,12 +45,17 @@ export default {
|
||||
const response = await EWebBridge.webCallAppInJs('getDeviceInfo', {
|
||||
secretKey: 'trainSecretKey'
|
||||
})
|
||||
|
||||
// const response = await new Promise((resolve, reject) => {
|
||||
// setTimeout(() => {
|
||||
// resolve(JSON.stringify({ uuid: '232432413212' }))
|
||||
// }, 2000)
|
||||
// })
|
||||
let jsonResponse = JSON.parse(response)
|
||||
if (jsonResponse.uuid && jsonResponse.uuid != '') {
|
||||
const res = await trainHomeUrl({ deviceCode: jsonResponse.uuid })
|
||||
if (res.result == 0) {
|
||||
that.trainHomeUrl = res.homeUrlDTO.fullPath
|
||||
that.timeOut()
|
||||
window.location.href = res.homeUrlDTO.fullPath
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user