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.
		
		
		
		
		
			
		
			
				
					
					
						
							479 lines
						
					
					
						
							9.4 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							479 lines
						
					
					
						
							9.4 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,
							 | 
						|
								  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,
							 | 
						|
								  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
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								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.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---------------------
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 获取 议题列表
							 | 
						|
								 */
							 | 
						|
								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 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-------------------
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 积分记录-积分记录接口
							 | 
						|
								 * 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() {
							 | 
						|
								  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)
							 | 
						|
								// }
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 志愿者认证 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', {
							 | 
						|
								    wxCode,
							 | 
						|
								    encryptedData,
							 | 
						|
								    iv
							 | 
						|
								  })
							 | 
						|
								}
							 | 
						|
								// *****************************爱心互助接口***************************end
							 | 
						|
								
							 |