fix invite bug

This commit is contained in:
yuexin 2024-04-13 23:39:39 +08:00
parent b673d2f90b
commit fc438913d6
2 changed files with 3 additions and 3 deletions

View File

@ -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)
}
// 探索状态

View File

@ -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