修改分享链接
This commit is contained in:
parent
c488a21a68
commit
2b259dafb9
@ -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
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user