注册/修改手机号优化
This commit is contained in:
parent
e38575f236
commit
d6be7802c8
|
|
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,3 +31,14 @@ export const updateUsers = (data) => {
|
|||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改手机号
|
||||
*/
|
||||
export const updatePhone = (data) => {
|
||||
return http.request({
|
||||
url: '/user/updatePhone',
|
||||
method: 'POST',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { onLoad} from '@dcloudio/uni-app'
|
||||
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
||||
import {setSendMsg,register} from '@/api/login/login.js';
|
||||
import {commonType} from '@/api/init.js';
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
|
||||
|
|
@ -235,7 +235,7 @@
|
|||
// #endif
|
||||
|
||||
|
||||
let res = await registerCode({
|
||||
let res = await register({
|
||||
password: password,
|
||||
phone: mobile,
|
||||
msg: code,
|
||||
|
|
|
|||
Loading…
Reference in New Issue