import request from '../request'; import handle from '../handle'; import { REQUEST_CONFIG } from '../../config'; /** * 跳转授权链接 * @param {String} appid appid * @param {Url} redirect_uri 授权后重定向的回调链接地址, 请使用 urlEncode 对链接进行处理 * @param {String} response_type 返回类型,请填写code * @param {String} scope snsapi_base (不弹出授权页面,直接跳转,只能获取用户openid),snsapi_userinfo (弹出授权页面,可通过openid拿到昵称、性别、所在地。并且, 即使在未关注的情况下,只要用户授权,也能获取其信息 ) */ export const WebOauth2Authorize = (queryData: any) => { return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${queryData.appid}&redirect_uri=${queryData.redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`; }; /** 获取系统状态 */ export const GetAppStatus = async (queryData: any) => { const resp = handle.promistHandle( await request.doPost( `${REQUEST_CONFIG.BASE_URL}kstserver/status?appId=${queryData.appId}`, {}, { construction: true, } ) ); return handle.catchPromise(resp, () => resp); }; /** 页面参数查询列表 */ export const SysAppPageList = async (queryData: any) => { const resp = handle.promistHandle( await request.doPost( `${REQUEST_CONFIG.BASE_URL}wsgw/sysAppPage/api/List/callApiJSON.do`, queryData, { showLoading: false, } ) ); return handle.catchPromise(resp, () => resp); }; /** 查询就诊人信息 */ export const QueryBaseMemberList_V3 = async (queryData: any) => { const resp = handle.promistHandleNew( await request.doPost( `${REQUEST_CONFIG.BASE_URL}wsgw/accountMember/api/QueryBaseMemberList_V3/callApiJSON.do`, queryData ) ); return handle.catchPromiseNew(resp, () => resp); }; /** 获取表单配置信息 */ export const BaseFormQuery = async (queryData: any) => { let resp = handle.promistHandle( await request.doPost( `${REQUEST_CONFIG.BASE_URL}wsgw/base/form/Query/callApiJSON.do`, queryData, { showLoading: false, } ) ); return handle.catchPromise(resp, () => resp); }; /** 查询功能菜单列表 */ export const SysclientappmenuList = async (queryData: any) => { let resp = handle.promistHandle( await request.doPost( `${REQUEST_CONFIG.BASE_URL}wsgw/sysclientappmenu/api/List/callApiJSON.do`, queryData, { showLoading: false, } ) ); return handle.catchPromise(resp, () => resp); };