mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-15 23:26:43 +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
|
// 获取分享记录的key
|
||||||
export function getShareKey(data) {
|
export function getShareKey(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Image, Lazyload, Grid, GridItem, Toast } from 'vant'
|
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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
[Toast.name]: Toast,
|
[Toast.name]: Toast,
|
||||||
@@ -33,9 +33,9 @@ export default {
|
|||||||
loadingType: 'spinner'
|
loadingType: 'spinner'
|
||||||
})
|
})
|
||||||
console.log(this.$route.query);
|
console.log(this.$route.query);
|
||||||
debugger
|
// debugger
|
||||||
if (this.$route.query.token && this.$route.query.redirectUrl && this.$route.query.agentCode) {
|
if (this.$route.query.token && this.$route.query.agentCode) {
|
||||||
this.herfUrl = this.$route.query.redirectUrl
|
// this.herfUrl = this.$route.query.redirectUrl
|
||||||
this.$CacheUtils.setLocItem('token',this.$route.query.token);
|
this.$CacheUtils.setLocItem('token',this.$route.query.token);
|
||||||
this.initThisPage()
|
this.initThisPage()
|
||||||
}
|
}
|
||||||
@@ -43,10 +43,12 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
async initThisPage() {
|
async initThisPage() {
|
||||||
let res = await this.saveShareRecord('1',this.$route.query.token,this.$route.query.linkType,this.$route.query.redirectUrl)
|
let res = await this.saveShareRecord('1',this.$route.query.token,this.$route.query.linkType)
|
||||||
if (this.herfUrl) {
|
await this.sharePosterLoading('1',this.$route.query.token,this.$route.query.linkType,this.$route.query.schoolName,this.$route.query.className)
|
||||||
window.location.href = this.herfUrl
|
// console.log(111+newRes)
|
||||||
}
|
// if (this.herfUrl) {
|
||||||
|
// window.location.href = this.herfUrl
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 保存产品海报打开记录
|
* 保存产品海报打开记录
|
||||||
@@ -55,12 +57,11 @@ export default {
|
|||||||
* linkType 类型
|
* linkType 类型
|
||||||
* shareUrl 分享的链接内容
|
* shareUrl 分享的链接内容
|
||||||
*/
|
*/
|
||||||
saveShareRecord(flag,key,linkType,shareUrl) {
|
saveShareRecord(flag,key,linkType) {
|
||||||
let data = {
|
let data = {
|
||||||
linkType: linkType,
|
linkType: linkType,
|
||||||
flag: flag,
|
flag: flag,
|
||||||
redisKey: key,
|
redisKey: key
|
||||||
shareUrl: shareUrl
|
|
||||||
}
|
}
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
saveShareRecord(data).then((res) => {
|
saveShareRecord(data).then((res) => {
|
||||||
@@ -68,7 +69,26 @@ export default {
|
|||||||
resolve(true)
|
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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user