You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

93 lines
1.3 KiB

import request from "@/utils/request.js";
import {host} from "@/config/host.js";
/**
* 登录
* @param {Object} data
*/
export function testLogin(data) {
return request({
url: `${host}/user/gettoken`,
method: "get",
data
});
}
export function login(data) {
return request({
url: `${host}`,
method: "method",
data
});
}
export function userDetail() {
return request({
url: `${host}/user/detail`,
method: "post",
});
}
export function userExtends(data) {
return request({
url: `${host}/user/user-count`,
method: "post",
data
});
}
export function userCoupons(data) {
return request({
url: `${host}/user/coupons-list`,
method: "get",
data
});
}
export function appletLogin(code,phoneCode){
return request({
url: `${host}/user/login`,
method: "post",
data:{
code:code,
phone_code:phoneCode
}
})
}
/**
* 更新用户详情
* @param data
*/
export function updateUserDetail(data){
return request({
url:"user/updateInfo",
method:'post',
data:data
})
}
/**
* 在线沟通未读数量
* @param data
*/
export function userChatCount(data){
return request({
url:"user/chat-count",
method:'get',
data:data
})
}
/**
* 通过手机号获取token
* @param data
*/
export function tokenByPhone(data){
return request({
url:"user/gettokenbyphone",
method:'get',
data:data
})
}