35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
import request from './request';
|
|
|
|
export default {
|
|
genderKV:{
|
|
MALE:'先生',FEMALE:'女士'
|
|
},
|
|
login:(phone,password)=>request.post('/api/user/password-login',{phone,password,role:'merchant'}),
|
|
|
|
info:()=>request.get('/api/user/info'),
|
|
|
|
verifyCode:(phone)=>request.post('/api/user/send-code',{phone}),
|
|
summary:()=>request.get('/api/merchant/order/merchant/summary'),
|
|
incomeList:(data)=>request.get('/api/account/details',data),
|
|
|
|
modifyPassword:(phone,new_password,verify_code)=>request.post('/api/user/change-password',{phone,new_password,verify_code}),
|
|
|
|
summary:()=>request.get('/api/account/summary'),
|
|
|
|
|
|
bankCard:{
|
|
list:()=>request.get('/api/bank-cards'),
|
|
add:(data)=>request.post('/api/bank-cards',data),
|
|
delete:(card_id)=>request.delete(`/api/bank-cards/${card_id}`)
|
|
},
|
|
|
|
withdraw:{
|
|
add:(bank_card_id,amount)=>request.post('/api/withdraw',{bank_card_id,amount}),
|
|
list:(data)=>request.get('/api/withdraw/user',data),
|
|
statusKV:{
|
|
PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"审核未通过"
|
|
}
|
|
},
|
|
getRNAuth:()=>request.get('/api/user/auth',{},{noTips:true}),
|
|
setRNAuth:(data)=>request.post('/api/user/auth',data)
|
|
} |