You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
447 lines
9.0 KiB
447 lines
9.0 KiB
var fly = require('./request.js')
|
|
module.exports = {
|
|
getToken: getToken,
|
|
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,
|
|
getAvailable: getAvailable,
|
|
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,
|
|
getPropertyProjectList:getPropertyProjectList,
|
|
getPropertyProjectDetail:getPropertyProjectDetail,
|
|
applyForGroup:applyForGroup,
|
|
submitScore:submitScore,
|
|
getStartupPageV2:getStartupPageV2
|
|
}
|
|
|
|
function getToken(wxCode) {
|
|
return fly.get('app-user/user/ma/getToken', {
|
|
wxCode: wxCode
|
|
})
|
|
}
|
|
|
|
function bannerList(position) {
|
|
return fly.get('news/banner/list', {
|
|
position
|
|
})
|
|
}
|
|
|
|
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 getAvailable () {
|
|
return fly.get('custom/evaluate/getAvailable')
|
|
}
|
|
|
|
/**
|
|
* 获取网格长管理的所有网格
|
|
*/
|
|
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/getInfoById')
|
|
}
|
|
|
|
/**
|
|
* 我的群列表
|
|
*/
|
|
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('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) {
|
|
return fly.get('app-user/user/ma/v3/getToken', para)
|
|
}
|
|
|
|
/********微信获取手机号 ********/
|
|
function getWxPhone ({wxCode,encryptedData,iv}) {
|
|
return fly.get('app-user/user/ma/getWxPhone',{
|
|
wxCode,
|
|
encryptedData,
|
|
iv
|
|
})
|
|
}
|
|
|
|
/********物业项目-物业项目列表 ********/
|
|
function getPropertyProjectList(){
|
|
return fly.get('property/projectList')
|
|
}
|
|
|
|
/********物业项目-物业项目详情 ********/
|
|
function getPropertyProjectDetail(propertyProjectId){
|
|
return fly.get(`property/v2/projectDetail/${propertyProjectId}`)
|
|
}
|
|
|
|
/********物业群-申请入群 ********/
|
|
function applyForGroup(groupId){
|
|
return fly.post('property/group/applyForGroup',{
|
|
groupId:groupId
|
|
})
|
|
}
|
|
/********物业-打分*******/
|
|
function submitScore(param){
|
|
return fly.get('property/projectScore',param)
|
|
}
|
|
|
|
export function getStartupPageV2() {
|
|
return fly.get('startup/v2/getStartupPage')
|
|
}
|