日照项目的居民端小程序
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.
 
 
 

578 lines
12 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,
// 爱心互助
getVolunteerList,
getActivityList,
getInProgress,
getImgUrl,
getMyActivityList,
getHeartConfigs,
getActLookBack,
updateWxUserInfo,
detail: detail,
rejectDetail: rejectDetail,
cancelDetail: cancelDetail,
clockAddressDetail: clockAddressDetail,
clockList: clockList,
getPhraseList: getPhraseList,
sagenumAddOne: sagenumAddOne,
clock: clock,
authenticate: authenticate,
signup: signup,
cancelsignup: cancelsignup,
getSignedList: getSignedList,
unpassActivityDetail: unpassActivityDetail,
completeInfoV2: completeInfoV2,
getTokenV3: getTokenV3,
getWxPhone: getWxPhone,
completeResidentInfoV2: completeResidentInfoV2,
completePartyInfoV2: completePartyInfoV2,
userPointsRankinglist: userPointsRankinglist,
getDefaultGridInfo: getDefaultGridInfo,
getResidentConfig: getResidentConfig,
getScrip: getScrip,
getHomePhone: getHomePhone,
gradeRankinglist: gradeRankinglist,
newlive: newlive
}
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 prepareComplete () {
return fly.post("heart/resi/volunteer/selectvolunteerinfo", {})
}
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 getVolunteerList (param) {
return fly.post("heart/resi/act/leaderboard",{
pageNo:param.pageIndex,
pageSize:param.pageSize,
customerId:param.customerId
})
}
/**
* 活动详情
*/
function detail(id) {
return fly.post(`heart/resi/act/detail`, {
actId: 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.post("heart/resi/act/livereclist", {
actId: actId
})
}
/**
* 常用语列表
*/
function getPhraseList() {
return fly.get("heart/phrase/getPhraseList")
}
/**
* 使用常用语
*/
function sagenumAddOne(id) {
return fly.post("heart/phrase/sagenumAddOne", {
id: id
})
}
function getActivityList (params) {
return fly.post("heart/resi/act/list", {
pageNo:params.pageIndex,
pageSize:params.pageSize,
customerId:params.customerId
})
}
function getActLookBack(params){
return fly.post("heart/resi/act/actlookback", {
pageNo:params.pageIndex,
pageSize:params.pageSize,
customerId:params.customerId
})
}
function bannerListV2 () {
return fly.get("heart/actbanner/banner/list")
}
// 获取配置图片
function getImgUrl (imgType) {
return fly.get(`imgConfig/getImgUrl/${imgType}`)
}
// 正在进行中的活动
function getInProgress(){
return fly.post("heart/resi/act/inprogress")
}
// 获取配置信息
function getHeartConfigs(param){
return fly.post("heart/actcustomized/getconfigs",param)
}
/**
* 活动打卡
*/
function clock(data) {
return fly.post("heart/resi/act/signin", data)
}
function newlive(data) {
return fly.post("heart/resi/act/insertlive", data)
}
// 我的活动
function getMyActivityList(param){
return fly.post("heart/resi/act/list/"+param.type,{
pageSize:param.pageSize,
pageNo:param.pageIndex,
customerId:param.customerId
})
}
// /**
// * 志愿者认证
// */
// function authenticate(data) {
// return fly.post('app-user/volunteer/authenticate', data)
// }
/**
* 志愿者认证 v2
*/
function authenticate(data) {
return fly.post("heart/resi/volunteer/authenticate", data)
}
/**
* 活动报名
*/
function signup(actId) {
return fly.post(`heart/act/signup?actId=${actId}`)
}
/**
* 取消报名
*/
function cancelsignup(id, cid, response) {
return fly.post("heart/resi/act/cancelsignup", {
actId: id,
failureReason: response,
customerId: cid
})
}
/**
* 已报名活动
*/
function getSignedList({ pageIndex, pageSize, timestamp, actType }) {
return fly.get("heart/act/signupList", {
pageIndex,
pageSize,
timestamp,
actType
})
}
/**
* 未通过活动详情
*/
function unpassActivityDetail(id) {
return fly.post(`heart/resi/act/rejectdetail`,{actId:id})
}
/**
* 更新微信用户信息
*/
function updateWxUserInfo(param) {
return fly.post('epmetuser/user/updatewxuserinfo',param)
}
/**
* 用户完善个人信息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.post('auth/login/getresiwxphone', {
wxCode,
encryptedData,
iv
})
}
// *****************************爱心互助接口***************************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
})
}