123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- import request from '@/utils/request'
- /*
- 字典key: GEIDCO_LEADER_DICT
- 主席: chairman
- 副主席: vice-chairman
- 秘书长: secretary-general
- 副秘书长: deputy-secretary-general
- 字典key: GEIDCO_LEADER_DICT_EN
- Chairman: chairman
- Vice-chairman: vice-chairman
- Secretary-General: secretary-general
- Deputy-Secretary-General: deputy-secretary-general
- */
- /*
- 图片接口
- */
- export const getBannerUrls = (params) => {
- return new request({
- url: './meeting/meetingBannerConfigs/getUrls',
- method: 'get',
- params: params
- });
- }
- /*
- 1.理事(职位)查询接口 (不用传参)
- id:主键ID, name:中文名, nameEn:英文名, positionName:中文职位(对应字典GEIDCO_LEADER_DICT), positionNameEn:英文职位(对应字典GEIDCO_LEADER_DICT_EN)
- photoUrl:头像地址, introduction:中文简介, introductionEn:英文简介
- */
- export const getMeetingGeidcoLeaders = (params) => {
- return new request({
- url: './meeting/meetingGeidcoLeaders/forGate',
- method: 'get',
- params: params
- });
- }
- /*
- 2.理事投票接口
- 参数格式如下(leaderId对应接口1的主键ID,type(0赞成,1反对,2弃权)):
- meetingGeidcoLeaderNumDetail:[
- {leaderId:"6cfa3529b48b11eba0e38cec4b8bb500",type:"0"},
- {leaderId:"adfa86deb6de11eba0e38cec4b8bb500",type:"1"}
- ]
- 调用如下:
- save: function(){
- this.submitHandler((token) => {
- saveOrUpdate(JSON.stringify(this.meetingGeidcoLeaderNumDetail), token).then(result => {
- //提示投票成功(提示信息要区分中英文)
- }).catch((error) => {
- // 此处你的业务代码
- this.resetToken();
- });
- });
- },
- */
- export function saveOrUpdateLeader(meetingGeidcoLeaderNumDetail, id, token) {
- return new request({
- url: './meeting/meetingGeidcoLeaderNumDetails',
- method: 'post',
- headers: {
- token
- },
- data: {
- meetingGeidcoLeaderNumDetail: meetingGeidcoLeaderNumDetail,
- meetingGeidcoUserId: id
- }
- });
- }
- /*
- 3.事项查询接口(不用传参)
- id:主键ID, title:中文标题, titleEn:英文标题, introduction:中文简介, introductionEn:英文简介
- */
- export const getMeetingGeidcoMatters = (params) => {
- return new request({
- url: './meeting/meetingGeidcoMatters/forGate',
- method: 'get',
- params: params
- });
- }
- /*
- 4.事项投票接口
- 参数格式如下(matterId对应接口1的主键ID,type(0赞成,1反对,2弃权)):
- meetingGeidcoMatterNumDetail:[
- {matterId:"d8bc398fb78211eba0e38cec4b8bb500",type:"0"},
- {matterId:"ec342167b78211eba0e38cec4b8bb500",type:"1"}
- ]
- 调用同接口2
- */
- export function saveOrUpdateMatter(meetingGeidcoMatterNumDetail, id, token) {
- return new request({
- url: './meeting/meetingGeidcoMatterNumDetails',
- method: 'post',
- headers: {
- token
- },
- data: {
- meetingGeidcoMatterNumDetail: meetingGeidcoMatterNumDetail,
- meetingGeidcoUserId: id
- }
- });
- }
- /*
- 5.判断条件
- 是否展示首页入口
- isShowHomeEntrance
- 是否为平台会员
- isDcpVip
- 是否投过理事
- isVotedLeader
- 是否投过事项
- IsVotedMatter
- */
- export const getCouncilVoteSituation = () => {
- return new request({
- url: './meeting/meetingGeidcoLeaderNumDetails/getCouncilVoteSituation',
- method: 'get'
- });
- }
- //未登录是否显示投票入口
- export const getCouncilVoteSituationBeforeLogin = () => {
- return new request({
- url: './meeting/meetingGeidcoLeaderNumDetails/getCouncilVoteSituationBeforeLogin',
- method: 'get'
- });
- }
- //投票码校验
- export const voteCodeVakidate = (voteCode) => {
- return new request({
- url: './meeting/meetingParamConfigs/voteCodeVakidate',
- method: 'get',
- params: {
- "voteCode": voteCode
- }
- });
- }
- //验证码校验
- export const captchaValidate = (captcha, codeUid) => {
- return new request({
- url: './meeting/commonValidate/captcha',
- method: 'post',
- params: {
- "captcha": captcha,
- "codeUid": codeUid
- }
- });
- }
|