mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 18:06:44 +08:00
二次跳转接口对接
This commit is contained in:
committed by
li.yuetong
parent
f284e6a8c9
commit
a3108b3832
@@ -98,6 +98,15 @@ export function saveShareRecord(data) {
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
export function sharePosterLoading(data) {
|
||||
return request({
|
||||
url: getUrl('/agent/share/posterLoading', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取分享记录的key
|
||||
export function getShareKey(data) {
|
||||
return request({
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<script>
|
||||
import { Image, Lazyload, Grid, GridItem, Toast } from 'vant'
|
||||
import { saveShareRecord } from '@/api/ebiz/manpower/manpower'
|
||||
import { saveShareRecord,sharePosterLoading } from '@/api/ebiz/manpower/manpower'
|
||||
export default {
|
||||
components: {
|
||||
[Toast.name]: Toast,
|
||||
@@ -33,9 +33,9 @@ export default {
|
||||
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
|
||||
// debugger
|
||||
if (this.$route.query.token && this.$route.query.agentCode) {
|
||||
// this.herfUrl = this.$route.query.redirectUrl
|
||||
this.$CacheUtils.setLocItem('token',this.$route.query.token);
|
||||
this.initThisPage()
|
||||
}
|
||||
@@ -43,10 +43,12 @@ export default {
|
||||
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
|
||||
}
|
||||
let res = await this.saveShareRecord('1',this.$route.query.token,this.$route.query.linkType)
|
||||
await this.sharePosterLoading('1',this.$route.query.token,this.$route.query.linkType,this.$route.query.schoolName,this.$route.query.className)
|
||||
// console.log(111+newRes)
|
||||
// if (this.herfUrl) {
|
||||
// window.location.href = this.herfUrl
|
||||
// }
|
||||
},
|
||||
/**
|
||||
* 保存产品海报打开记录
|
||||
@@ -55,12 +57,11 @@ export default {
|
||||
* linkType 类型
|
||||
* shareUrl 分享的链接内容
|
||||
*/
|
||||
saveShareRecord(flag,key,linkType,shareUrl) {
|
||||
saveShareRecord(flag,key,linkType) {
|
||||
let data = {
|
||||
linkType: linkType,
|
||||
flag: flag,
|
||||
redisKey: key,
|
||||
shareUrl: shareUrl
|
||||
redisKey: key
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
saveShareRecord(data).then((res) => {
|
||||
@@ -68,7 +69,26 @@ export default {
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
sharePosterLoading(flag,key,linkType,schoolName,className) {
|
||||
let data = {
|
||||
linkType: linkType,
|
||||
flag: flag,
|
||||
redisKey: key,
|
||||
schoolName:schoolName,
|
||||
className:className
|
||||
}
|
||||
sharePosterLoading(data).then((res) => {
|
||||
console.log(res)
|
||||
if(res.result==0){
|
||||
window.location.href = res.content
|
||||
}else{
|
||||
return this.$toast(res.resultMessage)
|
||||
}
|
||||
// this.$toast.clear()
|
||||
// resolve(true)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user