How to use isNative method in Best

Best JavaScript code snippet using best

menuData.js

Source:menuData.js Github

copy

Full Screen

1/**2 * common config3 */4import common from './common.js'5export default {6 // 子菜单与父菜单匹配归类7 menuCataLog: [8 {9 modulName: '页头',10 iconClass: "iconfont icon-xiaoshouxiansuo",11 children: [],12 },13 {14 modulName: '系统设置',15 iconClass: "iconfont icon-jichushezhi",16 // 数据字典 账务账期 业务序号 菜单管理 系统任务调度 GP归属设置 SNP归属设置 角色管理 工作流管理17 children: ['000001', '000662', '000011', '000018', '000167', '000048', '000056', '000039', '000530']18 },19 {20 modulName: '行政管理',21 iconClass: "iconfont icon-xiaoshouhangzhengguanli",22 // 组织管理 岗位管理 员工管理 员工岗位23 children: ['000024', '000030', '000979', '001015']24 },25 {26 modulName: '门店管理',27 iconClass: "iconfont icon-xiaoshouhangzhengguanli",28 // 门店管理 销售车型管理 仓库信息 库区管理 库位管理 工位管理 摆放管理 店长折扣29 children: ['001069', '000183', '000402', '000442', '000448', '000970', '001425', '001390']30 },31 {32 modulName: '区域管理',33 iconClass: "iconfont icon-jichushezhi",34 // 行政区域 销售区域 采购区域 配送区域35 children: ['000071', '000091', '000085', '000079']36 },37 {38 modulName: '车型管理',39 iconClass: "iconfont icon-chexingguanli",40 // 厂家管理 品牌管理 车系管理 车型管理 排量管理 进气方式 销售车型 售后车型41 children: ['000111', '000118', '000125', '000132', '000139', '000146', '000153', '001050']42 },43 {44 modulName: '金融管理',45 iconClass: "iconfont icon-jinrongguanli",46 // 金融机构 金融产品 协作报价 贷款申请47 children: ['000186', '000201', '001186', '001187']48 },49 {50 modulName: '保险管理',51 iconClass: "iconfont icon-baoxianguanli",52 // 保险公司 保险方案 协作报价 保险出单53 children: ['000232', '000246', '001613', '001670']54 },55 {56 modulName: '市场活动',57 iconClass: "iconfont icon-shichanghuodongguanlicopy",58 // 活动管理59 children: ['000217']60 },61 {62 modulName: 'CRM管理',63 iconClass: "iconfont icon-CRMtiaoyan",64 // 问卷设置 调研任务65 children: ['000252', '000275']66 },67 {68 modulName: '商品中心',69 iconClass: "iconfont icon-shangpinguanli",70 children: [71 '000288', // 分类管理72 '000315', // 目录管理73 {74 childName: '整车信息',75 // 整车信息 整车锁定/解锁 76 textCode: ['000321', '000333',]77 }, {78 childName: '商品信息',79 // 商品管理 品牌管理 产地管理 包装管理 单位管理 商品定价 商品车型适配 商品适配概览 车型适配查询80 textCode: ['000323', '000282', '000302', '000337', '000343', '000294', '000308', '001093', '001091',]81 }, {82 childName: '组合信息',83 // 组合商品 组合分类 组合目录84 textCode: ['001032', '001161', '001155']85 }86 ],87 },88 {89 modulName: '服务管理',90 iconClass: "iconfont icon-xiaoshouhangzhengguanli",91 children: [92 '000786', // 分类管理 93 '000791', // 目录管理 94 {95 childName: '服务信息',96 // 服务管理 服务商品用量 97 textCode: ['000877', '000906',]98 }, {99 childName: '服务定价',100 // 车型工时管理 套餐售价设置101 textCode: ['000884', '000897',]102 },103 '001343' // 推荐服务104 ],105 },106 {107 modulName: '客户管理',108 iconClass: "iconfont icon-xiaoshouhangzhengguanli",109 // 客户档案110 children: ['000367']111 },112 {113 modulName: '供应商管理',114 iconClass: "iconfont icon-gongyinglianguanli",115 // 供应商信息 采购合同116 children: ['000393', '000670']117 },118 {119 modulName: '供应链管理',120 iconClass: "iconfont icon-jichushezhi",121 children: [122 {123 childName: '需求管理',124 // 日常补货计划 需求处理 125 textCode: ['001103', '001126',]126 }, {127 childName: '整车采购',128 // 采购订单 采购付款 采购开票 采购入库 129 textCode: ['000410', '000425', '000421', '000417',]130 }, {131 childName: '整车共享',132 // 车辆分享 车辆发布 调拨出库 调拨入库 133 textCode: ['000767', '000769', '000818', '000826',]134 }, {135 childName: '商品供应链',136 // 商品采购 采购入库 采购退货 调拨出库 调拨入库 内售出库 内售入库 自采管理 自采到货处理 商品库存调整 报损/报溢 137 textCode: ['000429', '000434', '001326', '000698', '000720', '000962', '000957', '001601', '001602', '001615', '000684',]138 }, {139 childName: '库存信息',140 // 商品库存 整车库存 入库批次查询 出入库查询 调拨在途查询 141 textCode: ['000454', '001340', '001319', '001322', '001564',]142 }, {143 childName: '盘点管理',144 // 盘点计划 盘点处理145 textCode: ['000622', '000610',]146 }, {147 childName: '对账/核销',148 // 对账单管理 核销单管理 149 textCode: ['001539', '001549',]150 }, 151 '001780' // 自采对账核销152 ]153 },154 {155 modulName: '整车交易',156 iconClass: "iconfont icon-jichushezhi",157 children: [158 {159 childName: '行政设置',160 // 销售目标 商务政策 历史客流导入161 textCode: ['000499', '000516', '001740',]162 }, {163 childName: '新车销售',164 // 前台接待 销售线索 整车订单 订单收款 订单开票 订单退款165 textCode: ['000463', '000481', '000551', '000601', '000607', '000608']166 }167 ],168 },169 {170 modulName: '售后交易',171 iconClass: "iconfont icon-jichushezhi",172 children: [173 {174 childName: '行政设置',175 // 员工排班 检查模板176 textCode: ['000836', '001351',]177 }, 178 '001742', // 快捷洗车179 {180 childName: '售后维修',181 // 预约单 预检单查询 工单查询 派工管理 打卡管理 维修领料 质检查询 工单收款 工单开票182 textCode: ['001913', '001697', '001672', '000929', '000951', '001741', '001724', '001371']183 }184 ],185 },186 {187 modulName: '卡券中心',188 iconClass: "iconfont icon-jichushezhi",189 children: [190 {191 childName: '卡中心',192 // 计次卡模版 储值卡模版 卡管理 卡销售 卡充值 卡退换193 textCode: ['001216', '001566', '001261', '001226', '001239', '001307']194 },195 {196 childName: '券中心',197 // // 券模板 券管理 券销售198 textCode: [ '001469', '001667', '001952']199 }200 ],201 },202 {203 modulName: '财务管理',204 iconClass: "iconfont icon-jichushezhi",205 children: [206 {207 childName: '发票管理',208 // 退票管理209 textCode: ['001376']210 }211 ],212 },213 {214 modulName: '数据报表',215 iconClass: "iconfont icon-jichushezhi",216 children: [217 {218 childName:'整车交易',219 // 展厅客流日志 CRM回访跟进表 跨部门策略表 DCC线索跟进转化表 SC线索跟进转化表 LPE展厅客流日志 销售管理报表 经销商财务报表 SC线索电话跟进清单220 textCode: ['000740', '000796', '001203', '001119', '001120', '001306', '001660', '001415', '001671']221 }222 ],223 },224 ],225 //菜单sidebar 渲染226 menuMap: {227 // ==========================================以下为基础模块228 //数据字典229 '000001': {230 url:common.isweb() + '/dataDictionary/dataDictionary.html',231 isNative:false232 },233 //业务序号234 '000011': {235 url: common.isweb() + '/ordinal-info/ordinal-info.html',236 isNative:false237 },238 //菜单管理239 '000018': {240 url: common.isweb() + '/menu/menu.html',241 isNative:false242 },243 //组织管理244 '000024': {245 url: common.isweb() + '/organization/organization.html',246 isNative:false 247 },248 //岗位管理249 '000030': {250 url: common.isweb() + '/position/position.html',251 isNative:false 252 },253 //角色管理254 '000039': {255 url: common.isweb() + '/role/role.html',256 isNative:false 257 },258 //行政区域管理259 '000071': {260 url: common.isweb() + '/china/china.html',261 isNative:false 262 },263 //配送区域管理264 '000079': {265 url: common.isweb() + '/distribution/distribution.html',266 isNative:false 267 },268 //采购区域管理269 '000085': {270 url: common.isweb() + '/purchase/purchase.html',271 isNative: false272 },273 //销售区域管理274 '000091': {275 url: common.isweb() + '/sale/sale.html',276 isNative: false 277 },278 //员工信息管理279 '000099': {280 url: common.isweb() + '/employee/employee.html',281 isNative: false 282 },283 //车型-厂家信息284 '000111': {285 url: common.isweb() + '/carType/factory/factory.html',286 isNative: false 287 },288 //车型-品牌信息289 '000118': {290 url: common.isweb() + '/carType/brand/brand.html',291 isNative: false 292 },293 //车型-车系信息294 '000125': {295 url: common.isweb() + '/carType/series/series.html',296 isNative: false 297 },298 //车型-车型信息299 '000132': {300 url: common.isweb() + '/carType/model/model.html',301 isNative: false 302 },303 //车型-排量信息304 '000139': {305 url: common.isweb() + '/carType/displacement/displacement.html',306 isNative: false 307 },308 //车型-进气方式309 '000146': {310 url: common.isweb() + '/carType/inlet/inlet.html',311 isNative: false 312 },313 //主车型信息314 '000153': {315 url: common.isweb() + '/carType/mainCarType/mainCarType.html',316 isNative: false 317 },318 //统一任务调度319 '000167': {320 url: common.isweb() + '/task/tasklist.html',321 isNative: false 322 },323 //门店管理324 // '000174': {325 // url: common.isweb() + '/store/storeInfo/storeInfo.html',326 // isNative: false 327 // },328 //门店可见车型设置329 '000183': {330 url: common.isweb() + '/store/storeVisibleCar/storeVisibleCar.html',331 isNative: false 332 },333 //主车型信息V2334 '001050': {335 url: common.isweb() + '/carType/saleMainCarType/saleMainCarType.html',336 isNative: false337 },338 // ==========================================以下为销售模块339 //商品关联车型设置340 '000308': {341 url: common.islivePro() + '/models/query',342 isNative: false 343 },344 //市场活动345 "000217": {346 url: common.islivePro() + '/market/query',347 isNative: false 348 },349 //金融机构350 "000186": {351 url: common.islivePro() + '/finance/mainFinance',352 isNative: false 353 },354 //金融产品355 "000201": {356 url: common.islivePro() + '/financePro/mainFinancePro',357 isNative: false 358 },359 //金融协作报价360 '001186': {361 url: common.islivePro() + '/financeWb/quote',362 isNative: false 363 },364 //金融贷款申请365 '001187': {366 url: common.islivePro() + '/financeWb/loan',367 isNative: false 368 }, 369 //保险协作报价370 "001613": {371 url: common.islivePro() + '/insuranceWorkbench/quote',372 isNative: false373 },374 //保险出单管理375 "001670": {376 url: common.islivePro() + '/insuranceWorkbench/out',377 isNative: false378 },379 //保险公司380 "000232": {381 url: common.islivePro() + '/insurance/query',382 isNative: false 383 },384 //保险方案385 "000246": {386 url:common.islivePro() + '/insurancepro/query',387 isNative: false 388 },389 //调查问卷设置390 "000252": {391 url:common.islivePro() + '/questionnaire/query',392 isNative: false393 },394 //调研任务工作台395 "000275": {396 url: common.islivePro() + '/research/query',397 isNative: false 398 },399 // 商品分类400 "000288": {401 url:common.islivePro() + '/classification',402 isNative: false 403 },404 // 商品目录405 "000315": {406 url:common.islivePro() + '/catalog',407 isNative: false 408 },409 //商品品牌410 '000282': {411 url:common.islivePro() + '/commoditybrand',412 isNative: false 413 },414 //商品价格415 '000294': {416 url:common.islivePro() + '/skuPrice/query',417 isNative: false 418 },419 //商品产地420 '000302': {421 url: common.islivePro() + '/birthplace',422 isNative: false 423 },424 //整车商品425 '000321': {426 url: common.islivePro() + '/archives/query',427 isNative: false 428 },429 //商品包装430 '000337': {431 url: common.islivePro() + '/pack',432 isNative: false 433 },434 //商品单位435 '000343': {436 url: common.islivePro() + '/commodityunit',437 isNative: false 438 },439 //供应商信息440 // '000393': {441 // url: common.islivePro() + '/supplier',442 // isNative: false 443 // },444 //仓库信息445 '000402': {446 url: common.islivePro() + '/warehouse/query',447 isNative: false 448 },449 //仓库库区450 '000442': {451 url: common.islivePro() + '/whArea',452 isNative: false 453 },454 //仓库库位455 '000448': {456 url: common.islivePro() + '/whLocation',457 isNative: false 458 },459 //DCC线索管理460 '000481': {461 url: common.islivePro() + '/dccthread/queryclientmain',462 isNative: false 463 },464 //前台接待465 '000463': {466 url: common.islivePro() + '/receptionist',467 isNative: false 468 },469 //订单收款470 '000601': {471 url: common.islivePro() + '/incollectmoney/query',472 isNative: false 473 },474 //订单退款475 '000608': {476 url: common.islivePro() + '/outcollectmoney/query',477 isNative: false 478 },479 //订单开票480 '000607': {481 url: common.islivePro() + '/billing/query',482 isNative: false 483 },484 //销售订单485 '000551': {486 url: common.islivePro() + '/order',487 isNative: false 488 },489 //精品库存查询490 '000454': {491 url: common.islivePro() + '/storeInfo/sku',492 isNative: false493 },494 //整车库存查询495 '001340':{496 url: common.islivePro() + '/storeInfo/car',497 isNative: false498 },499 //整车锁定管理500 '000333': {501 url: common.islivePro() + '/archiveslock',502 isNative: false 503 },504 //整车采购订单505 '000410': {506 url: common.islivePro() + '/procurement/orderForm',507 isNative: false 508 },509 //整车采购付款510 '000425': {511 url: common.islivePro() + '/pay/query',512 isNative: false 513 },514 //整车采购开票515 '000421': {516 url: common.islivePro() + '/ticket/query',517 isNative: false 518 },519 //整车采购入库520 '000417': {521 url: common.islivePro() + '/storage/query',522 isNative: false 523 },524 //车辆资源共享平台525 '000767': {526 url: common.islivePro() + '/vehicle/share',527 isNative: false528 },529 //车辆资源发布530 '000769': {531 url: common.islivePro() + '/vehicle/release/main',532 isNative: false533 },534 //GP归属设置535 '000048': {536 url: common.islivePro() + '/gpbelonging/gp',537 isNative: false 538 },539 //SNP归属设置540 '000056': {541 url: common.islivePro() + '/snpbelonging/snp',542 isNative: false 543 },544 //销售目标545 '000499': {546 url: common.islivePro() + '/salesTargetPlan/query',547 isNative: false 548 },549 //商务政策550 '000516': {551 url: common.islivePro() + '/businessaffairs',552 isNative: false 553 },554 //门店审批流设置555 '000530': {556 url: common.islivePro() + '/salesAdmin/query',557 isNative: false 558 },559 //展厅客流日志560 '000740': {561 url: common.islivePro() + '/dataReport/exHallPassengerLog',562 isNative: false 563 },564 //展厅历史客流导入565 '001740': {566 url: common.islivePro() + '/dataReport/exHallPassengerToChannel',567 isNative: false568 },569 //CRM跟进情况表570 '000796': {571 url: common.islivePro() + '/dataReport/crmFollowUp',572 isNative: false573 },574 //SC线索电话跟进清单575 '001671': {576 url: common.islivePro() + '/dataReport/phonecalllist',577 isNative: false578 },579 //SC线索跟进及转化表580 '001120': {581 url: common.islivePro() + '/dataReport/scThreadFollowUp',582 isNative: false583 },584 //DCC线索跟进及转化表585 '001119': {586 url: common.islivePro() + '/dataReport/dccThreadReport',587 isNative: false588 },589 //经销商财务报表590 '001415': {591 url: common.islivePro() + '/dataReport/financeReport',592 isNative: false593 },594 //销售管理报表595 '001660': {596 url: common.islivePro() + '/dataReport/salesManageOrder',597 isNative: false598 },599 //跨部门策略表600 '001203': {601 url: common.islivePro() + '/policyTable/list',602 isNative: false603 },604 //LPE展厅客流日志605 '001306': {606 url: common.islivePro() + '/lpe/index',607 isNative: false608 },609 //内采内销调出单610 '000818': {611 url: common.islivePro() + '/vehicle/callOut/main',612 isNative: false613 },614 //内采内销调入单615 '000826': {616 url: common.islivePro() + '/vehicle/callIn/main',617 isNative: false618 },619 //组合商品620 '001032':{621 url: common.islivePro() + '/skuComb/query',622 isNative: false 623 }, 624 //商品关联车型设置V1625 '001000':{626 url: common.islivePro() + '/models/query',627 isNative: false 628 }, 629 // ==========================================以下为售后模块630 //精品商品631 '000323': {632 url: common.isliveCs() + '/skuinfo/query',633 isNative: true 634 },635 //精品采购订单636 '000429': {637 url: common.isliveCs() + '/purchase-order/purchase-query',638 isNative: true 639 },640 //精品采购入库641 '000434': {642 url: common.isliveCs() + '/notarchives-put/notarchives-query',643 isNative: true 644 },645 //客户主档646 '000367': {647 url: common.isliveCs() + '/mancar/query',648 isNative: true 649 },650 //员工岗位651 '001015': {652 url: common.isliveCs() + '/staffjobs/query',653 isNative: true 654 },655 //员工打卡656 '000951': {657 url: common.isliveCs() + '/clock/clock',658 isNative: true 659 },660 //盘点单 661 '000610': {662 url: common.isliveCs() + '/blitem/blitemSearch',663 isNative: true 664 },665 //采购合同666 '000670': {667 url: common.isliveCs() + '/purchasecontract/search',668 isNative: true 669 },670 //员工管理671 '000979': {672 url: common.isliveCs() + '/staff/search',673 isNative: true 674 },675 //盘点计划676 '000622': {677 url: common.isliveCs() + '/checkplan/query',678 isNative: true 679 },680 //账务账期681 '000662': {682 url: common.isliveCs() + '/accounting/query',683 isNative: true 684 },685 //服务信息686 '000877': {687 url: common.isliveCs() + '/serviceitem/query',688 isNative: true 689 },690 //服务固定价格691 '000897': {692 url: common.isliveCs() + '/service-staticprice/query',693 isNative: true 694 },695 //服务工时车型适配696 '000884': {697 url: common.isliveCs() + '/service-manhour/query',698 isNative: true 699 },700 //非整车调拨入库单701 '000720': {702 url: common.isliveCs() + '/allotin/query',703 isNative: true 704 },705 //非整车调拨出库单706 '000698': {707 url: common.isliveCs() + '/allotout/query',708 isNative: true 709 },710 //报损报溢711 '000684': {712 url: common.isliveCs() + '/decrease-overflow/query',713 isNative: true 714 },715 //库存调整单716 '001615': {717 url: common.isliveCs() + '/stock-adjust/query',718 isNative: true 719 },720 //员工排班721 '000836': {722 url: common.isliveCs() + '/emp-scheduling',723 isNative: true 724 },725 //商品服务目录726 '000791': {727 url: common.isliveCs() + '/serviceCatalog/query',728 isNative: true 729 },730 //商品服务分类731 '000786': {732 url: common.isliveCs() + '/serviceClassify/query',733 isNative: true 734 },735 //商品服务-服务商品关系及数量信息736 '000906': {737 url: common.isliveCs() + '/servicesku',738 isNative: true 739 },740 //售后主业务(派工管理)741 '000929': {742 url: common.isliveCs() + '/resource-utilization/resource-utilization',743 isNative: true 744 },745 //门店管理746 // '001076': {747 // url: '/storemanage',748 // isNative: true 749 // },750 //供应商信息751 '000393': {752 url: common.isliveCs() + '/supplier/supplierSearch',753 isNative: true 754 }, 755 //车型查询适配SKU756 '001091':{757 url: common.isliveCs() + '/carSku',758 isNative: true 759 },760 //SKU车型适配全数据预览761 '001093':{762 url: common.isliveCs() + '/skuCarAll',763 isNative: true 764 },765 /*==========================================演示测试==============================================================*/766 //非整车采购订单767 '000955' :{768 url: common.isliveCs() + '/purchase-order',769 isNative: true770 },771 // 自采管理772 '001601' :{773 url: common.isliveCs() + '/store-ownpurchase/search',774 isNative: true775 },776 // 自采到货处理777 '001602' :{778 url: common.isliveCs() + '/arrive-handle/query',779 isNative: true780 },781 //日常补货计划782 '001103' :{783 url: common.isliveCs() + '/dailyfill/query',784 isNative: true785 },786 //商品摆放目录787 '001425' :{788 url: common.isliveCs() + '/sku-place/query',789 isNative: true790 },791 //非整车采购退货792 '001326' :{793 url: common.isliveCs() + '/purchase-return/purchase-return-search',794 isNative: true795 },796 //出入库清单明细797 '001322' :{798 url: common.isliveCs() + '/warehousing-list',799 isNative: true800 },801 //入库清单明细802 '001319' :{803 url: common.isliveCs() + '/inventory-list',804 isNative: true805 },806 //集团内调拨入库单807 '000957' :{808 url: common.isliveCs() + '/group-allotin/query',809 isNative: true810 },811 //集团调拨出库单812 '000962' :{813 url: common.isliveCs() + '/group-allotout/query',814 isNative: true815 },816 //需求单817 '001126' :{818 url: common.isliveCs() + '/demand-order/require-goods',819 isNative: true820 },821 //组合商品822 '000349': {823 url: common.isliveCs() + '/skuComb',824 isNative: true 825 },826 // 组合分类827 '001161' :{828 url: common.isliveCs() + '/groupClassify/query',829 isNative: true830 },831 // 组合目录832 '001155' :{833 url: common.isliveCs() + '/groupCatalog/query',834 isNative: true835 },836 // 门店管理837 '001069' :{838 url: common.isliveCs() + '/storemanage/query',839 isNative: true840 },841 //门店工位信息842 '000970' :{843 url: common.isliveCs() + '/store-station',844 isNative: true845 },846 //卡模板管理计次卡847 '001216' :{848 url: common.isliveCs() + '/card-template-counting/card-template-counting-query',849 isNative: true850 },851 //卡充值852 '001239' :{853 url: common.isliveCs() + '/card-pay/card-pay-search',854 isNative: true855 },856 //卡管理857 '001261' :{858 url: common.isliveCs() + '/card-manager/query',859 isNative: true860 },861 //卡销售单862 '001226' :{863 url: common.isliveCs() + '/card-sale-order/query',864 isNative: true865 },866 //退卡退款867 '001307' :{868 url: common.isliveCs() + '/back-card/back-card-query',869 isNative: true870 },871 // 券模板 872 '001469': {873 url: common.isliveCs() + '/ticket-template-counting/ticket-template-counting-query',874 isNative: true875 },876 // 券管理 877 '001667': {878 url: common.isliveCs() + '/ticket-manager/query',879 isNative: true880 },881 // 券销售882 '001952': {883 url: common.isliveCs() + '/coupons-sale-order/query',884 isNative: true885 },886 // 检查模板887 '001351' :{888 url: common.isliveCs() + '/check-template/check-template-search',889 isNative: true890 },891 // 对账单892 '001539' :{893 url: common.isliveCs() + '/statement-account/query',894 isNative: true895 },896 // 对账核销单897 '001549' : {898 url: common.isliveCs() + '/statement-account-cancel/query',899 isNative: true900 },901 // 自采对账核销902 '001780' : {903 url: common.isliveCs() + '/account-check/index',904 isNative: true905 },906 // 调拨相关清单907 '001564' :{908 url: common.isliveCs() + '/allot-relative/query',909 isNative: true910 },911 // 卡模版储值912 '001566' :{913 url: common.isliveCs() + '/card-template-storedvalue/card-template-storedvalue-query',914 isNative: true915 },916 // 退票917 '001376' :{918 url: common.isliveCs() + '/refund/refund-query',919 isNative: true920 },921 // 开票922 '001371' :{923 url: common.isliveCs() + '/workOrderInvoice/workOrderInvoice',924 isNative: true925 },926 // 洗车927 '001742': {928 url: common.isliveCs() + '/vehicle-cleaning/vehicle-cleaning-add',929 isNative: true930 },931 // 维修合同932 '001689': {933 url: common.isliveCs() + '/work-order/work-order-search',934 isNative: true935 },936 // 预约单937 '001913': {938 url: common.isliveCs() + '/appointment-new',939 isNative: true940 },941 // 预检单942 '001697': {943 url: common.isliveCs() + '/precheck-fix/precheck-fix-query',944 isNative: true945 },946 // 订单结算947 '001724': {948 url: common.isliveCs() + '/workOrderPay/workOrderPay',949 isNative: true950 },951 // 领料952 '001741': {953 url: common.isliveCs() + '/store-requisition/query',954 isNative: true955 },956 // 非整车工单基础包957 '001672': {958 url: common.isliveCs() + '/check-fix-list/query',959 isNative: true960 },961 // 促销折扣权限962 '001390' :{963 url: common.isliveCs() + '/sale-discount/sale-discount-search',964 isNative: true965 },966 //供应商967 '000636' :{968 url: common.isliveCs() + '/supplier/supplierSearch',969 isNative: true970 },971 // 服务推荐972 '001343' :{973 url: common.isliveCs() + '/service-recommend/query',974 isNative: true975 },976 // 人车-会员车辆信息977 '001437' :{978 url: common.isliveCs() + '/mancar/query',979 isNative: true980 },981 // 商品信息982 '000905' :{983 url: common.isliveCs() + '/skuinfo/query',984 isNative: true985 },986 // 服务信息987 '000803' :{988 url: common.isliveCs() + '/serviceitem/query',989 isNative: true990 },991 // 非整车商品采购992 '001506' :{993 url: common.isliveCs() + '/notarchives-put/notarchives-query',994 isNative: true995 }996 }...

Full Screen

Full Screen

JSBHelper.js

Source:JSBHelper.js Github

copy

Full Screen

1/**2 * Created by vivekfitkariwala on 07/08/15.3 */4helper.JSBHelper = helper.JSBHelper || {};5puremvc.define(6 //class info7 {8 name: "helper.JSBHelper"9 },10 //instance member11 {},12 //static member13 {14 NAME: "HELPER_JSB_HELPER",15 ASSET_DOWNLOADED: "HELPER_ASSET_DOWNLOADED",16 ZIP_DOWNLOADED: "HELPER_ZIP_DOWNLOADED",17 BOOK_BACK_PRESSED: "HELPER_BOOK_BACK_PRESSED",18 MUSIC_BACK_PRESSED: "HELPER_MUSIC_BACK_PRESSED",19 GAME_BACK_PRESSED: "HELPER_GAME_BACK_PRESSED",20 WEB_ACTIVITY_BACK_PRESSED: "HELPER_WEB_ACTIVITY_BACK_PRESSED",21 startAssetDownload: function (assetURL, folderName, assetName) {22 //call the jsb function for downloading image23 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {24 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "downloadAsset", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", assetURL, folderName, assetName);25 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {26 jsb.reflection.callStaticMethod("JSBHelper", "downloadAssetWithURL:folderName:assetName:", assetURL, folderName, assetName);27 }28 },29 assetDownloaded: function (message, assetURL) {30 //send callback when image is downloaded31 var object = {32 message: message,33 url: assetURL34 };35 //dispatch notification for receiving asset36 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.ASSET_DOWNLOADED, object);37 },38 playVideo: function (stringData) {39 //starting the youtube video40 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {41 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "startYouTubeVideo", "(Ljava/lang/String;)V", stringData);42 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {43 jsb.reflection.callStaticMethod("JSBHelper", "LoadWebViewWithData:", stringData);44 }else if(!cc.sys.isNative) {45 var data = JSON.parse(stringData);46 window.open('https://www.youtube.com/embed/'+data.videoID+'?autoplay=1&controls=1&rel=0&showinfo=0&enablejsapi=1','_blank');47 }48 },49 playMusic: function (stringData) {50 //starting the music51 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {52 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "startMusicPlayer", "(Ljava/lang/String;)V", stringData);53 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {54 jsb.reflection.callStaticMethod("JSBHelper", "Log:", "playMusic");55 }56 },57 musicBackPressed: function (stringData) {58 var object = JSON.parse(stringData);59 //dispatch notification for receiving music60 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.MUSIC_BACK_PRESSED, object);61 },62 videoBackPressed: function (stringData) {63 cc.log("Video Back Pressed");64 var object = JSON.parse(decodeURIComponent(stringData));65 //dispatch notification for receiving image66 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.WEB_ACTIVITY_BACK_PRESSED, object);67 },68 bookBackPressed: function (stringData) {69 cc.log("Book back pressed");70 var object = JSON.parse(stringData);71 //dispatch notification for receiving image72 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.WEB_ACTIVITY_BACK_PRESSED, object);73 },74 gameBackPressed: function (stringData) {75 cc.log("Game back pressed");76 var object = JSON.parse(stringData);77 //dispatch notification for receiving image78 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.WEB_ACTIVITY_BACK_PRESSED, object);79 },80 startDownloadingAndExtractingZip: function (zipURL, folderName, zipName) {81 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {82 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "downloadZipAndExtract", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", zipURL, folderName, zipName);83 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {84 jsb.reflection.callStaticMethod("JSBHelper", "downloadZipWithURL:folderName:assetName:", zipURL, folderName, zipName);85 }86 },87 zipDownloadingAndExtractingComplete: function (message, zipURL) {88 var object = {89 message: message,90 url: zipURL91 };92 cc.log("Zip Download and Extract Complete");93 //dispatch notification for receiving image94 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.ZIP_DOWNLOADED, object);95 },96 playWebGame: function (stringObject) {97 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {98 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "playGame", "(Ljava/lang/String;)V", stringObject);99 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {100 jsb.reflection.callStaticMethod("JSBHelper", "LoadWebViewWithData:", stringObject);101 }else if(!cc.sys.isNative) {102 var data = JSON.parse(stringObject);103 window.open('http://www.playpowerlabs.org/lwactivities/'+data.zipName,'_blank');104 }105 },106 playVideoOffline: function (stringData) {107 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {108 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "videoPlayer", "(Ljava/lang/String;)V", stringData);109 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {110 jsb.reflection.callStaticMethod("JSBHelper", "Log:", "playVideo");111 }else if(!cc.sys.isNative) {112 var data = JSON.parse(decodeURIComponent(stringData));113 if(data.videoID)114 window.open('https://www.youtube.com/embed/'+data.videoID+'?autoplay=1&controls=1&rel=0&showinfo=0&enablejsapi=1','_blank');115 }116 },117 startBook: function (stringObject) {118 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {119 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "openBook", "(Ljava/lang/String;)V", stringObject);120 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {121 jsb.reflection.callStaticMethod("JSBHelper", "LoadWebViewWithData:", stringObject);122 }else if(!cc.sys.isNative) {123 var data = JSON.parse(stringObject);124 window.open(data.URL,'_blank');125 }126 },127 viewSource: function (sourceUrl) {128 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {129 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "openUrl", "(Ljava/lang/String;)V", sourceUrl);130 }else if(cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS){131 jsb.reflection.callStaticMethod("JSBHelper", "LoadSourceWithURL:", sourceUrl);132 }133 },134 TTS: function (sentence) {135 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {136 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "TTS", "(Ljava/lang/String;)V", sentence);137 }else if(cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS){138 jsb.reflection.callStaticMethod("JSBHelper", "TTSWithString:", sentence);139 }140 },141 analyticsSetUserDetail: function () {142 //retriving the levelVO data143 var _progressProxy = platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).retrieveProxy(platform.model.ProgressProxy.NAME);144 var _progressVO = _progressProxy.getData();145 var userVO = _progressVO.userVOObject;146 var analyticUserID = _progressVO.currentUser;147 var analyticUserDetail = {};148 analyticUserDetail.childName = userVO[analyticUserID][platform.LocalStorageConstants.CHILD_NAME];149 analyticUserDetail.childAge = userVO[analyticUserID][platform.LocalStorageConstants.CHILD_AGE];150 analyticUserDetail.childGender = userVO[analyticUserID][platform.LocalStorageConstants.CHILD_GENDER];151 analyticUserDetail.profilePic = userVO[analyticUserID][platform.LocalStorageConstants.CHILD_PROFILE_PIC];152 analyticUserDetail.parentEmail = userVO[platform.LocalStorageConstants.PARENT_EMAIL];153 //convert analyticUserDetail to string154 var analyticStringUserDetail = JSON.stringify(analyticUserDetail);155 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {156 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppAnalytics", "setUserDetail", "(Ljava/lang/String;Ljava/lang/String;)V", analyticUserID, analyticStringUserDetail);157 } else if (cc.sys.isNative && cc.sys.os === cc.sys.OS_IOS) {158 //jsb.reflection.callStaticMethod("JSBHelper", "customUserId", "(Ljava/lang/String;)V", userId);159 }160 },161 analyticsSetScreen: function (screenCategory, screenName, properties) {162 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {163 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppAnalytics", "trackScreen", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", screenCategory, screenName, properties);164 } else if (cc.sys.isNative && cc.sys.os === cc.sys.OS_IOS) {165 //jsb.reflection.callStaticMethod("JSBHelper", "customUserId", "(Ljava/lang/String;)V", userId);166 }167 },168 analyticsLogEvent: function (eventName, eventProperties) {169 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {170 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppAnalytics", "trackAction", "(Ljava/lang/String;Ljava/lang/String;)V", eventName, eventProperties);171 } else if (cc.sys.isNative && cc.sys.os === cc.sys.OS_IOS) {172 //jsb.reflection.callStaticMethod("JSBHelper", "customUserId", "(Ljava/lang/String;)V", userId);173 }174 },175 getExternalStoragePath: function () {176 var storagePath = "";177 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {178 storagePath = jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "getExternalPath", "()Ljava/lang/String;");179 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {180 storagePath = jsb.reflection.callStaticMethod("JSBHelper", "getExternalPath");181 }182 return storagePath;183 },184 //For TV Version;185 getServerPath: function () {186 var serverPath = "";187 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {188 serverPath = jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "getServerPath", "()Ljava/lang/String;");189 }190 return serverPath;191 },192 checkDirectoryExists: function (directoryPath) {193 if (cc.sys.isNative) {194 if (jsb.fileUtils.isDirectoryExist(directoryPath) == true) {195 return true;196 } else {197 return false;198 }199 }200 },201 openWebLink: function (url) {202 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {203 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "openWebLink", "(Ljava/lang/String;)V",url);204 }205 },206 shareMessage: function (message) {207 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {208 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "shareMessage", "(Ljava/lang/String;)V",message);209 }210 },211 exitApp: function () {212 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {213 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "exitApp", "()V");214 }215 },216 saveLoaderUserData: function () {217 var currentScene = cc.director.getRunningScene();218 if(currentScene && currentScene.NAME == 'LoaderView'){219 var progressProxy = platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).retrieveProxy(platform.model.ProgressProxy.NAME);220 progressProxy.saveUserVOData();221 }222 },223 checkFileExists: function (filePath) {224 if (cc.sys.isNative) {225 if (jsb.fileUtils.isFileExist(filePath) == true) {226 return true;227 } else {228 return false;229 }230 }231 }232 }...

Full Screen

Full Screen

poly.js

Source:poly.js Github

copy

Full Screen

...61 unique = require('../src/unique')62 values = require('../src/values')63 some = require('../src/some')64 natives.restore()65 if (isNative(assign)) throw new Error('native assign loaded where polyfill was expected')66 if (isNative(bind)) throw new Error('native bind loaded where polyfill was expected')67 if (isNative(debounce)) throw new Error('native debounce loaded where polyfill was expected')68 if (isNative(each)) throw new Error('native each loaded where polyfill was expected')69 if (isNative(every)) throw new Error('native every loaded where polyfill was expected')70 if (isNative(filter)) throw new Error('native filter loaded where polyfill was expected')71 if (isNative(find)) throw new Error('native find loaded where polyfill was expected')72 if (isNative(get)) throw new Error('native get loaded where polyfill was expected')73 if (isNative(identity)) throw new Error('native identity loaded where polyfill was expected')74 if (isNative(indexOf)) throw new Error('native indexOf loaded where polyfill was expected')75 if (isNative(invoke)) throw new Error('native invoke loaded where polyfill was expected')76 if (isNative(isArray)) throw new Error('native isArray loaded where polyfill was expected')77 if (isNative(isObject)) throw new Error('native isObject loaded where polyfill was expected')78 if (isNative(isMatch)) throw new Error('native isMatch loaded where polyfill was expected')79 if (isNative(keys)) throw new Error('native keys loaded where polyfill was expected')80 if (isNative(map)) throw new Error('native map loaded where polyfill was expected')81 if (isNative(matches)) throw new Error('native matches loaded where polyfill was expected')82 if (isNative(not)) throw new Error('native not loaded where polyfill was expected')83 if (isNative(objectEach)) throw new Error('native objectEach loaded where polyfill was expected')84 if (isNative(objectMap)) throw new Error('native objectMap loaded where polyfill was expected')85 if (isNative(objectReduce)) throw new Error('native objectReduce loaded where polyfill was expected')86 if (isNative(pick)) throw new Error('native pick loaded where polyfill was expected')87 if (isNative(pluck)) throw new Error('native pluck loaded where polyfill was expected')88 if (isNative(reduce)) throw new Error('native reduce loaded where polyfill was expected')89 if (isNative(set)) throw new Error('native set loaded where polyfill was expected')90 if (isNative(slice)) throw new Error('native slice loaded where polyfill was expected')91 if (isNative(unique)) throw new Error('native unique loaded where polyfill was expected')92 if (isNative(values)) throw new Error('native values loaded where polyfill was expected')93 if (isNative(some)) throw new Error('native some loaded where polyfill was expected')94 require('./src/assign')(assign)95 require('./src/bind')(bind)96 require('./src/debounce')(debounce)97 require('./src/each')(each)98 require('./src/every')(every)99 require('./src/filter')(filter)100 require('./src/find')(find)101 require('./src/get')(get)102 require('./src/identity')(identity)103 require('./src/indexOf')(indexOf)104 require('./src/invoke')(invoke)105 require('./src/isArray')(isArray)106 require('./src/isObject')(isObject)107 require('./src/isMatch')(isMatch)108 require('./src/keys')(keys)109 require('./src/map')(map)110 require('./src/matches')(matches)111 require('./src/not')(not)112 require('./src/objectEach')(objectEach)113 require('./src/objectMap')(objectMap)114 require('./src/objectReduce')(objectReduce)115 require('./src/pick')(pick)116 require('./src/pluck')(pluck)117 require('./src/reduce')(reduce)118 require('./src/set')(set)119 require('./src/slice')(slice)120 require('./src/unique')(unique)121 require('./src/values')(values)122 require('./src/some')(some)123 })124 describe('from bundle', function () {125 natives.override()126 assign = require('../dist').assign127 bind = require('../dist').bind128 debounce = require('../dist').debounce129 each = require('../dist').each130 every = require('../dist').every131 filter = require('../dist').filter132 find = require('../dist').find133 get = require('../dist').get134 identity = require('../dist').identity135 indexOf = require('../dist').indexOf136 invoke = require('../dist').invoke137 isArray = require('../dist').isArray138 isObject = require('../dist').isObject139 isMatch = require('../dist').isMatch140 keys = require('../dist').keys141 map = require('../dist').map142 matches = require('../dist').matches143 not = require('../dist').not144 objectEach = require('../dist').objectEach145 objectMap = require('../dist').objectMap146 objectReduce = require('../dist').objectReduce147 pick = require('../dist').pick148 pluck = require('../dist').pluck149 reduce = require('../dist').reduce150 set = require('../dist').set151 slice = require('../dist').slice152 unique = require('../dist').unique153 values = require('../dist').values154 some = require('../dist').some155 natives.restore()156 if (isNative(assign)) throw new Error('native assign loaded where polyfill was expected')157 if (isNative(bind)) throw new Error('native bind loaded where polyfill was expected')158 if (isNative(debounce)) throw new Error('native debounce loaded where polyfill was expected')159 if (isNative(each)) throw new Error('native each loaded where polyfill was expected')160 if (isNative(every)) throw new Error('native every loaded where polyfill was expected')161 if (isNative(filter)) throw new Error('native filter loaded where polyfill was expected')162 if (isNative(find)) throw new Error('native find loaded where polyfill was expected')163 if (isNative(get)) throw new Error('native get loaded where polyfill was expected')164 if (isNative(identity)) throw new Error('native identity loaded where polyfill was expected')165 if (isNative(indexOf)) throw new Error('native indexOf loaded where polyfill was expected')166 if (isNative(invoke)) throw new Error('native invoke loaded where polyfill was expected')167 if (isNative(isArray)) throw new Error('native isArray loaded where polyfill was expected')168 if (isNative(isObject)) throw new Error('native isObject loaded where polyfill was expected')169 if (isNative(isMatch)) throw new Error('native isMatch loaded where polyfill was expected')170 if (isNative(keys)) throw new Error('native keys loaded where polyfill was expected')171 if (isNative(map)) throw new Error('native map loaded where polyfill was expected')172 if (isNative(matches)) throw new Error('native matches loaded where polyfill was expected')173 if (isNative(not)) throw new Error('native not loaded where polyfill was expected')174 if (isNative(objectEach)) throw new Error('native objectEach loaded where polyfill was expected')175 if (isNative(objectMap)) throw new Error('native objectMap loaded where polyfill was expected')176 if (isNative(objectReduce)) throw new Error('native objectReduce loaded where polyfill was expected')177 if (isNative(pick)) throw new Error('native pick loaded where polyfill was expected')178 if (isNative(pluck)) throw new Error('native pluck loaded where polyfill was expected')179 if (isNative(reduce)) throw new Error('native reduce loaded where polyfill was expected')180 if (isNative(set)) throw new Error('native set loaded where polyfill was expected')181 if (isNative(slice)) throw new Error('native slice loaded where polyfill was expected')182 if (isNative(unique)) throw new Error('native unique loaded where polyfill was expected')183 if (isNative(values)) throw new Error('native values loaded where polyfill was expected')184 if (isNative(some)) throw new Error('native some loaded where polyfill was expected')185 require('./src/assign')(assign)186 require('./src/bind')(bind)187 require('./src/debounce')(debounce)188 require('./src/each')(each)189 require('./src/every')(every)190 require('./src/filter')(filter)191 require('./src/find')(find)192 require('./src/get')(get)193 require('./src/identity')(identity)194 require('./src/indexOf')(indexOf)195 require('./src/invoke')(invoke)196 require('./src/isArray')(isArray)197 require('./src/isObject')(isObject)198 require('./src/isMatch')(isMatch)...

Full Screen

Full Screen

native.js

Source:native.js Github

copy

Full Screen

...25 reduce = require('../src/reduce')26 slice = require('../src/slice')27 some = require('../src/some')28 values = require('../src/values')29 if (!isNative(assign)) throw new Error('polyfill assign loaded where native was expected')30 if (!isNative(each)) throw new Error('polyfill each loaded where native was expected')31 if (!isNative(every)) throw new Error('polyfill every loaded where native was expected')32 if (!isNative(filter)) throw new Error('polyfill filter loaded where native was expected')33 if (!isNative(find)) throw new Error('polyfill find loaded where native was expected')34 if (!isNative(indexOf)) throw new Error('polyfill indexOf loaded where native was expected')35 if (!isNative(isArray)) throw new Error('polyfill isArray loaded where native was expected')36 if (!isNative(keys)) throw new Error('polyfill keys loaded where native was expected')37 if (!isNative(map)) throw new Error('polyfill map loaded where native was expected')38 if (!isNative(reduce)) throw new Error('polyfill reduce loaded where native was expected')39 if (!isNative(slice)) throw new Error('polyfill slice loaded where native was expected')40 if (!isNative(values)) throw new Error('polyfill values loaded where native was expected')41 if (!isNative(some)) throw new Error('polyfill some loaded where native was expected')42 require('./src/assign')(assign)43 require('./src/each')(each)44 require('./src/every')(every)45 require('./src/filter')(filter)46 require('./src/find')(find)47 require('./src/indexOf')(indexOf)48 require('./src/isArray')(isArray)49 require('./src/keys')(keys)50 require('./src/map')(map)51 require('./src/reduce')(reduce)52 require('./src/slice')(slice)53 require('./src/some')(some)54 require('./src/values')(values)55 })56 describe('from bundle', function () {57 assign = require('../dist').assign58 each = require('../dist').each59 every = require('../dist').every60 filter = require('../dist').filter61 find = require('../dist').find62 indexOf = require('../dist').indexOf63 isArray = require('../dist').isArray64 keys = require('../dist').keys65 map = require('../dist').map66 reduce = require('../dist').reduce67 slice = require('../dist').slice68 values = require('../dist').values69 some = require('../dist').some70 if (!isNative(assign)) throw new Error('polyfill assign loaded where native was expected')71 if (!isNative(each)) throw new Error('polyfill each loaded where native was expected')72 if (!isNative(every)) throw new Error('polyfill every loaded where native was expected')73 if (!isNative(filter)) throw new Error('polyfill filter loaded where native was expected')74 if (!isNative(find)) throw new Error('polyfill find loaded where native was expected')75 if (!isNative(indexOf)) throw new Error('polyfill indexOf loaded where native was expected')76 if (!isNative(isArray)) throw new Error('polyfill isArray loaded where native was expected')77 if (!isNative(keys)) throw new Error('polyfill keys loaded where native was expected')78 if (!isNative(map)) throw new Error('polyfill map loaded where native was expected')79 if (!isNative(reduce)) throw new Error('polyfill reduce loaded where native was expected')80 if (!isNative(slice)) throw new Error('polyfill slice loaded where native was expected')81 if (!isNative(values)) throw new Error('polyfill values loaded where native was expected')82 if (!isNative(some)) throw new Error('polyfill some loaded where native was expected')83 require('./src/assign')(assign)84 require('./src/each')(each)85 require('./src/every')(every)86 require('./src/filter')(filter)87 require('./src/find')(find)88 require('./src/indexOf')(indexOf)89 require('./src/isArray')(isArray)90 require('./src/keys')(keys)91 require('./src/map')(map)92 require('./src/reduce')(reduce)93 require('./src/slice')(slice)94 require('./src/values')(values)95 require('./src/some')(some)96 })...

Full Screen

Full Screen

isNative.js

Source:isNative.js Github

copy

Full Screen

...26 });27 it('should return `false` for non-native methods', function() {28 var expected = lodashStable.map(falsey, stubFalse);29 var actual = lodashStable.map(falsey, function(value, index) {30 return index ? isNative(value) : isNative();31 });32 assert.deepStrictEqual(actual, expected);33 assert.strictEqual(isNative(args), false);34 assert.strictEqual(isNative([1, 2, 3]), false);35 assert.strictEqual(isNative(true), false);36 assert.strictEqual(isNative(new Date), false);37 assert.strictEqual(isNative(new Error), false);38 assert.strictEqual(isNative(_), false);39 assert.strictEqual(isNative({ 'a': 1 }), false);40 assert.strictEqual(isNative(1), false);41 assert.strictEqual(isNative(/x/), false);42 assert.strictEqual(isNative('a'), false);43 assert.strictEqual(isNative(symbol), false);44 });45 it('should work with native functions from another realm', function() {46 if (realm.element) {47 assert.strictEqual(isNative(realm.element.cloneNode), true);48 }49 if (realm.object) {50 assert.strictEqual(isNative(realm.object.valueOf), true);51 }52 });53 it('should throw an error if core-js is detected', function() {54 var lodash = runInContext({55 '__core-js_shared__': {}56 });57 assert.raises(function() { lodash.isNative(noop); });58 });59 it('should detect methods masquerading as native (test in Node.js)', function() {60 if (!amd && _baseEach) {61 var path = require('path'),62 basePath = path.dirname(filePath),63 uid = 'e0gvgyrad1jor',64 coreKey = '__core-js_shared__',65 fakeSrcKey = 'Symbol(src)_1.' + uid;66 root[coreKey] = { 'keys': { 'IE_PROTO': 'Symbol(IE_PROTO)_3.' + uid } };67 emptyObject(require.cache);68 var baseIsNative = interopRequire(path.join(basePath, '_baseIsNative'));69 assert.strictEqual(baseIsNative(slice), true);70 slice[fakeSrcKey] = slice + '';71 assert.strictEqual(baseIsNative(slice), false);...

Full Screen

Full Screen

build-platforms.js

Source:build-platforms.js Github

copy

Full Screen

1module.exports = {2 android: {3 isNative: !0,4 pack: !0,5 useTemplate: !0,6 stripDefaultValues: !0,7 exportSimpleProject: !18 },9 "android-instant": {10 isNative: !0,11 pack: !1,12 useTemplate: !0,13 stripDefaultValues: !0,14 exportSimpleProject: !115 },16 ios: {17 isNative: !0,18 pack: !0,19 useTemplate: !0,20 stripDefaultValues: !0,21 exportSimpleProject: !122 },23 mac: {24 isNative: !0,25 pack: !0,26 useTemplate: !0,27 stripDefaultValues: !0,28 exportSimpleProject: !129 },30 win32: {31 isNative: !0,32 pack: !0,33 useTemplate: !0,34 stripDefaultValues: !0,35 exportSimpleProject: !136 },37 "web-mobile": {38 isNative: !1,39 pack: !0,40 useTemplate: !1,41 stripDefaultValues: !0,42 exportSimpleProject: !143 },44 "web-desktop": {45 isNative: !1,46 pack: !0,47 useTemplate: !1,48 stripDefaultValues: !0,49 exportSimpleProject: !150 },51 "fb-instant-games": {52 isNative: !1,53 pack: !0,54 useTemplate: !1,55 stripDefaultValues: !0,56 exportSimpleProject: !157 },58 wechatgame: {59 isNative: !1,60 pack: !0,61 useTemplate: !1,62 stripDefaultValues: !0,63 exportSimpleProject: !164 },65 "wechatgame-subcontext": {66 isNative: !1,67 pack: !0,68 useTemplate: !1,69 stripDefaultValues: !0,70 exportSimpleProject: !171 },72 qqplay: {73 isNative: !1,74 pack: !0,75 useTemplate: !1,76 stripDefaultValues: !0,77 exportSimpleProject: !178 },79 export: {80 isNative: !0,81 pack: !1,82 useTemplate: !1,83 stripDefaultValues: !1,84 exportSimpleProject: !085 },86 editor: {87 isNative: !188 }...

Full Screen

Full Screen

02-utils-isnative.js

Source:02-utils-isnative.js Github

copy

Full Screen

1/*eslint-env mocha*/2/*global chai*/3describe("BOOMR.utils.isNative()", function() {4 var assert = chai.assert;5 it("Should return false if input is not an function", function() {6 assert.isFalse(BOOMR.utils.isNative(null));7 assert.isFalse(BOOMR.utils.isNative(undefined));8 assert.isFalse(BOOMR.utils.isNative());9 assert.isFalse(BOOMR.utils.isNative(""));10 assert.isFalse(BOOMR.utils.isNative(1));11 assert.isFalse(BOOMR.utils.isNative(true));12 assert.isFalse(BOOMR.utils.isNative(false));13 assert.isFalse(BOOMR.utils.isNative(NaN));14 });15 it("Should return true if input is a native function", function() {16 assert.isTrue(BOOMR.utils.isNative(Object));17 assert.isTrue(BOOMR.utils.isNative(Number));18 assert.isTrue(BOOMR.utils.isNative(parseInt));19 });20 it("Should return false if input is not a native function", function() {21 var nonNative = function(bar) {22 return false;23 };24 assert.isFalse(BOOMR.utils.isNative(nonNative));25 });26 it("Should return false for a polyfill", function() {27 var _parseInt = window.parseInt;28 window.parseInt = function(bar) {29 return false;30 };31 assert.isFalse(BOOMR.utils.isNative(window.parseInt));32 window.parseInt = _parseInt;33 });...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

...4 var isNative = require('../../');5 it('should return `true` for native methods', function () {6 var obj = { a: 1 };7 var arr = [1, 2, 3];8 expect(isNative(obj.valueOf)).to.be.true;9 expect(isNative(arr.push)).to.be.true;10 expect(isNative(Math.min)).to.be.true;11 });12 it('should return `false` for non-native methods', function () {13 expect(isNative(function () {})).to.be.false;14 expect(isNative()).to.be.false;15 expect(isNative(123)).to.be.false;16 expect(isNative('')).to.be.false;17 expect(isNative('abc')).to.be.false;18 expect(isNative(void 0)).to.be.false;19 expect(isNative(true)).to.be.false;20 expect(isNative({ a: 1 })).to.be.false;21 expect(isNative([1, 2, 3])).to.be.false;22 expect(isNative(NaN)).to.be.false;23 expect(isNative(/x/)).to.be.false;24 expect(isNative(new Date)).to.be.false;25 expect(isNative(new Error)).to.be.false;26 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var best = require('bestjs');2var isNative = best.isNative;3var isFunction = best.isFunction;4var isString = best.isString;5var isBoolean = best.isBoolean;6var isNumber = best.isNumber;7var isObject = best.isObject;8var isArray = best.isArray;9var isDate = best.isDate;10var isRegExp = best.isRegExp;11var isError = best.isError;12var isUndefined = best.isUndefined;13var isNull = best.isNull;14var isArguments = best.isArguments;15var isBuffer = best.isBuffer;16var isSymbol = best.isSymbol;17var isMap = best.isMap;18var isSet = best.isSet;19var isWeakMap = best.isWeakMap;20var isWeakSet = best.isWeakSet;21var isPrimitive = best.isPrimitive;

Full Screen

Using AI Code Generation

copy

Full Screen

1var isNative = require('bestjs').isNative;2var isNative = require('bestjs').isNative;3var isNative = require('bestjs').isNative;4var isNative = require('bestjs').isNative;5var isNative = require('bestjs').isNative;6var isNative = require('bestjs').isNative;7var isNative = require('bestjs').isNative;8var isNative = require('bestjs').isNative;9var isNative = require('bestjs').isNative;10var isNative = require('bestjs').isNative;11var isNative = require('bestjs').isNative;

Full Screen

Using AI Code Generation

copy

Full Screen

1var isNative = BestJS.isNative;2function testNative() {3 var a = 5;4 var b = 10;5 var c = a + b;6 var d = a - b;7 var e = a * b;8 var f = a / b;9 var g = a % b;10 var h = a << b;11 var i = a >> b;12 var j = a >>> b;13 var k = a & b;14 var l = a | b;15 var m = a ^ b;16 var n = a && b;17 var o = a || b;18 var p = a < b;19 var q = a > b;20 var r = a <= b;21 var s = a >= b;22 var t = a == b;23 var u = a === b;24 var v = a != b;25 var w = a !== b;26 var x = a ? b : c;27 var y = a++;28 var z = a--;29 var aa = ++a;30 var bb = --a;31 var cc = a += b;32 var dd = a -= b;33 var ee = a *= b;34 var ff = a /= b;35 var gg = a <<= b;36 var hh = a >>= b;37 var ii = a >>>= b;38 var jj = a &= b;39 var kk = a |= b;40 var ll = a ^= b;41 var mm = a &&= b;42 var nn = a ||= b;43 var oo = a ?? b;44 var pp = a ??= b;45 var qq = a in b;46 var rr = a instanceof b;47 var ss = a instanceof b;48 var tt = a instanceof b;49 var uu = a instanceof b;50 var vv = a instanceof b;51 var ww = a instanceof b;52 var xx = a instanceof b;53 var yy = a instanceof b;54 var zz = a instanceof b;55 var aaa = a instanceof b;56 var bbb = a instanceof b;57 var ccc = a instanceof b;58 var ddd = a instanceof b;59 var eee = a instanceof b;60 var fff = a instanceof b;61 var ggg = a instanceof b;

Full Screen

Using AI Code Generation

copy

Full Screen

1var isNative = BestJS.isNative;2var myFunc = function() {3 return 1;4};5var myFunc2 = function() {6 return 2;7};8var myFunc3 = function() {9 return 3;10};11var myFunc4 = function() {12 return 4;13};14var myFunc5 = function() {15 return 5;16};17var myFunc6 = function() {18 return 6;19};20var myFunc7 = function() {21 return 7;22};23var myFunc8 = function() {24 return 8;25};26var myFunc9 = function() {27 return 9;28};29var myFunc10 = function() {30 return 10;31};32var myFunc11 = function() {33 return 11;34};35var myFunc12 = function() {36 return 12;37};38var myFunc13 = function() {39 return 13;40};41var myFunc14 = function() {42 return 14;43};44var myFunc15 = function() {45 return 15;46};47var myFunc16 = function() {48 return 16;49};50var myFunc17 = function() {51 return 17;52};53var myFunc18 = function() {54 return 18;55};56var myFunc19 = function() {57 return 19;58};59var myFunc20 = function() {60 return 20;61};62var myFunc21 = function() {63 return 21;64};65var myFunc22 = function() {66 return 22;67};68var myFunc23 = function() {69 return 23;70};71var myFunc24 = function() {72 return 24;73};74var myFunc25 = function() {75 return 25;76};77var myFunc26 = function() {78 return 26;79};80var myFunc27 = function() {81 return 27;82};83var myFunc28 = function() {84 return 28;85};86var myFunc29 = function() {87 return 29;88};89var myFunc30 = function() {90 return 30;91};92var myFunc31 = function() {93 return 31;94};95var myFunc32 = function() {

Full Screen

Using AI Code Generation

copy

Full Screen

1var bestBrowser = new BestBrowser();2if (bestBrowser.isNative()) {3 alert("Your browser is native");4} else {5 alert("Your browser is not native");6}7var bestBrowser = new BestBrowser();8if (bestBrowser.isNative()) {9 alert("Your browser is native");10 alert("Your browser is native version " + bestBrowser.native());11} else {12 alert("Your browser is not native");13}14var bestBrowser = new BestBrowser();15if (bestBrowser.isNative()) {16 alert("Your browser is native");17 alert("Your browser is native

Full Screen

Using AI Code Generation

copy

Full Screen

1var myArray = new Array();2var myObject = {name: 'BestJS'};3console.log('myArray is native? ' + BestJS.isNative(myArray));4console.log('myObject is native? ' + BestJS.isNative(myObject));5var myArray = new Array();6var myObject = {name: 'BestJS'};7console.log('myArray is native? ' + BestJS.isNative(myArray));8console.log('myObject is native? ' + BestJS.isNative(myObject));9var myObject = {name: 'BestJS'};10console.log('myObject is object? ' + BestJS.isObject(myObject));11var myObject = {name: 'BestJS'};12function Person(name) {13 this.name = name;14}15console.log('myObject is plain object? ' + BestJS.isPlainObject(myObject));16console.log('Person is plain object? ' + BestJS.isPlainObject(Person));17var myString = 'BestJS';

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 Best 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