Merge branch 'feature/GFRS-2097【待确定】培训系统优化' into dev

This commit is contained in:
yang.huaxiang
2021-01-08 15:24:10 +08:00

View File

@@ -4,7 +4,9 @@
正在跳转培训中心请稍候
<span>{{ time }}</span
><br />
<div class="next-step" @click="next">点击跳转</div>
<div class="next-step" @click="nextStep">点击跳转</div>
<br />
<div class="next-step" @click="next">初始化请求链接</div>
</div>
<!--<van-button class="mt20" type="info" @click="getDeviceInfo">getDeviceInfo</van-button>
<van-button class="mt20 mb20" type="info" @click="getUserInfo">getUserInfo</van-button>-->
@@ -25,13 +27,13 @@ export default {
data() {
return {
trainHomeUrl: '',
time: 10,
time: 5,
requestRes: ''
}
},
created() {
//this.initThisPage()
this.timeOut()
//this.timeOut()
},
methods: {
async getDeviceInfo() {
@@ -57,6 +59,7 @@ export default {
const res = await EWebBridge.webCallAppInJs('getDeviceInfo', {
secretKey: 'trainSecretKey'
})
console.log('getDeviceInfo', res)
trainHomeUrl({ deviceCode: res.uuid }).then(res => {
if (res.result == 0) {
this.trainHomeUrl = res.homeUrlDTO.fullPath
@@ -79,17 +82,23 @@ export default {
},
async next() {
// eslint-disable-next-line no-undef
const res = await EWebBridge.webCallAppInJs('getDeviceInfo', {
const response = await EWebBridge.webCallAppInJs('getDeviceInfo', {
secretKey: 'trainSecretKey'
})
trainHomeUrl({ deviceCode: res.uuid }).then(res => {
console.log('getDeviceInfo', response)
trainHomeUrl({ deviceCode: response.uuid }).then(res => {
console.log(res)
if (res.result == 0) {
this.trainHomeUrl = res.homeUrlDTO.fullPath
window.location.href = this.trainHomeUrl
this.$toast(this.trainHomeUrl)
//window.location.href = this.trainHomeUrl
} else {
this.$toast(res.resultMessage)
}
})
},
async nextStep() {
window.location.href = this.trainHomeUrl
}
}
}