diff --git a/src/utils/webapi.js b/src/utils/webapi.js index eae8ce4..860c926 100644 --- a/src/utils/webapi.js +++ b/src/utils/webapi.js @@ -153,8 +153,8 @@ export const apiUserState = async () => { // 邀请新人 export const apiUploadInviteCode = async (code) => { - const url = `${API_BASE}/api/activity/upload_invite_code`; - return httpGet(url, { code }) + const url = `${API_BASE}/api/activity/upload_invite_code/?code=${code}`; + return httpGet(url) } // 探索状态 diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 2f78745..8ef6dd3 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1165,7 +1165,6 @@ export default { // 领取助力奖励 || 判断是否是新用户 async helpConfirm() { - debugger if(this.$route.params.name != undefined) { let newInvite = this.$route.params.name.split("new=")[1]; // let rtoken = await checkReCaptcha("invite_user"); @@ -1173,6 +1172,7 @@ export default { // params: { code: newInvite, rtoken: rtoken }, // headers: { Authorization: `Bearer ${this.token}` } // }); + console.log("[code]", newInvite) let res = await apiUploadInviteCode(newInvite) if (res.data.errcode == 0) { this.isNewUser = 0