Commit 7cc80b24 by 林家欣

feat: 新增首页大轮播图接口

parent a46b7619
import {
GET, POSTFORM, POST, UPLOAD, DOWNLOAD
} from "./fetch.js"
import { BlockRoleType } from "@/config/constant.js"
import {
handleResponseError
} from "./parameter"
// import {
// GET, POSTFORM
// } from "./fetch.js"
/* User */
// 获取二维码唯一ID
const GetQRCodeAsync = async function() {
return await GET("/console/getQRcodeId")
}
// 查询二维码状态
const GetQRCodeStatusAsync = async function(id) {
return await GET("/console/getQRcodeStatus", {
QRId: id
})
}
// 用户列表分页查询
const QueryUserListAsync = async function(query) {
return await GET("/console/user/list", query)
}
/** 小区管理 */
// 分页获取小区信息
const QueryBlockListAsync = async function (query) {
return await GET("/console/block/list", query)
}
// 获取系统下所有小区列表
const GetAllBlockListAsync = async function () {
return await GET("/common/block/list/all")
}
// 获取指定小区下所有的楼栋列表
const GetBlockBuildingListAsync = async function (blockId) {
return await GET("/common/block/list/buildings", { blockId })
}
// 获取指定小区某楼栋下楼层及房号列表
const GetBlockAppartmentListAsync = async function (blockId, building) {
return await GET("/common/block/list/appartments", { blockId, building })
}
// 查询用户信息 type: servant 物业, accountant 会计, comMember 业委会委员
const QueryUserListAsyncByType = async function (type, name, blockId) {
const query = {
pageIndex: 1,
pageSize: 20,
name
}
if (type === BlockRoleType.comMember) {
query.blockId = blockId
return await GET("/console/blockUser/list", query)
} else if (type === BlockRoleType.accountant ||
type === BlockRoleType.servant ||
type === BlockRoleType.temporal ||
type === BlockRoleType.community ||
type === BlockRoleType.management ||
type === BlockRoleType.gridManager) {
return await GET("/console/user/global", query)
} else {
return handleResponseError()
}
}
// 设置管理人员
const SetBlockManagersAsync = async function (blockId, roleId, userId) {
return await POSTFORM("/console/block/setCommittee", {
userId,
blockId,
roleId
})
}
/** 小区账号管理 */
// 分页获取小区账户列表
const QueryBlockFinanceListAsync = async function (query) {
return await GET("/console/finance/block/list", query)
}
// 分页获取指定小区账户明细列表
const QueryBlockFinanceDetailsAsync = async function (query) {
return await GET("/console/finance/block/detail", query)
}
// 撤销账单
const RevokeBlockFinanceDetailAsync = async function (id) {
return await POSTFORM("/console/finance/block/withdraw", { financeId: id })
}
// 撤销账单
const AddBlockFinanceAsync = async function (data) {
return await POSTFORM("/console/finance/block/add", data)
}
// 获取交易类型
const GetFinanceTypeListAsync = async function() {
return await GET("/console/finance/type")
}
/** 业主审批 */
// 分页获取业主审核列表
const QueryApproverListAsync = async function (query) {
return await GET("/console/block/order/list", query)
}
// 通过业主审核
const AcceptApproverAsync = async function (id) {
return await POSTFORM("/console/block/order/accept", { orderId: id })
}
// 驳回业主审核
const RejectApproverAsync = async function (id) {
return await POSTFORM("/console/block/order/reject", { orderId: id })
}
/** 事项 */
// 分页获取事项列表
const QueryMatterListAsync = async function (query) {
return await GET("/console/matter/list", query)
}
// 创建事项
const InsertMatterAsync = async function (matter) {
return await POST("/console/matter/insert", matter)
}
// 选择业主大会
const QueryMatterVoteAsync = async function () {
return await POST("/console/matter/queryAllOwner")
}
// 获取业主大会投票结果
const GetMatterVoteSelectAsync = async function (matterId) {
return await GET("/console/matter/getMatterResult", { matterId })
}
// 获取事项详情
const GetMatterDetailByIdAsync = async function (id) {
return await GET("/console/matter/detail", { matterId: id })
}
// 获取投票项详情
const GetMatterVoteResultDetail = async function (id) {
return await GET("/console/matter/voteSelect", { matterId: id })
}
const GetMatterVoteResultWithBuilding = async function (resultId, building) {
return await GET("/console/matter/voteResult", { selectId: resultId, building })
}
// 获取事项投票统计信息
const GetMatterChartStatsAsync = async function(matterId) {
return await GET("/console/matter/chart/stats", { matterId })
};
/** 事项审核 */
// 通过事项审核
const AcceptMatterAuditAsync = async function (id, content, isCommunity = false) {
const path = isCommunity ? "/console/matter/community/affirm" : "/console/matter/administrator/affirm"
return await POSTFORM(path, {
matterId: id,
content,
flag: true
})
}
// 驳回事项审核
const RejectMatterAuditAsync = async function (id, content, isCommunity = false) {
const path = isCommunity ? "/console/matter/community/affirm" : "/console/matter/administrator/affirm"
return await POSTFORM(path, {
matterId: id,
content,
flag: false
})
}
// 新增回函
const InsterMatterLetterAsync = async function (matterId, context) {
return await POST('/console/matter/insertLetters', {
matterId,
context
})
}
// 接收整改意见
const AcceptReformMatterAsync = async function (matterId, context) {
return await POST('/console/matter/accept', {
matterId,
context
})
}
/** 网格管理 */
// 获取网格列表
const QueryGridListAsync = async function (query) {
return await GET('/console/grid/list', query)
}
// 设置网格管理人员
const SetGridManagersAsync = async function (gridId, userId) {
return await POSTFORM("/console/grid/setCommittee", {
userId,
gridId
})
}
// 获取某网格的所有小区列表
const GetBlockListFromGrid = async function (gridId) {
return await GET('/console/grid/list/blocks', { id: gridId })
}
// 获取某网格某小区下楼栋列表
const GetBuildingListFromGrid = async function (gridId, blockId) {
return await GET('/console/grid/list/buildings', { id: gridId, blockId })
}
// 获取某网格某小区下楼栋列表
const GetAppartmentListFromGrid = async function (gridId, blockId, building) {
return await GET('/console/grid/list/appartments', { gridId, blockId, building })
}
/** 上传 */
const UploadImage = async (file) => {
const formData = new FormData()
formData.append("file", file, file.name)
return await UPLOAD("/file/uploadImg", formData);
}
// 绑定统计数据查询
const reportBindingData = async function (query) {
return await GET('/console/report/bindingData', query)
}
// 绑定统计数据导出
const reportBindingDataExport = async function (query) {
return await DOWNLOAD('/console/report/bindingData/export', query)
}
// 绑定明细数据查询
const reportBindingDetail = async function (query) {
return await GET('/console/report/bindingDetail', query)
}
// 绑定明细数据导出
const reportBindingDetailExport = async function (query) {
return await DOWNLOAD('/console/report/bindingDetail/export', query)
}
// 查询业主大会
const reportMatterlist = async function (blockId) {
return await GET('/console/report/matterlist', { blockId })
}
// 查询当前登录用户能看到的小区列表
const reportBlocks = async function () {
return await GET('/console/report/blocks', { })
}
// 投票统计数据查询
const reportVoteData = async function (query) {
return await GET('/console/report/voteData', query)
}
// 投票统计数据导出
const reportVoteDataExport = async function (query) {
return await DOWNLOAD('/console/report/voteData/export', query)
}
// 投票明细数据查询
const reportVoteDetail = async function (query) {
return await GET('/console/report/voteDetail', query)
}
// 投票明细数据导出
const reportVoteDetailExport = async function (query) {
return await DOWNLOAD('/console/report/voteDetail/export', query)
}
// 查询新近一次业委会选举
const cmtLatestElect = async function (blockId) {
return await GET('/console/cmt/latest/elect', { blockId })
}
// 分页查询web端业委会成立阶段列表
const cmtPhaseListPage = async function (query) {
return await GET('/console/cmt/phase/list/page', query)
}
// 查看某申请书详情
const cmtP1ApplyDeatil = async function (blockId, applyId) {
return await GET('/console/cmt/p1/apply/detail', { blockId, applyId })
}
// 审批业委会选举申请书
const cmtP1ApproveApply = async function (query) {
return await POSTFORM('/console/cmt/p1/approve/apply', query)
}
// 查看某申请书联名情况
const cmtP1ApplyNamingList = async function (applyId) {
return await GET('/console/cmt/p1/apply/naming/list', { applyId })
}
// 审批业委会选举申请书联名
const cmtP1ApproveNaming = async function (query) {
return await POSTFORM('/console/cmt/p1/approve/naming', query)
}
// 发布筹备组候选人报名通知
const cmtP2NoticePub = async function (query) {
return await POSTFORM('/console/cmt/p2/notice/pub', query)
}
// 查询筹备组报名主流程信息
const cmtP2Info = async function (mainId) {
return await GET('/console/cmt/p2/info', {mainId})
}
// 查询筹备组报名主流程信息
const cmtP2NoticeCheck = async function (body) {
return await POSTFORM('/console/cmt/p2/notice/check', body)
}
// 查询筹备组候选人报名名单
const cmtP2RegMembers = async function (preId) {
return await GET('/console/cmt/p2/reg/members', {preId})
}
// 查询筹备组候选人联名名单
const cmtP2NamingTables = async function (preId) {
return await GET('/console/cmt/p2/naming/tables', {preId})
}
// 审批筹备组候选人报名人
const cmtP2RegApprove = async function (body) {
return await POSTFORM('/console/cmt/p2/reg/approve', body)
}
// 查询筹备组联名名单
const cmtP2NamingMembers = async function (preId) {
return await GET('/console/cmt/p2/naming/members', {preId})
}
// 发起业主大会表决单--第七
const cmtOwnersMeeting = async function (query) {
return await POST('/console/cmt/owners/meeting/submit', query)
}
//
const cmtP6Candidates = async function (query) {
return await GET('/console/cmt/p6/candidates', query)
}
//业主大会 审批--第七
const approvalOwnerResult = async function (query) {
return await POST('/console/cmt/owners/meeting/approval', query)
}
//业主大会表决单通知详情--第七
const cmtMeetingDetail = async function (query) {
return await GET('/console/cmt/owners/meeting/detail', query)
}
//业主大会表决单公示详情--第七
const cmtMeetingResult = async function (query) {
return await GET('/console/cmt/owners/meeting/result', query)
}
//业主大会投票结果公示--第七
const cmtResultAnnounce = async function (query) {
return await POST('/console/cmt/owners/meeting/result/announce', query)
}
// 查询有哪些人给某人联名了
const cmtP2NamingSupporter = async function (preId, userId) {
return await GET('/console/cmt/p2/naming/supporter', {preId, userId})
}
// 审批筹备组候选人联名名单
const cmtP2NamingApprove = async function (body) {
return await POSTFORM('/console/cmt/p2/naming/approve', body)
}
// 发布筹备组候选人名单公示
const cmtP2PubCandidateNotice = async function (body) {
return await POSTFORM('/console/cmt/p2/pub/candidate/notice', body)
}
// 查询筹备组候选人名单
const cmtP2PubCandidateList = async function (preId, mainId) {
return await GET('/console/cmt/p2/candidate/list', {preId, mainId})
}
// 审核(附议)筹备组候选人名单公示
const cmtP2ApproveCandidateNotice = async function (body) {
return await POSTFORM('/console/cmt/p2/approve/candidate/notice', body)
}
//业委会主任选举结果--第八
const cmtCommitteeDetail = async function (query) {
return await GET('/console/cmt/committee/director/detail', query)
}
//业委会主任选举-发起选举--第八
const cmtCommitteeSubmit = async function (query) {
return await POST('/console/cmt/committee/director/vote/submit', query)
}
//业委会主任选举-完成--第八
const cmtCommitteeEnd = async function (query) {
return await POST('/console/cmt/committee/director/vote/end', query)
}
//业委会主任-编写公示--第八
const cmtCommitteeAnnounce = async function (query) {
return await POST('/console/cmt/committee/director/vote/announce', query)
}
//业委会主任-审核公示--第八
const cmtCommitteeApproval = async function (query) {
return await POST('/console/cmt/committee/director/vote/approval', query)
}
// 期间驳回筹备组候选人流程
const cmtP2Reject = async function (body) {
return await POSTFORM('/console/cmt/p2/reject', body)
}
// 发起筹备组选举通知
const cmtP3PubElectNotice = async function (body) {
return await POSTFORM('/console/cmt/p3/pub/elect/notice', body)
}
// 审批(附议)选举通知
const cmtP3CheckElectNotice = async function (body) {
return await POSTFORM('/console/cmt/p3/check/elect/notice', body)
}
// 查询前7名候选人得票详情
const cmtP3QueryElectResult = async function (electId) {
return await GET('/console/cmt/p3/query/elect/result', {electId})
}
// 检查筹备组内推的结果
const cmtP3ApproveElect = async function (body) {
return await POSTFORM('/console/cmt/p3/approve/elect', body)
}
// 查询筹备组选举通知
const cmtP3Info = async function (mainId) {
return await GET('/console/cmt/p3/info', {mainId})
}
// 查询副组长候选人得票详情
const cmtP3QueryViceelectResult = async function (electId) {
return await GET('/console/cmt/p3/query/viceelect/result', {electId})
}
// 检查副组长选举结果
const cmtP3ApproveElectVice = async function (body) {
return await POSTFORM('/console/cmt/p3/approve/elect/vice', body)
}
// 发起筹备组名单公示
const cmtP3PubNamelistNotice = async function (body) {
return await POSTFORM('/console/cmt/p3/pub/namelist/notice', body)
}
// 审批(附议)名单公示
const cmtP3CheckNamelistNotice = async function (body) {
return await POSTFORM('/console/cmt/p3/check/namelist/notice', body)
}
// 期间驳回成员选举的结果公示
const cmtP3Reject = async function (body) {
return await POSTFORM('/console/cmt/p3/reject', body)
}
// 查询制作文件--第四
const cmtConsoleFind = async function (body) {
return await GET('/console/cmt/p4/find', body)
}
// 审批选举办法草案--第四
const cmtApproveFile = async function (body) {
return await POSTFORM('/console/cmt/p4/approve/file', body)
}
//发布公示--第四
const cmtPubNotice = async function (body) {
return await POSTFORM('/console/cmt/p4/pub/notice', body)
}
// 审批/检查公示--第四
const cmtApproveNotice = async function (body) {
return await POSTFORM('/console/cmt/p4/approve/notice', body)
}
// 查询某文件的修订历史--第四
const cmtHistoryFile = async function (query) {
return await GET('/console/cmt/p4/mf/history', query)
}
// 查询上一次业委会选举办法草拟内容--第四
const cmtElectionDraftFind = async function (body) {
return await GET('/cmt/p4/find', body)
}
// 发布候选人报名通知
const cmtP5NoticePub = async function (query) {
return await POSTFORM('/console/cmt/p5/notice/pub', query)
}
// 查询报名主流程信息
const cmtP5Info = async function (regId) {
return await GET('/console/cmt/p5/info', {regId})
}
// 查询报名主流程信息
const cmtP5NoticeCheck = async function (body) {
return await POSTFORM('/console/cmt/p5/notice/check', body)
}
// 查询报名名单
const cmtP5RegMembers = async function (regId) {
return await GET('/console/cmt/p5/reg/members', {regId})
}
// 审批筹备组候选人报名人
const cmtP5RegApprove = async function (body) {
return await POSTFORM('/console/cmt/p5/reg/approve', body)
}
// 查询业委会参选人名单
const cmtP5PubCandidateList = async function (regId) {
return await GET('/console/cmt/p5/candidate/list', {regId})
}
// 发布业委会参选人名单公示
const cmtP5PubCandidateNotice = async function (body) {
return await POSTFORM('/console/cmt/p5/pub/candidate/notice', body)
}
// 审核(附议)筹备组候选人名单公示
const cmtP5ApproveCandidateNotice = async function (body) {
return await POSTFORM('/console/cmt/p5/approve/candidate/notice', body)
}
// 期间驳回筹备组候选人流程
const cmtP5Reject = async function (body) {
return await POSTFORM('/console/cmt/p5/reject', body)
}
// 查询联名名单
const cmtP5NameRegMembers = async function (regId) {
return await GET('/console/cmt/p5/naming/members', {regId})
}
// 审批筹备组候选人报名人
const cmtP5NameRegApprove = async function (body) {
return await POSTFORM('/console/cmt/p5/naming/approve', body)
}
// 查询有哪些人给某人联名了
const cmtP5NamingSupporter = async function (regId, userId) {
return await GET('/console/cmt/p5/naming/supporter', {regId, userId})
}
// 查询顶部可显示的按钮
const cmtButtons = async function (mainId) {
return await GET('/console/cmt/buttons', {mainId})
}
// 查询小区列表
const cmtBlocks = async function () {
return await GET('/console/cmt/blocks', { })
}
// 查询某小区下的业委会选举列表
const cmtElectList = async function (blockId) {
return await GET('/console/cmt/elect/list', { blockId })
}
// 查询预备候选人名单列表--第六
const cmtP6CandidateList= async function (query) {
return await GET('/console/cmt/p6/candidate/list', query)
}
// 预备候选人名单提交--第六
const cmtP6NoticePub= async function (query) {
return await POSTFORM('/console/cmt/p6/notice/pub', query)
}
// 查询第6阶段主流程信息--第六
const cmtP6Info = async function (query) {
return await GET('/console/cmt/p6/info', query)
}
// 检查选举结果通--第六
const cmtP6NoticeCheck = async function (query) {
return await POSTFORM('/console/cmt/p6/notice/check', query)
}
// 选举结果通过或返回--第六
const cmtP6ApproveElect = async function (query) {
return await POSTFORM('/console/cmt/p6/approve/elect', query)
}
// 发布候选人公示--第六
const cmtP6CandidateNotice = async function (query) {
return await POSTFORM('/console/cmt/p6/pub/candidate/notice', query)
}
// 候选人名单公示审批--第六
const cmtP6ApproveCandidateNotice = async function (query) {
return await POSTFORM('/console/cmt/p6/approve/candidate/notice', query)
}
//查询业委会候选人推选结果--第六
const cmtP6VoteResult= async function (query) {
return await GET('/console/cmt/p6/vote/result', query)
}
// 期间驳回第6流程
const cmtP6Reject = async function (body) {
return await POSTFORM('/console/cmt/p6/reject', body)
}
/* 公共接口 */
import committee from "./module/committee.js"
import home from "./module/home.js"
const api = {
committee,
cmtLatestElect,
cmtPhaseListPage,
cmtP1ApplyDeatil,
cmtP1ApproveApply,
cmtP1ApplyNamingList,
cmtP1ApproveNaming,
cmtP2NoticePub,
cmtP2Info,
cmtP2NoticeCheck,
cmtP2RegMembers,
cmtP2RegApprove,
cmtP2NamingMembers,
cmtP2NamingSupporter,
cmtP2NamingApprove,
cmtP2PubCandidateNotice,
cmtP2NamingTables,
cmtP2PubCandidateList,
cmtP2ApproveCandidateNotice,
cmtP2Reject,
cmtP3PubElectNotice,
cmtP3CheckElectNotice,
cmtP3QueryElectResult,
cmtP3ApproveElect,
cmtP3Info,
cmtP3QueryViceelectResult,
cmtP3ApproveElectVice,
cmtP3PubNamelistNotice,
cmtP3CheckNamelistNotice,
cmtP3Reject,
cmtP5NoticePub,
cmtP5Info,
cmtP5NoticeCheck,
cmtP5RegMembers,
cmtP5RegApprove,
cmtP5PubCandidateList,
cmtP5PubCandidateNotice,
cmtP5ApproveCandidateNotice,
cmtP5Reject,
cmtP5NameRegMembers,
cmtP5NameRegApprove,
cmtP5NamingSupporter,
cmtButtons,
cmtBlocks,
cmtElectList,
GetQRCodeAsync,
GetQRCodeStatusAsync,
QueryUserListAsync,
QueryBlockListAsync,
GetAllBlockListAsync,
GetBlockBuildingListAsync,
GetBlockAppartmentListAsync,
QueryUserListAsyncByType,
SetBlockManagersAsync,
QueryBlockFinanceListAsync,
QueryBlockFinanceDetailsAsync,
RevokeBlockFinanceDetailAsync,
AddBlockFinanceAsync,
GetFinanceTypeListAsync,
QueryApproverListAsync,
AcceptApproverAsync,
RejectApproverAsync,
QueryMatterListAsync,
InsertMatterAsync,
QueryMatterVoteAsync,
GetMatterVoteSelectAsync,
GetMatterDetailByIdAsync,
GetMatterVoteResultDetail,
GetMatterVoteResultWithBuilding,
GetMatterChartStatsAsync,
AcceptMatterAuditAsync,
RejectMatterAuditAsync,
InsterMatterLetterAsync,
AcceptReformMatterAsync,
QueryGridListAsync,
SetGridManagersAsync,
GetBlockListFromGrid,
GetBuildingListFromGrid,
GetAppartmentListFromGrid,
UploadImage,
reportBindingData,
reportBindingDataExport,
reportBindingDetail,
reportBindingDetailExport,
reportMatterlist,
reportBlocks,
reportVoteData,
reportVoteDataExport,
reportVoteDetail,
reportVoteDetailExport,
cmtOwnersMeeting,
approvalOwnerResult,
cmtMeetingDetail,
cmtResultAnnounce,
cmtCommitteeDetail,
cmtCommitteeSubmit,
cmtCommitteeEnd,
cmtCommitteeAnnounce,
cmtCommitteeApproval,
cmtApproveFile,
cmtConsoleFind,
cmtApproveNotice,
cmtPubNotice,
cmtP6CandidateList,
cmtP6NoticePub,
cmtP6Candidates,
cmtP6Info,
cmtP6NoticeCheck,
cmtP6ApproveElect,
cmtP6VoteResult,
cmtP6CandidateNotice,
cmtP6ApproveCandidateNotice,
cmtP6Reject,
cmtMeetingResult,
cmtElectionDraftFind,
cmtHistoryFile
home,
}
export default api
\ No newline at end of file
......@@ -18,7 +18,7 @@ import {
getToken
} from "@/utils/cookie.js"
const baseUrl = process.env.BASE_URL + "api"
const baseUrl = process.env.BASE_URL + "gs1"
function fetch(options) {
return new Promise((resolve, reject) => {
......
import {
POST
} from "../fetch.js"
// 根据业主id查询报名表
const homeBigImages = async (params = {}) => {
return await POST("/office/indexCarouselManage/api/bigImages", params)
}
export default {
homeBigImages,
}
......@@ -1086,8 +1086,21 @@ export default {
created() {
console.log(this.$route, "this.$route");
this.dzfw.push(this.dzfLastChild);
this.init();
},
methods: {
// 初始化
init() {
// 首页大轮播图
this.homeBigImages();
},
// 首页大轮播图
homeBigImages() {
console.log(this.$api, 'this.$api');
const homeBigImagesRes = this.$api.home.homeBigImages();
console.log(homeBigImagesRes, 'homeBigImagesRes');
},
// 我要申请商品条码
wysqsptmHandelClick() {
this.$router.push({
......
......@@ -54,13 +54,13 @@ module.exports = {
compress: true,
disableHostCheck: true,
proxy: {
"/api": {
"/gs1": {
target: process.env.VUE_APP_HOST_URL, // 原地址
// target: 'http://192.168.0.207:8080', // 渊炜
changeOrigin: true,
ws: true,
pathRewrite: {
"^/api": "/"
"^/gs1": "/"
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment