first commit
This commit is contained in:
50
api/modules/auth.js
Normal file
50
api/modules/auth.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request.js';
|
||||
|
||||
export const authApi = {
|
||||
verifyAsset(identifier) {
|
||||
return request({
|
||||
url: '/api/c/v1/auth/verify-asset',
|
||||
method: 'POST',
|
||||
data: { identifier }
|
||||
});
|
||||
},
|
||||
|
||||
wechatLogin(asset_token, code) {
|
||||
return request({
|
||||
url: '/api/c/v1/auth/wechat-login',
|
||||
method: 'POST',
|
||||
data: { asset_token, code }
|
||||
});
|
||||
},
|
||||
|
||||
sendCode(phone, scene) {
|
||||
return request({
|
||||
url: '/api/c/v1/auth/send-code',
|
||||
method: 'POST',
|
||||
data: { phone, scene }
|
||||
});
|
||||
},
|
||||
|
||||
bindPhone(phone, code) {
|
||||
return request({
|
||||
url: '/api/c/v1/auth/bind-phone',
|
||||
method: 'POST',
|
||||
data: { phone, code }
|
||||
});
|
||||
},
|
||||
|
||||
changePhone(old_phone, old_code, new_phone, new_code) {
|
||||
return request({
|
||||
url: '/api/c/v1/auth/change-phone',
|
||||
method: 'POST',
|
||||
data: { old_phone, old_code, new_phone, new_code }
|
||||
});
|
||||
},
|
||||
|
||||
logout() {
|
||||
return request({
|
||||
url: '/api/c/v1/auth/logout',
|
||||
method: 'POST'
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user