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.
640 lines
13 KiB
640 lines
13 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,
|
|
completeResidentInfo: completeResidentInfo,
|
|
completePartyInfo: completePartyInfo,
|
|
prepareComplete: prepareComplete,
|
|
getUserInfo: getUserInfo,
|
|
getMyAssociation: getMyAssociation,
|
|
getCommandAssociation: getCommandAssociation,
|
|
getMyTopicList: getMyTopicList,
|
|
getMyTopicListV2:getMyTopicListV2,
|
|
getMyIssueList: getMyIssueList,
|
|
getMyProjectList: getMyProjectList,
|
|
checkWxUnionId: checkWxUnionId,
|
|
bannerList: bannerList,
|
|
getFirstInfo: getFirstInfo,
|
|
noticelist: noticelist,
|
|
newsList: newsList,
|
|
getIssueList: getIssueList,
|
|
getProjectList: getProjectList,
|
|
pointsRankinglist: pointsRankinglist,
|
|
pointsRecordlist: pointsRecordlist,
|
|
// 爱心互助
|
|
leaderboard: leaderboard,
|
|
detail: detail,
|
|
rejectDetail: rejectDetail,
|
|
cancelDetail: cancelDetail,
|
|
clockAddressDetail: clockAddressDetail,
|
|
clockList: clockList,
|
|
clockListV2: clockListV2,
|
|
getPhraseList: getPhraseList,
|
|
sagenumAddOne: sagenumAddOne,
|
|
clock: clock,
|
|
authenticate: authenticate,
|
|
signup: signup,
|
|
cancelsignup:cancelsignup,
|
|
getSignedList: getSignedList,
|
|
unpassActivityDetail: unpassActivityDetail,
|
|
completeInfoV2: completeInfoV2,
|
|
getTokenV3: getTokenV3,
|
|
getWxPhone: getWxPhone,
|
|
applyAct: applyAct,
|
|
applyRecord: applyRecord,
|
|
applyActDetail: applyActDetail,
|
|
getImgUrl: getImgUrl,
|
|
completeResidentInfoV2: completeResidentInfoV2,
|
|
completePartyInfoV2: completePartyInfoV2,
|
|
userPointsRankinglist:userPointsRankinglist,
|
|
getDefaultGridInfo:getDefaultGridInfo,
|
|
getResidentConfig:getResidentConfig,
|
|
getScrip:getScrip,
|
|
getHomePhone:getHomePhone,
|
|
gradeRankinglist:gradeRankinglist,
|
|
userInfoSignUp:userInfoSignUp,
|
|
moduleCategory: moduleCategory,
|
|
reportIssue: reportIssue,
|
|
reportIssueList: reportIssueList,
|
|
reportIssueDetail: reportIssueDetail,
|
|
getVolunteerTags: getVolunteerTags,
|
|
getActInfo: getActInfo,
|
|
signIn: signIn,
|
|
suggestDict: suggestDict,
|
|
suggestDictList: suggestDictList,
|
|
suggestDetail: suggestDetail,
|
|
getVolunteerDepts: getVolunteerDepts,
|
|
getCharityPoints: getCharityPoints
|
|
}
|
|
|
|
function getToken (wxCode) {
|
|
return fly.get("app-user/user/ma/getToken", {
|
|
wxCode: wxCode,
|
|
type: 'volunteer'
|
|
})
|
|
}
|
|
|
|
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")
|
|
return fly.post("news/v2/information/first")
|
|
}
|
|
|
|
function noticelist (param) {
|
|
return fly.get("news/notice/list", param)
|
|
}
|
|
|
|
function newsList (param) {
|
|
return fly.get("news/news/list", param)
|
|
}
|
|
//platform 0-e锦水,1-志愿者去哪
|
|
function getScanSwitch (versionNum) {
|
|
return fly.get("ma/scanSwitch", {
|
|
versionNum,
|
|
platform: '1'
|
|
})
|
|
}
|
|
|
|
function getCompleteName (gridId) {
|
|
return fly.get("admin/dept/completeName", {
|
|
gridId: gridId,
|
|
type: 'volunteer'
|
|
})
|
|
}
|
|
|
|
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,
|
|
type: 'volunteer'
|
|
})
|
|
}
|
|
|
|
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 prepareComplete () {
|
|
return fly.get("app-user/user/prepareComplete", {})
|
|
}
|
|
|
|
function sendSms (mobile) {
|
|
return fly.get("message/sms/sendCode", {
|
|
mobile: mobile
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 获取网格长管理的所有网格
|
|
*/
|
|
function getGridList () {
|
|
return fly.get("app-user/user/listGrid")
|
|
}
|
|
|
|
/**
|
|
* 网格长切换网格
|
|
* @params {
|
|
* gridId 将要切换的网格id
|
|
* }
|
|
*/
|
|
function changeGrid (gridId) {
|
|
return fly.get(`app-user/user/switchGrid/${gridId}`)
|
|
}
|
|
// ---------------------------------友邻社群接口start------------------
|
|
|
|
/**
|
|
* 获取用户信息
|
|
* @param {*} param0
|
|
*/
|
|
// function getUserInfo() {
|
|
// return fly.get('/app-user/user/getInfoById')
|
|
// }
|
|
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
|
|
})
|
|
}
|
|
/**
|
|
* 我的话题列表V2
|
|
*/
|
|
function getMyTopicListV2 ({
|
|
pageIndex,
|
|
pageSize,
|
|
timestamp
|
|
}) {
|
|
return fly.get("partyGroup/myTopicList/list", {
|
|
pageIndex,
|
|
pageSize,
|
|
timestamp
|
|
})
|
|
}
|
|
/**
|
|
* 我的议题列表
|
|
*/
|
|
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-------------------
|
|
|
|
/**
|
|
* 积分记录-积分记录接口
|
|
* timestamp String 第一页查询发起时的时间
|
|
* pageIndex Number 页码
|
|
* pageSize Number 页容量
|
|
*/
|
|
function pointsRecordlist ({
|
|
timestamp,
|
|
pageIndex,
|
|
pageSize
|
|
}) {
|
|
return fly.get("points/pointsRecord/list", {
|
|
timestamp,
|
|
pageIndex,
|
|
pageSize
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 积分记录-积分排行接口
|
|
* timestamp String 第一页查询发起时的时间
|
|
* pageIndex Number 页码
|
|
* pageSize Number 页容量
|
|
* rankingType Number 排名方式:0-周,1-月
|
|
*/
|
|
|
|
function pointsRankinglist ({
|
|
timestamp,
|
|
pageIndex,
|
|
pageSize,
|
|
rankingType
|
|
}) {
|
|
return fly.get("points/pointsRanking/list", {
|
|
timestamp,
|
|
pageIndex,
|
|
pageSize,
|
|
rankingType
|
|
})
|
|
}
|
|
/**
|
|
* 积分记录-锦水-积分排行接口 v2 排名方式发生改变
|
|
* timestamp String 第一页查询发起时的时间
|
|
* pageIndex Number 页码
|
|
* pageSize Number 页容量
|
|
* rankingType Number 排名方式:0-网格,1-街道
|
|
*/
|
|
function userPointsRankinglist ({
|
|
timestamp,
|
|
pageIndex,
|
|
pageSize,
|
|
rankingType
|
|
}) {
|
|
return fly.get("app-user/userPointsRanking/list", {
|
|
timestamp,
|
|
pageIndex,
|
|
pageSize,
|
|
rankingType
|
|
})
|
|
}
|
|
|
|
// *****************************爱心互助接口***************************
|
|
|
|
/**
|
|
* 排行榜
|
|
*/
|
|
function leaderboard (param) {
|
|
return fly.get("heart/volunteer/leaderboard", param)
|
|
}
|
|
/**
|
|
* 活动详情
|
|
*/
|
|
function detail ({id,actType}) {
|
|
return fly.get(`heart/act/detail`,{
|
|
id: id,
|
|
actType: actType
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 未通过活动详情
|
|
*/
|
|
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 clockListV2 ({ actId, pageIndex, pageSize}) {
|
|
return fly.get("heart/act/V2/clockList", {
|
|
actId,
|
|
pageIndex,
|
|
pageSize
|
|
})
|
|
}
|
|
/**
|
|
* 常用语列表
|
|
*/
|
|
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)
|
|
// }
|
|
|
|
/**
|
|
* 志愿者认证 v2
|
|
*/
|
|
function authenticate (data) {
|
|
return fly.post("app-user/volunteer/v2/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)
|
|
}
|
|
function completeInfo (data) {
|
|
return fly.post("app-user/user/completeInfo", data)
|
|
}
|
|
//居民 完善个人信息
|
|
function completeResidentInfo (data) {
|
|
return fly.post("app-user/user/completeResidentInfo", data)
|
|
}
|
|
//党员 完善个人信息
|
|
function completePartyInfo (data) {
|
|
return fly.post("app-user/user/completePartyInfo", data)
|
|
}
|
|
// 居民 完善个人信息v2 不需要穿验证码
|
|
function completeResidentInfoV2 (para) {
|
|
return fly.post("app-user/user/v2/completeResidentInfo", para)
|
|
}
|
|
// 党员 完善个人信息 v2 不需要穿验证码
|
|
function completePartyInfoV2 (para) {
|
|
return fly.post("app-user/user/v2/completePartyInfo", 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", {
|
|
type: 'volunteer',
|
|
wxCode,
|
|
encryptedData,
|
|
iv
|
|
})
|
|
}
|
|
|
|
// 志愿者去哪儿-我要申请
|
|
function applyAct (para) {
|
|
return fly.post("heart/actApply/applyAct", para)
|
|
}
|
|
// 志愿者去哪儿-申请记录
|
|
function applyRecord ({
|
|
pageIndex,
|
|
pageSize
|
|
}) {
|
|
return fly.get("heart/actApply/applyRecord", {
|
|
pageIndex,
|
|
pageSize
|
|
})
|
|
}
|
|
// 志愿者去哪儿-活动详情
|
|
function applyActDetail (id) {
|
|
return fly.get(`heart/actApply/applyActDetail/${id}`)
|
|
}
|
|
|
|
// 获取配置图片
|
|
function getImgUrl (imgType) {
|
|
return fly.get(`imgConfig/getImgUrl/${imgType}`)
|
|
}
|
|
|
|
// *****************************爱心互助接口***************************end
|
|
// 获取默认网格信息
|
|
function getDefaultGridInfo () {
|
|
return fly.get("dic/getDefaultGridInfo")
|
|
}
|
|
// 获取居民端配置
|
|
function getResidentConfig () {
|
|
return fly.get("residentConfig/getResidentConfig")
|
|
}
|
|
|
|
// *****************************获取临时凭证接口****6.22***************end
|
|
// 获取临时凭证用于跳转到数据端
|
|
function getScrip () {
|
|
return fly.post("admin/getScrip")
|
|
}
|
|
// 获取首页电话
|
|
function getHomePhone () {
|
|
return fly.get("imgConfig/getImgUrl/3")
|
|
}
|
|
|
|
/**
|
|
* 积分记录-等级排行接口 6.28
|
|
* timestamp String 第一页查询发起时的时间
|
|
* pageIndex Number 页码
|
|
* pageSize Number 页容量
|
|
*/
|
|
|
|
function gradeRankinglist ({
|
|
timestamp,
|
|
pageIndex,
|
|
pageSize
|
|
}) {
|
|
return fly.get("app-user/user/gradeRanking/list", {
|
|
timestamp,
|
|
pageIndex,
|
|
pageSize
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 用户签到 2020.07.24
|
|
*/
|
|
|
|
function userInfoSignUp () {
|
|
return fly.get("app-user/user/sign")
|
|
}
|
|
|
|
// 一键服务/解码锦水 改版模块类别接口
|
|
function moduleCategory(params) {
|
|
return fly.get('news/module/moduleCategory', params)
|
|
}
|
|
|
|
// 锦水清风-我要举报
|
|
function reportIssue (para) {
|
|
return fly.post("custom/reportissue/submit", para)
|
|
}
|
|
// 一键服务-锦水清风-举报问题列表接口
|
|
function reportIssueList(para) {
|
|
return fly.get('custom/reportissue/list', para)
|
|
}
|
|
//一键服务-锦水清风-举报问题详情接口
|
|
function reportIssueDetail (id) {
|
|
return fly.get(`custom/reportissue/detail/${id}`)
|
|
}
|
|
//志愿者标签列表
|
|
function getVolunteerTags () {
|
|
return fly.get(`app-user/volunteer/tags`)
|
|
}
|
|
//居民扫签到码获取活动信息接口
|
|
function getActInfo (para) {
|
|
return fly.get(`act/actsignin/actInfo`, para)
|
|
}
|
|
// 居民签到打卡
|
|
function signIn (para) {
|
|
return fly.post("act/actsignin/signin", para)
|
|
}
|
|
|
|
// 建议直通-我的建议
|
|
function suggestDict (para) {
|
|
return fly.post("custom/advice/submit", para)
|
|
}
|
|
// 一键服务-建议直通-建议列表接口
|
|
function suggestDictList(para) {
|
|
return fly.get('custom/advice/list', para)
|
|
}
|
|
//一键服务-建议直通-建议详情接口
|
|
function suggestDetail (id) {
|
|
return fly.get(`custom/advice/detail/${id}`)
|
|
}
|
|
//志愿者注册-志愿者部门列表
|
|
function getVolunteerDepts () {
|
|
return fly.get(`app-user/volunteer/depts`)
|
|
}
|
|
//志愿者银行-公益积分记录
|
|
function getCharityPoints (para) {
|
|
return fly.get(`points/charityPoints`, para)
|
|
}
|