How to use postOptions method in apimocker

Best JavaScript code snippet using apimocker

Api.js

Source:Api.js Github

copy

Full Screen

1//根据当前关注的公众号或者生活号获取医院相关配置2export function hospitalInfo(params, dependent) {3 let getOptions = {4 urlPath: "/api/hospitalInfo",5 params: params,6 dependent: dependent,7 showLoading: false8 };9 return shareInst.http.get(getOptions);10}11export function queryRegHospAndDepts(params) {12 let getOptions = {13 urlPath: "/api/reghosp/queryRegHospAndDepts",14 params: params15 };16 return shareInst.http.get(getOptions);17}18//首页切换医院19export function getallcustomerhospital(params) {20 let postOptions = {21 urlPath: "/api/hospital/getallcustomerhospital",22 params: params23 };24 return shareInst.http.post(postOptions);25}26//登录获取短信验证码27export function getverificationcode(params) {28 let postOptions = {29 urlPath: "/api/user/getverificationcode",30 params: params31 };32 return shareInst.http.post(postOptions);33}34//登录注册接口35export function loginorregister(params) {36 let postOptions = {37 urlPath: '/api/user/loginorregister',38 params: params39 };40 return shareInst.http.post(postOptions);41}42//用户退出登录43export function logout(params) {44 let postOptions = {45 urlPath: '/api/user/logout',46 params: params47 };48 return shareInst.http.post(postOptions);49}50//获取首页功能模块51export function getfunctionlist(data) {52 let postOptions = {53 urlPath: '/api/hospital/getfunctionlist',54 params: data55 };56 return shareInst.http.post(postOptions);57}58//获取科室列表59export function getregdepartmentlist(params) {60 let postOptions = {61 urlPath: '/api/registration/getregdepartmentlist',62 params: params63 };64 return shareInst.http.post(postOptions);65}66//按专家获取医生列表67export function getregdoctorlistbydeptid(params) {68 let postOptions = {69 urlPath: '/api/registration/getregdoctorlistbydeptid',70 params: params71 };72 return shareInst.http.post(postOptions);73}74//按时间获取预约医生列表75export function getregdoctorlistbydate(params) {76 let postOptions = {77 urlPath: '/api/registration/getregdoctorlistbydate',78 params: params79 };80 return shareInst.http.post(postOptions);81}82//获取预约医生信息83export function getregdoctorinfo(params) {84 let postOptions = {85 urlPath: '/api/registration/getregdoctorinfo',86 params: params87 };88 return shareInst.http.post(postOptions);89}90//获取预约医生排班列表信息91export function getdocschedulelist(params) {92 let postOptions = {93 urlPath: '/api/registration/getdocschedulelist',94 params: params95 };96 return shareInst.http.post(postOptions);97}98//获取排班信息99export function getregschedulelist(params) {100 let postOptions = {101 urlPath: '/api/registration/getregschedulelist',102 params: params103 };104 return shareInst.http.post(postOptions);105}106//关注107export function collection(params) {108 let postOptions = {109 urlPath: '/api/registration/collection',110 params: params111 };112 return shareInst.http.post(postOptions);113}114//预约挂号115export function regconfirmation(params) {116 let postOptions = {117 urlPath: '/api/registration/regconfirmation',118 params: params119 };120 return shareInst.http.post(postOptions);121}122//获取家庭成员列表123export function getallrelativeinfo(params) {124 let postOptions = {125 urlPath: '/api/relative/getallrelativeinfo',126 params: params127 };128 return shareInst.http.post(postOptions);129}130//保存家庭成员131export function saverelative(params) {132 let postOptions = {133 urlPath: '/api/relative/saverelative',134 params: params,135 contentType: "application/json;charset=UTF-8"136 };137 return shareInst.http.post(postOptions);138}139//添加/编辑卡140export function savecard(params) {141 let postOptions = {142 urlPath: '/api/relative/savecard',143 params: params,144 failPrompt: false,145 mainData: false146 };147 return shareInst.http.post(postOptions);148}149//获取微信的配置150export function getWeiXinCongfig(currentUrl) {151 let endNum = currentUrl.indexOf("#");152 let url = currentUrl.substring(0, endNum);153 let getOptions = {154 urlPath: "/portalwxapi/queryreport/getWeiXinCongfig",155 params: {156 url: url157 }158 };159 return shareInst.http.get(getOptions);160}161//获取微信的配置162export function getTextWeiXinCongfig(currentUrl) {163 let endNum = currentUrl.indexOf("#");164 let url = currentUrl.substring(0, endNum);165 let getOptions = {166 urlPath: "/api/test/getWeiXinCongfig",167 params: {168 url: currentUrl169 }170 };171 return shareInst.http.get(getOptions);172}173export function registersign(params) {174 let postOptions = {175 urlPath: "/api/qlc/registration/registersign",176 params: params177 };178 return shareInst.http.post(postOptions);179}180//就诊卡信息181export function payinfo(params) {182 let postOptions = {183 urlPath: "/api/pay/payinfo",184 params: params185 };186 return shareInst.http.post(postOptions);187}188export function payinfo1(params) {189 let postOptions = {190 urlPath: "/api/pay/payinfo",191 params: params,192 showLoading: false,193 failPrompt: false,194 };195 return shareInst.http.post(postOptions);196}197//获取用户点评198export function regreviewlist(params) {199 let postOptions = {200 urlPath: '/api/qlc/registration/regreviewlist',201 params: params202 };203 return shareInst.http.post(postOptions);204}205//验证用户支付206export function syncvalidate(params) {207 let postOptions = {208 urlPath: '/api/qlc/outpatient/syncvalidate',209 params: params,210 mainData: false,211 showLoading: false,212 };213 return shareInst.http.get(postOptions);214}215//获取支付挂号结果216export function registerpayresult(params) {217 let postOptions = {218 urlPath: '/api/qlc/registration/registerpayresult',219 params: params,220 mainData: false,221 showLoading: false222 };223 return shareInst.http.post(postOptions);224}225export function regcancel(params) {226 let postOptions = {227 urlPath: '/api/registration/regcancel',228 params: params,229 mainData: false,230 failPrompt: false,231 };232 return shareInst.http.post(postOptions);233}234//获取医院支持卡类型235export function cardtype(params) {236 let getOptions = {237 urlPath: '/api/qlc/cardtype',238 params: params239 };240 return shareInst.http.get(getOptions);241}242// 就诊卡充值加签接口243export function unifiedorder(params) {244 let getOptions = {245 urlPath: '/api/recharge/unifiedorder',246 params: params247 };248 return shareInst.http.get(getOptions);249}250//修改亲友姓名251export function updaterealname(params) {252 let postOptions = {253 urlPath: '/api/relative/updaterealname',254 params: params255 };256 return shareInst.http.post(postOptions);257}258//修改亲友身份证号259export function updateidcard(params) {260 let postOptions = {261 urlPath: '/api/relative/updateidcard',262 params: params263 };264 return shareInst.http.post(postOptions);265}266//修改亲友手机号267export function updatemobilenumber(params) {268 let postOptions = {269 urlPath: '/api/relative/updatemobilenumber',270 params: params271 };272 return shareInst.http.post(postOptions);273}274//修改亲友身高275export function updateheight(params) {276 let postOptions = {277 urlPath: '/api/relative/updateheight',278 params: params279 };280 return shareInst.http.post(postOptions);281}282//修改亲友血型283export function updatebloodtype(params) {284 let postOptions = {285 urlPath: '/api/relative/updatebloodtype',286 params: params287 };288 return shareInst.http.post(postOptions);289}290//修改亲友性别291export function updategender(params) {292 let postOptions = {293 urlPath: '/api/relative/updategender',294 params: params295 };296 return shareInst.http.post(postOptions);297}298//修改亲友出生日期299export function updatebirthday(params) {300 let postOptions = {301 urlPath: '/api/relative/updatebirthday',302 params: params303 };304 return shareInst.http.post(postOptions);305}306//修改亲友监护人姓名307export function updateguardianname(params) {308 let postOptions = {309 urlPath: '/api/relative/updateguardianname',310 params: params311 };312 return shareInst.http.post(postOptions);313}314//修改亲友监护人证件号315export function updateguardiancardno(params) {316 let postOptions = {317 urlPath: '/api/relative/updateguardiancardno',318 params: params319 };320 return shareInst.http.post(postOptions);321}322//修改亲友监护人手机号323export function updateguardianphone(params) {324 let postOptions = {325 urlPath: '/api/relative/updateguardianphone',326 params: params327 };328 return shareInst.http.post(postOptions);329}330//修改亲友监护人证件类型331export function updateguardiancerttype(params) {332 let postOptions = {333 urlPath: '/api/relative/updateguardiancerttype',334 params: params335 };336 return shareInst.http.post(postOptions);337}338//修改亲友监护人证件类型339export function deletecard(params) {340 let postOptions = {341 urlPath: '/api/relative/deletecard',342 params: params343 };344 return shareInst.http.post(postOptions);345}346//获取所有地区列表347export function getallareas(params) {348 let postOptions = {349 urlPath: '/api/areas/getallareas',350 params: params351 };352 return shareInst.http.post(postOptions);353}354//获取所有地区列表355export function getallareasdata(params) {356 let postOptions = {357 urlPath: '/api/areas/getallareasdata',358 params: params359 };360 return shareInst.http.post(postOptions);361}362//就诊卡充值支付结果363export function rechargepayresult(params) {364 let postOptions = {365 urlPath: '/api/recharge/rechargepayresult',366 params: params,367 mainData: false,368 showLoading: false369 };370 return shareInst.http.post(postOptions);371}372//删除亲友373export function deleterelativeinfo(params) {374 let postOptions = {375 urlPath: '/api/relative/deleterelativeinfo',376 params: params377 };378 return shareInst.http.post(postOptions);379}380//待支付记录列表381export function pendingpaylist(params) {382 let postOptions = {383 urlPath: '/api/qlc/outpatient/pendingpaylist',384 params: params385 };386 return shareInst.http.post(postOptions);387}388//缴费记录列表389export function alreadypaylist(params) {390 let postOptions = {391 urlPath: '/api/qlc/outpatient/alreadypaylist',392 params: params393 };394 return shareInst.http.post(postOptions);395}396//文案提示397export function outpatientHint(params) {398 let postOptions = {399 urlPath: '/api/qlc/outpatient/hint',400 params: params401 };402 return shareInst.http.post(postOptions);403}404//支付费用详情405export function pendingpaydetail(params) {406 let postOptions = {407 urlPath: '/api/qlc/outpatient/pendingpaydetail',408 params: params409 };410 return shareInst.http.post(postOptions);411}412//合单支付加签413export function mergeordersign(params) {414 let postOptions = {415 urlPath: '/api/qlc/outpatient/mergeordersign',416 params: params417 };418 return shareInst.http.post(postOptions);419}420//校验支付结果421export function outpatientSyncvalidate(params) {422 let postOptions = {423 urlPath: '/api/qlc/outpatient/syncvalidate',424 params: params,425 showLoading: false426 };427 return shareInst.http.post(postOptions);428}429//合单支付结果430export function mergepayorderresult(params) {431 let postOptions = {432 urlPath: '/api/qlc/outpatient/mergepayorderresult',433 params: params,434 mainData: false,435 showLoading: false436 };437 return shareInst.http.post(postOptions);438}439//缴费记录结果440export function alreadypayresult(params) {441 let postOptions = {442 urlPath: '/api/qlc/outpatient/alreadypayresult',443 params: params444 };445 return shareInst.http.post(postOptions);446}447//查询住院信息(当前和历史)4.6.2.请求住院基本信息接口(全流程住院信息新接口)448export function stayhospitalallinfo(params) {449 let postOptions = {450 urlPath: '/api/registration/stayhospitalallinfo',451 params: params,452 };453 return shareInst.http.post(postOptions);454}455//查询押金信息456export function deposit(params) {457 let postOptions = {458 urlPath: '/api/qlc/registration/deposit',459 params: params460 };461 return shareInst.http.post(postOptions);462}463//查询住院费用总额列表--每天住院费用(原先的住院清单接口)464export function stayhospitallist(params) {465 let postOptions = {466 urlPath: '/api/registration/stayhospitallist',467 params: params468 };469 return shareInst.http.post(postOptions);470}471//查询押金缴费记录清单472export function depositlist(params) {473 let postOptions = {474 urlPath: '/api/qlc/registration/depositlist',475 params: params476 };477 return shareInst.http.post(postOptions);478}479//住院押金支付 -- 加签480export function stayhosordersign(params) {481 let postOptions = {482 urlPath: '/api/qlc/registration/stayhosordersign',483 params: params484 };485 return shareInst.http.post(postOptions);486}487//住院押金支付 -- 获得支付结果488export function stayhospayresult(params) {489 let postOptions = {490 urlPath: '/api/qlc/registration/stayhospayresult',491 params: params,492 mainData: false,493 showLoading: false494 };495 return shareInst.http.post(postOptions);496}497//门诊清单接口498export function outpatientlist(params) {499 let postOptions = {500 urlPath: '/api/registration/outpatientlist',501 params: params502 };503 return shareInst.http.post(postOptions);504}505//当天取号信息列表506export function gettodaytakenolist(params) {507 let postOptions = {508 urlPath: '/api/qlc/registration/gettodaytakenolist',509 params: params510 };511 return shareInst.http.post(postOptions);512}513//判断是否已缴费514export function ispayorder(params) {515 let postOptions = {516 urlPath: '/api/qlc/registration/ispayorder',517 params: params518 };519 return shareInst.http.post(postOptions);520}521//取号候诊支付加签522export function takenosign(params) {523 let postOptions = {524 urlPath: '/api/qlc/registration/takenosign',525 params: params526 };527 return shareInst.http.post(postOptions);528}529//取号候诊支付结果530export function takenopayresult(params) {531 let postOptions = {532 urlPath: '/api/qlc/registration/takenopayresult',533 params: params,534 mainData: false,535 showLoading: false536 };537 return shareInst.http.post(postOptions);538}539//取号540export function gettakeno(params) {541 let postOptions = {542 urlPath: '/api/qlc/registration/gettakeno',543 params: params544 };545 return shareInst.http.post(postOptions);546}547/**548 * 挂号记录549 * page550 * regtype:0->预约挂号,1->当日挂号551 * page=1&regtype=0&rows=8&ticket=11936c6f4bd431d8fa5a88d32f23b68c&uid=2528552 */553export function getreghistorylist(params) {554 let postOptions = {555 urlPath: '/api/registration/getreghistorylist',556 params: params557 };558 return shareInst.http.post(postOptions);559}560//获取用户点评所有信息561export function gettodayreview(params) {562 let postOptions = {563 urlPath: '/api/qlc/registration/gettodayreview',564 params: params565 };566 return shareInst.http.post(postOptions);567}568//就医点评569export function review(params) {570 let postOptions = {571 urlPath: '/api/qlc/registration/review',572 params: params573 };574 return shareInst.http.post(postOptions);575}576//获取我的关注医生列表577export function getcollectionlist(params) {578 let postOptions = {579 urlPath: '/api/registration/getcollectionlist',580 params: params581 };582 return shareInst.http.post(postOptions);583}584//充值记录列表查询585export function getrechargelist(params) {586 let postOptions = {587 urlPath: '/api/recharge/getrechargelist',588 params: params589 };590 return shareInst.http.post(postOptions);591}592//充值记录明细593export function getrechargedetail(params) {594 let postOptions = {595 urlPath: '/api/recharge/getrechargedetail',596 params: params597 };598 return shareInst.http.post(postOptions);599}600//获取个人中心配置列表601export function getpersonalcenterlist(params) {602 let postOptions = {603 urlPath: '/api/qlc/personal/getpersonalcenterlist',604 params: params605 };606 return shareInst.http.post(postOptions);607}608//查询业务卡609export function getcardinfo(params) {610 let postOptions = {611 urlPath: '/api/qlc/relative/getcardinfo',612 params: params613 };614 return shareInst.http.post(postOptions);615}616//查报告列表617export function queryReportList(params) {618 let getOptions = {619 urlPath: '/api/qlc/queryreportlist',620 params: params621 };622 return shareInst.http.post(getOptions);623}624//查报告详情625export function queryReportDetail(params) {626 let getOptions = {627 urlPath: '/api/qlc/queryreportdetaillist',628 params: params629 };630 return shareInst.http.get(getOptions);631}632//获取用户信息633export function getuserinfo(params) {634 let getOptions = {635 urlPath: '/api/qlc/personal/getuserinfo',636 params: params637 };638 return shareInst.http.get(getOptions);639}640//在线建档641export function onlinebuildrecord(params) {642 let getOptions = {643 urlPath: '/api/qlc/personal/onlinebuildrecord',644 params: params,645 mainData: false,646 failPrompt: false,647 loadText: '正在建卡,请稍候'648 };649 return shareInst.http.get(getOptions);650}651//获取上次预约科室652export function getlatestregdepartment(params) {653 let getOptions = {654 urlPath: '/api/registration/getlatestregdepartment',655 params: params,656 showLoading: false657 };658 return shareInst.http.get(getOptions);659}660//获取上次预约的医生661export function getlatestregdoctor(params) {662 let getOptions = {663 urlPath: '/api/registration/getlatestregdoctor',664 params: params,665 showLoading: false666 };667 return shareInst.http.get(getOptions);668}669//拉取已有业务卡670export function getalreadycard(params) {671 let getOptions = {672 urlPath: '/api/qlc/personal/getalreadycard',673 params: params,674 failPrompt: false,675 mainData: false676 };677 return shareInst.http.get(getOptions);678}679//修改亲友证件类型680export function updatecerttype(params) {681 let getOptions = {682 urlPath: '/api/relative/updatecerttype',683 params: params,684 };685 return shareInst.http.get(getOptions);686}687//修改亲友关系688export function updaterelationship(params) {689 let getOptions = {690 urlPath: '/api/relative/updaterelationship',691 params: params,692 mainData: false693 };694 return shareInst.http.get(getOptions);695}696//当日/预约挂号详情697export function getreghistorydetail(params) {698 let getOptions = {699 urlPath: '/api/registration/getreghistorydetail',700 params: params,701 };702 return shareInst.http.get(getOptions);703}704//扫码付列表705export function getscandata(params) {706 let getOptions = {707 urlPath: '/api/qlc/unifiedpay/getscandata',708 params: params,709 mainData: false,710 };711 return shareInst.http.get(getOptions);712}713//获取首页轮播图714export function gethomepagelist(params) {715 let getOptions = {716 urlPath: '/api/adv/gethomepagelist',717 params: params,718 };719 return shareInst.http.get(getOptions);720}721//在线生成条形码或者二维码接口722export function getbarcodeimage(params) {723 let getOptions = {724 urlPath: '/api/barcode/getbarcodeimage',725 params: params,726 mainData: false,727 };728 return shareInst.http.get(getOptions);729}730//支付测试731export function testPaySign(params) {732 let getOptions = {733 urlPath: '/test/api/wechat/wechatpaysign',734 params: params,735 };736 return shareInst.http.get(getOptions);737}738//获取所有地区739export function getallcustomerareas(params) {740 let getOptions = {741 urlPath: '/api/areas/getallcustomerareas',742 params: params,743 };744 return shareInst.http.get(getOptions);745}746export function guidance(url, params) {747 let getOptions = {748 urlPath: url,749 params: params,750 mainData: false751 };752 return shareInst.http.get(getOptions);753}754//报告消息推送755export function getreportdata(params) {756 let getOptions = {757 urlPath: '/api/message/getreportdata',758 params: params,759 };760 return shareInst.http.get(getOptions);761}762//获取微信推送门诊详情列表763export function getwxoutpaylist(params) {764 let getOptions = {765 urlPath: '/api/qlc/outpatient/getwxoutpaylist',766 params: params,767 };768 return shareInst.http.get(getOptions);769}770//771export function getcards(params) {772 let getOptions = {773 urlPath: '/api/qlc/personal/getcards',774 params: params,775 };776 return shareInst.http.get(getOptions);777}778export function waitingList(params, showLoading = false) {779 let getOptions = {780 urlPath: '/api/qlc/registration/waitinglist',781 params: params,782 showLoading: showLoading783 };784 return shareInst.http.get(getOptions);785}786export function presidentLogs(params) {787 let getOptions = {788 urlPath: '/api/qlc/personal/presidentlogs',789 params: params,790 mainData: false791 };792 return shareInst.http.get(getOptions);793}794export function selfMachineCount(params) {795 let getOptions = {796 urlPath: '/api/qlc/personal/selfmachinecount',797 params: params,798 mainData: false799 }800 return shareInst.http.get(getOptions);801}802export function getBindCardCode(params) {803 let getOptions = {804 urlPath: '/api/doctor/getbindcardcode',805 params: params,806 }807 return shareInst.http.get(getOptions);808}809export function getHomeFuncList(params) {810 let getOptions = {811 urlPath: '/hosintro/' + (params.hospCode || '188282') + '.json',812 params: params,813 mainData: false814 }815 return shareInst.http.get(getOptions);816}817export function getFuncList(params) {818 let getOptions = {819 urlPath: '/hosintro/' + params.type + '/' + (params.hospCode || '188282') + '.json',820 params: params,821 mainData: false822 }823 return shareInst.http.get(getOptions);824}825export function saverelativeext(params) {826 let getOptions = {827 urlPath: '/api/relative/saverelativeext',828 params: params,829 contentType: "application/json;charset=UTF-8"830 }831 return shareInst.http.post(getOptions);832}833//新UI界面中获取首页功能模块接口834export function getNewfunctionlist(data) {835 let postOptions = {836 urlPath: '/hosintro/index/' + (data.hospCode || '188282') + '.json',837 params: data,838 mainData: false839 }840 return shareInst.http.get(postOptions)841}842export function isHasMember(params) {843 let postOptions = {844 urlPath: '/api/relative/getrelative',845 params: params,846 }847 return shareInst.http.post(postOptions)848}849//文案提示850export function hintText(params) {851 let postOptions = {852 urlPath: '/api/qlc/outpatient/hintext',853 params: params854 };855 return shareInst.http.post(postOptions);856}857export function doctorLogin(params) {858 let postOptions = {859 urlPath: '/api/qlc/wzdoctor/login',860 params: params861 }862 return shareInst.http.post(postOptions);863}864export function doctorResetPwd(params) {865 let postOptions = {866 urlPath: '/api/qlc/wzdoctor/resetpwd',867 params: params868 }869 return shareInst.http.post(postOptions);870}871//医生获取所有主题 (待回答问题)dtoken=参数为登录返回的872export function reqDList(params) {873 let postOptions = {874 urlPath: '/api/qlc/wzthread/dlist',875 params: params876 }877 return shareInst.http.post(postOptions);878}879//点击单个问题 获取用户对话框880export function reqDListBytId(params) {881 let postOptions = {882 urlPath: '/api/qlc/wzthread/dlistbytid',883 params: params884 }885 return shareInst.http.post(postOptions);886}887//医生回复问题,医生界面不要上次附件功能888export function reqDoctorReply(params) {889 let postOptions = {890 urlPath: '/api/qlc/wzthread/post?dtoken=' + params.dtoken,891 data: params,892 loadText: '数据提交中'893 }894 return shareInst.http.post(postOptions);895}896//患者查询医生列表:医院id 获取问诊医生列表897export function reqDoctorList(params) {898 let postOptions = {899 urlPath: '/api/qlc/wzdoctor/list',900 params: params901 }902 return shareInst.http.post(postOptions);903}904//患者提问 附件的需要在研究下905export function reqThreadAsk(params) {906 let postOptions = {907 urlPath: '/api/qlc/wzthread/hzpost',908 data: params,909 loadText: '数据提交中'910 }911 return shareInst.http.post(postOptions);912}913export function uploadFile(params) {914 return shareInst.http.uploadFile({915 urlPath: '/api/qlc/attachment/upload',916 data: params,917 contentType: 'multipart/form-data'918 })919}920export function reqHzList(params) {921 let postOptions = {922 urlPath: '/api/qlc/wzthread/hzlist',923 params: params924 }925 return shareInst.http.post(postOptions)926}927/***********************核酸检验*************************/928export function natItemList(params) {929 let postOptions = {930 urlPath: '/api/qlc/outpatient/natItemList',931 params: params932 }933 return shareInst.http.post(postOptions)934}935//核酸检测预约(不支付)936export function natItemSub(params) {937 let postOptions = {938 urlPath: '/api/qlc/outpatient/natItemSub',939 params: params940 }941 return shareInst.http.post(postOptions)942}943//核酸检测预约加签 (调起支付)944export function natItemSign(params) {945 let postOptions = {946 urlPath: '/api/qlc/outpatient/natItemSign',947 params: params948 }949 return shareInst.http.post(postOptions)950}951//取消检测预约952export function natItemCancel(params) {953 let postOptions = {954 urlPath: '/api/qlc/outpatient/natItemCancel',955 params: params956 }957 return shareInst.http.post(postOptions)958}959// 获取结果960export function natItemResult(params) {961 let postOptions = {962 urlPath: '/api/qlc/outpatient/natItemResult',963 params: params,964 mainData: false,965 showLoading: false966 }967 return shareInst.http.post(postOptions)968}969export function natItemSignList(params) {970 let postOptions = {971 urlPath: '/api/qlc/outpatient/natItemSignList',972 params: params973 }974 return shareInst.http.post(postOptions)...

Full Screen

Full Screen

create.js

Source:create.js Github

copy

Full Screen

1var _ = require('underscore');2var headers = require('../utils/constants.js').acceptHeaders;3exports.create = function(options) {4 var requestor = options.requestor;5 var optionsToSend = {6 url: options.apiUrls.sheets7 };8 _.extend(optionsToSend, options.clientOptions);9 var createSheet = (postOptions, callback) =>10 requestor.post(_.extend({}, optionsToSend, postOptions), callback);11 var createSheetFromExisting = (postOptions, callback) => {12 var options = JSON.parse(JSON.stringify(postOptions));13 if (options.workspaceId) {14 return createSheetInWorkspace(options, callback);15 } else if (options.folderId) {16 return createSheetInFolder(options, callback);17 } else {18 return createSheet(options, callback);19 }20 };21 var createSheetInFolder = (postOptions, callback) => {22 var urlOptions = {url: buildFolderUrl(postOptions)};23 return requestor.post(_.extend({}, optionsToSend, urlOptions, postOptions), callback);24 };25 var createSheetInWorkspace = (postOptions, callback) => {26 var urlOptions = {url: buildWorkspaceUrl(postOptions)};27 return requestor.post(_.extend({}, optionsToSend, urlOptions, postOptions), callback);28 };29 var copySheet = (postOptions, callback) => {30 var urlOptions = {url: options.apiUrls.sheets + postOptions.sheetId + '/copy'};31 return requestor.post(_.extend({}, optionsToSend, urlOptions, postOptions), callback);32 };33 var importSheet = (postOptions, callback, contentType, baseUrl) => {34 var urlOptions = {35 url: baseUrl + 'import',36 contentType: contentType,37 contentDisposition: 'attachment'38 };39 return requestor.postFile(_.extend({}, optionsToSend, urlOptions, postOptions));40 };41 var importXlsxAndReplaceSheet = (postOptions, callback) => {42 var baseUrl = options.apiUrls.sheets + postOptions.sheetId + "/";43 return importSheet(postOptions, callback, headers.vndOpenXml, baseUrl);44 };45 var importCsvAndReplaceSheet = (postOptions, callback) => {46 var baseUrl = options.apiUrls.sheets + postOptions.sheetId + "/";47 return importSheet(postOptions, callback, headers.textCsv, baseUrl);48 };49 var importXlsxSheet = (postOptions, callback) => {50 return importSheet(postOptions, callback, headers.vndOpenXml, options.apiUrls.sheets);51 };52 var importCsvSheet = (postOptions, callback) => {53 return importSheet(postOptions, callback, headers.textCsv, options.apiUrls.sheets);54 };55 var importXlsxSheetIntoFolder = (postOptions, callback) => {56 return importSheet(postOptions, callback, headers.vndOpenXml, buildFolderUrl(postOptions) + "/");57 };58 var importCsvSheetIntoFolder = (postOptions, callback) => {59 return importSheet(postOptions, callback, headers.textCsv, buildFolderUrl(postOptions) + "/");60 };61 var importXlsxSheetIntoWorkspace = (postOptions, callback) => {62 return importSheet(postOptions, callback, headers.vndOpenXml, buildWorkspaceUrl(postOptions) + "/");63 };64 var importCsvSheetIntoWorkspace = (postOptions, callback) => {65 return importSheet(postOptions, callback, headers.textCsv, buildWorkspaceUrl(postOptions) + "/");66 };67 var buildFolderUrl = (requestOptions) => {68 return options.apiUrls.folders + requestOptions.folderId + '/sheets';69 };70 var buildWorkspaceUrl = (requestOptions) => {71 return options.apiUrls.workspaces + requestOptions.workspaceId + '/sheets'72 }73 return {74 createSheet : createSheet,75 createSheetFromExisting : createSheetFromExisting,76 createSheetInFolder : createSheetInFolder,77 createSheetInWorkspace : createSheetInWorkspace,78 copySheet : copySheet,79 // Not yet released in the API80 // importCsvAndReplaceSheet : importCsvAndReplaceSheet,81 // importXlsxAndReplaceSheet : importXlsxAndReplaceSheet,82 importCsvSheet : importCsvSheet,83 importXlsxSheet : importXlsxSheet,84 importCsvSheetIntoFolder : importCsvSheetIntoFolder,85 importXlsxSheetIntoFolder : importXlsxSheetIntoFolder,86 importCsvSheetIntoWorkspace : importCsvSheetIntoWorkspace,87 importXlsxSheetIntoWorkspace : importXlsxSheetIntoWorkspace,88 };...

Full Screen

Full Screen

userRequests.js

Source:userRequests.js Github

copy

Full Screen

1import { postOptions, apiUrl, fetchOptions } from './config';2const userAPI = {};3userAPI.login = (user) => {4 return fetch(apiUrl + '/api/user/signin', {5 ...postOptions,6 body: JSON.stringify(user),7 });8};9userAPI.logout = () => {10 return fetch(apiUrl + '/api/user/signout', fetchOptions);11};12userAPI.register = (user) => {13 return fetch(apiUrl + '/api/user/signup', {14 ...postOptions,15 body: JSON.stringify(user),16 });17};18userAPI.recoverPassword = async (email) => {19 fetch(apiUrl + '/api/user/forgotpassword', {20 ...postOptions,21 body: JSON.stringify({ email }),22 });23};24userAPI.choosePassword = async ({ password, token }) => {25 return await fetch(apiUrl + '/api/user/choosepassword', {26 ...postOptions,27 body: JSON.stringify({ password, token }),28 });29};30userAPI.validate = (user) => {31 return fetch(apiUrl + '/api/user/validate', {32 ...postOptions,33 body: JSON.stringify(user),34 });35};36userAPI.googleLoginRequest = async (userIDToken) => {37 let response = await fetch(apiUrl + '/api/user/googleauth', {38 ...postOptions,39 body: JSON.stringify({ userIDToken }),40 });41 return response;42};43userAPI.contactUs = async (payload) => {44 return await fetch(apiUrl + '/api/user/contactus', {45 ...postOptions,46 body: JSON.stringify(payload),47 });48};49userAPI.changePassword = async (payload) => {50 return await fetch(apiUrl + '/api/user/changepassword', {51 ...postOptions,52 body: JSON.stringify(payload),53 });54};55userAPI.changeEmail = async (payload) => {56 return await fetch(apiUrl + '/api/user/changeemail', {57 ...postOptions,58 body: JSON.stringify(payload),59 });60};61userAPI.cartPersistAddItem = async (formData) => {62 return await fetch(apiUrl + '/api/user/addcartitem', {63 ...postOptions,64 body: JSON.stringify(formData),65 });66};67userAPI.cartPersistRemoveItem = async (formData) => {68 return await fetch(apiUrl + '/api/user/removecartitem', {69 ...postOptions,70 body: JSON.stringify(formData),71 });72};73userAPI.cartPersistClear = async () => {74 return await fetch(`${apiUrl}/api/user/clearcart`, fetchOptions);75};76userAPI.getCart = async () => {77 return await fetch(`${apiUrl}/api/user/getcart`, fetchOptions);78};79userAPI.getGuestToken = async (expires) => {80 return await fetch(`${apiUrl}/api/user/getguesttoken?expires=${expires}`, {81 ...fetchOptions,82 });83};84userAPI.updateUserInfo = async (userInfo) => {85 return await fetch(apiUrl + '/api/user/updateinfo', {86 ...postOptions,87 body: JSON.stringify(userInfo),88 });89};90userAPI.keyRetrieval = async () => {91 return await fetch(apiUrl + '/api/user/retrieveapikeys', fetchOptions);92};93userAPI.keyCreation = async (description) => {94 return await fetch(95 apiUrl + `/api/user/generateapikey?description=${description.trim()}`,96 fetchOptions,97 );98};...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var apimocker = require('apimocker');2apimocker.setConfigDir(__dirname + '/config');3apimocker.setMockDataDir(__dirname + '/mockdata');4apimocker.setPort(3000);5apimocker.loadMockFiles();6apimocker.listen();7var apimocker = require('apimocker');8apimocker.setConfigDir(__dirname + '/config');9apimocker.setMockDataDir(__dirname + '/mockdata');10apimocker.setPort(3000);11apimocker.loadMockFiles();12apimocker.listen();13var apimocker = require('apimocker');14apimocker.setConfigDir(__dirname + '/config');15apimocker.setMockDataDir(__dirname + '/mockdata');16apimocker.setPort(3000);17apimocker.loadMockFiles();18apimocker.listen();19var apimocker = require('apimocker');20apimocker.setConfigDir(__dirname + '/config');21apimocker.setMockDataDir(__dirname + '/mockdata');22apimocker.setPort(3000);23apimocker.loadMockFiles();24apimocker.listen();25var apimocker = require('apimocker');26apimocker.setConfigDir(__dirname + '/config');27apimocker.setMockDataDir(__dirname + '/mockdata');28apimocker.setPort(3000);29apimocker.loadMockFiles();30apimocker.listen();31var apimocker = require('apimocker');32apimocker.setConfigDir(__dirname + '/config');33apimocker.setMockDataDir(__dirname + '/mockdata');34apimocker.setPort(3000);35apimocker.loadMockFiles();36apimocker.listen();37var apimocker = require('apimocker');38apimocker.setConfigDir(__dirname + '/config');39apimocker.setMockDataDir(__dirname + '/mockdata');40apimocker.setPort(3000);41apimocker.loadMockFiles();42apimocker.listen();43var apimocker = require('apim

Full Screen

Using AI Code Generation

copy

Full Screen

1var apimocker = require('apimocker');2apimocker.setConfigDir('./mocks');3apimocker.setPort(3000);4apimocker.listen();5var apimocker = require('apimocker');6apimocker.setConfigDir('./mocks');7apimocker.setPort(3000);8apimocker.listen();

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run apimocker automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful