mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
104 lines
1.7 KiB
JavaScript
104 lines
1.7 KiB
JavaScript
import config from '@/config/index.js'
|
|
import ajax from '../ajax';
|
|
const baseURL = config.socialApiBaseUrl;
|
|
|
|
|
|
/**
|
|
* 添加关注
|
|
* @param{
|
|
* followId
|
|
* }
|
|
* */
|
|
const save=function (followId){
|
|
return ajax.get(baseURL,'/xboe/subgroup/m/userfollow/save?followId='+followId);
|
|
}
|
|
|
|
/**
|
|
* 检查是否已关注
|
|
* @param{
|
|
* followId
|
|
* }
|
|
* */
|
|
const checkFllow=function (followId){
|
|
return ajax.get(baseURL,'/xboe/subgroup/m/userfollow/checkFllow?followId='+followId);
|
|
}
|
|
|
|
/**
|
|
* 取消关注
|
|
*
|
|
* */
|
|
const remove=function (followId){
|
|
return ajax.get(baseURL,'/xboe/subgroup/m/userfollow/remove?followId='+followId);
|
|
}
|
|
|
|
/**
|
|
* 我关注的人列表
|
|
* @param{
|
|
* pageIndex
|
|
* pageSize,
|
|
* aid
|
|
* }
|
|
* */
|
|
const page=function (query){
|
|
return ajax.post(baseURL,'/xboe/subgroup/m/userfollow/page',query);
|
|
}
|
|
|
|
/**
|
|
* 我关注的人列表
|
|
* @param{
|
|
* pageIndex
|
|
* pageSize,
|
|
* aid
|
|
* }
|
|
* */
|
|
const mypage=function (query){
|
|
return ajax.post(baseURL,'/xboe/subgroup/m/userfollow/mypage',query);
|
|
}
|
|
|
|
/**
|
|
* 二次查询
|
|
* */
|
|
const ids=function (data){
|
|
return ajax.postJson(baseURL,'/xboe/subgroup/m/userfollow/ids',data);
|
|
}
|
|
|
|
/**
|
|
* 被关注数
|
|
* 关注数
|
|
* @pram{
|
|
* aid
|
|
* }
|
|
* */
|
|
const counts=function (aid){
|
|
return ajax.get(baseURL,'/xboe/subgroup/m/userfollow/counts?aid='+aid);
|
|
}
|
|
|
|
/**
|
|
* 查询是否已关注
|
|
* @param{
|
|
* followId 关注人的id
|
|
* }
|
|
* */
|
|
const has=function (followId){
|
|
return ajax.get(baseURL,'/xboe/subgroup/m/userfollow/has?followId='+followId);
|
|
}
|
|
|
|
/**
|
|
* 我的关注二次查询
|
|
* */
|
|
const list=function (){
|
|
return ajax.get(baseURL,'/xboe/subgroup/m/userfollow/list');
|
|
}
|
|
|
|
export default {
|
|
save,
|
|
remove,
|
|
page,
|
|
mypage,
|
|
ids,
|
|
counts,
|
|
has,
|
|
checkFllow,
|
|
list
|
|
}
|