Best JavaScript code snippet using appium-base-driver
apis.js
Source:apis.js
1import axios from 'axios';2// function to get number from DB calling our Server API3export const getNumbersFromDb = () =>{4 return new Promise((resolve,reject)=>{5 axios.post(`/getNumbers`, {})6 .then(function (response) {7 resolve(response.data);8 })9 .catch(function (error) {10 reject(error)11 });12 })13}14export const putNumbersToDb = (request) =>{15 return new Promise((resolve,reject)=>{16 axios.post(`/putNumbers`, JSON.parse(request))17 .then(function (response) {18 resolve(response);19 })20 .catch(function (error) {21 reject(error)22 });23 })24}25export const signUp = (request) =>{26 return new Promise((resolve,reject)=>{27 axios.post(`/signUp`, JSON.parse(request))28 .then(function (response) {29 resolve(response);30 })31 .catch(function (error) {32 reject(error)33 });34 })35}36export const singUpWithToken = (request) =>{37 return new Promise((resolve,reject)=>{38 axios.post(`/singUpWithToken`, JSON.parse(request))39 .then(function (response) {40 resolve(response);41 })42 .catch(function (error) {43 reject(error)44 });45 })46}47export const logIn = (request) =>{48 return new Promise((resolve,reject)=>{49 axios.post(`/logIn`, JSON.parse(request),{withCredentials: true})50 .then(function (response) {51 resolve(response);52 })53 .catch(function (error) {54 reject(error)55 });56 })57}58export const reSendVerficationEmail = (request) =>{59 return new Promise((resolve,reject)=>{60 axios.post(`/reSendVerficationEmail`, request,{withCredentials: true})61 .then(function (response) {62 resolve(response);63 })64 .catch(function (error) {65 reject(error)66 });67 })68}69export const logInHidden = (request) =>{70 return new Promise((resolve,reject)=>{71 axios.post(`/logInHidden`, JSON.parse(request),{withCredentials: true})72 .then(function (response) {73 resolve(response);74 })75 .catch(function (error) {76 reject(error)77 });78 })79}80export const loginWithoutEmail = (request) =>{81 return new Promise((resolve,reject)=>{82 axios.post(`/LoginWithoutEmail`, request,{withCredentials: true})83 .then(function (response) {84 resolve(response);85 })86 .catch(function (error) {87 reject(error)88 });89 })90}91export const mergeVideos = (request) =>{92 return new Promise((resolve,reject)=>{93 axios.post(`/merge-video`, request,{withCredentials: true})94 .then(function (response) {95 resolve(response);96 })97 .catch(function (error) {98 reject(error)99 });100 })101}102export const trimVideo = (request) =>{103 return new Promise((resolve,reject)=>{104 axios.post(`/trimVideo`, request,{withCredentials: true})105 .then(function (response) {106 resolve(response);107 })108 .catch(function (error) {109 reject(error)110 });111 })112}113export const flipVideo = (request) =>{114 return new Promise((resolve,reject)=>{115 axios.post(`/api/v1/flipVideo`, request,{withCredentials: true})116 .then(function (response) {117 resolve(response);118 })119 .catch(function (error) {120 reject(error)121 });122 })123}124export const setUserPassword = (request) =>{125 return new Promise((resolve,reject)=>{126 axios.post(`/setUserPassword`, request,{withCredentials: true})127 .then(function (response) {128 resolve(response);129 })130 .catch(function (error) {131 reject(error)132 });133 })134}135export const InviteUser = (request) =>{136 return new Promise((resolve,reject)=>{137 axios.post(`/InviteUsers`, request,{withCredentials: true})138 .then(function (response) {139 resolve(response);140 })141 .catch(function (error) {142 reject(error)143 });144 })145}146export const updateUserDetails = (request) =>{147 return new Promise((resolve,reject)=>{148 axios.post(`/updateUserDetails`, JSON.parse(request),{withCredentials: true})149 .then(function (response) {150 resolve(response);151 })152 .catch(function (error) {153 reject(error)154 });155 })156}157export const updateUserMouthguardDetails = (request) =>{158 return new Promise((resolve,reject)=>{159 axios.post(`/updateUserMouthguardDetails`, JSON.parse(request),{withCredentials: true})160 .then(function (response) {161 resolve(response);162 })163 .catch(function (error) {164 reject(error)165 });166 })167}168export const VerifyVerificationCode = (request) =>{169 return new Promise((resolve,reject)=>{170 axios.post(`/VerifyVerificationCode`, request,{withCredentials: true})171 .then(function (response) {172 resolve(response);173 })174 .catch(function (error) {175 reject(error)176 });177 })178}179export const VerifyNumber = (request) =>{180 return new Promise((resolve,reject)=>{181 axios.post(`/VerifyNumber`, request,{withCredentials: true})182 .then(function (response) {183 resolve(response);184 })185 .catch(function (error) {186 reject(error)187 });188 })189}190export const logInFirstTime = (request) =>{191 return new Promise((resolve,reject)=>{192 axios.post(`/logInFirstTime`, JSON.parse(request),{withCredentials: true})193 .then(function (response) {194 resolve(response);195 })196 .catch(function (error) {197 reject(error)198 });199 })200}201export const isAuthenticated = (request) =>{202 return new Promise((resolve,reject)=>{203 axios.post(`/isAuthenticated`, JSON.parse(request),{withCredentials: true})204 .then(function (response) {205 resolve(response);206 })207 .catch(function (error) {208 reject(error)209 });210 })211}212export const listUsers = (request) =>{213 return new Promise((resolve,reject)=>{214 axios.post(`/listUsers`, {})215 .then(function (response) {216 resolve(response);217 })218 .catch(function (error) {219 reject(error)220 });221 })222}223export const enableUser = (request) =>{224 return new Promise((resolve,reject)=>{225 axios.post(`/enableUser`, JSON.parse(request))226 .then(function (response) {227 resolve(response);228 })229 .catch(function (error) {230 reject(error)231 });232 })233}234export const disableUser = (request) =>{235 return new Promise((resolve,reject)=>{236 axios.post(`/disableUser`, JSON.parse(request))237 .then(function (response) {238 resolve(response);239 })240 .catch(function (error) {241 reject(error)242 });243 })244}245export const uploadProfilePic = (request) =>{246 return new Promise((resolve,reject)=>{247 axios.post(`/uploadProfilePic`, request,{withCredentials: true})248 .then(function (response) {249 resolve(response);250 })251 .catch(function (error) {252 reject(error)253 });254 })255}256export const uploadProfileSelfie = (request) =>{257 return new Promise((resolve,reject)=>{258 axios.post(`/uploadProfileSelfie`, request,{withCredentials: true})259 .then(function (response) {260 resolve(response);261 })262 .catch(function (error) {263 reject(error)264 });265 })266}267export const uploadSensorDataAndCompute = (request) =>{268 return new Promise((resolve,reject)=>{269 axios.post(`/uploadSensorDataAndCompute`, request,{withCredentials: true})270 .then(function (response) {271 resolve(response);272 })273 .catch(function (error) {274 reject(error)275 });276 })277}278export const uploadSidelineImpactVideo = (request) =>{279 return new Promise((resolve,reject)=>{280 axios.post(`/uploadSidelineImpactVideo`, request,{withCredentials: true})281 .then(function (response) {282 resolve(response);283 })284 .catch(function (error) {285 reject(error)286 });287 })288}289export const removeVideo = (request) =>{290 return new Promise((resolve,reject)=>{291 axios.post(`/removeVideo`, request,{withCredentials: true})292 .then(function (response) {293 resolve(response);294 })295 .catch(function (error) {296 reject(error)297 });298 })299}300export const resetToOriginal = (request) =>{301 return new Promise((resolve,reject)=>{302 axios.post(`/resetToOriginal`, request,{withCredentials: true})303 .then(function (response) {304 resolve(response);305 })306 .catch(function (error) {307 reject(error)308 });309 })310}311export const getUserDetails = (request) =>{312 return new Promise((resolve,reject)=>{313 axios.post(`/getUserDetails`, request,{withCredentials: true})314 .then(function (response) {315 resolve(response);316 })317 .catch(function (error) {318 reject(error)319 });320 })321}322export const getAvatarInspection = (request) =>{323 return new Promise((resolve,reject)=>{324 axios.post(`/getAvatarInspection`, request,{withCredentials: true})325 .then(function (response) {326 resolve(response);327 })328 .catch(function (error) {329 reject(error)330 });331 })332}333export const getUserDBDetails = (request) =>{334 return new Promise((resolve,reject)=>{335 axios.post(`/getUserDBDetails`, request,{withCredentials: true})336 .then(function (response) {337 resolve(response);338 })339 .catch(function (error) {340 reject(error)341 });342 })343}344export const getUserDetailsByAccountID = (request) =>{345 return new Promise((resolve,reject)=>{346 axios.post(`/getUserDetailsByAccountID`, request,{withCredentials: true})347 .then(function (response) {348 resolve(response);349 })350 .catch(function (error) {351 reject(error)352 });353 })354}355export const getUserDataByPlayerID = (request) =>{356 return new Promise((resolve,reject)=>{357 axios.post(`/getUserDataByPlayerID`, request,{withCredentials: true})358 .then(function (response) {359 resolve(response);360 })361 .catch(function (error) {362 reject(error)363 });364 })365}366export const getUserTokenDBDetails = (request) =>{367 return new Promise((resolve,reject)=>{368 axios.post(`/getUserTokenDBDetails`, request,{withCredentials: true})369 .then(function (response) {370 resolve(response);371 })372 .catch(function (error) {373 reject(error)374 });375 })376}377export const getProfilePicLink = (request) =>{378 return new Promise((resolve,reject)=>{379 axios.post(`/getProfilePicLink`, JSON.parse(request),{withCredentials: true})380 .then(function (response) {381 resolve(response);382 })383 .catch(function (error) {384 reject(error)385 });386 })387}388export const getInpFileLink = (request) =>{389 return new Promise((resolve,reject)=>{390 axios.post(`/getInpFileLink`, JSON.parse(request),{withCredentials: true})391 .then(function (response) {392 resolve(response);393 })394 .catch(function (error) {395 reject(error)396 });397 })398}399export const getModelLink = (request) =>{400 return new Promise((resolve,reject)=>{401 axios.post(`/getModelFileLink`, JSON.parse(request),{withCredentials: true})402 .then(function (response) {403 resolve(response);404 })405 .catch(function (error) {406 reject(error)407 });408 })409}410export const getSimulationFile = (request) =>{411 return new Promise((resolve,reject)=>{412 axios.post(`/getSimulationFileLink`, JSON.parse(request),{withCredentials: true})413 .then(function (response) {414 resolve(response);415 })416 .catch(function (error) {417 reject(error)418 });419 })420}421export const verifyUser = (request) =>{422 return new Promise((resolve,reject)=>{423 axios.post(`/verifyUser`, {},{withCredentials: true})424 .then(function (response) {425 resolve(response);426 })427 .catch(function (error) {428 reject(error)429 });430 })431}432export const logOut = (request) =>{433 return new Promise((resolve,reject)=>{434 axios.post(`/logOut`, {},{withCredentials: true})435 .then(function (response) {436 resolve(response);437 })438 .catch(function (error) {439 reject(error)440 });441 })442}443export const createAvatar = (request) =>{444 return new Promise((resolve,reject)=>{445 axios.post(`/createAvatar`, request)446 .then(function (response) {447 resolve(response);448 })449 .catch(function (error) {450 reject(error)451 });452 })453}454export const getCumulativeEventPressureData = (request) =>{455 return new Promise((resolve,reject)=>{456 axios.post(`/getCumulativeEventPressureData`, {},{withCredentials: true})457 .then(function (response) {458 resolve(response);459 })460 .catch(function (error) {461 reject(error)462 });463 })464}465export const getCumulativeEventLoadData = (request) =>{466 return new Promise((resolve,reject)=>{467 axios.post(`/getCumulativeEventLoadData`, {},{withCredentials: true})468 .then(function (response) {469 resolve(response);470 })471 .catch(function (error) {472 reject(error)473 });474 })475}476export const getHeadAccelerationEvents = (request) =>{477 return new Promise((resolve,reject)=>{478 axios.post(`/getHeadAccelerationEvents`, request,{withCredentials: true})479 .then(function (response) {480 resolve(response);481 })482 .catch(function (error) {483 reject(error)484 });485 })486}487export const getTeamAdminData = (request) =>{488 return new Promise((resolve,reject)=>{489 axios.post(`/getTeamAdminData`, {},{withCredentials: true})490 .then(function (response) {491 resolve(response);492 })493 .catch(function (error) {494 reject(error)495 });496 })497}498export const getImpactHistory = (request) =>{499 return new Promise((resolve,reject)=>{500 axios.post(`/getImpactHistory`, {},{withCredentials: true})501 .then(function (response) {502 resolve(response);503 })504 .catch(function (error) {505 reject(error)506 });507 })508}509export const getImpactSummary = (request) =>{510 return new Promise((resolve,reject)=>{511 axios.post(`/getImpactSummary`, {},{withCredentials: true})512 .then(function (response) {513 resolve(response);514 })515 .catch(function (error) {516 reject(error)517 });518 })519}520export const getPlayersData = (request) =>{521 return new Promise((resolve,reject)=>{522 axios.post(`/getPlayersData`, request,{withCredentials: true})523 .then(function (response) {524 resolve(response);525 })526 .catch(function (error) {527 reject(error)528 });529 })530}531export const getRequestedPlayersData = (request) =>{532 return new Promise((resolve,reject)=>{533 axios.post(`/getRequestedPlayersData`, request,{withCredentials: true})534 .then(function (response) {535 resolve(response);536 })537 .catch(function (error) {538 reject(error)539 });540 })541}542export const getOrganizationAdminData = (request) =>{543 return new Promise((resolve,reject)=>{544 axios.post(`/getOrganizationAdminData`, request,{withCredentials: true})545 .then(function (response) {546 resolve(response);547 })548 .catch(function (error) {549 reject(error)550 });551 })552}553export const fetchAllTeamsInOrganization = (request) =>{554 return new Promise((resolve,reject)=>{555 axios.post(`/fetchAllTeamsInOrganization`, request,{withCredentials: true})556 .then(function (response) {557 resolve(response);558 })559 .catch(function (error) {560 reject(error)561 });562 })563}564export const getAllRosters = (request) =>{565 return new Promise((resolve,reject)=>{566 axios.post(`/getAllRosters`, {},{withCredentials: true})567 .then(function (response) {568 resolve(response);569 })570 .catch(function (error) {571 reject(error)572 });573 })574}575export const addTeam = (request) =>{576 return new Promise((resolve,reject)=>{577 axios.post(`/addTeam`, JSON.parse(request),{withCredentials: true})578 .then(function (response) {579 resolve(response);580 })581 .catch(function (error) {582 reject(error)583 });584 })585}586export const deleteTeam = (request) =>{587 return new Promise((resolve,reject)=>{588 axios.post(`/deleteTeam`, request,{withCredentials: true})589 .then(function (response) {590 resolve(response);591 })592 .catch(function (error) {593 reject(error)594 });595 })596}597export const getCumulativeAccelerationData = (request) =>{598 return new Promise((resolve,reject)=>{599 axios.post(`/getCumulativeAccelerationData`, request,{withCredentials: true})600 .then(function (response) {601 resolve(response);602 })603 .catch(function (error) {604 reject(error)605 });606 })607}608export const getSimulationFilePath = (request) =>{609 return new Promise((resolve,reject)=>{610 axios.post(`/getSimulationFilePath`, request,{withCredentials: true})611 .then(function (response) {612 resolve(response);613 })614 .catch(function (error) {615 reject(error)616 });617 })618}619export const getSimulationFilesOfPlayer = (request) =>{620 return new Promise((resolve,reject)=>{621 axios.post(`/getSimulationFilesOfPlayer`, request,{withCredentials: true})622 .then(function (response) {623 resolve(response);624 })625 .catch(function (error) {626 reject(error)627 });628 })629}630export const getCumulativeAccelerationTimeData = (request) =>{631 return new Promise((resolve,reject)=>{632 axios.post(`/getCumulativeAccelerationTimeData`, request,{withCredentials: true})633 .then(function (response) {634 resolve(response);635 })636 .catch(function (error) {637 reject(error)638 });639 })640}641export const uploadModelRealData= (request) =>{642 return new Promise((resolve,reject)=>{643 axios.post(`/uploadModelRealData`, request,{withCredentials: true})644 .then(function (response) {645 resolve(response);646 })647 .catch(function (error) {648 reject(error)649 });650 })651}652export const fetchStaffMembers = (request) => {653 return new Promise((resolve,reject)=>{654 axios.post(`/fetchStaffMembers`, request, {withCredentials: true})655 .then(function (response) {656 resolve(response);657 })658 .catch(function (error) {659 reject(error)660 });661 })662}663export const fetchAdminStaffMembers = (request) => {664 return new Promise((resolve,reject)=>{665 axios.post(`/fetchAdminStaffMembers`, request, {withCredentials: true})666 .then(function (response) {667 resolve(response);668 })669 .catch(function (error) {670 reject(error)671 });672 })673}674export const fetchOrgStaffMembers = (request) => {675 return new Promise((resolve,reject)=>{676 axios.post(`/fetchOrgStaffMembers`, request, {withCredentials: true})677 .then(function (response) {678 resolve(response);679 })680 .catch(function (error) {681 reject(error)682 });683 })684}685//fetchTeamStaffMembers686export const fetchTeamStaffMembers = (request) => {687 return new Promise((resolve,reject)=>{688 axios.post(`/fetchTeamStaffMembers`, request, {withCredentials: true})689 .then(function (response) {690 resolve(response);691 })692 .catch(function (error) {693 reject(error)694 });695 })696}697export const getAllCumulativeAccelerationTimeRecords = (request) =>{698 return new Promise((resolve,reject)=>{699 axios.post(`/getAllCumulativeAccelerationTimeRecords`, request,{withCredentials: true})700 .then(function (response) {701 resolve(response);702 })703 .catch(function (error) {704 reject(error)705 });706 })707}708export const getCumulativeAccelerationTimeRecords = (request) =>{709 return new Promise((resolve,reject)=>{710 axios.post(`/getCumulativeAccelerationTimeRecords`, request,{withCredentials: true})711 .then(function (response) {712 resolve(response);713 })714 .catch(function (error) {715 reject(error)716 });717 })718}719export const getMpsRankedData = (request) =>{720 return new Promise((resolve,reject)=>{721 axios.post(`/getMpsRankedData`, request,{withCredentials: true})722 .then(function (response) {723 resolve(response);724 })725 .catch(function (error) {726 reject(error)727 });728 })729}730export const AllCumulativeAccelerationTimeRecords = (request) =>{731 return new Promise((resolve,reject)=>{732 axios.post(`/AllCumulativeAccelerationTimeRecords`, request,{withCredentials: true})733 .then(function (response) {734 resolve(response);735 })736 .catch(function (error) {737 reject(error)738 });739 })740}741export const getSimulationDetail = (request) =>{742 return new Promise((resolve,reject)=>{743 axios.post(`/getSimulationDetail`, request,{withCredentials: true})744 .then(function (response) {745 resolve(response);746 })747 .catch(function (error) {748 reject(error)749 });750 })751}752export const getAllCumulativeAccelerationJsonData = (request) =>{753 return new Promise((resolve,reject)=>{754 axios.post(`/getAllCumulativeAccelerationJsonData`, request,{withCredentials: true})755 .then(function (response) {756 resolve(response);757 })758 .catch(function (error) {759 reject(error)760 });761 })762}763export const getSimulationStatusCount = (request) =>{764 return new Promise((resolve,reject)=>{765 axios.post(`/getSimulationStatusCount`, request,{withCredentials: true})766 .then(function (response) {767 resolve(response);768 })769 .catch(function (error) {770 reject(error)771 });772 })773}774export const checkIfPlayerExists = (request) =>{775 return new Promise((resolve,reject)=>{776 axios.post(`/checkIfPlayerExists`, request,{withCredentials: true})777 .then(function (response) {778 resolve(response);779 })780 .catch(function (error) {781 reject(error)782 });783 })784}785export const listAllUsers = (request) =>{786 return new Promise((resolve,reject)=>{787 axios.post(`/listAllUsers`, request,{withCredentials: true})788 .then(function (response) {789 resolve(response);790 })791 .catch(function (error) {792 reject(error)793 });794 })795}796export const getUserDetailsForIRB = (request) =>{797 return new Promise((resolve,reject)=>{798 axios.post(`/getUserDetailsForIRB`, request,{withCredentials: true})799 .then(function (response) {800 resolve(response);801 })802 .catch(function (error) {803 reject(error)804 });805 })806}807export const confirmGuardianIRBConsent = (request) =>{808 return new Promise((resolve,reject)=>{809 axios.post(`/confirmGuardianIRBConsent`, request,{withCredentials: true})810 .then(function (response) {811 resolve(response);812 })813 .catch(function (error) {814 reject(error)815 });816 })817}818export const getVtkFileLink = (request) =>{819 return new Promise((resolve,reject)=>{820 axios.post(`/getVtkFileLink`, JSON.parse(request),{withCredentials: true})821 .then(function (response) {822 resolve(response);823 })824 .catch(function (error) {825 reject(error)826 });827 })828}829export const getUpdatesAndNotifications = (request) =>{830 return new Promise((resolve,reject)=>{831 axios.post(`/getUpdatesAndNotifications`, request)832 .then(function (response) {833 resolve(response);834 })835 .catch(function (error) {836 reject(error)837 });838 })839}840export const getAllSensorBrands = (request) =>{841 return new Promise((resolve,reject)=>{842 axios.post(`/getAllSensorBrands`, {},{withCredentials: true})843 .then(function (response) {844 resolve(response);845 })846 .catch(function (error) {847 reject(error)848 });849 })850}851export const getAllSensorBrandsList = (request) =>{852 return new Promise((resolve,reject)=>{853 axios.post(`/getAllSensorBrandsList`, {},{withCredentials: true})854 .then(function (response) {855 resolve(response);856 })857 .catch(function (error) {858 reject(error)859 });860 })861}862export const getAllOrganizationsOfSensorBrand = (request) =>{863 return new Promise((resolve,reject)=>{864 axios.post(`/getAllOrganizationsOfSensorBrand`, request,{withCredentials: true})865 .then(function (response) {866 resolve(response);867 })868 .catch(function (error) {869 reject(error)870 });871 })872}873export const getAllOrganizationsSimultionCount = (request) =>{874 return new Promise((resolve,reject)=>{875 axios.post(`/getAllOrganizationsSimultionCount`, request,{withCredentials: true})876 .then(function (response) {877 resolve(response);878 })879 .catch(function (error) {880 reject(error)881 });882 })883}884export const getTeamSimultionCount = (request) =>{885 return new Promise((resolve,reject)=>{886 axios.post(`/getTeamSimultionCount`, request,{withCredentials: true})887 .then(function (response) {888 resolve(response);889 })890 .catch(function (error) {891 reject(error)892 });893 })894}895export const getAllOrganizationsOfSensorBrandList = (request) =>{896 return new Promise((resolve,reject)=>{897 axios.post(`/getAllOrganizationsOfSensorBrandList`, request,{withCredentials: true})898 .then(function (response) {899 resolve(response);900 })901 .catch(function (error) {902 reject(error)903 });904 })905}906export const getAllteamsOfOrganizationOfSensorBrand = (request) =>{907 return new Promise((resolve,reject)=>{908 axios.post(`/getAllteamsOfOrganizationOfSensorBrand`, request,{withCredentials: true})909 .then(function (response) {910 resolve(response);911 })912 .catch(function (error) {913 reject(error)914 });915 })916}917export const getAllteamsOfOrganizationOfSensorBrandList = (request) =>{918 return new Promise((resolve,reject)=>{919 axios.post(`/getAllteamsOfOrganizationOfSensorBrandList`, request,{withCredentials: true})920 .then(function (response) {921 resolve(response);922 })923 .catch(function (error) {924 reject(error)925 });926 })927}928export const getBrainSimulationMovie = (request) =>{929 return new Promise((resolve,reject)=>{930 axios.get(`/getBrainSimulationMovie/`+request, {withCredentials: true})931 .then(function (response) {932 resolve(response);933 })934 .catch(function (error) {935 reject(error)936 });937 })938}939export const getBrainSimulationLogFile = (request) =>{940 return new Promise((resolve,reject)=>{941 axios.get(`/getBrainSimulationLogFile/`+request, {withCredentials: true})942 .then(function (response) {943 resolve(response);944 })945 .catch(function (error) {946 reject(error)947 });948 })949}950export const downloadLogFileFromS3 = (request) =>{951 return new Promise((resolve,reject)=>{952 axios.get(`/downloadLogFileFromS3/`+request, {withCredentials: true})953 .then(function (response) {954 resolve(response);955 })956 .catch(function (error) {957 reject(error)958 });959 })960}961export const getOrganizationList = (request) =>{962 return new Promise((resolve,reject)=>{963 axios.post(`/getOrganizationList/`,request, {withCredentials: true})964 .then(function (response) {965 resolve(response);966 })967 .catch(function (error) {968 reject(error)969 });970 })971}972export const getOrganizationNameList = (request) =>{973 return new Promise((resolve,reject)=>{974 axios.post(`/getOrganizationNameList/`,request, {withCredentials: true})975 .then(function (response) {976 resolve(response);977 })978 .catch(function (error) {979 reject(error)980 });981 })982}983export const getTeamList = (request) =>{984 return new Promise((resolve,reject)=>{985 axios.post(`/getTeamList/`,request, {withCredentials: true})986 .then(function (response) {987 resolve(response);988 })989 .catch(function (error) {990 reject(error)991 });992 })993}994export const getTeamNameList = (request) =>{995 return new Promise((resolve,reject)=>{996 axios.post(`/getTeamNameList/`,request, {withCredentials: true})997 .then(function (response) {998 resolve(response);999 })1000 .catch(function (error) {1001 reject(error)1002 });1003 })1004}1005export const getTeamSpheres = (request) =>{1006 return new Promise((resolve,reject)=>{1007 axios.post(`/getTeamSpheres`, request,{withCredentials: true})1008 .then(function (response) {1009 resolve(response);1010 })1011 .catch(function (error) {1012 reject(error)1013 });1014 })1015}1016export const getMLplatformfiles = (request) =>{1017 return new Promise((resolve,reject)=>{1018 axios.post(`/getMLplatformfiles`, request,{withCredentials: true})1019 .then(function (response) {1020 resolve(response);1021 })1022 .catch(function (error) {1023 reject(error)1024 });1025 })1026}1027export const getFilterdTeamSpheres = (request) =>{1028 return new Promise((resolve,reject)=>{1029 axios.post(`/getFilterdTeamSpheres`, request,{withCredentials: true})1030 .then(function (response) {1031 resolve(response);1032 })1033 .catch(function (error) {1034 reject(error)1035 });1036 })1037}1038export const getFilterdTeamSpheresTest = (request) =>{1039 return new Promise((resolve,reject)=>{1040 axios.post(`/getFilterdTeamSpheresTest`, request,{withCredentials: true})1041 .then(function (response) {1042 resolve(response);1043 })1044 .catch(function (error) {1045 reject(error)1046 });1047 })1048}1049export const getPlayerList = (request) =>{1050 return new Promise((resolve,reject)=>{1051 axios.post(`/getPlayerList/`,request, {withCredentials: true})1052 .then(function (response) {1053 resolve(response);1054 })1055 .catch(function (error) {1056 reject(error)1057 });1058 })1059}1060export const loadMorePlayerList = (request) =>{1061 return new Promise((resolve,reject)=>{1062 axios.post(`/loadMorePlayerList/`,request, {withCredentials: true})1063 .then(function (response) {1064 resolve(response);1065 })1066 .catch(function (error) {1067 reject(error)1068 });1069 })1070}1071export const deleteItem = (request) =>{1072 return new Promise((resolve,reject)=>{1073 axios.post(`/deleteItem/`,request, {withCredentials: true})1074 .then(function (response) {1075 resolve(response);1076 })1077 .catch(function (error) {1078 reject(error)1079 });1080 })1081}1082export const renameOrganization = (request) =>{1083 return new Promise((resolve,reject)=>{1084 axios.post(`/renameOrganization/`,request, {withCredentials: true})1085 .then(function (response) {1086 resolve(response);1087 })1088 .catch(function (error) {1089 reject(error)1090 });1091 })1092}1093export const renameTeam = (request) =>{1094 return new Promise((resolve,reject)=>{1095 axios.post(`/renameTeam/`,request, {withCredentials: true})1096 .then(function (response) {1097 resolve(response);1098 })1099 .catch(function (error) {1100 reject(error)1101 });1102 })1103}1104export const addOrganization = (request) =>{1105 return new Promise((resolve,reject)=>{1106 axios.post(`/addOrganization/`,request, {withCredentials: true})1107 .then(function (response) {1108 resolve(response);1109 })1110 .catch(function (error) {1111 reject(error)1112 });1113 })1114}1115export const addorgTeam= (request) =>{1116 return new Promise((resolve,reject)=>{1117 axios.post(`/addorgTeam/`,request, {withCredentials: true})1118 .then(function (response) {1119 resolve(response);1120 })1121 .catch(function (error) {1122 reject(error)1123 });1124 })1125}1126export const updateUserStatus = (request) =>{1127 return new Promise((resolve,reject)=>{1128 axios.post(`/updateUserStatus/`,request, {withCredentials: true})1129 .then(function (response) {1130 resolve(response);1131 })1132 .catch(function (error) {1133 reject(error)1134 });1135 })1136}1137export const MergeOrganization = (request) =>{1138 return new Promise((resolve,reject)=>{1139 axios.post(`/MergeOrganization/`,request, {withCredentials: true})1140 .then(function (response) {1141 resolve(response);1142 })1143 .catch(function (error) {1144 reject(error)1145 });1146 })1147}1148export const MergeTeam = (request) =>{1149 return new Promise((resolve,reject)=>{1150 axios.post(`/MergeTeam/`,request, {withCredentials: true})1151 .then(function (response) {1152 resolve(response);1153 })1154 .catch(function (error) {1155 reject(error)1156 });1157 })1158}1159export const getOrgUniqueList = () =>{1160 return new Promise((resolve,reject)=>{1161 axios.post(`/getOrgUniqueList/`, {withCredentials: true})1162 .then(function (response) {1163 resolve(response);1164 })1165 .catch(function (error) {1166 reject(error)1167 });1168 })1169}1170export const getOrgUniqueTeams = (request) =>{1171 return new Promise((resolve,reject)=>{1172 axios.post(`/getOrgUniqueTeams/`,request, {withCredentials: true})1173 .then(function (response) {1174 resolve(response);1175 })1176 .catch(function (error) {1177 reject(error)1178 });1179 })1180}1181export const setVideoTime = (request) =>{1182 return new Promise((resolve,reject)=>{1183 axios.post(`/setVideoTime/`,request, {withCredentials: true})1184 .then(function (response) {1185 resolve(response);1186 })1187 .catch(function (error) {1188 reject(error)1189 });1190 })1191}1192//Demo api for team state page.1193export const getFilterdTeamSpheres_demo = (request) =>{1194 return new Promise((resolve,reject)=>{1195 axios.post(`/getFilterdTeamSpheres_demo`, request,{withCredentials: true})1196 .then(function (response) {1197 resolve(response);1198 })1199 .catch(function (error) {1200 reject(error)1201 });1202 })1203}1204export const getTeamSpheres_Demo = (request) =>{1205 return new Promise((resolve,reject)=>{1206 axios.post(`/getTeamSpheres_Demo`, request,{withCredentials: true})1207 .then(function (response) {1208 resolve(response);1209 })1210 .catch(function (error) {1211 reject(error)1212 });1213 })1214}1215export const modalValidationOutput = () =>{1216 return new Promise((resolve,reject)=>{1217 axios.post(`/modalValidationOutput`,{withCredentials: true})1218 .then(function (response) {1219 resolve(response);1220 })1221 .catch(function (error) {1222 reject(error)1223 });1224 })1225}1226//# submit jobs api called1227export const submitBrainsimulationJobs = (request) =>{1228 return new Promise((resolve,reject)=>{1229 axios.post(`/api/v2/upload/sensor/`, request, {withCredentials: true})1230 .then(function (response) {1231 resolve(response);1232 })1233 .catch(function (error) {1234 reject(error)1235 });1236 })1237}1238export const createJoblogs = (request) =>{1239 return new Promise((resolve,reject)=>{1240 axios.post(`/api/v1/jobs/insertlogs`, request,{withCredentials: true})1241 .then(function (response) {1242 resolve(response);1243 })1244 .catch(function (error) {1245 reject(error)1246 });1247 })1248}1249//# ...1250export const checkSensorDataExistsSimulationjsonData = (request) =>{1251 return new Promise((resolve,reject)=>{1252 axios.post(`/api/v2/checkSensorDataExists/json/`, request, {withCredentials: true})1253 .then(function (response) {1254 resolve(response);1255 })1256 .catch(function (error) {1257 reject(error)1258 });1259 })1260}1261//# getFailedSimulationList1262export const getFailedSimulationList = (request) =>{1263 return new Promise((resolve,reject)=>{1264 axios.post(`/getFailedSimulationList`, request, {withCredentials: true})1265 .then(function (response) {1266 resolve(response);1267 })1268 .catch(function (error) {1269 reject(error)1270 });1271 })1272}1273//# getCompleteSimulationList1274export const getCompleteSimulationList = (request) =>{1275 return new Promise((resolve,reject)=>{1276 axios.post(`/getCompleteSimulationList`, request, {withCredentials: true})1277 .then(function (response) {1278 resolve(response);1279 })1280 .catch(function (error) {1281 reject(error)1282 });1283 })1284}1285//# deleteuserfromteam1286export const deleteuserfromteam = (request) =>{1287 return new Promise((resolve,reject)=>{1288 axios.post(`/deleteuserfromteam`, request, {withCredentials: true})1289 .then(function (response) {1290 resolve(response);1291 })1292 .catch(function (error) {1293 reject(error)1294 });1295 })1296}1297//# getFailedSimulationList1298export const filterStrainMetric = (request) =>{1299 return new Promise((resolve,reject)=>{1300 axios.patch(`/filterStrainMetric`, request, {withCredentials: true})1301 .then(function (response) {1302 resolve(response);1303 })1304 .catch(function (error) {1305 reject(error)1306 });1307 })1308}1309//# getFailedSimulationList1310export const getplayerlistoforg = (request) =>{1311 return new Promise((resolve,reject)=>{1312 axios.post(`/getplayerlistoforg`, request, {withCredentials: true})1313 .then(function (response) {1314 resolve(response);1315 })1316 .catch(function (error) {1317 reject(error)1318 });1319 })1320}1321//# getBrainImageByAccountID1322export const getBrainImageByAccountID = (request) =>{1323 return new Promise((resolve,reject)=>{1324 axios.post(`/getBrainImageByAccountID`, request, {withCredentials: true})1325 .then(function (response) {1326 resolve(response);1327 })1328 .catch(function (error) {1329 reject(error)1330 });1331 })1332}1333//# getBrainImageByAccountID1334export const getBrainImageByimageID = (request) =>{1335 return new Promise((resolve,reject)=>{1336 axios.post(`/getBrainImageByimageID`, request, {withCredentials: true})1337 .then(function (response) {1338 resolve(response);1339 })1340 .catch(function (error) {1341 reject(error)1342 });1343 })1344}1345//# getAllBrainImageByimageID1346export const getAllBrainImageByimageID = (request) =>{1347 return new Promise((resolve,reject)=>{1348 axios.post(`/getAllBrainImageByimageID`, request, {withCredentials: true})1349 .then(function (response) {1350 resolve(response);1351 })1352 .catch(function (error) {1353 reject(error)1354 });1355 })1356}1357//# deleteOrgTeam1358export const deleteOrgTeam = (request) =>{1359 return new Promise((resolve,reject)=>{1360 axios.post(`/deleteOrgTeam`, request, {withCredentials: true})1361 .then(function (response) {1362 resolve(response);1363 })1364 .catch(function (error) {1365 reject(error)1366 });1367 })1368}1369//# deleteOrgTeam11370export const deleteOrgTeam1 = (request) =>{1371 return new Promise((resolve,reject)=>{1372 axios.post(`/deleteOrgTeam1`, request, {withCredentials: true})1373 .then(function (response) {1374 resolve(response);1375 })1376 .catch(function (error) {1377 reject(error)1378 });1379 })1380}1381//# deleteOrgTeam21382export const deleteOrgTeam2 = (request) =>{1383 return new Promise((resolve,reject)=>{1384 axios.post(`/deleteOrgTeam2`, request, {withCredentials: true})1385 .then(function (response) {1386 resolve(response);1387 })1388 .catch(function (error) {1389 reject(error)1390 });1391 })1392}1393//# deleteOrgTeam31394export const deleteOrgTeam3 = (request) =>{1395 return new Promise((resolve,reject)=>{1396 axios.post(`/deleteOrgTeam3`, request, {withCredentials: true})1397 .then(function (response) {1398 resolve(response);1399 })1400 .catch(function (error) {1401 reject(error)1402 });1403 })1404}1405//# deleteOrgTeam41406export const deleteOrgTeam4 = (request) =>{1407 return new Promise((resolve,reject)=>{1408 axios.post(`/deleteOrgTeam4`, request, {withCredentials: true})1409 .then(function (response) {1410 resolve(response);1411 })1412 .catch(function (error) {1413 reject(error)1414 });1415 })1416}1417//# deleteOrgTeam41418export const deleteEventByImageID = (request) =>{1419 return new Promise((resolve,reject)=>{1420 axios.post(`/deleteEventByImageID`, request, {withCredentials: true})1421 .then(function (response) {1422 resolve(response);1423 })1424 .catch(function (error) {1425 reject(error)1426 });1427 })...
index.js
Source:index.js
...9 *10 * @param {any} params ç»å½çåæ°11 */12 Login(params) {13 return axios.post(path + '/login', params);14 },15 /**16 * éåºç»å½17 *18 * @returns19 */20 LoginOut() {21 return axios.get(path + '/AUser.aspx?act=loginOut')22 },23 /*======================================æå°ç¹=========================================== */24 /**25 * å¾å°æå°ç¹æ°æ®26 *27 * @param {any} params åæ°å¯¹è±¡,å
å«å页28 */29 GetPrintByPage(params) {30 return axios.post(path + '/Print.aspx?act=lists', params)31 },32 /**33 * éè¿IDå¾å°æå°ç¹æ°æ®34 *35 * @param {any} id æå°ç¹ID36 * @returns37 */38 GetPrintById(id) {39 return axios.post(path + '/Print.aspx?act=get', {40 'id': id41 })42 },43 /**44 * æ°å¢æè
ä¿®æ¹ä¸ä¸ªæå°ç¹ä¿¡æ¯ï¼åå°æ ¹æ®IDè¿è¡å¤æ,çæµTODO:ï¼45 *46 * @param {any} print æå°ç¹å¯¹è±¡47 * @returns48 */49 NewPrint(print) {50 return axios.post(path + '/Print.aspx?act=save', print)51 },52 /**53 * ä¿®æ¹ä¸ä¸ªæå°ç¹ä¿¡æ¯54 *55 * @param {any} print æå°ç¹å¯¹è±¡56 * @returns57 */58 UpdatePrint(params) {59 return axios.post(path + '/Print.aspx?act=update', params)60 },61 /**62 * å é¤æå°ç¹ä¿¡æ¯63 *64 * @param {any} print æå°ç¹å¯¹è±¡65 * @returns66 */67 DelPrintById(id) {68 return axios.post(path + '/Print.aspx?act=delete', {69 'id': id70 })71 },72 /**73 * æ£æµéå¤74 *75 * @param {any} print æå°ç¹å¯¹è±¡76 * @returns77 */78 Check(params) {79 return axios.post(path + '/Print.aspx?act=check', params)80 },81 /**82 * ä¿åå¼æ¾æ¶é´ä¿¡æ¯83 *84 * @param {any} print æå°ç¹å¯¹è±¡85 * @returns86 */87 SaveTrade(param) {88 return axios.post(path + '/Print.aspx?act=saveTrade', param)89 },90 /**91 * è·åå¼æ¾æ¶é´ä¿¡æ¯92 *93 * @param {any} print æå°ç¹å¯¹è±¡94 * @returns95 */96 GetTrade(id) {97 return axios.post(path + '/Print.aspx?act=getTrade', {98 'dwPrinterSN': id99 })100 },101 /**102 * ä¿®æ¹å¼æ¾æ¶é´ä¿¡æ¯103 *104 * @param {any} print æå°ç¹å¯¹è±¡105 * @returns106 */107 UpdateTrade(day, time, dwOpenFlag, dwPrinterSN) {108 return axios.post(path + '/Print.aspx?act=updateTrade', {109 'day': day,110 'time': time,111 'dwOpenFlag': dwOpenFlag,112 'dwPrinterSN': dwPrinterSN113 })114 },115 /*===================================================æå°æå¡====================================================== */116 /**117 * å¾å°ä¸æçæå°æå¡å表118 *119 */120 GetPrintServiceSelect() {121 return axios.post(path + '/PrintService.aspx?act=select')122 },123 /*===================================================è¿è¥å=========================================================== */124 /**125 * å¾å°è¿è¥åæ°æ®126 *127 * @param {any} params åæ°å¯¹è±¡,å
å«å页128 */129 GetManageByPage(params) {130 return axios.post(path + '/Company.aspx?act=lists', params)131 },132 /**133 * éè¿IDå¾å°è¿è¥åæ°æ®134 *135 * @param {any} id æå°ç¹ID136 * @returns137 */138 GetManageById(id) {139 return axios.post(path + '/Company.aspx?act=get', {140 'id': id141 })142 },143 /**144 * æ°å¢è¿è¥å145 *146 * @param {any} person147 * @returns148 */149 NewManage(params) {150 return axios.post(path + '/Company.aspx?act=save', params)151 },152 /**153 * ä¿®æ¹è¿è¥å154 *155 * @param {any} person156 * @returns157 */158 SetManage(params) {159 return axios.post(path + '/Company.aspx?act=update', params)160 },161 /**162 * å é¤è¿è¥å163 *164 * @param {any} print æå°ç¹å¯¹è±¡165 * @returns166 */167 DelManageById(id) {168 return axios.post(path + '/Company.aspx?act=delete', {169 'id': id170 })171 },172 /*======================================è系人=========================================== */173 /**174 * å¾å°è系人æ°æ®175 *176 * @param {any} id æå°ç¹ID177 * @returns178 */179 GetPersonByPage(params) {180 return axios.post(path + '/Contact.aspx?act=lists', params)181 },182 /**183 * éè¿IDå¾å°ä¸ä¸ªè系人æ°æ®184 *185 * @param {any} id186 * @returns187 */188 GetPersonById(id) {189 return axios.post(path + '/Contact.aspx?act=get', {190 'id': id191 })192 },193 /**194 * æ°å¢è系人信æ¯195 *196 * @param {any} person197 * @returns198 */199 NewPerson(params) {200 return axios.post(path + '/Contact.aspx?act=save', params)201 },202 /**203 * ä¿®æ¹è系人信æ¯204 *205 * @param {any} person206 * @returns207 */208 SetPerson(params) {209 return axios.post(path + '/Contact.aspx?act=update', params)210 },211 /**212 * å é¤è系人信æ¯213 *214 * @param {any} print æå°ç¹å¯¹è±¡215 * @returns216 */217 DelPersonById(id) {218 return axios.post(path + '/Contact.aspx?act=delete', {219 'id': id220 })221 },222 /*======================================管çå=========================================== */223 /**224 * å¾å°è系人æ°æ®225 *226 * @param {any} id æå°ç¹ID227 * @returns228 */229 GetManagerList(params) {230 return axios.post(path + '/Admin.aspx?act=lists', params)231 },232 /**233 * éè¿IDå¾å°ä¸ä¸ªè系人æ°æ®234 *235 * @param {any} id236 * @returns237 */238 SetPassword(params) {239 return axios.post(path + '/Admin.aspx?act=chgpwd', params)240 },241 /**242 * æ°å¢è系人信æ¯243 *244 * @param {any} person245 * @returns246 */247 NewManager(params) {248 return axios.post(path + '/Admin.aspx?act=save', params)249 },250 /**251 * å é¤è系人信æ¯252 *253 * @param {any} manage 管çå254 * @returns255 */256 DelManagerById(id) {257 return axios.post(path + '/Admin.aspx?act=delete', {258 'id': id259 })260 },261 /**262 * æ£æµç®¡çåç¨æ·åæ¯å¦éå¤263 *264 */265 CheckManage(param) {266 return axios.post(path + '/Admin.aspx?act=check', param)267 },268 /*======================================è®°å½æ¥è¯¢=========================================== */269 /**270 * å¾å°è®°å½å表271 *272 * @param {any}273 * @returns274 */275 GetRecordList(params) {276 return axios.post(path + '/PrintQuery.aspx?act=lists', params)277 },278 ExportRecord(params) {279 return axios.post(path + '/PrintQuery.aspx?act=export', params)280 },281 /*======================================è®°å½ç»è®¡=========================================== */282 /**283 * å¾å°è®°å½å表284 *285 * @param {any}286 * @returns287 */288 GetCountList(params) {289 return axios.post(path + '/PrintCount.aspx?act=lists', params)290 },291 /*======================================è¿è¥åç»è®¡=========================================== */292 /**293 * å¾å°ç»è®¡å表294 *295 * @param {any}296 * @returns297 */298 GetRunCount(params) {299 return axios.post(path + '/PrintCount.aspx?act=companyCount', params)300 },301 /*======================================æå°ç¹ç»è®¡=========================================== */302 /**303 * å¾å°è®°å½å表304 *305 * @param {any}306 * @returns307 */308 GetPrintCount(params) {309 return axios.post(path + '/PrintCount.aspx?act=printCount', params)310 },311 /*======================================è´¦æ·ç®¡ç=========================================== */312 /**313 * å¾å°è´¦æ·å表æ°æ®314 *315 * @param {any}316 * @returns317 */318 GetAccountList(params) {319 return axios.post(path + '/Account.aspx?act=lists', params)320 },321 /**322 * å¾å°çµåè´¦æ·å表æ°æ®323 *324 * @param {any}325 * @returns326 */327 GetEPay(params) {328 return axios.post(path + '/Account.aspx?act=ePayList', params)329 },330 /**331 * å
è¡¥å©332 *333 * @param {any}334 * @returns335 */336 SetSup(params) {337 return axios.post(path + '/Account.aspx?act=setPromotion', params)338 },339 /**340 * 管çåå
è¡¥å©341 *342 * @param {any}343 * @returns344 */345 addSup(params) {346 return axios.post(path + '/Admin.aspx?act=addDeposit', params)347 },348 /**349 * ä¿®æ¹å¯ç 350 *351 * @param {any}352 * @returns353 */354 SetPIN(params) {355 return axios.post(path + '/Account.aspx?act=changePwd', params)356 },357 /**358 * å é¤è´¦æ·359 *360 * @param {any}361 * @returns362 */363 DelAccount(id) {364 return axios.post(path + '/Account.aspx?act=delete', id)365 },366 /**367 * å¼å¡368 *369 * @param {any}370 * @returns371 */372 SetCard(params) {373 return axios.post(path + '/Account.aspx?act=setCard', params)374 },375 /**376 * ç»å®å¾®ä¿¡377 *378 * @param {any}379 * @returns380 */381 BlindCode(params) {382 return axios.post(path + '/Account.aspx?act=bindCode', params)383 },384 /**385 * å个å¼æ·386 *387 * @param {any}388 * @returns389 */390 SaveAccount(params) {391 return axios.post(path + '/Account.aspx?act=save', params)392 },393 /**394 * æ°æ®æ£æµéå¤395 *396 * @param {any} params397 */398 CheckAccount(params) {399 return axios.post(path + '/Account.aspx?act=check', params);400 },401 /*======================================æå¡äººå=========================================== */402 /**403 * å¾å°è系人æ°æ®404 *405 * @param {any} id æå°ç¹ID406 * @returns407 */408 GetStaffByPage(params) {409 return axios.post(path + '/ServiceStaff.aspx?act=lists', params)410 },411 /**412 * éè¿IDå¾å°ä¸ä¸ªè系人æ°æ®413 *414 * @param {any} id415 * @returns416 */417 GetStaffById(id) {418 return axios.post(path + '/ServiceStaff.aspx?act=get', {419 'id': id420 })421 },422 /**423 * æ°å¢è系人信æ¯424 *425 * @param {any} person426 * @returns427 */428 NewStaff(params) {429 return axios.post(path + '/ServiceStaff.aspx?act=save', params)430 },431 /**432 * ä¿®æ¹è系人信æ¯433 *434 * @param {any} person435 * @returns436 */437 UpdateStaff(params) {438 return axios.post(path + '/ServiceStaff.aspx?act=update', params)439 },440 /**441 * å é¤è系人信æ¯442 *443 * @param {any} print æå°ç¹å¯¹è±¡444 * @returns445 */446 DelStaffById(id, ComSN) {447 return axios.post(path + '/ServiceStaff.aspx?act=delete', {448 'id': id,449 'ComSN': ComSN450 })451 },452 /*======================================æå¡ç¹æ¥å£=========================================== */453 GetServiceList(params) {454 return axios.post(path + '/PrintService.aspx?act=lists', params)455 },456 /**457 * éè¿IDå¾å°ä¸ä¸ªæå°ç¹æ°æ®458 *459 * @param {any} id460 * @returns461 */462 GetServiceById(id) {463 return axios.post(path + '/PrintService.aspx?act=get', {464 'id': id465 })466 },467 /**468 * æ°å¢æå°ç¹ä¿¡æ¯469 *470 * @param {any} person471 * @returns472 */473 NewService(params) {474 return axios.post(path + '/PrintService.aspx?act=save', params)475 },476 /**477 * ä¿®æ¹æå°ç¹ä¿¡æ¯478 *479 * @param {any} person480 * @returns481 */482 UpdateService(params) {483 return axios.post(path + '/PrintService.aspx?act=update', params)484 },485 /**486 * å é¤æå°ç¹ä¿¡æ¯487 *488 * @param {any} print æå°ç¹å¯¹è±¡489 * @returns490 */491 DelServiceById(id) {492 return axios.post(path + '/PrintService.aspx?act=delete', {493 'id': id494 })495 },496 /*======================================æ¶è´¹æ å=========================================== */497 /**498 * æ°å¢æ¶è´¹æ å499 *500 * @param {any}501 * @returns502 */503 NewFee(params) {504 return axios.post(path + '/Fee.aspx?act=saveStd', params)505 },506 /**507 * è·åæ¶è´¹æ å508 *509 * @param {any}510 * @returns511 */512 GetFee(id) {513 return axios.post(path + '/Fee.aspx?act=getStd', {514 'id': id515 })516 },517 /**518 * ä¿®æ¹æ¶è´¹æ å519 *520 * @param {any}521 * @returns522 */523 UpdateFee(params) {524 return axios.post(path + '/Fee.aspx?act=updateStd', params)525 },526 /**527 *528 * å é¤ä¸ä¸ªæ¶è´¹æ å529 *530 * @param {any} params531 */532 DelFee(params) {533 return axios.post(path + '/Fee.aspx?act=delStd', params)534 },535 /**536 * æ°å¢æ¶è´¹æ å详æ
537 *538 * @param {any} params539 */540 NewFeeDetail(params) {541 return axios.post(path + '/Fee.aspx?act=saveDetail', params)542 },543 /**544 * ä¿®æ¹æ¶è´¹æ å详æ
545 *546 * @param {any} params547 */548 UpdateFeeDetail(params) {549 return axios.post(path + '/Fee.aspx?act=updateDetail', params)550 },551 /*======================================AreaCode=========================================== */552 /**553 * åºåå表æ¥å£554 * é»è®¤è¿åå
¨å½åç级555 *556 */557 GetAreaCodeSelect(param) {558 return axios.post(path + '/AreaCode.aspx?act=select', param)559 },560 /**561 * è·å对åºçå级å称562 *563 * @param {any} param564 * @returns565 */566 GetSubArea(param) {567 return axios.post(path + '/AreaCode.aspx?act=getSub', param)568 },569 /**570 * éè¿IDå¾å°è¡æ¿åºå571 *572 * @param {any} id573 * @returns574 */575 GetArea(id) {576 return axios.post(path + '/AreaCode.aspx?act=get', {577 'id': id578 })579 },580 /*======================================é款记å½æ¥å£=========================================== */581 /**582 * å¾å°é款记å½æ¥å£583 *584 * @param {any} words585 */586 GetRefundList(params) {587 return axios.post(path + '/Rfunds.aspx?act=lists', params);588 },589 /*======================================ç°éåè¡¥å©è®°å½æ¥å£=========================================== */590 /**591 * å¾å°ç°é592 *593 * @param {any} words594 */595 GetCashList(params) {596 return axios.post(path + '/Cash.aspx?act=ePayList', params);597 },598 /**599 * è¡¥å©è®°å½æ¥å£600 *601 * @param {any} params602 * @returns603 */604 GetSupplyList(params) {605 return axios.post(path + '/Cash.aspx?act=lists', params)606 },607 /*======================================纸åæ¥å£=========================================== */608 /**609 * å¾å°çº¸åæ¥å£610 *611 * @param {any} words612 */613 GetPaperList(words) {614 return axios.post(path + '/Print.aspx?act=paperList', {615 'q': words616 });617 },618 /*======================================ä¿®æ¹çº¸å=========================================== */619 /**620 * ä¿®æ¹çº¸åæ¥å£621 *622 * @param {any} words623 */624 UpdatePaper(params) {625 return axios.post(path + '/Print.aspx?act=updatePaper', params);626 },627 /*======================================å¢å 纸å=========================================== */628 /**629 * å¢å 纸åæ¥å£630 *631 * @param {any} words632 */633 SavePaper(params) {634 return axios.post(path + '/Print.aspx?act=savePaper', params);635 },636 /*======================================å é¤çº¸å=========================================== */637 /**638 * å é¤çº¸åæ¥å£639 *640 * @param {any} words641 */642 DeletePaper(params) {643 return axios.post(path + '/Print.aspx?act=delPaper', params);644 },645 /*======================================è¿è¥åæ¥å£=========================================== */646 /**647 * å¾å°è¿è¥åæ¥å£648 *649 * @param {any} words650 */651 GetCompanySelect(words) {652 return axios.post(path + '/Company.aspx?act=select', {653 'q': words654 });655 },656 /*======================================æå°ç¹æ¥å£=========================================== */657 /**658 * å¾å°æå°ç¹æ¥å£659 *660 * @param {any} words661 */662 GetPrintSelect(words) {663 return axios.post(path + '/Print.aspx?act=select', {664 'q': words,665 });666 },667 /*======================================è系人æ¥å£=========================================== */668 /**669 * å¾å°è系人æ¥å£670 *671 * @param {any} words672 */673 GetContactSelect(words, sn) {674 return axios.post(path + '/Contact.aspx?act=select', {675 'q': words,676 'sn': sn677 });678 },679 /*======================================å¹³å°ç¨æ·æ¥å£=========================================== */680 /**681 * å¾å°å¹³å°ç¨æ·æ¥å£682 *683 * @param {any} words684 */685 GetAccountSelect(words) {686 return axios.post(path + '/Account.aspx?act=select', {687 'q': words688 });689 },690 /*======================================è¿è¥åæ£æµéå¤æ¥å£=========================================== */691 /**692 * æ£æµè¿è¥åæ°æ®éå¤693 *694 * @param {any} para695 */696 CheckCompany(para) {697 return axios.post(path + '/Company.aspx?act=check', para);698 },699 /*======================================ä¼æ ç æ¥å£=========================================== */700 /**701 * è·åä¼æ ç 702 *703 * @param {any} para704 */705 GetProCode(params) {706 return axios.post(path + '/Promotion.aspx?act=getProCode', params);707 },708 /**709 * è·åå表710 *711 * @param {any} para712 */713 GetCodeList(params) {714 return axios.post(path + '/Promotion.aspx?act=lists', params);715 },716 /**717 * ä¿åä¼æ ç 718 *719 * @param {any} para720 */721 saveCode(params) {722 return axios.post(path + '/Promotion.aspx?act=save', params);723 },724 /**725 * æ´æ°ä¼æ ç 726 *727 * @param {any} para728 */729 updateCode(params) {730 return axios.post(path + '/Promotion.aspx?act=update', params);731 },732 /**733 * è·å¾ä¸ä¸ªä¼æ ç 734 *735 * @param {any} para736 */737 gainCode(para) {738 return axios.post(path + '/Promotion.aspx?act=get',para);739 },740 /**741 * å é¤ä¼æ ç 742 *743 * @param {any} para744 */745 delCode(para) {746 return axios.post(path + '/Promotion.aspx?act=delete',para);747 },748 /*======================================é¦é¡µæ¥è¡¨æ°æ®=========================================== */749 /**750 * é¦é¡µæç¨ç¨æ·æ°æ®æ¾ç¤º751 *752 * @returns753 */754 GetHomeUsers() {755 return axios.post(path + '/Utils.aspx?act=homeUsers');756 },757 /**758 * é¦é¡µæç¨æ¥è¡¨æ°æ®759 *760 * @returns761 */762 GetReportData() {763 return axios.post(path + '/Utils.aspx?act=homeReport');764 },765 /*======================================æ¥å¿æ¥è¯¢=========================================== */766 /**767 *768 * æ¥å¿æ¥å£769 */770 GetAdminLog(params){771 return axios.post(path + '/Admin.aspx?act=getAdminLog',params);772 },773 /*======================================çµåå票éå®æ¹æ¥å£=========================================== */774 /**775 * è·åå表776 *777 * @param {any} para778 */779 GetEInvoice(params) {780 return axios.post(path + '/EInvoice.aspx?act=lists', params);781 },782 /**783 * ä¿åå票784 *785 * @param {any} para786 */787 SaveEInvoice(params) {788 return axios.post(path + '/EInvoice.aspx?act=save', params);789 },790 /**791 * éè¿idå¾å°ä¸ä¸ªçµåå票æ°æ®792 *793 * @param {any} para794 */795 SetEInvoice(id) {796 return axios.post(path + '/EInvoice.aspx?act=get', id);797 },798 /**799 * ä¿®æ¹å票800 *801 * @param {any} para802 */803 UpEInvoice(params) {804 return axios.post(path + '/EInvoice.aspx?act=update', params);805 },806 /**807 * å é¤å票808 *809 * @param {any} para810 */811 DelEInvoice(id) {812 return axios.post(path + '/EInvoice.aspx?act=delete', id);813 },814 /*======================================çµåå票å¼ç¥¨æ¹=========================================== */815 /**816 * è·åå表817 *818 * @param {any} para819 */820 GetItem(params) {821 return axios.post(path + '/EInvoiceItem.aspx?act=lists', params);822 },823 /**824 * ä¿åå¼ç¥¨æ¹825 *826 * @param {any} para827 */828 SaveItem(params) {829 return axios.post(path + '/EInvoiceItem.aspx?act=save', params);830 },831 /**832 * éè¿idå¾å°ä¸ä¸ªå¼ç¥¨æ¹æ°æ®833 *834 * @param {any} para835 */836 SetItem(id) {837 return axios.post(path + '/EInvoiceItem.aspx?act=get', id);838 },839 /**840 * ä¿®æ¹å¼ç¥¨æ¹841 *842 * @param {any} para843 */844 UpItem(params) {845 return axios.post(path + '/EInvoiceItem.aspx?act=update', params);846 },847 /**848 * å é¤å¼ç¥¨æ¹849 *850 * @param {any} para851 */852 DelItem(id) {853 return axios.post(path + '/EInvoiceItem.aspx?act=delete', id);854 },855 /*======================================çµåå票å¼ç¥¨è®°å½=========================================== */856 /**857 * è·åå表858 *859 * @param {any} para860 */861 GetInvinfo(params) {862 return axios.post(path + '/EInvoice.aspx?act=invoiceLists', params);863 }...
test.js
Source:test.js
1import {axiosGet, axiosPost} from './baseApi'2// export const getTestList = (params,config)=>axiosGet('/getTestList',params,config);3// export const postTestList = (params,config)=>axiosPost('/sgw_system_web/sys/shop/getBaseInfo',params,config);4//mockæ¥å£5// export const postLoginSignIn = (params, config) => axiosPost('/login', params, config);6// export const getMenuList = (params, config) => axiosPost('/user/navlist', params, config);7//1111111118//è·åéªè¯ç 9export const postSendMessage = (params, config) => axiosPost('/login/sendMessage', params, config);10// export const postSendMessage = (params, config) => axiosPost('/login/sendDynamicMessage', params, config);11//ç»å½æ¥å£12export const postLoginSignIn = (params, config) => axiosPost('/login/signIn', params, config);13//ç®å½èå14export const getMenuList = (params, config) => axiosGet('/common/menu', params, config);15//è·ålogo16export const getShopLogo = (params, config) => axiosGet('/login/getShopLogo', params, config);17//æ¥è¯¢åæ·ä¿¡æ¯:18export const getBaseInfo = (params, config) => axiosPost('/sys/shop/getBaseInfo', params, config);19// åæ·å
³éåé20export const shopAllotSwitchCloseOrOpen = (params, config) => axiosPost('/sys/shop/shopAllotSwitchCloseOrOpen', params, config);21//æ交åæ°é
å¶22export const updateShopConfig = (params, config) => axiosPost('/sys/shop/updateShopConfig', params, config);23//åæ·å
å¼ç³è¯·:24export const rechargeProduct = (params, config) => axiosPost('/sys/shop/rechargeProduct', params, config);25//åæ·æç°ç³è¯·:26export const cashOutProduct = (params, config) => axiosPost('/sys/shop/cashOutProduct', params, config);27//éªè¯ç 28export const sendMessage = (params, config) => axiosPost('sys/order/sendMessage', params, config);29//ç¼è¾è¿æ¬¾é
å¶30export const changeRepayConfig = (params, config) => axiosPost('/sys/shop/changeRepayConfig', params, config);31// æ¥è¯¢åæ·èµéæç»å表:32export const queryCostDetail = (params, config) => axiosPost('/sys/shop/queryCostDetail', params, config);33//ç¨æ·å表æ¥è¯¢:34export const cusList = (params, config) => axiosPost('/sys/cus/cusList', params, config);35//ç³»ç»æ¨å¹¿å表æ¥è¯¢36export const sysPromotionList = (params, config) => axiosPost('/sys/cus/sysPromotionList', params, config);37//客æå表38export const cusServiceList = (params, config) => axiosPost('/sys/cus/cusServiceList', params, config);39//æäº¤å®¡æ ¸40export const subAnlyseCustomer = (params, config) => axiosPost('/sys/cus/subAnlyseCustomer', params, config);41//ä¿®æ¹æ ç¾42export const changeLabel = (params, config) => axiosPost('/sys/cus/changeLabel', params, config);43//æå44export const repulseCus = (params, config) => axiosPost('/sys/cus/repulseCus', params, config);45//ç»å®¡æç»46export const refuseFinalAudit = (params, config) => axiosPost('/sys/cus/refuseFinalAudit', params, config);47//æ交å贷认è¯ä¸ä¼ å¾ç48export const uploadLoanProve = (params, config) => axiosPost('/sys/cus/uploadLoanProve', params, config);49//ç¨æ·å®¡æ ¸å表æ¥è¯¢:50export const cusAuthList = (params, config) => axiosPost('/sys/cus/cusAuthList', params, config);51//è·åçä¿¡é¾æ¥:52export const getlink = (params, config) => axiosPost('/sys/cus/getlink', params, config);53//å®¡æ ¸äººå认é¢:54export const claimCustomer = (params, config) => axiosPost('/sys/cus/claimCustomer', params, config);55//å®¡æ ¸äººåå®¡æ ¸56export const auditCustomer = (params, config) => axiosPost('sys/cus/auditCustomer', params, config);57// çæåæ¡58export const artificiapay = (params, config) => axiosPost('sys/loan/artificiapay', params, config);59//æ¥çç¨æ·ä¿¡æ¯:60export const getCusInfo = (params, config) => axiosPost('sys/cus/getCusInfo', params, config);61/// ç»å®¡å表ç62export const finalAuditlist = (params, config) => axiosPost('sys/cus/finalAuditlist', params, config);63// ä¿®æ¹ç¨æ·ä¿¡æ¯:64export const changeCusInfo = (params, config) => axiosPost('sys/cus/changeCusInfo', params, config);65//æ¥çè系人:66export const getContactInfo = (params, config) => axiosPost('sys/cus/getContactInfo', params, config);67//è·åç´§æ¥è系人268export const getLinkMan = (params, config) => axiosPost('sys/cus/getLinkMan', params, config);69//æ¥çè®°å½ï¼70export const getCusRecord = (params, config) => axiosPost('sys/cus/getCusRecord', params, config);71//æ·»å å¤æ³¨ï¼72export const addCusRemark = (params, config) => axiosPost('sys/cus/addCusRemark', params, config);73//ç½è´·é»åå74export const getTdBacklistInfo = (params, config) => axiosPost('sys/cus/getTdBacklistInfo', params, config);75//çµå76export const getShopData = (params, config) => axiosPost('sys/cus/getShopData', params, config);77//ææºè¿è¥åä¿¡æ¯78export const getMhmobileDetailInfo = (params, config) => axiosPost('sys/cus/getMhmobileDetailInfo', params, config);79// åè´·å®80export const getCreditJiedaibaoInfo = (params, config) => axiosPost('sys/cus/getCreditJiedaibaoInfo', params, config);81// ä»åå°82export const getCreditJinjiedaoInfo = (params, config) => axiosPost('sys/cus/getCreditJinjiedaoInfo', params, config);83/// ææºé讯å½æ°æ®84export const getCreditAddressInfo = (params, config) => axiosPost('sys/cus/getCreditAddressInfo', params, config);85//å¤æ³¨è系人86export const addLinkMan = (params, config) => axiosPost('sys/cus/addLinkMan', params, config);87//ä¸ä¼ ææºé讯å½88export const upload = (params, config) => axiosPost('sys/cus/upload', params, config);89//ç½è´·å
±äº«æ¥å90export const getCreditWdgxInfo = (params, config) => axiosPost('sys/cus/getCreditWdgxInfo', params, config);91//å贷认è¯92export const getCusModuleInfo = (params, config) => axiosPost('sys/cus/getCusModuleInfo', params, config);93//æ¥çèªå¨å®¡æ ¸ä¿¡æ¯ï¼94export const getModuleInfo = (params, config) => axiosPost('sys/cus/getModuleInfo', params, config);95///æ¨éæ¶æ¯96export const sendGeneralizeMessage = (params, config) => axiosPost('/sys/cus/sendGeneralizeMessage', params, config);97//è·ååæ¡ä¿¡æ¯98export const loanInfo = (params, config) => axiosPost('sys/loan/loanInfo', params, config);99//å款å表æ¥è¯¢:100export const loanList = (params, config) => axiosPost('/sys/loan/loanList', params, config);101//å款记å½å表102export const loanRecordList = (params, config) => axiosPost('/sys/loan/loanRecordList', params, config);103//ææ¬¾å®¡æ ¸ï¼éè¿/ä¸éè¿ï¼:104export const auditUserPay = (params, config) => axiosPost('/sys/loan/auditUserPay', params, config);105//è¿æ¬¾å表æ¥è¯¢:106export const repayDetailList = (params, config) => axiosPost('/sys/loan/repayDetailList', params, config);107// è¿æ¬¾è®°å½:108// export const repayLogList = (params, config) => axiosPost('/sys/loan/repayLogList', params, config);109export const logOrderCusRepayRenewalList = (params, config) => axiosPost('/sys/loan/logOrderCusRepayRenewalList', params, config);110//è¿æ¬¾å®¡æ ¸ï¼éè¿/ä¸éè¿ï¼:111export const auditUserRepay = (params, config) => axiosPost('/sys/loan/auditUserRepay', params, config);112//æ°å¢è¿æ¬¾æµæ°´è®°å½113export const saveLogOrderCusRepay = (params, config) => axiosPost('/sys/loan/saveLogOrderCusRepay', params, config);114//æ°å¢ç»ææµæ°´è®°å½115export const saveLogOrderCusRenewal = (params, config) => axiosPost('/sys/loan/saveLogOrderCusRenewal', params, config);116//ç¨æ·å表117export const userList = (params, config) => axiosPost('sys/user/userList', params, config);118//æ¯å¦æ¨éå¼å
³119export const changeAllotSwith = (params, config) => axiosPost('/sys/user/changeAllotSwith', params, config);120//è·åææè§è²:121export const getAllRoles = (params, config) => axiosPost('sys/user/getAllRoles', params, config);122//æ·»å ç¨æ·:123export const addUser = (params, config) => axiosPost('/sys/user/addUser', params, config);124//ä¿®æ¹ç¨æ·:125export const changeUser = (params, config) => axiosPost('/sys/user/changeUser', params, config);126//å é¤ç¨æ·:127export const delateUser = (params, config) => axiosPost('/sys/user/delateUser', params, config);128//ä¿®æ¹å¯ç :129export const changePwd = (params, config) => axiosPost('/sys/user/changePwd', params, config);130//éç½®å¯ç :131export const resetPwd = (params, config) => axiosPost('/sys/user/resetPwd', params, config);132//è·åè¿è¥äººå133export const getoperactionInfo = (params, config) => axiosPost('/sys/proxy/getoperactionInfo', params, config);134//代çå¹³å°135export const proxyplatfrom = (params, config) => axiosPost('/sys/proxy/proxyplatfrom', params, config);136//代çå表137export const proxylist = (params, config) => axiosPost('/sys/proxy/proxylist', params, config);138//æ·»å 代ç139export const addProxyUser = (params, config) => axiosPost('/sys/proxy/addProxyUser', params, config);140//ç¼è¾141export const updateProxy = (params, config) => axiosPost('/sys/proxy/updateProxy', params, config);142//è·åæå¼143export const getsysProxyInfo = (params, config) => axiosPost('/sys/proxy/getsysProxyInfo', params, config);144//è·å代çç»è®¡145export const proxyStatisticslist = (params, config) => axiosPost('/sys/proxy/proxyStatisticslist', params, config);146//////////////////////147//è´·å管ç148//æéå表149export const loanCollectDayBeforeList = (params, config) => axiosPost('/sys/loanCollect/loanCollectDayBeforeList', params, config);150export const UpdateloanCollect = (params, config) => axiosPost('/sys/loanCollect/UpdateloanCollect', params, config);151//å¬æ¶å表152export const loanCollectList = (params, config) => axiosPost('/sys/loanCollect/loanCollectList', params, config);153export const updateLoanDetailRemarks = (params, config) => axiosPost('/sys/loanCollect/updateLoanDetailRemarks', params, config);154export const getLoanCollects = (params, config) => axiosPost('/sys/loanCollect/getLoanCollects', params, config);155//ç»è®¡ç®¡ç156export const getServiceStatisList = (params, config) => axiosPost('/sys/statistics/getServiceStatisList', params, config);157export const statisticsReviewOfficer = (params, config) => axiosPost('/sys/statistics/statisticsReviewOfficer', params, config);158//é¦é¡µ159export const chargingList = (params, config) => axiosPost('/sys/statistics/chargingList', params, config);160//æ¶è´¹æ å...
API.js
Source:API.js
...6 user: user,7 notify: notify,8 image: image9 }10 return axios.post("/api/user/register", obj);11 },12 loginUser: function(loginData) {13 return axios.post("/api/user/login", loginData);14 },15 getUserbyId: function(id) {16 return axios.post("/api/user/" + id);17 },18 checkFriendRequest: function(username) {19 return axios.post("/api/user/friendRequest/" + username)20 },21 acceptFriendRequest: function(username, friendUsername) {22 return axios.post("/api/user/acceptFriendRequest/" + username, {friendUsername: friendUsername})23 },24 declineFriendRequest: function(username, friendUsername) {25 return axios.post("/api/user/declineFriendRequest/" + username, {friendUsername: friendUsername})26 },27 getAllUsersPantheon: function(username) {28 return axios.post("/api/user/allPantheon/" + username);29 },30 allUserPantheons: function(username, user) {31 return axios.post("/api/user/allUserPantheons/" + username, user)32 },33 // saveReview: function(user, review) {34 // return axios.post("/api/user/review/" + user, review);35 // },36 // getReview: function(id) {37 // return axios.post("/api/user/mediaReview/" + id);38 // },39 // getMaxRatings: function() {40 // return axios.post("api/maxRatings");41 // },42 addFriend: function(username, selector, input) {43 const obj = {44 username: username,45 selector: selector,46 input: input47 };48 return axios.post("api/user/addFriend/" + username, obj);49 },50 getFriends: function(username) {51 return axios.post("api/user/getFriends/" + username);52 },53 getFriendsPantheon: function (user) {54 return axios.post("api/user/getFriendsPantheon/" + user.username, user)55 },56 savePantheon: function(data) {57 return axios.post("api/pantheon", data);58 },59 getNonAcceptedPantheons: function(username) {60 return axios.post("api/pantheon/" + username);61 },62 getUserPantheonInteractions: function(username) {63 return axios.post("api/user/pantheonInteractions/" + username)64 },65 acceptPantheon: function(id, username) {66 const obj = {67 username: username68 };69 return axios.post("api/user/pantheon/" + id, obj)70 },71 declinePantheon: function(id, username) {72 const obj = {73 username: username74 };75 return axios.post("api/user/pantheonDeclined/" + id, obj)76 },77 getPantheonBattle: function(username) {78 return axios.post("api/pantheon/selectMusic/" + username)79 },80 saveSong: function(username, song, pantheonId) {81 const obj = {82 song: song,83 pantheonId: pantheonId84 };85 return axios.post("api/pantheon/song/" + username, obj)86 },87 checkPantheonTimer: function(username) {88 return axios.post("api/pantheon/timer/" + username);89 },90 submitVote: function(username, fighter, pantheonId, battle, number) {91 const obj = {92 username: username,93 fighter: fighter,94 battle: battle,95 number: number96 };97 return axios.post("api/pantheon/vote/" + pantheonId, obj)98 },99 finalVote: function(username) {100 return axios.post("api/pantheon/finalVote/" + username);101 },102 getResultsPantheon: function (username) {103 return axios.post("api/pantheon/results/" + username);104 },105 submitFinalVote: function(username, fighter, pantheonId, battle) {106 const obj = {107 username: username,108 fighter: fighter,109 battle: battle,110 };111 return axios.post("api/pantheon/finalVoting/" + pantheonId, obj)112 },113 checkFinalTimer: function(username) {114 return axios.post("api/pantheon/finalTimer/" + username);115 },116 getWinner: function(username) {117 return axios.post("api/pantheon/winner/" + username);118 },119 completePantheon: function(username) {120 return axios.post("api/pantheon/complete/" + username)121 }122 // getActivePantheon: function(id) {123 // return axios.post("api/pantheon/creator/" + id);124 // },125 // startMusic: function (item) {126 // console.log(item)127 // return axios.post("api/pantheon/music/" + item.id, item);128 // },129 // getMusic: function (username) {130 // return axios.post("api/pantheon/find/" + username)131 // },132 // submitBattle: function (obj, username) {133 // return axios.post("api/pantheon/battle/" + username, obj)134 // },135 // getVotingPantheon: function (username) {136 // return axios.post("api/pantheon/voting/" + username);137 // },138 // saveVotes: function (obj) {139 // return axios.post("api/pantheon/saveVotes/" + obj.username, obj)140 // },141 // getResults: function (username) {142 // return axios.post("api/pantheon/results/" + username)143 // },144 // createFinalBattle: function (id) {145 // return axios.post("api/pantheon/finalBattle/" + id)146 // },147 // getFinalMusic: function (username) {148 // return axios.post("api/pantheon/finalMusic/" + username)149 // },150 // submitFinalBattle: function (obj, username) {151 // return axios.post("api/pantheon/finalMusicChoice/" + username, obj)152 // },153 // getFinalVotingPantheon: function (username) {154 // return axios.post("api/pantheon/finalVoting/" + username);155 // },156 // saveFinalVotes: function (obj, username) {157 // return axios.post("api/pantheon/saveFinalVotes/" + username, obj)158 // },159 // getFinalResults: function (username) {160 // return axios.post("api/pantheon/finalResults/" + username)161 // },162 // completePantheon: function (pantheonId) {163 // return axios.post("api/pantheon/complete/" + pantheonId)164 // }...
service.js
Source:service.js
2//if (process.env.NODE_ENV == 'development') {3 axios.defaults.baseURL = 'http://182.254.133.153:8088';4//}5const AppService = {6 book_data: request => axios.post('api/book/data', request),7 book_items: request => axios.post('api/book/items', request),8 book_item: request => axios.post('api/book/item', request),9 book_basic: request => axios.post('api/book/basic', request),10 book_count: request => axios.post('api/book/count', request),11 book_update: request => axios.post('api/book/update', request),12 book_create: request => axios.post('api/book/create', request),13 book_empty: request => axios.post('api/book/empty', request),14 book_enable: request => axios.post('api/book/enable', request),15 book_disable: request => axios.post('api/book/disable', request),16 tag_data: request => axios.post('api/tag/data', request),17 tag_items: request => axios.post('api/tag/items', request),18 tag_item: request => axios.post('api/tag/item', request),19 tag_basic: request => axios.post('api/tag/basic', request),20 tag_count: request => axios.post('api/tag/count', request),21 tag_update: request => axios.post('api/tag/update', request),22 tag_create: request => axios.post('api/tag/create', request),23 tag_empty: request => axios.post('api/tag/empty', request),24 tag_enable: request => axios.post('api/tag/enable', request),25 tag_disable: request => axios.post('api/tag/disable', request),26 category_data: request => axios.post('api/category/data', request),27 category_items: request => axios.post('api/category/items', request),28 category_item: request => axios.post('api/category/item', request),29 category_basic: request => axios.post('api/category/basic', request),30 category_count: request => axios.post('api/category/count', request),31 category_update: request => axios.post('api/category/update', request),32 category_create: request => axios.post('api/category/create', request),33 category_empty: request => axios.post('api/category/empty', request),34 category_enable: request => axios.post('api/category/enable', request),35 category_disable: request => axios.post('api/category/disable', request),36 pattern_data: request => axios.post('api/pattern/data', request),37 pattern_items: request => axios.post('api/pattern/items', request),38 pattern_item: request => axios.post('api/pattern/item', request),39 pattern_basic: request => axios.post('api/pattern/basic', request),40 pattern_count: request => axios.post('api/pattern/count', request),41 pattern_update: request => axios.post('api/pattern/update', request),42 pattern_create: request => axios.post('api/pattern/create', request),43 pattern_empty: request => axios.post('api/pattern/empty', request),44 pattern_enable: request => axios.post('api/pattern/enable', request),45 pattern_disable: request => axios.post('api/pattern/disable', request),46 metaStatus_items: request => axios.post('api/meta-status/items', request),47 metaStatus_selected_item: request => axios.post('api/meta-status/selected-item', request),48 metaStatus_selected_items: request => axios.post('api/meta-status/selected-items', request),49 metaColor_items: request => axios.post('api/meta-color/items', request),50 metaColor_selected_item: request => axios.post('api/meta-color/selected-item', request),51 metaColor_selected_items: request => axios.post('api/meta-color/selected-items', request),52 metaCategory_items: request => axios.post('api/meta-category/items', request),53 metaCategory_selected_item: request => axios.post('api/meta-category/selected-item', request),54 metaCategory_selected_items: request => axios.post('api/meta-category/selected-items', request),55 metaPattern_items: request => axios.post('api/meta-pattern/items', request),56 metaPattern_selected_item: request => axios.post('api/meta-pattern/selected-item', request),57 metaPattern_selected_items: request => axios.post('api/meta-pattern/selected-items', request),58 casTag_items: request => axios.post('api/cas-tag/items', request),59 casTag_selected_item: request => axios.post('api/cas-tag/selected-item', request),60 casTag_selected_items: request => axios.post('api/cas-tag/selected-items', request),61 casTag_basic: request => axios.post('api/cas-tag/basic', request),62 user_profile: request => axios.post('api/user/profile', request)63}...
depart.js
Source:depart.js
...6 * è·åé¨é¨å表7 * @param {*} params8 */9export function getDepartSelect(params) {10 return $axios.post("/depart/select", params);11}12/**13 * è·åé¨é¨å表14 * @param {*} params15 */16export function getDepartList(params) {17 return $axios.post("/depart/list", params);18}19/**20 * æ°å¢ä¿®æ¹é¨é¨21 * @param {*} params22 */23export function addOrUpdateDepart(params) {24 return $axios.post("/depart/add", params);25}26/**27 * èµäº§å表28 * @param {*} params29 */30export function getAssetsList(params) {31 return $axios.post("/assests/list", params);32}33/**34 * ä¿åèµäº§35 * @param {*} params36 */37export function addOrUpdateAssets(params) {38 return $axios.post("/assests/save", params);39}40/**41 * å é¤èµäº§42 * @param {*} id43 */44export function deleteAssetsById(id) {45 return $axios.post(`/assests/delete/${id}`);46}47/**48 * æ¥åºèµäº§49 * @param {*} id50 */51export function loseAssetsById(id) {52 return $axios.post(`/assests/lose/${id}`);53}54/**55 * è·åæç³è¯·çç»´ä¿®å56 * @param {*} params57 */58export function getKeepMyList(params) {59 return $axios.post("/keep/my/list", params);60}61/**62 * 维修人å63 * @param {*} params64 */65export function getKeepUserSelect(params) {66 return $axios.post("/keep/user/select", params);67}68/**69 * å¾
å®¡æ ¸å表70 * @param {*} params71 */72export function getVerifyList(params) {73 return $axios.post("/keep/verify/list", params);74}75/**76 * ä¿åèµäº§77 * @param {*} params78 */79export function addOrUpdateKeep(params) {80 return $axios.post("/keep/add", params);81}82/**83 * ç»´ä¿®ç³è¯·å¾
å®¡æ ¸84 * @param {*} params85 */86export function getKeepApplyVerify(params) {87 return $axios.post("/keep/apply/verify", params);88}89/**90 * ç»´ä¿®ç³è¯·æç»91 * @param {*} params92 */93export function getKeepApplyRefuse(params) {94 return $axios.post("/keep/apply/refuse", params);95}96/**97 * ç»´ä¿®å®¡æ ¸å¾
å®¡æ ¸98 * @param {*} params99 */100export function getKeepAdminVerify(params) {101 return $axios.post("/keep/admin/verify", params);102}103/**104 * ç»´ä¿®å®¡æ ¸å·²é©³å105 * @param {*} params106 */107export function getKeepAdminRefuse(params) {108 return $axios.post("/keep/admin/refuse", params);109}110/**111 * å®¡æ ¸ç»´ä¿®å112 * @param {*} params113 */114export function shKeepVerify(params) {115 return $axios.post("/keep/verify", params);116}117/**118 * ç»´ä¿®è¿åº¦å¾
ç»´ä¿®119 * @param {*} params120 */121export function getSpeedKeeping(params) {122 return $axios.post("/keep/speed/keeping", params);123}124/**125 * ç»´ä¿®è¿åº¦å¾
ç»´ä¿®126 * @param {*} params127 */128export function getSpeedFinishi(params) {129 return $axios.post("/keep/speed/finish", params);130}131/**132 * èªä¸»å·¡æ£133 * @param {*} params134 */135export function getPatrolAutoList(params) {136 return $axios.post("/patrol/auto/list", params);137}138/**139 * å®æå·¡æ£140 * @param {*} params141 */142export function getPatrolTimeList(params) {143 return $axios.post("/patrol/time/list", params);144}145/**146 * æ°å¢ç¼è¾å¼å¸¸è®°å½147 * @param {*} type148 * @param {*} params149 */150export function addOrUpdateYichang(type, params) {151 return $axios.post(`/patrol/${type}/save`, params);152}153/**154 * å é¤å·¡æ£155 * @param {*} id156 */157export function deletePatrol(id) {158 return $axios.post(`/patrol/delete/${id}`);159}160export function getParrolDetail(id) {161 return $axios.post(`/patrol/find/${id}`);162}163/**164 * è·åé¦é¡µæ°æ®165 */166export function getIndexData(params) {167 return $axios.post("/data/chart", params);168}169/**170 * å é¤171 * @param {*} id172 */173export function deleteKeep(id) {174 return $axios.post(`/keep/delete/${id}`);175}176/**177 * 详æ
178 */179export function getKeepDetail(id) {180 return $axios.post(`/keep/find/${id}`);181}182export function subKeepRemark(params) {183 return $axios.post("/keep/remark", params);...
task.js
Source:task.js
2axios.defaults.withCredentials = true3import API from "@/net/API"4export default {5 async loadAll() {6 return await axios.post(API.LOAD_ALL_TASK.path, {})7 },8 async loadTask() {9 return await axios.get(API.LOAD_TASK.path)10 },11 async getFavor(){12 return await axios.post(API.GET_FAVOR.path, {})13 },14 async getMiniTaskByTask(id){15 return await axios.post(API.GET_MINITASK_BY_TASK.path,{id})16 },17 async favor(id){18 return await axios.post(API.FAVOR.path, {id})19 },20 async isFavor(id){21 return await axios.post(API.IS_FAVOR.path, {id})22 },23 async createTask(cover, title, intro, deadline) {24 let formData = new FormData()25 formData.append('file', cover)26 let data = JSON.stringify({title, intro, deadline})27 formData.append('data', data) // ä¸ä¼ æ件çåæ¶ï¼ ä¹å¯ä»¥ä¸ä¼ å
¶ä»æ°æ®28 let config = {29 headers: {'Content-Type': 'multipart/form-data'}30 }31 return await axios.post(API.CREATE_TASK.path, formData, config)32 },33 async getTemplate(type) {34 return await axios.post(API.GET_TEMPLATE.path, { type })35 },36 async configTask(problems, id, deadline, taskTag, miniTasksNum, miniTasksBonus, miniTasksTime, miniTasksLimit, miniTasksType) {37 let formData = new FormData()38 formData.append('file', problems)39 let data = JSON.stringify({id, deadline, taskTag, miniTasksNum, miniTasksBonus, miniTasksTime, miniTasksLimit, miniTasksType})40 formData.append('data', data) // ä¸ä¼ æ件çåæ¶ï¼ ä¹å¯ä»¥ä¸ä¼ å
¶ä»æ°æ®41 let config = {42 headers: {'Content-Type': 'multipart/form-data'}43 }44 return await axios.post(API.CONFIG_TASK.path, formData, config)45 },46 async beforeReleaseTask(id) {47 return await axios.post(API.BEFORE_RELEASE_TASK.path, { id })48 },49 async releaseTask(id) {50 return await axios.post(API.RELEASE_TASK.path, { id })51 },52 async getTaskProgress(id) {53 return await axios.post(API.TASK_PROGRESS.path, { id })54 },55 async terminateTask(id) {56 return await axios.post(API.TERMINATE_TASK.path, { id })57 },58 async getMiniTasks(id) {59 return await axios.post(API.SEE_MINI_TASKS_OF_TASK.path, { id })60 },61 async getAnswerIds(id) {62 return await axios.post(API.SEE_ANSWERS_OF_USERS.path, { id })63 },64 async getProblemsAndUsers(id) {65 return await axios.post(API.SEE_ANSWERS_OF_USER.path, { id })66 },67 async refuseAnswer(id) {68 return await axios.post(API.REFUSE_ANSWERS_OF_USER.path, { id })69 },70 async continueRelease(id) {71 return await axios.post(API.CONTINUE_RELEASE.path, { id })72 },73 async getAnswerProgress(id) {74 return await axios.post(API.ANSWER_PROGRESS.path, { id })75 },76 async autoCheck(id) {77 return await axios.post(API.AUTO_CHECK.path, { id })78 },79 async settleTask(id) {80 return await axios.post(API.SETTLE_TASK.path, { id })81 },82 async exportTask(id) {83 return await axios.post(API.EXPORT_TASK.path, { id })84 },...
Myservices.js
Source:Myservices.js
1import axios from 'axios'2import { MAIN_URL } from "./URL"3export function register(data) {4 return axios.post(`${MAIN_URL}/register`, data);5}6export function login(data) {7 return axios.post(`${MAIN_URL}/login`, data)8}9export function sociallogin(data) {10 return axios.post(`${MAIN_URL}/sociallogin`, data)11}12export function sendotp(data) {13 return axios.post(`${MAIN_URL}/sendotp`, data)14}15export function getinfo(data) {16 return axios.post(`${MAIN_URL}/getinfo`, data)17}18export function changepassword(data) {19 return axios.post(`${MAIN_URL}/changepassword`, data)20}21export function getproducts(data) {22 return axios.get(`${MAIN_URL}/getproducts${data}`)23}24export function forgetpassword(data) {25 return axios.post(`${MAIN_URL}/forgetpassword`, data)26}27export function addAddress(data) {28 return axios.post(`${MAIN_URL}/addAddress`, data)29}30export function viewproducts(id) {31 return axios.get(`${MAIN_URL}/viewproduct${id}`)32}33export function setAddress(data) {34 return axios.post(`${MAIN_URL}/setAddress`, data)35}36export function setcart(data) {37 return axios.post(`${MAIN_URL}/setcart`, data)38}39export function setorder(data) {40 return axios.post(`${MAIN_URL}/setorder`, data)41}42export function getorder(data) {43 return axios.post(`${MAIN_URL}/getorder`, data)44}45export function getcartinfo(data) {46 return axios.post(`${MAIN_URL}/getcartinfo`, data)47}48export function getCategory() {49 return axios.get(`${MAIN_URL}/getCategory`)50}51export function getColor() {52 return axios.get(`${MAIN_URL}/getColor`)53}54export function updateRating(data) {55 return axios.post(`${MAIN_URL}/updateRating`, data)56}57export function getsearch(data) {58 return axios.post(`${MAIN_URL}/getsearch`, data);59}60export function subscribe(data) {61 return axios.post(`${MAIN_URL}/subscribe`, data)...
Using AI Code Generation
1const axios = require('axios');2const data = {3 "desiredCapabilities": {4 }5};6 .then(response => {7 console.log(response);8 })9 .catch(error => {10 console.log(error);11 });12const axios = require('axios');13const data = {14 "desiredCapabilities": {15 }16};17 .then(response => {18 console.log(response);19 })20 .catch(error => {21 console.log(error);22 });23const axios = require('axios');24const data = {25 "desiredCapabilities": {26 }27};28 .then(response => {29 console.log(response);30 })31 .catch(error => {32 console.log(error);33 });34const axios = require('axios');35const data = {36 "desiredCapabilities": {37 }38};39 .then(response => {40 console.log(response);41 })42 .catch(error => {43 console.log(error);44 });
Using AI Code Generation
1const axios = require('axios');2const data = {3 "desiredCapabilities": {4 }5};6axios.post(url, data)7 .then(response => {8 console.log(response.data);9 })10 .catch(error => {11 console.log(error);12 });13const axios = require('axios');14const data = {15 "desiredCapabilities": {16 }17};18axios.post(url, data)19 .then(response => {20 console.log(response.data);21 })22 .catch(error => {23 console.log(error);24 });25const axios = require('axios');26const data = {27 "desiredCapabilities": {28 }29};30axios.post(url, data)31 .then(response => {32 console.log(response.data);33 })
Using AI Code Generation
1const axios = require('axios');2const { exec } = require('child_process');3const { expect } = require('chai');4const { createDevice } = require('./createDevice');5const { deleteDevice } = require('./deleteDevice');6const { getDevice } = require('./getDevice');7const { getDevices } = require('./getDevices');8const { getDeviceStatus } = require('./getDeviceStatus');9const { getDeviceLog } = require('./getDeviceLog');10const { getDeviceScreenshot } = require('./getDeviceScreenshot');11const { getDevicePerformanceData } = require('./getDevicePerformanceData');12const { getDevicePerformanceDataTypes } = require('./getDevicePerformanceDataTypes');13const { getDevicePerformanceDataTypesForPlatform } = require('./getDevicePerformanceDataTypesForPlatform');14const { getDevicePerformanceDataTypesForPlatformWithApp } = require('./getDevicePerformanceDataTypesForPlatformWithApp');15const { getDevicePerformanceDataTypesForPlatformWithAppAndTest } = require('./getDevicePerformanceDataTypesForPlatformWithAppAndTest');16const { getDevicePerformanceDataTypesWithApp } = require('./getDevicePerformanceDataTypesWithApp');17const { getDevicePerformanceDataTypesWithAppAndTest } = require('./getDevicePerformanceDataTypesWithAppAndTest');18const { getDevicePerformanceDataTypesWithTest } = require('./getDevicePerformanceDataTypesWithTest');19const { getDevicePerformanceDataWithApp } = require('./getDevicePerformanceDataWithApp');20const { getDevicePerformanceDataWithAppAndTest } = require('./getDevicePerformanceDataWithAppAndTest');21const { getDevicePerformanceDataWithTest } = require('./getDevicePerformanceDataWithTest');22const { getDevicePerformanceDataTypesForPlatformWithTest } = require('./getDevicePerformanceDataTypesForPlatformWithTest');23const { getDevicePerformanceDataTypesWithAppAndTest } = require('./getDevicePerformanceDataTypesWithAppAndTest');24const { getDevicePerformanceDataWithAppAndTest } = require('./getDevicePerformanceDataWithAppAndTest');25const { getDevicePerformanceDataTypesForPlatformWithAppAndTest } = require('./getDevicePerformanceDataTypesForPlatformWithAppAndTest');26const { getDevicePerformanceDataWithTest } = require('./getDevicePerformanceDataWithTest');27const { getDevicePerformanceDataTypesForPlatformWithTest } = require('./getDevicePerformanceDataTypesForPlatformWithTest');28const { getDevicePerformanceDataTypesWith
Using AI Code Generation
1var axios = require('axios');2var data = JSON.stringify({3 "desiredCapabilities": {4 }5});6var config = {7 headers: { 8 },9};10axios(config)11.then(function (response) {12 console.log(JSON.stringify(response.data));13})14.catch(function (error) {15 console.log(error);16});17var axios = require('axios');18var config = {19 headers: { }20};21axios(config)22.then(function (response) {23 console.log(JSON.stringify(response.data));24})25.catch(function (error) {26 console.log(error);27});28var axios = require('axios');29var config = {30 headers: { }31};32axios(config)33.then(function (response) {34 console.log(JSON.stringify(response.data));35})36.catch(function (error) {37 console.log(error);38});39var axios = require('axios');40var config = {41 headers: {
Using AI Code Generation
1const axios = require('axios');2const fs = require('fs');3const desiredCapabilities = {4};5let sessionID = '';6const driver = axios.create({7 headers: {8 }9});10driver.post('/session', desiredCapabilities)11 .then((response) => {12 console.log(response);13 sessionID = response.data.sessionId;14 return sessionID;15 })16 .then((sessionID) => {17 return driver.get(`/session/${sessionID}/element/0/text`);18 })19 .then((response) => {20 console.log(response);21 return response.data;22 })23 .then((data) => {24 return fs.writeFileSync('test.txt', data);25 })26 .catch((error) => {27 console.log(error);28 });
Using AI Code Generation
1const axios = require('axios');2 "desiredCapabilities": {3 }4}).then(function (response) {5 console.log(response.data.sessionId);6 console.log(response.data.status);7 console.log(response.data.value);8 var sessionId = response.data.sessionId;9 .then(function (response) {10 console.log(response.data.sessionId);11 console.log(response.data.status);12 console.log(response.data.value);13 }).catch(function (error) {14 console.log(error);15 });16}).catch(function (error) {17 console.log(error);18});
Using AI Code Generation
1var axios = require('axios');2var data = {3};4axios.post(url,data)5 .then(function (response) {6 console.log(response.data);7 })8 .catch(function (error) {9 console.log(error);10 });11var axios = require('axios');12var data = {};13axios.post(url,data)14 .then(function (response) {15 console.log(response.data);16 })17 .catch(function (error) {18 console.log(error);19 });20var axios = require('axios');
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!