mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 08:36:44 +08:00
因分享链接设置了的是60天失效,登录是30天失效,所以不校验登录token,其他模块也在用,所以保存产品海报打开记录功能,放在sharePosterLoading接口里由后端完成
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Image, Lazyload, Grid, GridItem, Toast } from 'vant'
|
import { Image, Lazyload, Grid, GridItem, Toast } from 'vant'
|
||||||
import { saveShareRecord,sharePosterLoading } from '@/api/ebiz/manpower/manpower'
|
import { sharePosterLoading } from '@/api/ebiz/manpower/manpower'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
[Toast.name]: Toast,
|
[Toast.name]: Toast,
|
||||||
@@ -34,17 +34,18 @@ export default {
|
|||||||
})
|
})
|
||||||
console.log(this.$route.query);
|
console.log(this.$route.query);
|
||||||
// debugger
|
// debugger
|
||||||
if (this.$route.query.token) {
|
if (this.$route.query.tooken) {
|
||||||
// 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()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
async initThisPage() {
|
async initThisPage() {
|
||||||
let res = await this.saveShareRecord('1',this.$route.query.token)
|
// 因分享链接设置了的是60天失效,登录是30天失效,所以不校验登录token,其他模块也在用,所以保存产品海报打开记录功能,放在sharePosterLoading接口里由后端完成
|
||||||
await this.sharePosterLoading('1',this.$route.query.token)
|
// let res = await this.saveShareRecord('1',this.$route.query.tooken)
|
||||||
|
await this.sharePosterLoading('1',this.$route.query.tooken)
|
||||||
// console.log(111+newRes)
|
// console.log(111+newRes)
|
||||||
// if (this.herfUrl) {
|
// if (this.herfUrl) {
|
||||||
// window.location.href = this.herfUrl
|
// window.location.href = this.herfUrl
|
||||||
@@ -57,24 +58,24 @@ export default {
|
|||||||
* linkType 类型
|
* linkType 类型
|
||||||
* shareUrl 分享的链接内容
|
* shareUrl 分享的链接内容
|
||||||
*/
|
*/
|
||||||
saveShareRecord(flag,key,linkType) {
|
// saveShareRecord(flag,key,linkType) {
|
||||||
let data = {
|
// let data = {
|
||||||
flag: flag,
|
// flag: flag,
|
||||||
redisKey: key
|
// redisKey: key
|
||||||
}
|
// }
|
||||||
return new Promise((resolve) => {
|
// return new Promise((resolve) => {
|
||||||
saveShareRecord(data).then((res) => {
|
// saveShareRecord(data).then((res) => {
|
||||||
this.$toast.clear()
|
// this.$toast.clear()
|
||||||
resolve(true)
|
// resolve(true)
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
sharePosterLoading(flag,key,linkType) {
|
sharePosterLoading(flag,key,linkType) {
|
||||||
let data = {
|
// let data = {
|
||||||
flag: flag,
|
// flag: flag,
|
||||||
redisKey: key,
|
// redisKey: key,
|
||||||
}
|
// }
|
||||||
sharePosterLoading(data).then((res) => {
|
sharePosterLoading({tooken:this.$route.query.tooken}).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.result==0){
|
if(res.result==0){
|
||||||
window.location.href = res.content
|
window.location.href = res.content
|
||||||
|
|||||||
Reference in New Issue
Block a user