From dacd8e7825e84d2a72664d362ff45427d4ac62be Mon Sep 17 00:00:00 2001 From: hxhxhx <2357034401@qq.com> Date: Sun, 27 Apr 2025 13:32:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=8D=E9=81=A5=E6=B8=B8=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/interstellareye/Registergame.vue | 51 +++++++++++++++----------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/pages/interstellareye/Registergame.vue b/pages/interstellareye/Registergame.vue index 3284832..974b798 100644 --- a/pages/interstellareye/Registergame.vue +++ b/pages/interstellareye/Registergame.vue @@ -190,28 +190,35 @@ }, success: (res) => { // console.log(res, 777777) - let token = res.data.data.userinfo.token - // 關聯錢包地址 - uni.request({ - url: 'https://www.samsaradao.com/api/user/refyzswallet', //仅为示例,并非真实接口地址。 - method: 'POST', - data: { - wallet: this.address - }, - header: { - token: token //自定义请求头信息 - }, - success: (res) => { - console.log('关联钱包地址res', res); - uni.showToast({ - title: '註冊成功!!' - }) - this.Searchregistration() - uni.switchTab({ - url: "/pages/interstellareye/interstellareye", // 注意路径 - }); - } - }); + if(res.data.code === 1){ + let token = res.data.data.userinfo.token + // 關聯錢包地址 + uni.request({ + url: 'https://www.samsaradao.com/api/user/refyzswallet', //仅为示例,并非真实接口地址。 + method: 'POST', + data: { + wallet: this.address + }, + header: { + token: token //自定义请求头信息 + }, + success: (res) => { + console.log('关联钱包地址res', res); + uni.showToast({ + title: '註冊成功!!' + }) + this.Searchregistration() + uni.switchTab({ + url: "/pages/interstellareye/interstellareye", // 注意路径 + }); + } + }); + }else{ + uni.showToast({ + title:res.data.msg, + icon:"error" + }) + } }, fail(rej) { uni.showToast({