83 lines
2.0 KiB
JavaScript
83 lines
2.0 KiB
JavaScript
// src/composables/useWeChatAuth.js
|
|
import { ref } from 'vue';
|
|
import request from '@/request/index.js';
|
|
|
|
//向机构申请
|
|
export function Apply(data){
|
|
return request({
|
|
url: `/api/employessapply/apply`,
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|
|
//向机构接受拒绝
|
|
export function invitedConfirm(data){
|
|
return request({
|
|
url: `/api/employessapply/invitedConfirm`,
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|
|
//获取机构的列表
|
|
export function getOrgInfo(title){
|
|
return request({
|
|
url: `/api/employessapply/getOrgInfo?title=${title}&pageSize=-1&openId=${uni.getStorageSync('openid')}`,
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
//获取审核的列表
|
|
export function getEmployeesOrgRela(openId){
|
|
return request({
|
|
url: `/api/employessapply/getEmployeesOrgRela?openId=${openId}&invited=0,1,2`,
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
//主页
|
|
export function getIndex(openId){
|
|
return request({
|
|
url: `/api/employessapply/getEmployeesOrgRela?openId=${openId}&izHistory=1`,
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
//机构邀请
|
|
export function getInvited(openId){
|
|
return request({
|
|
url: `/api/employessapply/getEmployeesOrgRela?openId=${openId}&invited=0&izHistory=1`,
|
|
method: 'get',
|
|
})
|
|
}
|
|
//单独机构邀请
|
|
export function getId(id){
|
|
return request({
|
|
url: `/api/employessapply/getEmployeesOrgRela?openId=${uni.getStorageSync('openid')}&invited=0&id=${id}&izHistory=1`,
|
|
method: 'get',
|
|
})
|
|
}
|
|
//机构邀请
|
|
export function getNotice(openId){
|
|
return request({
|
|
url: `/api/wx/notice/query?openId=${uni.getStorageSync('openid')}&clientType=2`,
|
|
method: 'get',
|
|
// data: JSON.stringify({ openId: uni.getStorageSync('openid') }) // 把 body 串行化,强行放 data
|
|
})
|
|
}
|
|
|
|
//检测有没有已读
|
|
export function isRead(openId){
|
|
return request({
|
|
url: `/api/wx/notice/unreadCount?openId=${uni.getStorageSync('openid')}&clientType=2`,
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
//向机构申请
|
|
export function upRead(data){
|
|
return request({
|
|
url: `/api/wx/notice/upRead`,
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|