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