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.
214 lines
4.3 KiB
214 lines
4.3 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,
|
|
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
|
|
}
|
|
|
|
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 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 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-------------------
|
|
|
|
|