var fly = require("./request.js") module.exports = { getToken: getToken, logout:logout, getCompleteName: getCompleteName, saveWxFormid: saveWxFormid, getScanSwitch: getScanSwitch, getTokenV2: getTokenV2, updateWxInfo: updateWxInfo, sendSms: sendSms, gridLeaderRegister: gridLeaderRegister, getGridList: getGridList, changeGrid: changeGrid, completeInfo: completeInfo, completeCompanyInfo: completeCompanyInfo, completeCompanyMoreInfo: completeCompanyMoreInfo, prepareComplete: prepareComplete, getUserInfo: getUserInfo, getMyAssociation: getMyAssociation, getCommandAssociation: getCommandAssociation, getMyTopicList: getMyTopicList, getMyIssueList: getMyIssueList, getMyProjectList: getMyProjectList, checkWxUnionId: checkWxUnionId, leaderboard: leaderboard, clockList: clockList, clock: clock, detail: detail, rejectDetail: rejectDetail, cancelDetail: cancelDetail, bannerList: bannerList, getFirstInfo: getFirstInfo, noticelist: noticelist, newsList: newsList, getIssueList: getIssueList, getProjectList: getProjectList, getDeptInfoByMaCode: getDeptInfoByMaCode, getAvailabel: getAvailabel, getCompanyByUserId: getCompanyByUserId, checkConsultFlag: checkConsultFlag, getIndexSudokuState: getIndexSudokuState, getSignedList: getSignedList, getPhraseList: getPhraseList, sagenumAddOne: sagenumAddOne, authenticate: authenticate, signup: signup, cancelsignup: cancelsignup, clockAddressDetail: clockAddressDetail, unpassActivityDetail: unpassActivityDetail, completeInfoV2: completeInfoV2, getTokenV3: getTokenV3, getWxPhone: getWxPhone, getComplete: getComplete, getInvitation: getInvitation, userLogin: userLogin, userInfoSignUp: userInfoSignUp, getAppMenu: getAppMenu, standardbearerApply: standardbearerApply, standardbearerStatus: standardbearerStatus, getByLoginUser: getByLoginUser, saveOrder: saveOrder, getDeptIdByItude: getDeptIdByItude, getDeptTree: getDeptTree, userInfoUpdate: userInfoUpdate, getVoluntarystyle: getVoluntarystyle, getGridstyle: getGridstyle, editPassword:editPassword } function getToken(params) { return fly.get("app-user/user/nmp/getToken", params ) } function bannerList(position) { return fly.get("news/banner/list", { position }) } function logout() { return fly.get("analysis/user/logout") } // function getIssueList(param) { // return fly.get("events/issue/list", param) // } // function getProjectList(param) { // return fly.get("events/item/list", param) // } function getFirstInfo() { return fly.post("news/information/first") } function noticelist(param) { return fly.get("news/notice/list", param) } function newsList(param) { return fly.get("news/news/list", param) } function getScanSwitch(versionNum) { return fly.get("ma/scanSwitch", { versionNum }) } function getCompleteName(gridId) { return fly.get("admin/dept/completeName", { gridId: gridId }) } function saveWxFormid(wxCode, wxFormId) { return fly.post("app-user/wxformid/save", { wxCode: wxCode, wxFormId: wxFormId }) } function getTokenV2({ wxCode, gridId, inviteUserId }) { return fly.get("app-user/user/ma/v2/getToken", { wxCode, gridId, inviteUserId }) } function updateWxInfo(wxCode, encryptedData, iv) { return fly.post("app-user/user/ma/updateWxInfo", { wxCode: wxCode, encryptedData: encryptedData, iv: iv }) } function gridLeaderRegister(mobile, smsCode, wxCode) { return fly.post("app-user/user/ma/gridLeaderRegister", { mobile: mobile, smsCode: smsCode, wxCode: wxCode }) } function completeInfo(data) { return fly.post("app-user/user/completeInfo", data) } function completeCompanyInfo(data) { return fly.post("custom/enterprise/completeRequisiteInfo", data) } function completeCompanyMoreInfo(data) { return fly.post("custom/enterprise/completeSelectiveInfo", data) } function prepareComplete() { return fly.get("app-user/user/prepareComplete", {}) } function checkConsultFlag() { return fly.get("custom/consult/checkConsultFlag", {}) } function sendSms(mobile) { return fly.get("message/sms/sendCode", { mobile: mobile }) } /*** * 查询企业信息 */ function getCompanyByUserId() { return fly.get("custom/enterprise/getByUserId", {}) } /** * 干部评价入口是否开启 */ function getAvailabel() { return fly.get("custom/evaluate/getAvailabel") } /** * 获取网格长管理的所有网格 */ function getGridList() { return fly.get("app-user/user/listGrid") } /** * 网格长切换网格 * @params { * gridId 将要切换的网格id * } */ function changeGrid(gridId) { return fly.get(`app-user/user/switchGrid/${gridId}`) } // ---------------------------------党群议事start--------------------- /** * 获取 议题列表 */ function getIssueList(params) { return fly.get("events/issue/list", params) } /** * 获取项目列表 */ function getProjectList(params) { return fly.get("events/item/list", params) } // ---------------------------------党群议事 end --------------------- // ---------------------------------友邻社群接口start------------------ /** * 获取用户信息 * @param {*} param0 */ function getUserInfo() { return fly.get("app-user/user/getNamInfoById") } /** * 我的群列表 */ function getMyAssociation() { return fly.get("group/group/listOfMine") } /** * 推荐群列表 */ function getCommandAssociation() { return fly.get("group/group/listOfRecommend") } // ---------------------------------友邻社群接口end-------------------- // ---------------------------------个人中心接口start------------------ /** * 我的话题列表 */ function getMyTopicList({ pageIndex, pageSize }) { return fly.get("group/topic/listOfMine", { pageIndex, pageSize }) } /** * 我的议题列表 */ function getMyIssueList() { return fly.get("events/issue/listByUserId") } /** * 我的项目列表 */ function getMyProjectList({ pageIndex, pageSize, timestamp }) { return fly.get("events/item/listByUserId", { pageIndex, pageSize, timestamp }) } /** * 查看用户是否已保存unionId */ function checkWxUnionId() { return fly.get("app-user/user/checkWxUnionId") } // ---------------------------------个人中心接口 end------------------- //根据小程序码内的字符串,解析机构名称和第三方哨卡id function getDeptInfoByMaCode(code) { return fly.get("custom/epidemic/sentryPost/getDeptInfoByMaCode", { code }) } /** * 首页,九宫格显示按钮 */ function getIndexSudokuState() { return fly.get("api/custom/majorFunction/checkState") } // *****************************爱心互助接口*************************** /** * 排行榜 */ function leaderboard() { return fly.get("heart/volunteer/leaderboard") } /** * 活动详情 */ function detail(id) { return fly.get(`heart/act/detail/${id}`) } /** * 未通过活动详情 */ function rejectDetail(id) { return fly.get(`heart/act/rejectDetail/${id}`) } /** * 取消活动详情 */ function cancelDetail(id) { return fly.get(`heart/act/cancelDetail/${id}`) } /** * 活动打卡地点详情 */ function clockAddressDetail(id) { return fly.get("heart/act/clockAddressDetail", { actId: id }) } /** * 打卡列表 */ function clockList(actId) { return fly.get("heart/act/clockList", { actId: actId }) } /** * 常用语列表 */ function getPhraseList() { return fly.get("heart/phrase/getPhraseList") } /** * 使用常用语 */ function sagenumAddOne(id) { return fly.post("heart/phrase/sagenumAddOne", { id: id }) } /** * 活动打卡 */ function clock(data) { return fly.post("heart/act/clock", data) } /** * 志愿者认证 */ function authenticate(data) { return fly.post("app-user/volunteer/authenticate", data) } /** * 活动报名 */ function signup(actId) { return fly.post(`heart/act/signup?actId=${actId}`) } /** * 取消报名 */ function cancelsignup(id, response) { return fly.post("heart/act/cancelsignup", { actId: id, failureReason: response }) } /** * 已报名活动 */ function getSignedList({ pageIndex, pageSize, timestamp, actType }) { return fly.get("heart/act/signupList", { pageIndex, pageSize, timestamp, actType }) } /** * 未通过活动详情 */ function unpassActivityDetail(id) { return fly.get(`heart/act/rejectDetail/${id}`) } /** * 用户完善个人信息v2(不穿验证码) */ function completeInfoV2(para) { return fly.post("app-user/user/v2/completeInfo", para) } /** * 获取Token v3 网格码和邀请码合二为一 */ function getTokenV3(para) { // app-user/user/ma/v3/nmaV2getToken return fly.post("app-user/user/npm/register", para) } /********微信获取手机号 ********/ function getWxPhone({ wxCode, encryptedData, iv }) { return fly.get("app-user/user/ma/getWxPhone", { wxCode, encryptedData, iv }) } // 获取完整机构 function getComplete(gridId) { return fly.get("admin/dept/getComplete", { gridId }) } // function getInvitation(id) { return fly.get(`app-user/user/ma/v3/getInvitation/${id}`) } /** *小程序用户登录 */ function userLogin(para) { return fly.post("analysis/user/login", para) } /** * 用户签到 20201.9.29 */ function userInfoSignUp() { return fly.get("app-user/user/signIn") } // 获取小程序菜单权限 function getAppMenu(para) { return fly.post("api/admin/getAppMenu", para) } // 党员亮旗申请提交 function standardbearerApply() { return fly.post("app-user/party/standardbearer/apply") } // 党员亮旗状态查询 function standardbearerStatus() { return fly.get("app-user/party/standardbearer/status") } function getByLoginUser() { return fly.get("/sys/dept/party/getDeptTree") } //保存招募令 function saveOrder(info) { return fly.post("app-user/redspearhead/save", info) } //根据经纬度查询街道社区 function getDeptIdByItude(para) { return fly.post(`admin/dept/getGridByCoordinate`, para) } //街道tree function getDeptTree() { return fly.get(`admin/dept/getAllDeptTree`) } //修改个人信息 function userInfoUpdate(para) { return fly.post("app-user/user/npm/update", para) } function editPassword(para) { return fly.post("app-user/user/updatePassword", para) } function getVoluntarystyle(para) { return fly.get(`admin/sys/voluntarystyle/getListByDeptId`, para) } function getGridstyle(para) { return fly.get(`admin/sys/gridstyle/getListByDeptId`, para) }