96 lines
2.4 KiB
JavaScript
96 lines
2.4 KiB
JavaScript
|
|
// src/composables/useWeChatAuth.js
|
||
|
|
import { ref } from 'vue';
|
||
|
|
import request from '@/request/index.js';
|
||
|
|
|
||
|
|
//向机构申请
|
||
|
|
export function applySupOrg(data){
|
||
|
|
return request({
|
||
|
|
url: `/api/suppliers/applySupOrg`,
|
||
|
|
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 getApplySuppliersOrgInfo(res){
|
||
|
|
return request({
|
||
|
|
url: `/api/suppliers/getApplySuppliersOrgInfo?title=${res.title}&pageNo=${res.pageNo}&pageSize=5&openId=${uni.getStorageSync('openid')}`,
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
//获取审核的列表
|
||
|
|
export function getSuppliersAuditLog(){
|
||
|
|
return request({
|
||
|
|
url: `/api/suppliers/getSuppliersAuditLog?openId=${uni.getStorageSync('openid')}`,
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
//主页
|
||
|
|
export function getSuppliersOrgInfo(){
|
||
|
|
return request({
|
||
|
|
url: `/api/suppliers/getSuppliersOrgInfo?openId=${uni.getStorageSync('openid')}`,
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
//查询供应商个人信息
|
||
|
|
export function getSupInfoByOpenId(){
|
||
|
|
return request({
|
||
|
|
url: `/api/suppliers/getSupInfoByOpenId?openId=${uni.getStorageSync('openid')}`,
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
//机构邀请
|
||
|
|
export function getInvited(openId){
|
||
|
|
return request({
|
||
|
|
url: `/api/employessapply/getEmployeesOrgRela?openId=${openId}&invited=0&izHistory=N`,
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
//单独机构邀请
|
||
|
|
export function getId(id){
|
||
|
|
return request({
|
||
|
|
url: `/api/employessapply/getEmployeesOrgRela?openId=${uni.getStorageSync('openid')}&invited=0&id=${id}&izHistory=N`,
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
//消息队列
|
||
|
|
export function getNotice(){
|
||
|
|
return request({
|
||
|
|
url: `/api/wx/notice/query?openId=${uni.getStorageSync('openid')}&clientType=${uni.getStorageSync('jumpIndex')}`,
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
//检测有没有已读
|
||
|
|
export function isRead(openId){
|
||
|
|
return request({
|
||
|
|
url: `/api/wx/notice/unreadCount?openId=${uni.getStorageSync('openid')}&clientType=4`,
|
||
|
|
method: 'get',
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
//向机构申请
|
||
|
|
export function upRead(data){
|
||
|
|
return request({
|
||
|
|
url: `/api/wx/notice/upRead`,
|
||
|
|
method: 'post',
|
||
|
|
data,
|
||
|
|
})
|
||
|
|
}
|