From d6be7802c87121b3131f11f73a994a1939673208 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Tue, 14 Jan 2025 10:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C/=E4=BF=AE=E6=94=B9=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/login/login.js | 9 ++++++--- api/user/user.js | 11 +++++++++++ pages/login/bind.vue | 3 ++- pages/login/register.vue | 4 ++-- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/api/login/login.js b/api/login/login.js index f1f4109..3c54372 100644 --- a/api/login/login.js +++ b/api/login/login.js @@ -23,9 +23,10 @@ export const setSendMsg = (mobile,type) => { /** * 注册 */ -export const registerCode = (params) => { +export const register = (params) => { return http.request({ url: '/Login/registerCode', + method: 'POST', params: params }) } @@ -48,6 +49,8 @@ export const bind = (data) => { return http.request({ url: '/Login/registerCode', method: 'POST', - params: data + data: data }) -} \ No newline at end of file +} + + diff --git a/api/user/user.js b/api/user/user.js index 90028ef..291cad2 100644 --- a/api/user/user.js +++ b/api/user/user.js @@ -31,3 +31,14 @@ export const updateUsers = (data) => { data: data, }) } + +/** + * 修改手机号 + */ +export const updatePhone = (data) => { + return http.request({ + url: '/user/updatePhone', + method: 'POST', + params: data + }) +} \ No newline at end of file diff --git a/pages/login/bind.vue b/pages/login/bind.vue index 1e25199..c757442 100644 --- a/pages/login/bind.vue +++ b/pages/login/bind.vue @@ -20,6 +20,7 @@ import { reactive } from 'vue'; import { onLoad} from '@dcloudio/uni-app' import { setSendMsg, bind} from '@/api/login/login.js'; + import { updatePhone } from '@/api/user/user.js'; let data = reactive({ mobile: '', @@ -100,7 +101,7 @@ } else { uni.showLoading({ title: '正在绑定中...' }) - let res = await bind({ + let res = await updatePhone({ phone: mobile, // wxId: openId, // userId: userId, diff --git a/pages/login/register.vue b/pages/login/register.vue index 9509ea1..614f98c 100644 --- a/pages/login/register.vue +++ b/pages/login/register.vue @@ -48,7 +48,7 @@