How to use fetchUrl method in storybook-root

Best JavaScript code snippet using storybook-root

transaction.js

Source:transaction.js Github

copy

Full Screen

1/**2 * 交易3 * */4// import { stringify } from 'qs';5import request from '@/utils/request';6import FetchURL from './FetchURL';7import { getQueryPath } from '@/utils/utils';8export async function getOrderDetail(params = {}) {9 // 订单明细查询10 return request(FetchURL.orderDetailQuery, {11 method: 'GET',12 body: {13 ...params,14 startOrderTime: params.orderTime && params.orderTime[0], // 下单开始时间15 endOrderTime: params.orderTime && params.orderTime[1], // 下单结束时间16 startPaymentTime: params.paymentTime && params.paymentTime[0], // 付款开始时间17 endPaymentTime: params.paymentTime && params.paymentTime[1], // 付款结束时间18 district: params.district && params.district[0], // 地区19 province: params.district && params.district[1], // 省份20 city: params.district && params.district[2], // 城市21 },22 });23}24export async function getShipmentsDetail(params = {}) {25 // 发货明细查询26 return request(FetchURL.shipmentsDetailQuery, {27 method: 'GET',28 body: {29 ...params,30 startCreateTime: params.createTime && params.createTime[0], // 下单开始时间31 endCreateTime: params.createTime && params.createTime[1], // 下单结束时间32 startPaymentTime: params.paymentTime && params.paymentTime[0], // 付款开始时间33 endPaymentTime: params.paymentTime && params.paymentTime[1], // 付款结束时间34 startAffirmTime: params.affirmTime && params.affirmTime[0], // 确认开始时间35 endAffirmTime: params.affirmTime && params.affirmTime[1], // 确认结束时间36 district: params.district && params.district[0], // 地区37 province: params.district && params.district[1], // 省份38 city: params.district && params.district[2], // 城市39 },40 });41}42export async function getClearingIndexDetail(params = {}) {43 // 动销明细查询44 return request(FetchURL.clearingIndexDetailQuery, {45 method: 'GET',46 body: {47 ...params,48 startClearingTime: params.clearingTime && params.clearingTime[0], // 下单开始时间49 endClearingTime: params.clearingTime && params.clearingTime[1], // 下单结束时间50 district: params.district && params.district[0], // 地区51 province: params.district && params.district[1], // 省份52 city: params.district && params.district[2], // 城市53 },54 });55}56export async function getRefundmentDetail(params = {}) {57 // 退款明细查询58 return request(FetchURL.refundmentDetailQuery, {59 method: 'GET',60 body: {61 ...params,62 startOrderTime: params.orderTime && params.orderTime[0], // 退货源付款开始时间63 endOrderTime: params.orderTime && params.orderTime[1], // 退货源付款结束时间64 startCreateTime: params.createTime && params.createTime[0], // 退款提交开始时间65 endCreateTime: params.createTime && params.createTime[1], // 退款提交结束时间66 startRefundmentTime: params.refundmentTime && params.refundmentTime[0], // 退款完成时间开始时间67 endRefundmentTime: params.refundmentTime && params.refundmentTime[1], // 退款完成时间结束时间68 district: params.district && params.district[0], // 地区69 province: params.district && params.district[1], // 省份70 city: params.district && params.district[2], // 城市71 },72 });73}74export async function downloadOrderDetail(params = {}) {75 // 订单明细下载76 return getQueryPath(FetchURL.downloadOrderDetailDownload, {77 ...params,78 startOrderTime: params.orderTime && params.orderTime[0], // 下单开始时间79 endOrderTime: params.orderTime && params.orderTime[1], // 下单结束时间80 startPaymentTime: params.paymentTime && params.paymentTime[0], // 付款开始时间81 endPaymentTime: params.paymentTime && params.paymentTime[1], // 付款结束时间82 district: params.district && params.district[0], // 地区83 province: params.district && params.district[1], // 省份84 city: params.district && params.district[2], // 城市85 });86}87export async function downloadReport(params = {}) {88 // 订单明细下载89 return getQueryPath(FetchURL.downloadReport, {90 ...params,91 });92}93export async function downloadPublicReport(params = {}) {94 // 订单明细下载95 return getQueryPath(FetchURL.downloadPublicReport, {96 ...params,97 });98}99export async function downloadReportCompare(params = {}) {100 // 订单明细下载101 return getQueryPath(FetchURL.downloadReportCompare, {102 ...params,103 });104}105export async function downloadShipmentsDetail(params = {}) {106 // 发货明细下载107 return getQueryPath(FetchURL.downloadShipmentsDetailDownload, {108 ...params,109 startCreateTime: params.createTime && params.createTime[0], // 下单开始时间110 endCreateTime: params.createTime && params.createTime[1], // 下单结束时间111 startPaymentTime: params.paymentTime && params.paymentTime[0], // 付款开始时间112 endPaymentTime: params.paymentTime && params.paymentTime[1], // 付款结束时间113 startAffirmTime: params.affirmTime && params.affirmTime[0], // 确认开始时间114 endAffirmTime: params.affirmTime && params.affirmTime[1], // 确认结束时间115 district: params.district && params.district[0], // 地区116 province: params.district && params.district[1], // 省份117 city: params.district && params.district[2], // 城市118 });119}120export async function downloadClearingindexDetail(params = {}) {121 // 动销明细下载122 return getQueryPath(FetchURL.downloadClearingindexDetailDownload, {123 ...params,124 startClearingTime: params.clearingTime && params.clearingTime[0], // 下单开始时间125 endClearingTime: params.clearingTime && params.clearingTime[1], // 下单结束时间126 district: params.district && params.district[0], // 地区127 province: params.district && params.district[1], // 省份128 city: params.district && params.district[2], // 城市129 });130}131export async function downloadRefundmentDetail(params = {}) {132 // 退款明细下载133 return getQueryPath(FetchURL.downloadRefundmentDetailDownload, {134 ...params,135 startOrderTime: params.orderTime && params.orderTime[0], // 退货源付款开始时间136 endOrderTime: params.orderTime && params.orderTime[1], // 退货源付款结束时间137 startCreateTime: params.createTime && params.createTime[0], // 退款提交开始时间138 endCreateTime: params.createTime && params.createTime[1], // 退款提交结束时间139 startRefundmentTime: params.refundmentTime && params.refundmentTime[0], // 退款完成时间开始时间140 endRefundmentTime: params.refundmentTime && params.refundmentTime[1], // 退款完成时间结束时间141 district: params.district && params.district[0], // 地区142 province: params.district && params.district[1], // 省份143 city: params.district && params.district[2], // 城市144 });145}146export async function directoryQuery(params = {}) {147 // 目录查询148 return request(FetchURL.directoryQuery, {149 method: 'GET',150 body: params,151 });152}153export async function directoryQueryOffical(params = {}) {154 // 目录查询155 return request(FetchURL.directoryQueryOffical, {156 method: 'GET',157 body: params,158 });159}160export async function directorySave(params = {}) {161 // 添加目录162 return request(FetchURL.directorySave, {163 method: 'POST',164 body: params,165 });166}167export async function directoryUpdate(params = {}) {168 // 修改目录169 return request(FetchURL.directoryUpdate, {170 method: 'POST',171 body: params,172 });173}174export async function reportUpatePriority(params = {}) {175 // 报表优先级修改176 return request(FetchURL.reportUpatePriority, {177 method: 'GET',178 body: params,179 });180}181export async function directoryDelete(params = {}) {182 // 删除目录183 return request(FetchURL.directoryDelete, {184 method: 'POST',185 body: params,186 });187}188export async function customReportQuery(params = {}) {189 // 查询报表190 return request(FetchURL.customReportQuery, {191 method: 'GET',192 body: params,193 });194}195export async function customReportQueryData(params = {}) {196 // 报表数据查询197 return request(FetchURL.customReportQueryData, {198 method: 'GET',199 body: params,200 });201}202export async function customReportSave(params = {}) {203 // 增加报表204 return request(FetchURL.customReportSave, {205 method: 'POST',206 body: params,207 });208}209export async function reportDelete(params = {}) {210 // 删除报表211 return request(FetchURL.customReportDelete, {212 method: 'POST',213 body: params,214 });215}216export async function reportDetail(params = {}) {217 // 获取报表详情218 return request(FetchURL.customReportDetail, {219 method: 'GET',220 body: params,221 });222}223export async function dataCompareReportQuery(params = {}) {224 // 查询报表225 return request(FetchURL.dataCompareReportQuery, {226 method: 'GET',227 body: params,228 });229}230export async function dataCompareReportQueryData(params = {}) {231 // 报表数据查询232 return request(FetchURL.dataCompareReportQueryData, {233 method: 'GET',234 body: params,235 });236}237export async function dataCompareReportSave(params = {}) {238 // 增加同期对比报表239 return request(FetchURL.dataCompareReportSave, {240 method: 'POST',241 body: params,242 });243}244export async function dataCompareReportDelete(params = {}) {245 // 删除同期对比报表246 return request(FetchURL.dataCompareReportDelete, {247 method: 'POST',248 body: params,249 });250}251export async function dataCompareReportDetail(params = {}) {252 // 获取同期对比报表详情253 return request(FetchURL.dataCompareReportDetail, {254 method: 'GET',255 body: params,256 });257}258export async function dataCompareReportList(params = {}) {259 // 根据报表获取所有同期对比报表260 return request(FetchURL.dataCompareReportList, {261 method: 'POST',262 body: params,263 });264}265export async function fetchIndicatorTypeList(params) {266 // 获取指标分类267 return request(FetchURL.indicatorTypeList, {268 method: 'GET',269 body: params,270 });271}272export async function indicatorsQuery(params) {273 // 指标列表获取274 return request(FetchURL.indicatorsQuery, {275 method: 'GET',276 body: params,277 });278}279export async function indicatorsInfo(params) {280 // 指标详情获取281 return request(FetchURL.indicatorsInfo, {282 method: 'GET',283 body: params,284 });285}286export async function downloadSave(params = {}) {287 // 下载记录增加288 return request(FetchURL.downloadSave, {289 method: 'POST',290 body: params,291 });292}293// 公开报表294export async function customReportQueryOffical(params = {}) {295 // 查询报表296 return request(FetchURL.customReportQueryOffical, {297 method: 'GET',298 body: params,299 });300}301export async function customReportQueryDataOffical(params = {}) {302 // 报表数据查询303 return request(FetchURL.customReportQueryDataOffical, {304 method: 'GET',305 body: params,306 });307}308export async function customReportSaveOffical(params = {}) {309 // 增加报表310 return request(FetchURL.customReportSaveOffical, {311 method: 'POST',312 body: params,313 });314}315export async function selectIndicatorData(params = {}) {316 // 下拉框选择317 return request(FetchURL.selectIndicatorData, {318 method: 'GET',319 body: params,320 });321}322export async function reportDeleteOffical(params = {}) {323 // 删除报表324 return request(FetchURL.customReportDeleteOffical, {325 method: 'POST',326 body: params,327 });328}329export async function reportDetailOffical(params = {}) {330 // 获取报表详情331 return request(FetchURL.customReportDetailOffical, {332 method: 'GET',333 body: params,334 });335}336export async function dataCompareReportSaveOffical(params = {}) {337 // 增加同期对比报表338 return request(FetchURL.dataCompareReportSaveOffical, {339 method: 'POST',340 body: params,341 });342}343export async function dataCompareReportDeleteOffical(params = {}) {344 // 删除同期对比报表345 return request(FetchURL.dataCompareReportDeleteOffical, {346 method: 'POST',347 body: params,348 });349}350export async function deleteUserFromShareReport(params = {}) {351 // 删除报表的某一个共享用户352 return request(FetchURL.deleteUserFromShareReport, {353 method: 'POST',354 body: params,355 });356}357export async function reportIndicatorsQuery(params = {}) {358 // 指标公式359 return request(FetchURL.reportIndicatorsQuery, {360 method: 'GET',361 body: params,362 });363}364export async function reportIndicatorsList(params = {}) {365 // 获取某个报表所有公式366 return request(FetchURL.reportIndicatorsList, {367 method: 'GET',368 body: params,369 });370}371export async function reportSaveDefinedIndicators(params = {}) {372 // 新增公式373 return request(FetchURL.reportSaveDefinedIndicators, {374 method: 'POST',375 body: params,376 });377}378// 配置报表379export async function settingReportPriority(params = {}) {380 // 报表优先级修改381 return request(FetchURL.settingReportPriority, {382 method: 'GET',383 body: params,384 });385}386export async function settingReportQuery(params = {}) {387 // 查询报表388 return request(FetchURL.settingReportQuery, {389 method: 'GET',390 body: params,391 });392}393export async function settingReportQueryData(params = {}) {394 // 报表数据查询395 return request(FetchURL.settingReportQueryData, {396 method: 'GET',397 body: {398 ...params,399 pageNo: params.pageNo || 1,400 pageSize: params.pageSize || 10,401 },402 });403}404export async function settingReportSave(params = {}) {405 // 增加报表406 return request(FetchURL.settingReportSave, {407 method: 'POST',408 body: params,409 });410}411export async function settingReportDelete(params = {}) {412 // 删除报表413 return request(FetchURL.settingReportDelete, {414 method: 'POST',415 body: params,416 });417}418export async function settingReportDetail(params = {}) {419 // 获取报表详情420 return request(FetchURL.settingReportDetail, {421 method: 'GET',422 body: params,423 });424}425export async function settingReportDatasource(params = {}) {426 // 获取报表详情427 return request(FetchURL.settingReportDatasource, {428 method: 'GET',429 body: params,430 });431}432export async function settingReportOthers(params = {}) {433 // 获取报表详情434 return request(FetchURL.settingReportOthers, {435 method: 'GET',436 body: params,437 });438}439export async function downloadSettingReport(params = {}) {440 // 获取报表详情441 return getQueryPath(FetchURL.downloadSettingReport, {442 ...params,443 });444}445export async function directoryCockpitQuery(params = {}) {446 // 目录查询447 return request(FetchURL.directoryCockpitQuery, {448 method: 'GET',449 body: params,450 });451}452export async function reportListData(params = {}) {453 // 目录查询454 return request(FetchURL.reportListData, {455 method: 'GET',456 body: params,457 });458}459export async function userPermissList(params = {}) {460 // 权限-人员列表461 return request(FetchURL.userPermissList, {462 method: 'GET',463 body: params,464 });465}466export async function datasourcePermissList(params = {}) {467 // 权限-数据源468 return request(FetchURL.datasourcePermissList, {469 method: 'GET',470 body: params,471 });472}473export async function reportPermissList(params = {}) {474 // 权限-用户报表475 return request(FetchURL.reportPermissList, {476 method: 'GET',477 body: params,478 });479}480export async function addTablePermission(params = {}) {481 // 权限-用户报表482 return request(FetchURL.addTablePermission, {483 method: 'POST',484 body: params,485 });486}487// 数据需求488export async function dataJobHistoryList(params) {489 // 获取下载需求列表490 return request(FetchURL.dataJobHistoryList, {491 method: 'GET',492 body: params,493 });494}495export async function dataJobList(params) {496 // 获取需求列表497 return request(FetchURL.dataJobList, {498 method: 'GET',499 body: params,500 });501}502export async function dataJobSave(params) {503 // 添加编辑模板504 return request(FetchURL.dataJobSave, {505 method: 'POST',506 body: params,507 });508}509export async function dataJobAddSubtasks(params) {510 // 添加子任务511 return request(FetchURL.dataJobAddSubtasks, {512 method: 'GET',513 body: params,514 });515}516export async function dataJobInfo(params) {517 // 需求详情518 return request(FetchURL.dataJobInfo, {519 method: 'GET',520 body: params,521 });522}523export async function dataJobClose(params) {524 // 关闭525 return request(FetchURL.dataJobClose, {526 method: 'POST',527 body: params,528 });529}530export async function dataJobAccurate(params) {531 // 需求准确无误532 return request(FetchURL.dataJobAccurate, {533 method: 'POST',534 body: params,535 });536}537export async function dataJobConfim(params) {538 // 需求确认539 return request(FetchURL.dataJobConfim, {540 method: 'POST',541 body: params,542 });543}544export async function dataJobUploadData(params) {545 // 上传数据546 return request(FetchURL.dataJobUploadData, {547 method: 'POST',548 body: params,549 });550}551export async function dataJobOperate(params) {552 // 数据执行人553 return request(FetchURL.dataJobOperate, {554 method: 'POST',555 body: params,556 });557}558export async function dataJobProblems(params) {559 // 数据需求问题560 return request(FetchURL.dataJobProblems, {561 method: 'POST',562 body: params,563 });564}565export async function dataJobReview(params) {566 // 数据审核人567 return request(FetchURL.dataJobReview, {568 method: 'POST',569 body: params,570 });571}572export async function dataJobUpdatePriority(params) {573 // 优先级修改574 return request(FetchURL.dataJobUpdatePriority, {575 method: 'POST',576 body: params,577 });578}579export async function dataJobDownload(params) {580 // 需求下载581 return getQueryPath(FetchURL.dataJobDownload, {582 ...params,583 });584}585export async function dataJobHistoryDownload(params) {586 // 记录下载587 return request(FetchURL.dataJobHistoryDownload, {588 method: 'GET',589 body: params,590 });591}592export async function dataJobGetSort(params) {593 // 顺序594 return request(FetchURL.dataJobGetSort, {595 method: 'GET',596 body: params,597 });598}599export async function dataJobGetAdminList(params) {600 // 后台数据需求下载列表601 return request(FetchURL.dataJobGetAdminList, {602 method: 'GET',603 body: params,604 });605}606export async function dataJobAdminUpdateIndicate(params) {607 // 后台数据需求有效期修改608 return request(FetchURL.dataJobAdminUpdateIndicate, {609 method: 'POST',610 body: params,611 });612}613// 公开报表614export async function settingReportPublicPriority(params = {}) {615 // 报表优先级修改616 return request(FetchURL.settingReportPublicPriority, {617 method: 'GET',618 body: params,619 });620}621export async function settingReportPublicQuery(params = {}) {622 // 查询报表623 return request(FetchURL.settingReportPublicQuery, {624 method: 'GET',625 body: params,626 });627}628export async function settingReportPublicQueryData(params = {}) {629 // 报表数据查询630 return request(FetchURL.settingReportPublicQueryData, {631 method: 'GET',632 body: {633 ...params,634 pageNo: params.pageNo || 1,635 pageSize: params.pageSize || 10,636 },637 });638}639export async function settingReportPublicSave(params = {}) {640 // 增加报表641 return request(FetchURL.settingReportPublicSave, {642 method: 'POST',643 body: params,644 });645}646export async function settingReportPublicDelete(params = {}) {647 // 删除报表648 return request(FetchURL.settingReportPublicDelete, {649 method: 'POST',650 body: params,651 });652}653export async function settingReportPublicDetail(params = {}) {654 // 获取报表详情655 return request(FetchURL.settingReportPublicDetail, {656 method: 'GET',657 body: params,658 });659}660export async function shareReportPublic(params = {}) {661 // 获取报表详情662 return request(FetchURL.shareReportPublic, {663 method: 'POST',664 body: params,665 });666}667export async function getUsersByReportId(params = {}) {668 // 根据报表获取到共享用户669 return request(FetchURL.getUsersByReportId, {670 method: 'GET',671 body: params,672 });673}674export async function getReportList(params = {}) {675 // 获取所有报表676 return request(FetchURL.getReportList, {677 method: 'GET',678 body: params,679 });...

Full Screen

Full Screen

back.js

Source:back.js Github

copy

Full Screen

1import request from '@/utils/request';2import FetchURL from './FetchURL';3import { getQueryPath } from '@/utils/utils';4export async function indicatorsQuery(params) {5 // 指标列表获取6 return request(FetchURL.indicatorsQuery, {7 method: 'GET',8 body: params,9 });10}11export async function indicatorsInfo(params) {12 // 指标详情获取13 return request(FetchURL.indicatorsInfo, {14 method: 'GET',15 body: params,16 });17}18export async function indicatorsSave(params) {19 // 指标保存20 return request(FetchURL.indicatorsSave, {21 method: 'POST',22 body: params,23 });24}25export async function indicatorUpload(params) {26 // 指标保存27 return request(FetchURL.indicatorUpload, {28 method: 'POST',29 body: params,30 });31}32export async function enableSwitch(params) {33 // 指标启用开关34 return request(FetchURL.indicatorsIsEnable, {35 method: 'POST',36 body: params,37 });38}39export async function dbInstanceQuery(params) {40 // 实例列表获取41 return request(FetchURL.dbInstanceQuery, {42 method: 'GET',43 body: params,44 });45}46export async function dbInstanceInfo(params) {47 // 实例详情获取48 return request(FetchURL.dbInstanceInfo, {49 method: 'GET',50 body: params,51 });52}53export async function dbInstanceSave(params) {54 // 实例保存55 return request(FetchURL.dbInstanceSave, {56 method: 'POST',57 body: params,58 });59}60export async function dbInstanceDelete(params) {61 // 实例删除62 return request(FetchURL.dbInstanceDelete, {63 method: 'POST',64 body: params,65 });66}67export async function dataCollectionGets(params) {68 // 数据采集列表获取69 return request(FetchURL.dataCollectionGets, {70 method: 'GET',71 body: params,72 });73}74export async function dataCollectionInfo(params) {75 // 数据采集详情获取76 return request(FetchURL.dataCollectionInfo, {77 method: 'GET',78 body: params,79 });80}81export async function dataCollectionSave(params) {82 // 数据采集保存83 return request(FetchURL.dataCollectionSave, {84 method: 'POST',85 body: params,86 });87}88export async function dataCollectionIsEnable(params) {89 // 数据采集启用开关90 return request(FetchURL.dataCollectionIsEnable, {91 method: 'POST',92 body: params,93 });94}95export async function collectHistoryGets(params) {96 // 数据采集列表获取97 return request(FetchURL.collectHistoryGets, {98 method: 'GET',99 body: params,100 });101}102export async function testDataCollection(params) {103 // 数据采集测试104 return request(FetchURL.testDataCollection, {105 method: 'POST',106 body: params,107 });108}109export async function dataCollectionImport(params) {110 // 数据采集导入111 return request(FetchURL.dataCollectionImport, {112 method: 'POST',113 body: params,114 });115}116export async function dataCollectionExport(params) {117 // 数据采集导入118 return getQueryPath(FetchURL.dataCollectionExport, {119 ...params,120 });121}122export async function fetchIndicatorTypeList(params) {123 // 获取指标分类124 return request(FetchURL.indicatorTypeList, {125 method: 'GET',126 body: params,127 });128}129export async function scriptLibraryQuery(params) {130 // 脚本库列表获取131 return request(FetchURL.scriptLibraryQuery, {132 method: 'GET',133 body: params,134 });135}136export async function scriptLibraryInfo(params) {137 // 脚本库详情获取138 return request(FetchURL.scriptLibraryInfo, {139 method: 'GET',140 body: params,141 });142}143export async function scriptLibrarySave(params) {144 // 脚本库保存145 return request(FetchURL.scriptLibrarySave, {146 method: 'POST',147 body: params,148 });149}150export async function userRegistered(params) {151 // 新增用户152 return request(FetchURL.userRegistered, {153 method: 'POST',154 body: params,155 });156}157export async function userUpdate(params) {158 // 修改用户159 return request(FetchURL.userUpdate, {160 method: 'POST',161 body: params,162 });163}164export async function userisEnable(params) {165 // 是否启用166 return request(FetchURL.userisEnable, {167 method: 'POST',168 body: params,169 });170}171export async function userPostPermission(params) {172 // 用户岗位权限173 return request(FetchURL.userPostPermission, {174 method: 'GET',175 body: params,176 });177}178export async function userGetInfo(params) {179 // 获取用户信息180 return request(FetchURL.userGetInfo, {181 method: 'GET',182 body: params,183 });184}185export async function userGets(params) {186 // 获取用户信息187 return request(FetchURL.userGets, {188 method: 'GET',189 body: params,190 });191}192export async function userDataDemanGets(params) {193 // 获取数据需求用户信息194 return request(FetchURL.userDataDemanGets, {195 method: 'GET',196 body: params,197 });198}199export async function permissPostIsEnable(params) {200 // 是否启用201 return request(FetchURL.permissPostIsEnable, {202 method: 'POST',203 body: params,204 });205}206export async function permissPostGets(params) {207 // 岗位信息详细获取208 return request(FetchURL.permissPostGets, {209 method: 'GET',210 body: params,211 });212}213export async function permissPostSave(params) {214 // 添加岗位215 return request(FetchURL.permissPostSave, {216 method: 'POST',217 body: params,218 });219}220export async function permissPostQuery(params) {221 // 岗位列表222 return request(FetchURL.permissPostQuery, {223 method: 'GET',224 body: params,225 });226}227export async function indicatorQuery(params) {228 // 指标查询229 return request(FetchURL.indicatorQuery, {230 method: 'GET',231 body: params,232 });233}234export async function navigateMenuList(params) {235 // 查询目录236 return request(FetchURL.navigateMenuList, {237 method: 'GET',238 body: params,239 });240}241export async function navigateMenuAdd(params) {242 // 查询目录243 return request(FetchURL.navigateMenuAdd, {244 method: 'POST',245 body: params,246 });247}248export async function reportGetsByUesrId(params) {249 // 根据用户获取报表250 return request(FetchURL.reportGetsByUesrId, {251 method: 'GET',252 body: params,253 });254}255export async function reportIndicatosGetsByUesrId(params) {256 // 根据用户获取报表,根据报表id获取指标257 return request(FetchURL.reportIndicatosGetsByUesrId, {258 method: 'GET',259 body: params,260 });261}262export async function updateReportIndicatos(params) {263 // 根据用户获取报表,根据报表id获取指标修改指标264 return request(FetchURL.updateReportIndicatos, {265 method: 'POST',266 body: params,267 });268}269export async function indicatorsGetsByUserId(params) {270 // 根据用户获取指标271 return request(FetchURL.indicatorsGetsByUserId, {272 method: 'GET',273 body: params,274 });275}276export async function reportGetsByIndicators(params) {277 // 用户指标对应报表278 return request(FetchURL.reportGetsByIndicators, {279 method: 'GET',280 body: params,281 });282}283export async function reportDeleteByIndicators(params) {284 // 用户指标删除对应的报表285 return request(FetchURL.reportDeleteByIndicators, {286 method: 'POST',287 body: params,288 });289}290export async function lineTagQuery(params) {291 // 线性标签列表292 return request(FetchURL.lineTagQuery, { method: 'GET', body: params });293}294export async function lineTagInfo(params) {295 // 线性详情296 return request(FetchURL.lineTagInfo, {297 method: 'GET',298 body: params,299 });300}301export async function lineTagSave(params) {302 // 保存线性标签303 return request(FetchURL.lineTagSave, {304 method: 'POST',305 body: params,306 });307}308export async function lineTagIsEnable(params) {309 // 是否启用标签310 return request(FetchURL.lineTagIsEnable, {311 method: 'POST',312 body: params,313 });314}315export async function apiList(params) {316 // api列表317 return request(FetchURL.apiList, {318 method: 'GET',319 body: params,320 });321}322export async function apiInfo(params) {323 // api列表324 return request(FetchURL.apiInfo, {325 method: 'GET',326 body: params,327 });328}329export async function saveApi(params) {330 // 创建api331 return request(FetchURL.saveApi, {332 method: 'POST',333 body: params,334 });335}336export async function tableStructureQuery(params) {337 // 获取表结构列表338 return request(FetchURL.tableStructureQuery, {339 method: 'GET',340 body: params,341 });342}343export async function tableStructureGet(params) {344 // 获取表结构列表判断表结构是否重复345 return request(FetchURL.tableStructureGet, {346 method: 'GET',347 body: params,348 });349}350export async function tableStructureInfo(params) {351 // 查询表结构建表信息352 return request(FetchURL.tableStructureInfo, {353 method: 'GET',354 body: params,355 });356}357export async function tableStructureSave(params) {358 // 新增表359 return request(FetchURL.tableStructureSave, {360 method: 'POST',361 body: params,362 });363}364export async function tableStructureFieldsInfo(params) {365 // 查询表结构字段信息366 return request(FetchURL.tableStructureFieldsInfo, {367 method: 'GET',368 body: params,369 });370}371export async function tableStructureAddFields(params) {372 // 新增字段373 return request(FetchURL.tableStructureAddFields, {374 method: 'POST',375 body: params,376 });377}378export async function tableStructureUpdataFields(params) {379 // 修改字段380 return request(FetchURL.tableStructureUpdataFields, {381 method: 'POST',382 body: params,383 });384}385export async function tableStructureUpdataIndex(params) {386 // 修改索引387 return request(FetchURL.tableStructureUpdataIndex, {388 method: 'POST',389 body: params,390 });391}392export async function tableStructureHistory(params) {393 // 历史记录394 return request(FetchURL.tableStructureHistory, {395 method: 'GET',396 body: params,397 });398}399export async function tableStructureDeleteData(params) {400 // 清除数据401 return request(FetchURL.tableStructureDeleteData, {402 method: 'POST',403 body: params,404 });405}406export async function tableStructureDelete(params) {407 // 删除表结构信息408 return request(FetchURL.tableStructureDelete, {409 method: 'POST',410 body: params,411 });412}413export async function tableStructureImport(params) {414 // 表结构导入415 return request(FetchURL.tableStructureImport, {416 method: 'POST',417 body: params,418 });419}420export async function tableStructureExport(params) {421 // 表结构导入422 return getQueryPath(FetchURL.tableStructureExport, {423 ...params,424 });425}426export async function tableStructureFieldsList(params) {427 // 表字段属性428 return request(FetchURL.tableStructureFieldsList, {429 method: 'GET',430 body: params,431 });432}433export async function tableStructureUpdate(params) {434 // 修改字段属性435 return request(FetchURL.tableStructureUpdate, {436 method: 'POST',437 body: params,438 });439}440export async function tableStructureFieldsUpdate(params) {441 // 修改字段属性442 return request(FetchURL.tableStructureFieldsUpdate, {443 method: 'POST',444 body: params,445 });446}447export async function tableStructureUpdateAlias(params) {448 // 修改字段中文449 return request(FetchURL.tableStructureUpdateAlias, {450 method: 'POST',451 body: params,452 });453}454export async function tableStructureUpdateSelector(params) {455 // 修改选择器456 return request(FetchURL.tableStructureUpdateSelector, {457 method: 'POST',458 body: params,459 });460}461export async function dataBaseQueryList(params) {462 // 修改字段属性463 return request(FetchURL.dataBaseQueryList, {464 method: 'GET',465 body: params,466 });467}468export async function tableChannelList(params) {469 // 获取470 return request(FetchURL.tableChannelList, {471 method: 'GET',472 body: params,473 });474}475export async function tableParticlenList(params) {476 // 获取粒度数据477 return request(FetchURL.tableParticlenList, {478 method: 'GET',479 body: params,480 });481}482export async function tableCategoryList(params) {483 // 获取所有表分类数据484 return request(FetchURL.tableCategoryList, {485 method: 'GET',486 body: params,487 });488}489export async function tableChannelAdd(params) {490 // 添加渠道491 return request(FetchURL.tableChannelAdd, {492 method: 'POST',493 body: params,494 });495}496export async function tableParticlenAdd(params) {497 // 添加粒度498 return request(FetchURL.tableParticlenAdd, {499 method: 'POST',500 body: params,501 });502}503export async function tableCategoryAdd(params) {504 // 添加表分类505 return request(FetchURL.tableCategoryAdd, {506 method: 'POST',507 body: params,508 });509}510export async function tableCategoryIsEnable(params) {511 // 添加表分类512 return request(FetchURL.tableCategoryIsEnable, {513 method: 'POST',514 body: params,515 });516}517export async function tableCollectQuery(params) {518 // 获取所有已采集的表519 return request(FetchURL.tableCollectQuery, {520 method: 'GET',521 body: params,522 });523}524export async function tableCollectDbInstanceQuery(params) {525 // 获取环境变量526 return request(FetchURL.tableCollectDbInstanceQuery, {527 method: 'GET',528 body: params,529 });530}531export async function tableCollectsave(params) {532 // 单表采集增加533 return request(FetchURL.tableCollectsave, {534 method: 'POST',535 body: params,536 });537}538export async function tableCollectInfo(params) {539 // 单表信息540 return request(FetchURL.tableCollectInfo, {541 method: 'GET',542 body: params,543 });544}545export async function tableCollectIsEnable(params) {546 // 启用547 return request(FetchURL.tableCollectIsEnable, {548 method: 'POST',549 body: params,550 });551}552export async function tableCollectIsSysnc(params) {553 // 是否启用同步554 return request(FetchURL.tableCollectIsSysnc, {555 method: 'POST',556 body: params,557 });558}559export async function tableCollectTest(params) {560 // 单表采集测试561 return request(FetchURL.tableCollectTest, {562 method: 'POST',563 body: params,564 });565}566export async function tableCollectReTry(params) {567 // 单表采集测试568 return request(FetchURL.tableCollectReTry, {569 method: 'POST',570 body: params,571 });572}573export async function tableCollectHistory(params) {574 // 单表采集测试575 return request(FetchURL.tableCollectHistory, {576 method: 'GET',577 body: params,578 });579}580export async function tableCollectImport(params) {581 // 单表导入表582 return request(FetchURL.tableCollectImport, {583 method: 'POST',584 body: params,585 });586}587export async function tableCollectExport(params) {588 // 单表采集导出589 return getQueryPath(FetchURL.tableCollectExport, {590 ...params,591 });592}593export async function DataRinseHistory(params) {594 // 单个清洗内容595 return request(FetchURL.DataRinseHistory, {596 method: 'GET',597 body: params,598 });599}600export async function DataRinseQuery(params) {601 // 清洗数据602 return request(FetchURL.DataRinseQuery, {603 method: 'GET',604 body: params,605 });606}607export async function DataRinseSave(params) {608 // 新增清洗数据609 return request(FetchURL.DataRinseSave, {610 method: 'POST',611 body: params,612 });613}614export async function DataRinseIsEnable(params) {615 // 是否启用616 return request(FetchURL.DataRinseIsEnable, {617 method: 'POST',618 body: params,619 });620}621export async function DataRinseInfo(params) {622 // 详情623 return request(FetchURL.DataRinseInfo, {624 method: 'GET',625 body: params,626 });627}628export async function DataRinseReTest(params) {629 // 数据清洗试运行630 return request(FetchURL.DataRinseReTest, {631 method: 'POST',632 body: params,633 });634}635export async function DataRinseReReTry(params) {636 // 数据清洗重运行637 return request(FetchURL.DataRinseReReTry, {638 method: 'POST',639 body: params,640 });641}642export async function tableCollectFromDb(params) {643 // 源库644 return request(FetchURL.tableCollectFromDb, {645 method: 'GET',646 body: params,647 });648}649export async function tableCollectDestDb(params) {650 // 目标库651 return request(FetchURL.tableCollectDestDb, {652 method: 'GET',653 body: params,654 });655}656// 数据导入657export async function dataImportList(params) {658 // 获取模板列表659 return request(FetchURL.dataImportList, {660 method: 'GET',661 body: params,662 });663}664export async function dataImportSave(params) {665 // 添加编辑模板666 return request(FetchURL.dataImportSave, {667 method: 'POST',668 body: params,669 });670}671export async function dataImportInfo(params) {672 // 模板详情673 return request(FetchURL.dataImportInfo, {674 method: 'GET',675 body: params,676 });677}678export async function dataImportIsEnable(params) {679 // 是否启用模板680 return request(FetchURL.dataImportIsEnable, {681 method: 'POST',682 body: params,683 });684}685export async function dataImportUserPermiss(params) {686 // 用户权限687 return request(FetchURL.dataImportUserPermiss, {688 method: 'POST',689 body: params,690 });691}692export async function dataImportUploadData(params) {693 // 上传数据694 return request(FetchURL.dataImportUploadData, {695 method: 'POST',696 body: params,697 });698}699export async function dataImportDownload(params) {700 // 下载模板701 return getQueryPath(FetchURL.dataImportDownload, {702 ...params,703 });704}705export async function dataImportPermissList(params) {706 // 已有模板权限的用户707 return request(FetchURL.dataImportPermissList, {708 method: 'GET',709 body: params,710 });711}712export async function uploadHistoryDownload(params) {713 // 下载模板714 return getQueryPath(FetchURL.uploadHistoryDownload, {715 ...params,716 });717}718export async function uploadPreviewDownload(params) {719 // 预览720 return request(FetchURL.uploadPreviewDownload, {721 method: 'GET',722 body: params,723 });724}725export async function dataImportUploadListData(params) {726 // 上传记录列表727 return request(FetchURL.dataImportUploadListData, {728 method: 'GET',729 body: params,730 });731}732// 定时邮件733export async function getMailList(params = {}) {734 // 获取定时邮件735 return request(FetchURL.mailListgets, {736 method: 'GET',737 body: params,738 });739}740export async function mailListEdit(params = {}) {741 // 获取定时邮件742 return request(FetchURL.mailListEdit, {743 method: 'POST',744 body: params,745 });746}747export async function mailListinfo(params = {}) {748 // 获取定时邮件749 return request(FetchURL.mailListinfo, {750 method: 'GET',751 body: params,752 });...

Full Screen

Full Screen

song_api.js

Source:song_api.js Github

copy

Full Screen

1class SongApi {2 static getNextSongs(pageUrl) {3 let fetchUrl;4 if (pageUrl) {5 fetchUrl = pageUrl;6 } else {7 fetchUrl = '/api/v0/audio/';8 }9 return fetch(fetchUrl, { cache: 'no-cache', credentials: 'same-origin' })10 .then(response => response.json())11 .catch((error) => {12 throw error;13 });14 }15 static getTags() {16 return fetch('/api/v0/tags/', { cache: 'no-cache', credentials: 'same-origin' })17 .then(response => response.json())18 .catch((error) => {19 throw error;20 });21 }22 static fetchSongs(oType, searchSongValue, filterObject, author) {23 let fetchUrl = '';24 if (oType) {25 fetchUrl += `o=${oType}&`;26 }27 if (searchSongValue) {28 fetchUrl += `search=${searchSongValue}&`;29 }30 if (author) {31 fetchUrl += 'author=true&';32 }33 if (filterObject && filterObject.slug) {34 fetchUrl += `tag=${filterObject.slug}&`;35 }36 // clearing & symbol37 if (fetchUrl.endsWith('&')) {38 fetchUrl = fetchUrl.slice(0, -1);39 }40 // keep url in sync to allow loading state from Url41 window.history.pushState(null, '', `?${fetchUrl}`);42 fetchUrl = `/api/v0/audio/?${fetchUrl}`;43 return fetch(fetchUrl, { cache: 'no-cache', credentials: 'same-origin' })44 .then(response => response.json())45 .catch((error) => {46 throw error;47 });48 }49 static getSongLyrics(songId) {50 return fetch(`/api/v0/audio/${songId}/lyrics/`, {51 cache: 'no-cache',52 credentials: 'same-origin',53 })54 .then(response => response.json())55 .catch((error) => {56 throw error;57 });58 }59}...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import fetchUrl from 'storybook-root/fetchUrl';2import fetchUrl from 'storybook-root/fetchUrl';3import fetchUrl from 'storybook-root/fetchUrl';4import fetchUrl from 'storybook-root/fetchUrl';5import fetchUrl from 'storybook-root/fetchUrl';6import fetchUrl from 'storybook-root/fetchUrl';7import fetchUrl from 'storybook-root/fetchUrl';8import fetchUrl from 'storybook-root/fetchUrl';9import fetchUrl from 'storybook-root/fetchUrl';10import fetchUrl from 'storybook-root/fetchUrl';11import fetchUrl from 'storybook-root/fetchUrl';12import fetchUrl from 'storybook-root/fetchUrl';13import fetchUrl from 'storybook-root/fetchUrl';14import fetchUrl from 'storybook-root/fetchUrl';15import fetchUrl from 'storybook-root/fetchUrl';16import fetchUrl from 'storybook-root/fetchUrl';17import fetchUrl from 'storybook-root/fetchUrl';18import fetchUrl from 'storybook-root/fetchUrl';19import fetchUrl from 'storybook-root/fetchUrl';20import fetchUrl from 'storybook-root/fetchUrl';21import fetchUrl

Full Screen

Using AI Code Generation

copy

Full Screen

1import { fetchUrl } from 'storybook-root';2import { fetchUrl } from 'storybook-root';3import { fetchUrl } from 'storybook-root';4import { fetchUrl } from 'storybook-root';5import { fetchUrl } from 'storybook-root';6import { fetchUrl } from 'storybook-root';7import { fetchUrl } from 'storybook-root';8import { fetchUrl } from 'storybook-root';9import { fetchUrl } from 'storybook-root';10import { fetchUrl } from 'storybook-root';11import { fetchUrl } from 'storybook-root';12import { fetchUrl } from 'storybook-root';13import { fetchUrl } from 'storybook-root';14import { fetchUrl } from 'storybook-root';15import { fetchUrl } from 'storybook-root';16import { fetchUrl } from 'storybook-root';17import { fetchUrl } from 'storybook-root';18import { fetchUrl } from 'storybook-root';19import { fetchUrl } from 'storybook-root';20import { fetchUrl } from 'storybook-root';

Full Screen

Using AI Code Generation

copy

Full Screen

1import { fetchUrl } from 'storybook-root';2import { fetchUrl } from 'storybook-root';3import { fetchUrl } from 'storybook-root';4import { fetchUrl } from 'storybook-root';5import { fetchUrl } from 'storybook-root';6import { fetchUrl } from 'storybook-root';7import { fetchUrl } from 'storybook-root';8import { fetchUrl } from 'storybook-root';9import { fetchUrl } from 'storybook-root';10import { fetchUrl } from 'storybook-root';11import { fetchUrl } from 'storybook-root';12import { fetchUrl } from 'storybook-root';13import { fetchUrl } from 'storybook-root';

Full Screen

Using AI Code Generation

copy

Full Screen

1const fetchUrl = require('storybook-root/fetchUrl');2fetchUrl(url, function(err, meta, body){3 if (err) {4 console.log(err);5 } else {6 console.log('body', body);7 }8});9const fetchUrl = require('storybook-root/fetchUrl');10fetchUrl(url, function(err, meta, body){11 if (err) {12 console.log(err);13 } else {14 console.log('body', body);15 }16});17import fetchUrl from 'storybook-root/fetchUrl';18fetchUrl(url, function(err, meta, body){19 if (err) {20 console.log(err);21 } else {22 console.log('body', body);23 }24});25import express from 'express';26const app = express();27app.get('/', (req, res) => {28 res.send('Hello World!');29});30app.listen(3000, () => {31 console.log('Example app listening on port 3000!');32});

Full Screen

Using AI Code Generation

copy

Full Screen

1const fetchUrl = require('storybook-root').fetchUrl;2fetchUrl(url, function(err, meta, body){3 if(err) throw err;4 console.log('Got response: ' + body);5});6const fetchUrl = require('storybook-root').fetchUrl;7fetchUrl(url, function(err, meta, body){8 if(err) throw err;9 console.log('Got response: ' + body);10});11const fetchUrl = require('storybook-root').fetchUrl;12fetchUrl(url, function(err, meta, body){13 if(err) throw err;14 console.log('Got response: ' + body);15});16const fetchUrl = require('storybook-root').fetchUrl;17fetchUrl(url, function(err, meta, body){18 if(err) throw err;19 console.log('Got response: ' + body);20});21const fetchUrl = require('storybook-root').fetchUrl;22fetchUrl(url, function(err, meta, body){23 if(err) throw err;24 console.log('Got response: ' + body);25});26const fetchUrl = require('storybook-root').fetchUrl;27fetchUrl(url, function(err, meta, body){28 if(err) throw err;29 console.log('Got response: ' + body);30});31const fetchUrl = require('storybook-root').fetchUrl;32fetchUrl(url, function(err, meta, body){33 if(err) throw err;34 console.log('Got response: ' + body);35});

Full Screen

Using AI Code Generation

copy

Full Screen

1import { fetchUrl } from 'storybook-root';2 console.log(response);3});4import fetch from 'node-fetch';5export const fetchUrl = (url) => fetch(url);6{7 "dependencies": {8 }9}10{11 "dependencies": {12 }13}

Full Screen

Using AI Code Generation

copy

Full Screen

1const fetchUrl = (url) => {2}3export const fetchUrl = (url) => {4}5I have a Storybook instance running on my local machine. I am trying to run tests for the components in Storybook. I have a test file which imports the storybook-root.js file. I am trying to mock the fetchUrl method in the storybook-root.js file. I have tried the following code:6I have a Storybook instance running on my local machine. I am trying to run tests for the components in Storybook. I have a test file which imports the storybook-root.js file. I am trying to mock the fetchUrl method in the storybook-root.js file. I have tried the following code:7I have a Storybook instance running on my local machine. I am trying to run tests for the components in Storybook. I have a test file which imports the storybook-root.js file. I am trying to mock the fetchUrl method in the storybook-root.js file. I have tried the following code:8I have a Storybook instance running on my local machine. I am trying to run tests for the components in Storybook. I have a test file which imports the storybook-root.js file. I am trying to mock the fetchUrl method in the storybook-root.js file. I have tried the following code:9I have a Storybook instance running on my local machine. I am trying to run tests for the components in Storybook. I have a test file which imports the storybook-root.js file. I am trying to mock the fetchUrl method in the storybook-root.js file. I have tried the following code:10I have a Storybook instance running on my local machine. I am trying to run tests for the components in Storybook. I have a test file which imports the storybook-root.js file. I am trying to mock the fetchUrl method in the storybook-root.js file. I have tried

Full Screen

Using AI Code Generation

copy

Full Screen

1import { fetchUrl } from 'storybook-root';2module.exports = (baseConfig, env, defaultConfig) => {3 defaultConfig.resolve.alias['storybook-root'] = process.cwd();4 return defaultConfig;5};6import { fetchUrl } from 'storybook-root';

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 storybook-root 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