Files
ebiz-h5/src/views/ebiz/poster/PosterLoading.vue

87 lines
1.9 KiB
Vue

<template>
<div class="loading-content flex justify-content-c align-items-c">
<div class="context-core text-center line-height">
</div>
</div>
</template>
<script>
import { Image, Lazyload, Grid, GridItem, Toast } from 'vant'
import { saveShareRecord } from '@/api/ebiz/manpower/manpower'
export default {
components: {
[Toast.name]: Toast,
[Image.name]: Image,
[Grid.name]: Grid,
[GridItem.name]: GridItem,
[Lazyload.name]: Lazyload
},
data() {
return {
herfUrl: '',
time: 9,
requestRes: ''
}
},
mounted() {
Toast.loading({
message: '加载中...',
forbidClick: true,
duration: 0,
loadingType: 'spinner'
})
console.log(this.$route.query);
debugger
if (this.$route.query.token && this.$route.query.redirectUrl && this.$route.query.agentCode) {
this.herfUrl = this.$route.query.redirectUrl
this.$CacheUtils.setLocItem('token',this.$route.query.token);
this.initThisPage()
}
},
methods: {
// 初始化页面
async initThisPage() {
let res = await this.saveShareRecord('1',this.$route.query.token,this.$route.query.linkType,this.$route.query.redirectUrl)
if (this.herfUrl) {
window.location.href = this.herfUrl
}
},
/**
* 保存产品海报打开记录
* flag 0-分享 1-打开
* key redisKey
* linkType 类型
* shareUrl 分享的链接内容
*/
saveShareRecord(flag,key,linkType,shareUrl) {
let data = {
linkType: linkType,
flag: flag,
redisKey: key,
shareUrl: shareUrl
}
return new Promise((resolve) => {
saveShareRecord(data).then((res) => {
this.$toast.clear()
resolve(true)
})
})
}
}
}
</script>
<style lang="scss" scoped>
.loading-content {
width: 100vw;
height: 100vh;
flex-direction: column;
}
.next-step {
text-decoration: underline;
color: #5ca5ea;
}
</style>