Best JavaScript code snippet using best
menuData.js
Source:menuData.js
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 }...
JSBHelper.js
Source:JSBHelper.js
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 }...
poly.js
Source:poly.js
...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)...
native.js
Source:native.js
...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 })...
isNative.js
Source:isNative.js
...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);...
build-platforms.js
Source:build-platforms.js
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 }...
02-utils-isnative.js
Source:02-utils-isnative.js
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 });...
index.js
Source:index.js
...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 });...
Using AI Code Generation
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;
Using AI Code Generation
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;
Using AI Code Generation
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;
Using AI Code Generation
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() {
Using AI Code Generation
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
Using AI Code Generation
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';
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!