修改分享链接

This commit is contained in:
yuyongdong 2024-04-16 17:54:44 +08:00
parent c488a21a68
commit 2b259dafb9
2 changed files with 11 additions and 33 deletions

View File

@ -97,7 +97,6 @@ export default {
boxData: {},
token: null,
helpLogList: [],
boxId: '',
boxCode: '',
boxState: {},
isNewUser: 0,
@ -108,14 +107,12 @@ export default {
mounted() {
this.token = getToken()
if(this.$route.params.name) {
if(this.$route.params.boxId.split("id=")[1] != 'undefined') {
this.boxId = this.$route.params.boxId.split("id=")[1];
if(this.$route.params.code.split("id=")[1] != 'undefined') {
this.boxCode = this.$route.params.box.split("box=")[1];
this.getBoxData()
if(this.token) {
this.getHelpBoxLog()
// this.helpConfirm()
this.initBoxState(this.boxCode,this.boxId)
this.initBoxState(this.boxCode)
}
// } else {
// this.$emit('handleClose')
@ -126,7 +123,7 @@ export default {
methods: {
//
async getBoxData() {
let res = await this.$axios.post(process.env.VUE_APP_API_URL+'/api/chest/enhance/state', {chestId: this.boxId},{})
let res = await this.$axios.post(process.env.VUE_APP_API_URL+'/api/chest/enhance/state', {chestId: this.boxCode},{})
if(res.data.errcode == 0) {
this.boxData = res.data.data
} else if(res.data.errcode == 14) {
@ -136,11 +133,11 @@ export default {
//
async getHelpBoxLog() {
if (this.$route.params.boxId != undefined) {
if (this.$route.params.code != undefined) {
let rtoken = await checkReCaptcha("chest_share");
let res = await this.$axios.post(
process.env.VUE_APP_API_URL+"/api/chest/enhance/list",
{ chestid: this.boxId, rtoken: rtoken },
{ chestid: this.boxCode, rtoken: rtoken },
{
headers: { Authorization: `Bearer ${this.token}` }
}
@ -151,25 +148,6 @@ export default {
}
},
// ||
async helpConfirm() {
if(this.$route.params.name != undefined) {
let newInvite = this.$route.params.name.split("new=")[1];
// let rtoken = await checkReCaptcha("invite_user");
// let res = await this.$axios.get(process.env.VUE_APP_API_URL+"/api/activity/upload_invite_code", {
// params: { code: newInvite, rtoken: rtoken },
// headers: { Authorization: `Bearer ${this.token}` }
// });
let res = await apiUploadInviteCode(newInvite)
return
if (res.data.errcode == 0) {
this.isNewUser = 0
} else {
this.isNewUser = 1
}
}
},
//
async helpBtn() {
let address = localStorage.getItem("myAddress")
@ -246,8 +224,8 @@ export default {
},
//
async initBoxState(code,chestId) {
let res = await this.$axios.post(process.env.VUE_APP_API_URL+'/api/chest/enhance/state',{code: code, chestId: chestId, },{headers: { Authorization: `Bearer ${this.token}` }})
async initBoxState(boxCode) {
let res = await this.$axios.post(process.env.VUE_APP_API_URL+'/api/chest/enhance/state',{chestId: boxCode, },{headers: { Authorization: `Bearer ${this.token}` }})
this.boxState = res.data.data
},

View File

@ -830,8 +830,8 @@ export default {
mounted() {
this.initData();
this.$nextTick(() => {
if (this.$route.params.name) {
if (this.$route.params.boxId.split("box=")[1] != "undefined") {
if (this.$route.params.code) {
if (this.$route.params.code.split("box=")[1] != "undefined") {
this.helpDialogVisible = true;
}
}
@ -852,8 +852,8 @@ export default {
this.myInviteCount = this.userData.inviteCount;
this.myEnhanceCount = this.userData.enhanceCount;
this.inWhiteList = this.userData.inWhiteList;
if (this.$route.params.name) {
if (this.$route.params.boxId.split("new=")[1] != "undefined") {
if (this.$route.params.code) {
if (this.$route.params.code.split("new=")[1] != "undefined") {
this.helpConfirm()
}
}