修改分享链接

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: {}, boxData: {},
token: null, token: null,
helpLogList: [], helpLogList: [],
boxId: '',
boxCode: '', boxCode: '',
boxState: {}, boxState: {},
isNewUser: 0, isNewUser: 0,
@ -108,14 +107,12 @@ export default {
mounted() { mounted() {
this.token = getToken() this.token = getToken()
if(this.$route.params.name) { if(this.$route.params.name) {
if(this.$route.params.boxId.split("id=")[1] != 'undefined') { if(this.$route.params.code.split("id=")[1] != 'undefined') {
this.boxId = this.$route.params.boxId.split("id=")[1];
this.boxCode = this.$route.params.box.split("box=")[1]; this.boxCode = this.$route.params.box.split("box=")[1];
this.getBoxData() this.getBoxData()
if(this.token) { if(this.token) {
this.getHelpBoxLog() this.getHelpBoxLog()
// this.helpConfirm() this.initBoxState(this.boxCode)
this.initBoxState(this.boxCode,this.boxId)
} }
// } else { // } else {
// this.$emit('handleClose') // this.$emit('handleClose')
@ -126,7 +123,7 @@ export default {
methods: { methods: {
// //
async getBoxData() { 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) { if(res.data.errcode == 0) {
this.boxData = res.data.data this.boxData = res.data.data
} else if(res.data.errcode == 14) { } else if(res.data.errcode == 14) {
@ -136,11 +133,11 @@ export default {
// //
async getHelpBoxLog() { async getHelpBoxLog() {
if (this.$route.params.boxId != undefined) { if (this.$route.params.code != undefined) {
let rtoken = await checkReCaptcha("chest_share"); let rtoken = await checkReCaptcha("chest_share");
let res = await this.$axios.post( let res = await this.$axios.post(
process.env.VUE_APP_API_URL+"/api/chest/enhance/list", 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}` } 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() { async helpBtn() {
let address = localStorage.getItem("myAddress") let address = localStorage.getItem("myAddress")
@ -246,8 +224,8 @@ export default {
}, },
// //
async initBoxState(code,chestId) { async initBoxState(boxCode) {
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}` }}) 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 this.boxState = res.data.data
}, },

View File

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