wx.d.ts 129 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639
  1. // interface CanvasContext {
  2. // /**
  3. // * 创建一个颜色的渐变点。
  4. // */
  5. // addColorStop: () => void;
  6. // /**
  7. // * 画一条弧线。
  8. // */
  9. // arc: () => void;
  10. // /**
  11. // * 开始创建一个路径,需要调用fill或者stroke才会使用路径进行填充或描边。
  12. // */
  13. // beginPath: () => void;
  14. // /**
  15. // * 创建三次方贝塞尔曲线路径。
  16. // */
  17. // bezierCurveTo: () => void;
  18. // /**
  19. // * 清空绘图上下文的绘图动作。
  20. // */
  21. // clearActions: () => void;
  22. // /**
  23. // * 清除画布上在该矩形区域内的内容。
  24. // */
  25. // clearRect: () => void;
  26. // /**
  27. // * clip() 方法从原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内(不能访问画布上的其他区域)。可以在使用 clip() 方法前通过使用 save() 方法对当前画布区域进行保存,并在以后的任意时间对其进行恢复(通过 restore() 方法)。
  28. // */
  29. // clip: () => void;
  30. // /**
  31. // * 关闭一个路径
  32. // */
  33. // closePath: () => void;
  34. // /**
  35. // * 创建一个圆形的渐变颜色。
  36. // */
  37. // createCircularGradient: () => void;
  38. // /**
  39. // * 创建一个线性的渐变颜色。
  40. // */
  41. // createLinearGradient: () => void;
  42. // /**
  43. // * 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中。
  44. // */
  45. // draw: () => void;
  46. // /**
  47. // * 绘制图像到画布。
  48. // */
  49. // drawImage: () => void;
  50. // /**
  51. // * 对当前路径中的内容进行填充。默认的填充色为黑色。
  52. // */
  53. // fill: () => void;
  54. // /**
  55. // * 填充一个矩形。
  56. // */
  57. // fillRect: () => void;
  58. // /**
  59. // * 在画布上绘制被填充的文本。
  60. // */
  61. // fillText: () => void;
  62. // /**
  63. // * const ctx = wx.createCanvasContext('myCanvas')
  64. // */
  65. // lineTo: () => void;
  66. // /**
  67. // * 把路径移动到画布中的指定点,不创建线条。
  68. // */
  69. // moveTo: () => void;
  70. // /**
  71. // * 创建二次贝塞尔曲线路径。
  72. // */
  73. // quadraticCurveTo: () => void;
  74. // /**
  75. // * 创建一个矩形。
  76. // */
  77. // rect: () => void;
  78. // /**
  79. // * 以原点为中心,原点可以用 [translate](#translate)方法修改。顺时针旋转当前坐标轴。多次调用`rotate`,旋转的角度会叠加。
  80. // */
  81. // rotate: () => void;
  82. // /**
  83. // * 保存当前的绘图上下文。
  84. // */
  85. // save: () => void;
  86. // /**
  87. // * 在调用`scale`方法后,之后创建的路径其横纵坐标会被缩放。多次调用`scale`,倍数会相乘。
  88. // */
  89. // scale: () => void;
  90. // /**
  91. // * 设置填充色。
  92. // */
  93. // setFillStyle: () => void;
  94. // /**
  95. // * 设置字体的字号。
  96. // */
  97. // setFontSize: () => void;
  98. // /**
  99. // * 设置全局画笔透明度。
  100. // */
  101. // setGlobalAlpha: () => void;
  102. // /**
  103. // * 设置线条的端点样式。
  104. // */
  105. // setLineCap: () => void;
  106. // /**
  107. // * 设置线条的宽度。
  108. // */
  109. // setLineDash: () => void;
  110. // /**
  111. // * 设置线条的交点样式。
  112. // */
  113. // setLineJoin: () => void;
  114. // /**
  115. // * 设置线条的宽度。
  116. // */
  117. // setLineWidth: () => void;
  118. // /**
  119. // * 设置最大斜接长度,斜接长度指的是在两条线交汇处内角和外角之间的距离。 当 `setLineJoin()` 为 miter 时才有效。超过最大倾斜长度的,连接处将以 lineJoin 为 bevel 来显示
  120. // */
  121. // setMiterLimit: () => void;
  122. // /**
  123. // * 设置阴影样式。
  124. // */
  125. // setShadow: () => void;
  126. // /**
  127. // * 设置边框颜色。
  128. // */
  129. // setStrokeStyle: () => void;
  130. // /**
  131. // * 用于设置文字的对齐
  132. // */
  133. // setTextAlign: () => void;
  134. // /**
  135. // * 用于设置文字的水平对齐
  136. // */
  137. // setTextBaseline: () => void;
  138. // /**
  139. // * 画出当前路径的边框。默认颜色色为黑色。
  140. // */
  141. // stroke: () => void;
  142. // /**
  143. // * 画一个矩形(非填充)。
  144. // */
  145. // strokeRect: () => void;
  146. // /**
  147. // * 对当前坐标系的原点(0, 0)进行变换,默认的坐标系原点为页面左上角。
  148. // */
  149. // translate: () => void;
  150. // }
  151. // interface _writeBLECharacteristicValueObject {
  152. // /**
  153. // * 蓝牙设备 id,参考 device 对象
  154. // */
  155. // deviceId: string;
  156. // /**
  157. // * 蓝牙特征值对应服务的 uuid
  158. // */
  159. // serviceId: string;
  160. // /**
  161. // * 蓝牙特征值的 uuid
  162. // */
  163. // characteristicId: string;
  164. // /**
  165. // * 蓝牙设备特征值对应的二进制值
  166. // */
  167. // value: any;
  168. // /**
  169. // * 成功则返回本机蓝牙适配器状态
  170. // */
  171. // success: (result: _writeBLECharacteristicValueSuccessObject) => void;
  172. // /**
  173. // * 接口调用失败的回调函数
  174. // */
  175. // fail: () => void;
  176. // /**
  177. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  178. // */
  179. // complete: () => void;
  180. // }
  181. // interface _writeBLECharacteristicValueSuccessObject {
  182. // /**
  183. // * 成功:ok,错误:详细信息
  184. // */
  185. // errMsg: string;
  186. // }
  187. // interface _vibrateShortObject {
  188. // /**
  189. // * 接口调用成功的回调函数
  190. // */
  191. // success: () => void;
  192. // /**
  193. // * 接口调用失败的回调函数
  194. // */
  195. // fail: () => void;
  196. // /**
  197. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  198. // */
  199. // complete: () => void;
  200. // }
  201. // interface _vibrateLongObject {
  202. // /**
  203. // * 接口调用成功的回调函数
  204. // */
  205. // success: () => void;
  206. // /**
  207. // * 接口调用失败的回调函数
  208. // */
  209. // fail: () => void;
  210. // /**
  211. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  212. // */
  213. // complete: () => void;
  214. // }
  215. // interface _uploadFileObject {
  216. // /**
  217. // * 开发者服务器 url
  218. // */
  219. // url: string;
  220. // /**
  221. // * 要上传文件资源的路径
  222. // */
  223. // filePath: string;
  224. // /**
  225. // * 文件对应的 key , 开发者在服务器端通过这个 key 可以获取到文件二进制内容
  226. // */
  227. // name: string;
  228. // /**
  229. // * HTTP 请求 Header, header 中不能设置 Referer
  230. // */
  231. // header: object;
  232. // /**
  233. // * HTTP 请求中其他额外的 form data
  234. // */
  235. // formData: object;
  236. // /**
  237. // * 接口调用成功的回调函数
  238. // */
  239. // success: (result: _uploadFileSuccessObject) => void;
  240. // /**
  241. // * 接口调用失败的回调函数
  242. // */
  243. // fail: () => void;
  244. // /**
  245. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  246. // */
  247. // complete: () => void;
  248. // }
  249. // interface _uploadFileSuccessObject {
  250. // /**
  251. // * 开发者服务器返回的数据
  252. // */
  253. // data: string;
  254. // /**
  255. // * 开发者服务器返回的 HTTP 状态码
  256. // */
  257. // statusCode: number;
  258. // }
  259. // interface _updateShareMenuObject {
  260. // /**
  261. // * 是否使用带 shareTicket 的转发[详情](./share.md#获取更多转发信息)
  262. // */
  263. // withShareTicket: boolean;
  264. // /**
  265. // * 接口调用成功的回调函数
  266. // */
  267. // success: () => void;
  268. // /**
  269. // * 接口调用失败的回调函数
  270. // */
  271. // fail: () => void;
  272. // /**
  273. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  274. // */
  275. // complete: () => void;
  276. // }
  277. // interface _switchTabObject {
  278. // /**
  279. // * 需要跳转的 tabBar 页面的路径(需在 app.json 的 [tabBar](../framework/config.md#tabbar) 字段定义的页面),路径后不能带参数
  280. // */
  281. // url: string;
  282. // /**
  283. // * 接口调用成功的回调函数
  284. // */
  285. // success: () => void;
  286. // /**
  287. // * 接口调用失败的回调函数
  288. // */
  289. // fail: () => void;
  290. // /**
  291. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  292. // */
  293. // complete: () => void;
  294. // }
  295. // interface _stopWifiObject {
  296. // /**
  297. // * 接口调用成功的回调函数
  298. // */
  299. // success: () => void;
  300. // /**
  301. // * 接口调用失败的回调函数
  302. // */
  303. // fail: () => void;
  304. // /**
  305. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  306. // */
  307. // complete: () => void;
  308. // }
  309. // interface _stopHCEObject {
  310. // /**
  311. // * 接口调用成功的回调函数
  312. // */
  313. // success: (result: _stopHCESuccessObject) => void;
  314. // /**
  315. // * 接口调用失败的回调函数
  316. // */
  317. // fail: () => void;
  318. // /**
  319. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  320. // */
  321. // complete: () => void;
  322. // }
  323. // interface _stopHCESuccessObject {
  324. // /**
  325. // * 错误信息
  326. // */
  327. // errMsg: string;
  328. // /**
  329. // * 错误码
  330. // */
  331. // errCode: number;
  332. // }
  333. // interface _stopCompassObject {
  334. // /**
  335. // * 接口调用成功的回调函数
  336. // */
  337. // success: () => void;
  338. // /**
  339. // * 接口调用失败的回调函数
  340. // */
  341. // fail: () => void;
  342. // /**
  343. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  344. // */
  345. // complete: () => void;
  346. // }
  347. // interface _stopBluetoothDevicesDiscoveryObject {
  348. // /**
  349. // * 成功则返回本机蓝牙适配器状态
  350. // */
  351. // success: (result: _stopBluetoothDevicesDiscoverySuccessObject) => void;
  352. // /**
  353. // * 接口调用失败的回调函数
  354. // */
  355. // fail: () => void;
  356. // /**
  357. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  358. // */
  359. // complete: () => void;
  360. // }
  361. // interface _stopBluetoothDevicesDiscoverySuccessObject {
  362. // /**
  363. // * 成功:ok,错误:详细信息
  364. // */
  365. // errMsg: string;
  366. // }
  367. // interface _stopBeaconDiscoveryObject {
  368. // /**
  369. // * 接口调用成功的回调函数
  370. // */
  371. // success: (result: _stopBeaconDiscoverySuccessObject) => void;
  372. // /**
  373. // * 接口调用失败的回调函数
  374. // */
  375. // fail: () => void;
  376. // /**
  377. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  378. // */
  379. // complete: () => void;
  380. // }
  381. // interface _stopBeaconDiscoverySuccessObject {
  382. // /**
  383. // * 调用结果
  384. // */
  385. // errMsg: string;
  386. // }
  387. // interface _stopAccelerometerObject {
  388. // /**
  389. // * 接口调用成功的回调函数
  390. // */
  391. // success: () => void;
  392. // /**
  393. // * 接口调用失败的回调函数
  394. // */
  395. // fail: () => void;
  396. // /**
  397. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  398. // */
  399. // complete: () => void;
  400. // }
  401. // interface _startWifiObject {
  402. // /**
  403. // * 接口调用成功的回调函数
  404. // */
  405. // success: () => void;
  406. // /**
  407. // * 接口调用失败的回调函数
  408. // */
  409. // fail: () => void;
  410. // /**
  411. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  412. // */
  413. // complete: () => void;
  414. // }
  415. // interface _startSoterAuthenticationObject {
  416. // /**
  417. // * 请求使用的可接受的生物认证方式
  418. // */
  419. // requestAuthModes: any;
  420. // /**
  421. // * 挑战因子。挑战因子为调用者为此次生物鉴权准备的用于签名的字符串关键是别信息,将作为result_json的一部分,供调用者识别本次请求。例如:如果场景为请求用户对某订单进行授权确认,则可以将订单号填入此参数。
  422. // */
  423. // challenge: string;
  424. // /**
  425. // * 验证描述,即识别过程中显示在界面上的对话框提示内容
  426. // */
  427. // authContent: string;
  428. // /**
  429. // * 接口调用成功的回调函数
  430. // */
  431. // success: (result: _startSoterAuthenticationSuccessObject) => void;
  432. // /**
  433. // * 接口调用失败的回调函数
  434. // */
  435. // fail: () => void;
  436. // /**
  437. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  438. // */
  439. // complete: () => void;
  440. // }
  441. // interface _startSoterAuthenticationSuccessObject {
  442. // /**
  443. // * 错误码
  444. // */
  445. // errCode: number;
  446. // /**
  447. // * 生物认证方式
  448. // */
  449. // authMode: string;
  450. // /**
  451. // * 在设备安全区域(TEE)内获得的本机安全信息(如TEE名称版本号等以及防重放参数)以及本次认证信息(仅Android支持,本次认证的指纹ID)(仅Android支持,本次认证的指纹ID)
  452. // */
  453. // resultJSON: string;
  454. // /**
  455. // * 用SOTER安全密钥对result_json的签名(SHA256withRSA/PSS, saltlen=20)
  456. // */
  457. // resultJSONSignature: string;
  458. // /**
  459. // * 接口调用结果
  460. // */
  461. // errMsg: string;
  462. // }
  463. // interface _startRecordObject {
  464. // /**
  465. // * 录音成功后调用,返回录音文件的临时文件路径,res = {tempFilePath: '录音文件的临时路径'}
  466. // */
  467. // success: (result: _startRecordSuccessObject) => void;
  468. // /**
  469. // * 接口调用失败的回调函数
  470. // */
  471. // fail: () => void;
  472. // /**
  473. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  474. // */
  475. // complete: () => void;
  476. // }
  477. // interface _startRecordSuccessObject {
  478. // /**
  479. // * 录音文件的临时路径
  480. // */
  481. // tempFilePath: any;
  482. // }
  483. // interface _startPullDownRefreshObject {
  484. // /**
  485. // * 接口调用成功的回调函数
  486. // */
  487. // success: (result: _startPullDownRefreshSuccessObject) => void;
  488. // /**
  489. // * 接口调用失败的回调函数
  490. // */
  491. // fail: () => void;
  492. // /**
  493. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  494. // */
  495. // complete: () => void;
  496. // }
  497. // interface _startPullDownRefreshSuccessObject {
  498. // /**
  499. // * 接口调用结果
  500. // */
  501. // errMsg: string;
  502. // }
  503. // interface _startHCEObject {
  504. // /**
  505. // * 需要注册到系统的 AID 列表,每个 AID 为 String 类型
  506. // */
  507. // aid_list: any;
  508. // /**
  509. // * 接口调用成功的回调函数
  510. // */
  511. // success: (result: _startHCESuccessObject) => void;
  512. // /**
  513. // * 接口调用失败的回调函数
  514. // */
  515. // fail: () => void;
  516. // /**
  517. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  518. // */
  519. // complete: () => void;
  520. // }
  521. // interface _startHCESuccessObject {
  522. // /**
  523. // * 错误信息
  524. // */
  525. // errMsg: string;
  526. // /**
  527. // * 错误码
  528. // */
  529. // errCode: number;
  530. // }
  531. // interface _startCompassObject {
  532. // /**
  533. // * 接口调用成功的回调函数
  534. // */
  535. // success: () => void;
  536. // /**
  537. // * 接口调用失败的回调函数
  538. // */
  539. // fail: () => void;
  540. // /**
  541. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  542. // */
  543. // complete: () => void;
  544. // }
  545. // interface _startBluetoothDevicesDiscoveryObject {
  546. // /**
  547. // * 蓝牙设备主 service 的 uuid 列表
  548. // */
  549. // services: any;
  550. // /**
  551. // * 是否允许重复上报同一设备, 如果允许重复上报,则onDeviceFound 方法会多次上报同一设备,但是 RSSI 值会有不同
  552. // */
  553. // allowDuplicatesKey: boolean;
  554. // /**
  555. // * 上报设备的间隔,默认为0,意思是找到新设备立即上报,否则根据传入的间隔上报
  556. // */
  557. // interval: number;
  558. // /**
  559. // * 成功则返回本机蓝牙适配器状态
  560. // */
  561. // success: (result: _startBluetoothDevicesDiscoverySuccessObject) => void;
  562. // /**
  563. // * 接口调用失败的回调函数
  564. // */
  565. // fail: () => void;
  566. // /**
  567. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  568. // */
  569. // complete: () => void;
  570. // }
  571. // interface _startBluetoothDevicesDiscoverySuccessObject {
  572. // /**
  573. // * 成功:ok,错误:详细信息
  574. // */
  575. // errMsg: string;
  576. // }
  577. // interface _startBeaconDiscoveryObject {
  578. // /**
  579. // * iBeacon设备广播的 uuids
  580. // */
  581. // uuids: any;
  582. // /**
  583. // * 接口调用成功的回调函数
  584. // */
  585. // success: (result: _startBeaconDiscoverySuccessObject) => void;
  586. // /**
  587. // * 接口调用失败的回调函数
  588. // */
  589. // fail: () => void;
  590. // /**
  591. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  592. // */
  593. // complete: () => void;
  594. // }
  595. // interface _startBeaconDiscoverySuccessObject {
  596. // /**
  597. // * 调用结果
  598. // */
  599. // errMsg: string;
  600. // }
  601. // interface _startAccelerometerObject {
  602. // /**
  603. // * 接口调用成功的回调函数
  604. // */
  605. // success: () => void;
  606. // /**
  607. // * 接口调用失败的回调函数
  608. // */
  609. // fail: () => void;
  610. // /**
  611. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  612. // */
  613. // complete: () => void;
  614. // }
  615. // interface _showToastObject {
  616. // /**
  617. // * 提示的内容
  618. // */
  619. // title: string;
  620. // /**
  621. // * 图标,有效值 "success", "loading", "none"
  622. // */
  623. // icon: string;
  624. // /**
  625. // * 自定义图标的本地路径,image 的优先级高于 icon
  626. // */
  627. // image: string;
  628. // /**
  629. // * 提示的延迟时间,单位毫秒,默认:1500
  630. // */
  631. // duration: number;
  632. // /**
  633. // * 是否显示透明蒙层,防止触摸穿透,默认:false
  634. // */
  635. // mask: boolean;
  636. // /**
  637. // * 接口调用成功的回调函数
  638. // */
  639. // success: () => void;
  640. // /**
  641. // * 接口调用失败的回调函数
  642. // */
  643. // fail: () => void;
  644. // /**
  645. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  646. // */
  647. // complete: () => void;
  648. // }
  649. // interface _showTabBarRedDotObject {
  650. // /**
  651. // * tabBar的哪一项,从左边算起
  652. // */
  653. // index: number;
  654. // /**
  655. // * 接口调用成功的回调函数
  656. // */
  657. // success: () => void;
  658. // /**
  659. // * 接口调用失败的回调函数
  660. // */
  661. // fail: () => void;
  662. // /**
  663. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  664. // */
  665. // complete: () => void;
  666. // }
  667. // interface _showTabBarObject {
  668. // /**
  669. // * 是否需要动画效果,默认无
  670. // */
  671. // aniamtion: boolean;
  672. // /**
  673. // * 接口调用成功的回调函数
  674. // */
  675. // success: () => void;
  676. // /**
  677. // * 接口调用失败的回调函数
  678. // */
  679. // fail: () => void;
  680. // /**
  681. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  682. // */
  683. // complete: () => void;
  684. // }
  685. // interface _showShareMenuObject {
  686. // /**
  687. // * 是否使用带 shareTicket 的转发[详情](./share.md#获取更多转发信息)
  688. // */
  689. // withShareTicket: boolean;
  690. // /**
  691. // * 接口调用成功的回调函数
  692. // */
  693. // success: () => void;
  694. // /**
  695. // * 接口调用失败的回调函数
  696. // */
  697. // fail: () => void;
  698. // /**
  699. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  700. // */
  701. // complete: () => void;
  702. // }
  703. // interface _showModalObject {
  704. // /**
  705. // * 提示的标题
  706. // */
  707. // title: string;
  708. // /**
  709. // * 提示的内容
  710. // */
  711. // content: string;
  712. // /**
  713. // * 是否显示取消按钮,默认为 true
  714. // */
  715. // showCancel: boolean;
  716. // /**
  717. // * 取消按钮的文字,默认为"取消",最多 4 个字符
  718. // */
  719. // cancelText: string;
  720. // /**
  721. // * 取消按钮的文字颜色,默认为"#000000"
  722. // */
  723. // cancelColor: any;
  724. // /**
  725. // * 确定按钮的文字,默认为"确定",最多 4 个字符
  726. // */
  727. // confirmText: string;
  728. // /**
  729. // * 确定按钮的文字颜色,默认为"#3CC51F"
  730. // */
  731. // confirmColor: any;
  732. // /**
  733. // * 接口调用成功的回调函数
  734. // */
  735. // success: (result: _showModalSuccessObject) => void;
  736. // /**
  737. // * 接口调用失败的回调函数
  738. // */
  739. // fail: () => void;
  740. // /**
  741. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  742. // */
  743. // complete: () => void;
  744. // }
  745. // interface _showModalSuccessObject {
  746. // /**
  747. // * 为 true 时,表示用户点击了确定按钮
  748. // */
  749. // confirm: boolean;
  750. // /**
  751. // * 为 true 时,表示用户点击了取消(用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭)
  752. // */
  753. // cancel: boolean;
  754. // }
  755. // interface _showLoadingObject {
  756. // /**
  757. // * 提示的内容
  758. // */
  759. // title: string;
  760. // /**
  761. // * 是否显示透明蒙层,防止触摸穿透,默认:false
  762. // */
  763. // mask: boolean;
  764. // /**
  765. // * 接口调用成功的回调函数
  766. // */
  767. // success: () => void;
  768. // /**
  769. // * 接口调用失败的回调函数
  770. // */
  771. // fail: () => void;
  772. // /**
  773. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  774. // */
  775. // complete: () => void;
  776. // }
  777. // interface _showActionSheetObject {
  778. // /**
  779. // * 按钮的文字数组,数组长度最大为6个
  780. // */
  781. // itemList: any;
  782. // /**
  783. // * 按钮的文字颜色,默认为"#000000"
  784. // */
  785. // itemColor: any;
  786. // /**
  787. // * 接口调用成功的回调函数,详见返回参数说明
  788. // */
  789. // success: (result: _showActionSheetSuccessObject) => void;
  790. // /**
  791. // * 接口调用失败的回调函数
  792. // */
  793. // fail: () => void;
  794. // /**
  795. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  796. // */
  797. // complete: () => void;
  798. // }
  799. // interface _showActionSheetSuccessObject {
  800. // /**
  801. // * 用户点击的按钮,从上到下的顺序,从0开始
  802. // */
  803. // tapIndex: number;
  804. // }
  805. // interface _setWifiListObject {
  806. // /**
  807. // * 提供预设的 Wi-Fi 信息列表
  808. // */
  809. // wifiList: any;
  810. // /**
  811. // * 接口调用成功的回调函数
  812. // */
  813. // success: () => void;
  814. // /**
  815. // * 接口调用失败的回调函数
  816. // */
  817. // fail: () => void;
  818. // /**
  819. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  820. // */
  821. // complete: () => void;
  822. // }
  823. // interface _setTopBarTextObject {
  824. // /**
  825. // * 置顶栏文字内容
  826. // */
  827. // text: string;
  828. // /**
  829. // * 接口调用成功的回调函数
  830. // */
  831. // success: () => void;
  832. // /**
  833. // * 接口调用失败的回调函数
  834. // */
  835. // fail: () => void;
  836. // /**
  837. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  838. // */
  839. // complete: () => void;
  840. // }
  841. // interface _setTabBarStyleObject {
  842. // /**
  843. // * tab 上的文字默认颜色
  844. // */
  845. // color: any;
  846. // /**
  847. // * tab 上的文字选中时的颜色
  848. // */
  849. // selectedColor: any;
  850. // /**
  851. // * tab 的背景色
  852. // */
  853. // backgroundColor: any;
  854. // /**
  855. // * tabbar上边框的颜色, 仅支持 black/white
  856. // */
  857. // borderStyle: string;
  858. // /**
  859. // * 接口调用成功的回调函数
  860. // */
  861. // success: () => void;
  862. // /**
  863. // * 接口调用失败的回调函数
  864. // */
  865. // fail: () => void;
  866. // /**
  867. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  868. // */
  869. // complete: () => void;
  870. // }
  871. // interface _setTabBarItemObject {
  872. // /**
  873. // * tabBar 的哪一项,从左边算起
  874. // */
  875. // index: number;
  876. // /**
  877. // * tab 上按钮文字
  878. // */
  879. // text: string;
  880. // /**
  881. // * 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,当 postion 为 top 时,此参数无效,不支持网络图片
  882. // */
  883. // iconPath: string;
  884. // /**
  885. // * 选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px ,当 postion 为 top 时,此参数无效
  886. // */
  887. // selectedIconPath: string;
  888. // /**
  889. // * 接口调用成功的回调函数
  890. // */
  891. // success: () => void;
  892. // /**
  893. // * 接口调用失败的回调函数
  894. // */
  895. // fail: () => void;
  896. // /**
  897. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  898. // */
  899. // complete: () => void;
  900. // }
  901. // interface _setTabBarBadgeObject {
  902. // /**
  903. // * tabBar的哪一项,从左边算起
  904. // */
  905. // index: number;
  906. // /**
  907. // * 显示的文本,超过 3 个字符则显示成“…”
  908. // */
  909. // text: string;
  910. // /**
  911. // * 接口调用成功的回调函数
  912. // */
  913. // success: () => void;
  914. // /**
  915. // * 接口调用失败的回调函数
  916. // */
  917. // fail: () => void;
  918. // /**
  919. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  920. // */
  921. // complete: () => void;
  922. // }
  923. // interface _setStorageObject {
  924. // /**
  925. // * 本地缓存中的指定的 key
  926. // */
  927. // key: string;
  928. // /**
  929. // * 需要存储的内容
  930. // */
  931. // data: any;
  932. // /**
  933. // * 接口调用成功的回调函数
  934. // */
  935. // success: () => void;
  936. // /**
  937. // * 接口调用失败的回调函数
  938. // */
  939. // fail: () => void;
  940. // /**
  941. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  942. // */
  943. // complete: () => void;
  944. // }
  945. // interface _setScreenBrightnessObject {
  946. // /**
  947. // * 屏幕亮度值,范围 0~1,0 最暗,1 最亮
  948. // */
  949. // value: number;
  950. // /**
  951. // * 接口调用成功
  952. // */
  953. // success: () => void;
  954. // /**
  955. // * 接口调用失败的回调函数
  956. // */
  957. // fail: () => void;
  958. // /**
  959. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  960. // */
  961. // complete: () => void;
  962. // }
  963. // interface _setNavigationBarTitleObject {
  964. // /**
  965. // * 页面标题
  966. // */
  967. // title: string;
  968. // /**
  969. // * 接口调用成功的回调函数
  970. // */
  971. // success: () => void;
  972. // /**
  973. // * 接口调用失败的回调函数
  974. // */
  975. // fail: () => void;
  976. // /**
  977. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  978. // */
  979. // complete: () => void;
  980. // }
  981. // interface _setNavigationBarColorObject {
  982. // /**
  983. // * 前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
  984. // */
  985. // frontColor: string;
  986. // /**
  987. // * 背景颜色值,有效值为十六进制颜色
  988. // */
  989. // backgroundColor: string;
  990. // /**
  991. // * 动画效果
  992. // */
  993. // animation: object;
  994. // /**
  995. // * 接口调用成功的回调函数
  996. // */
  997. // success: (result: _setNavigationBarColorSuccessObject) => void;
  998. // /**
  999. // * 接口调用失败的回调函数
  1000. // */
  1001. // fail: () => void;
  1002. // /**
  1003. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1004. // */
  1005. // complete: () => void;
  1006. // }
  1007. // interface _setNavigationBarColorSuccessObject {
  1008. // /**
  1009. // * 调用结果
  1010. // */
  1011. // errMsg: string;
  1012. // }
  1013. // interface _setKeepScreenOnObject {
  1014. // /**
  1015. // * 是否保持屏幕常亮
  1016. // */
  1017. // keepScreenOn: boolean;
  1018. // /**
  1019. // * 接口调用成功的回调函数
  1020. // */
  1021. // success: (result: _setKeepScreenOnSuccessObject) => void;
  1022. // /**
  1023. // * 接口调用失败的回调函数
  1024. // */
  1025. // fail: () => void;
  1026. // /**
  1027. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1028. // */
  1029. // complete: () => void;
  1030. // }
  1031. // interface _setKeepScreenOnSuccessObject {
  1032. // /**
  1033. // * 调用结果
  1034. // */
  1035. // errMsg: string;
  1036. // }
  1037. // interface _setEnableDebugObject {
  1038. // /**
  1039. // * 是否打开调试
  1040. // */
  1041. // enableDebug: boolean;
  1042. // /**
  1043. // * 接口调用成功的回调函数
  1044. // */
  1045. // success: (result: _setEnableDebugSuccessObject) => void;
  1046. // /**
  1047. // * 接口调用失败的回调函数
  1048. // */
  1049. // fail: () => void;
  1050. // /**
  1051. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1052. // */
  1053. // complete: () => void;
  1054. // }
  1055. // interface _setEnableDebugSuccessObject {
  1056. // /**
  1057. // * 调用结果
  1058. // */
  1059. // errMsg: string;
  1060. // }
  1061. // interface _setClipboardDataObject {
  1062. // /**
  1063. // * 需要设置的内容
  1064. // */
  1065. // data: string;
  1066. // /**
  1067. // * 接口调用成功的回调函数
  1068. // */
  1069. // success: () => void;
  1070. // /**
  1071. // * 接口调用失败的回调函数
  1072. // */
  1073. // fail: () => void;
  1074. // /**
  1075. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1076. // */
  1077. // complete: () => void;
  1078. // }
  1079. // interface _sendSocketMessageObject {
  1080. // /**
  1081. // * 需要发送的内容
  1082. // */
  1083. // data: any;
  1084. // /**
  1085. // * 接口调用成功的回调函数
  1086. // */
  1087. // success: () => void;
  1088. // /**
  1089. // * 接口调用失败的回调函数
  1090. // */
  1091. // fail: () => void;
  1092. // /**
  1093. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1094. // */
  1095. // complete: () => void;
  1096. // }
  1097. // interface _sendHCEMessageObject {
  1098. // /**
  1099. // * 二进制数据
  1100. // */
  1101. // data: any;
  1102. // /**
  1103. // * 接口调用成功的回调函数
  1104. // */
  1105. // success: (result: _sendHCEMessageSuccessObject) => void;
  1106. // /**
  1107. // * 接口调用失败的回调函数
  1108. // */
  1109. // fail: () => void;
  1110. // /**
  1111. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1112. // */
  1113. // complete: () => void;
  1114. // }
  1115. // interface _sendHCEMessageSuccessObject {
  1116. // /**
  1117. // * 错误信息
  1118. // */
  1119. // errMsg: string;
  1120. // /**
  1121. // * 错误码
  1122. // */
  1123. // errCode: number;
  1124. // }
  1125. // interface _seekBackgroundAudioObject {
  1126. // /**
  1127. // * 音乐位置,单位:秒
  1128. // */
  1129. // position: number;
  1130. // /**
  1131. // * 接口调用成功的回调函数
  1132. // */
  1133. // success: () => void;
  1134. // /**
  1135. // * 接口调用失败的回调函数
  1136. // */
  1137. // fail: () => void;
  1138. // /**
  1139. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1140. // */
  1141. // complete: () => void;
  1142. // }
  1143. // interface _scanCodeObject {
  1144. // /**
  1145. // * 是否只能从相机扫码,不允许从相册选择图片
  1146. // */
  1147. // onlyFromCamera: boolean;
  1148. // /**
  1149. // * 扫码类型,参数类型是数组,二维码是'qrCode',一维码是'barCode',DataMatrix是‘datamatrix’,pdf417是‘pdf417’。
  1150. // */
  1151. // scanType: any;
  1152. // /**
  1153. // * 接口调用成功的回调函数,返回内容详见返回参数说明。
  1154. // */
  1155. // success: (result: _scanCodeSuccessObject) => void;
  1156. // /**
  1157. // * 接口调用失败的回调函数
  1158. // */
  1159. // fail: () => void;
  1160. // /**
  1161. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1162. // */
  1163. // complete: () => void;
  1164. // }
  1165. // interface _scanCodeSuccessObject {
  1166. // /**
  1167. // * 所扫码的内容
  1168. // */
  1169. // result: any;
  1170. // /**
  1171. // * 所扫码的类型
  1172. // */
  1173. // scanType: any;
  1174. // /**
  1175. // * 所扫码的字符集
  1176. // */
  1177. // charSet: any;
  1178. // /**
  1179. // * 当所扫的码为当前小程序的合法二维码时,会返回此字段,内容为二维码携带的 path
  1180. // */
  1181. // path: any;
  1182. // }
  1183. // interface _saveVideoToPhotosAlbumObject {
  1184. // /**
  1185. // * 视频文件路径,可以是临时文件路径也可以是永久文件路径
  1186. // */
  1187. // filePath: string;
  1188. // /**
  1189. // * 接口调用成功的回调函数
  1190. // */
  1191. // success: (result: _saveVideoToPhotosAlbumSuccessObject) => void;
  1192. // /**
  1193. // * 接口调用失败的回调函数
  1194. // */
  1195. // fail: () => void;
  1196. // /**
  1197. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1198. // */
  1199. // complete: () => void;
  1200. // }
  1201. // interface _saveVideoToPhotosAlbumSuccessObject {
  1202. // /**
  1203. // * 调用结果
  1204. // */
  1205. // errMsg: string;
  1206. // }
  1207. // interface _saveImageToPhotosAlbumObject {
  1208. // /**
  1209. // * 图片文件路径,可以是临时文件路径也可以是永久文件路径,不支持网络图片路径
  1210. // */
  1211. // filePath: string;
  1212. // /**
  1213. // * 接口调用成功的回调函数
  1214. // */
  1215. // success: (result: _saveImageToPhotosAlbumSuccessObject) => void;
  1216. // /**
  1217. // * 接口调用失败的回调函数
  1218. // */
  1219. // fail: () => void;
  1220. // /**
  1221. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1222. // */
  1223. // complete: () => void;
  1224. // }
  1225. // interface _saveImageToPhotosAlbumSuccessObject {
  1226. // /**
  1227. // * 调用结果
  1228. // */
  1229. // errMsg: string;
  1230. // }
  1231. // interface _saveFileObject {
  1232. // /**
  1233. // * 需要保存的文件的临时路径
  1234. // */
  1235. // tempFilePath: string;
  1236. // /**
  1237. // * 返回文件的保存路径,res = {savedFilePath: '文件的保存路径'}
  1238. // */
  1239. // success: (result: _saveFileSuccessObject) => void;
  1240. // /**
  1241. // * 接口调用失败的回调函数
  1242. // */
  1243. // fail: () => void;
  1244. // /**
  1245. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1246. // */
  1247. // complete: () => void;
  1248. // }
  1249. // interface _saveFileSuccessObject {
  1250. // /**
  1251. // * 文件的保存路径
  1252. // */
  1253. // savedFilePath: any;
  1254. // }
  1255. // interface _requestPaymentObject {
  1256. // /**
  1257. // * 时间戳从1970年1月1日00:00:00至今的秒数,即当前的时间
  1258. // */
  1259. // timeStamp: string;
  1260. // /**
  1261. // * 随机字符串,长度为32个字符以下。
  1262. // */
  1263. // nonceStr: string;
  1264. // /**
  1265. // * 统一下单接口返回的 prepay_id 参数值,提交格式如:prepay_id=***
  1266. // */
  1267. // package: string;
  1268. // /**
  1269. // * 签名算法,暂支持 MD5
  1270. // */
  1271. // signType: string;
  1272. // /**
  1273. // * 签名,具体签名方案参见[小程序支付接口文档](https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=7_7&index=3);
  1274. // */
  1275. // paySign: string;
  1276. // /**
  1277. // * 接口调用成功的回调函数
  1278. // */
  1279. // success: () => void;
  1280. // /**
  1281. // * 接口调用失败的回调函数
  1282. // */
  1283. // fail: () => void;
  1284. // /**
  1285. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1286. // */
  1287. // complete: () => void;
  1288. // }
  1289. // interface _requestObject {
  1290. // /**
  1291. // * 开发者服务器接口地址
  1292. // */
  1293. // url: string;
  1294. // /**
  1295. // * 请求的参数
  1296. // */
  1297. // data: any;
  1298. // /**
  1299. // * 设置请求的 header,header 中不能设置 Referer。
  1300. // */
  1301. // header: object;
  1302. // /**
  1303. // * (需大写)有效值:OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
  1304. // */
  1305. // method: string;
  1306. // /**
  1307. // * 如果设为json,会尝试对返回的数据做一次 JSON.parse
  1308. // */
  1309. // dataType: string;
  1310. // /**
  1311. // * 设置响应的数据类型。合法值:text、arraybuffer
  1312. // */
  1313. // responseType: string;
  1314. // /**
  1315. // * 收到开发者服务成功返回的回调函数
  1316. // */
  1317. // success: (result: _requestSuccessObject) => void;
  1318. // /**
  1319. // * 接口调用失败的回调函数
  1320. // */
  1321. // fail: () => void;
  1322. // /**
  1323. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1324. // */
  1325. // complete: () => void;
  1326. // }
  1327. // interface _requestSuccessObject {
  1328. // /**
  1329. // * 开发者服务器返回的数据
  1330. // */
  1331. // data: any;
  1332. // /**
  1333. // * 开发者服务器返回的 HTTP 状态码
  1334. // */
  1335. // statusCode: number;
  1336. // /**
  1337. // * 开发者服务器返回的 HTTP Response Header
  1338. // */
  1339. // header: object;
  1340. // }
  1341. // interface _removeTabBarBadgeObject {
  1342. // /**
  1343. // * tabBar的哪一项,从左边算起
  1344. // */
  1345. // index: number;
  1346. // /**
  1347. // * 接口调用成功的回调函数
  1348. // */
  1349. // success: () => void;
  1350. // /**
  1351. // * 接口调用失败的回调函数
  1352. // */
  1353. // fail: () => void;
  1354. // /**
  1355. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1356. // */
  1357. // complete: () => void;
  1358. // }
  1359. // interface _removeStorageObject {
  1360. // /**
  1361. // * 本地缓存中的指定的 key
  1362. // */
  1363. // key: string;
  1364. // /**
  1365. // * 接口调用的回调函数
  1366. // */
  1367. // success: () => void;
  1368. // /**
  1369. // * 接口调用失败的回调函数
  1370. // */
  1371. // fail: () => void;
  1372. // /**
  1373. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1374. // */
  1375. // complete: () => void;
  1376. // }
  1377. // interface _removeSavedFileObject {
  1378. // /**
  1379. // * 需要删除的文件路径
  1380. // */
  1381. // filePath: string;
  1382. // /**
  1383. // * 接口调用成功的回调函数
  1384. // */
  1385. // success: () => void;
  1386. // /**
  1387. // * 接口调用失败的回调函数
  1388. // */
  1389. // fail: () => void;
  1390. // /**
  1391. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1392. // */
  1393. // complete: () => void;
  1394. // }
  1395. // interface _redirectToObject {
  1396. // /**
  1397. // * 需要跳转的应用内非 tabBar 的页面的路径,路径后可以带参数。参数与路径之间使用`?`分隔,参数键与参数值用`=`相连,不同参数用`&`分隔;如 'path?key=value&key2=value2'
  1398. // */
  1399. // url: string;
  1400. // /**
  1401. // * 接口调用成功的回调函数
  1402. // */
  1403. // success: () => void;
  1404. // /**
  1405. // * 接口调用失败的回调函数
  1406. // */
  1407. // fail: () => void;
  1408. // /**
  1409. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1410. // */
  1411. // complete: () => void;
  1412. // }
  1413. // interface _readBLECharacteristicValueObject {
  1414. // /**
  1415. // * 蓝牙设备 id,参考 device 对象
  1416. // */
  1417. // deviceId: string;
  1418. // /**
  1419. // * 蓝牙特征值对应服务的 uuid
  1420. // */
  1421. // serviceId: string;
  1422. // /**
  1423. // * 蓝牙特征值的 uuid
  1424. // */
  1425. // characteristicId: string;
  1426. // /**
  1427. // * 成功则返回本机蓝牙适配器状态
  1428. // */
  1429. // success: (result: _readBLECharacteristicValueSuccessObject) => void;
  1430. // /**
  1431. // * 接口调用失败的回调函数
  1432. // */
  1433. // fail: () => void;
  1434. // /**
  1435. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1436. // */
  1437. // complete: () => void;
  1438. // }
  1439. // interface _readBLECharacteristicValueSuccessObject {
  1440. // /**
  1441. // * 错误码
  1442. // */
  1443. // errCode: number;
  1444. // /**
  1445. // * 成功:ok,错误:详细信息
  1446. // */
  1447. // errMsg: string;
  1448. // }
  1449. // interface _reLaunchObject {
  1450. // /**
  1451. // * 需要跳转的应用内页面路径 , 路径后可以带参数。参数与路径之间使用`?`分隔,参数键与参数值用`=`相连,不同参数用`&`分隔;如 'path?key=value&key2=value2',如果跳转的页面路径是 tabBar 页面则不能带参数
  1452. // */
  1453. // url: string;
  1454. // /**
  1455. // * 接口调用成功的回调函数
  1456. // */
  1457. // success: () => void;
  1458. // /**
  1459. // * 接口调用失败的回调函数
  1460. // */
  1461. // fail: () => void;
  1462. // /**
  1463. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1464. // */
  1465. // complete: () => void;
  1466. // }
  1467. // interface _previewImageObject {
  1468. // /**
  1469. // * 当前显示图片的链接,不填则默认为 urls 的第一张
  1470. // */
  1471. // current: string;
  1472. // /**
  1473. // * 需要预览的图片链接列表
  1474. // */
  1475. // urls: any;
  1476. // /**
  1477. // * 接口调用成功的回调函数
  1478. // */
  1479. // success: () => void;
  1480. // /**
  1481. // * 接口调用失败的回调函数
  1482. // */
  1483. // fail: () => void;
  1484. // /**
  1485. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1486. // */
  1487. // complete: () => void;
  1488. // }
  1489. // interface _playVoiceObject {
  1490. // /**
  1491. // * 需要播放的语音文件的文件路径
  1492. // */
  1493. // filePath: string;
  1494. // /**
  1495. // * 指定录音时长,到达指定的录音时长后会自动停止录音,单位:秒,默认值:60
  1496. // */
  1497. // duration: number;
  1498. // /**
  1499. // * 接口调用成功的回调函数
  1500. // */
  1501. // success: () => void;
  1502. // /**
  1503. // * 接口调用失败的回调函数
  1504. // */
  1505. // fail: () => void;
  1506. // /**
  1507. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1508. // */
  1509. // complete: () => void;
  1510. // }
  1511. // interface _playBackgroundAudioObject {
  1512. // /**
  1513. // * 音乐链接,目前支持的格式有 m4a, aac, mp3, wav
  1514. // */
  1515. // dataUrl: string;
  1516. // /**
  1517. // * 音乐标题
  1518. // */
  1519. // title: string;
  1520. // /**
  1521. // * 封面URL
  1522. // */
  1523. // coverImgUrl: string;
  1524. // /**
  1525. // * 接口调用成功的回调函数
  1526. // */
  1527. // success: () => void;
  1528. // /**
  1529. // * 接口调用失败的回调函数
  1530. // */
  1531. // fail: () => void;
  1532. // /**
  1533. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1534. // */
  1535. // complete: () => void;
  1536. // }
  1537. // interface _pageScrollToObject {
  1538. // /**
  1539. // * 滚动到页面的目标位置(单位px)
  1540. // */
  1541. // scrollTop: number;
  1542. // /**
  1543. // * 滚动动画的时长,默认300ms,单位 ms
  1544. // */
  1545. // duration: number;
  1546. // }
  1547. // interface _openSettingObject {
  1548. // /**
  1549. // * 接口调用成功的回调函数,返回内容详见返回参数说明。
  1550. // */
  1551. // success: (result: _openSettingSuccessObject) => void;
  1552. // /**
  1553. // * 接口调用失败的回调函数
  1554. // */
  1555. // fail: () => void;
  1556. // /**
  1557. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1558. // */
  1559. // complete: () => void;
  1560. // }
  1561. // interface _openSettingSuccessObject {
  1562. // /**
  1563. // * 用户授权结果,其中 key 为 scope 值,value 为 Bool 值,表示用户是否允许授权,详见 [scope 列表](./authorize-index.md#scope-列表)
  1564. // */
  1565. // authSetting: object;
  1566. // }
  1567. // interface _openLocationObject {
  1568. // /**
  1569. // * 纬度,范围为-90~90,负数表示南纬
  1570. // */
  1571. // latitude: any;
  1572. // /**
  1573. // * 经度,范围为-180~180,负数表示西经
  1574. // */
  1575. // longitude: any;
  1576. // /**
  1577. // * 缩放比例,范围5~18,默认为18
  1578. // */
  1579. // scale: any;
  1580. // /**
  1581. // * 位置名
  1582. // */
  1583. // name: string;
  1584. // /**
  1585. // * 地址的详细说明
  1586. // */
  1587. // address: string;
  1588. // /**
  1589. // * 接口调用成功的回调函数
  1590. // */
  1591. // success: () => void;
  1592. // /**
  1593. // * 接口调用失败的回调函数
  1594. // */
  1595. // fail: () => void;
  1596. // /**
  1597. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1598. // */
  1599. // complete: () => void;
  1600. // }
  1601. // interface _openDocumentObject {
  1602. // /**
  1603. // * 文件路径,可通过 downFile 获得
  1604. // */
  1605. // filePath: any;
  1606. // /**
  1607. // * 文件类型,指定文件类型打开文件,有效值 doc, xls, ppt, pdf, docx, xlsx, pptx
  1608. // */
  1609. // fileType: any;
  1610. // /**
  1611. // * 接口调用成功的回调函数
  1612. // */
  1613. // success: any;
  1614. // /**
  1615. // * 接口调用失败的回调函数
  1616. // */
  1617. // fail: any;
  1618. // /**
  1619. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1620. // */
  1621. // complete: any;
  1622. // }
  1623. // interface _openCardObject {
  1624. // /**
  1625. // * 需要打开的卡券列表,列表内参数详见[openCard 请求对象说明](#opencard-请求对象说明)
  1626. // */
  1627. // cardList: any;
  1628. // /**
  1629. // * 接口调用成功的回调函数
  1630. // */
  1631. // success: () => void;
  1632. // /**
  1633. // * 接口调用失败的回调函数
  1634. // */
  1635. // fail: () => void;
  1636. // /**
  1637. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1638. // */
  1639. // complete: () => void;
  1640. // }
  1641. // interface _openBluetoothAdapterObject {
  1642. // /**
  1643. // * 成功则返回成功初始化信息
  1644. // */
  1645. // success: () => void;
  1646. // /**
  1647. // * 接口调用失败的回调函数
  1648. // */
  1649. // fail: () => void;
  1650. // /**
  1651. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1652. // */
  1653. // complete: () => void;
  1654. // }
  1655. // interface _onWifiConnectedCallbackResult {
  1656. // /**
  1657. // * Wi-Fi 信息
  1658. // */
  1659. // wifi: object;
  1660. // }
  1661. // interface _onUserCaptureScreenCallbackResult {}
  1662. // interface _onSocketMessageCallbackResult {
  1663. // /**
  1664. // * 服务器返回的消息
  1665. // */
  1666. // data: any;
  1667. // }
  1668. // interface _onNetworkStatusChangeCallbackResult {
  1669. // /**
  1670. // * 当前是否有网络连接
  1671. // */
  1672. // isConnected: boolean;
  1673. // /**
  1674. // * 网络类型
  1675. // */
  1676. // networkType: string;
  1677. // }
  1678. // interface _onHCEMessageCallbackResult {
  1679. // /**
  1680. // * 消息类型
  1681. // */
  1682. // messageType: number;
  1683. // /**
  1684. // * 客户端接收到 NFC 设备的指令,此参数当且仅当 `messageType=1` 时有效
  1685. // */
  1686. // data: any;
  1687. // /**
  1688. // * 此参数当且仅当 `messageType=2` 时有效
  1689. // */
  1690. // reason: number;
  1691. // }
  1692. // interface _onGetWifiListCallbackResult {
  1693. // /**
  1694. // * Wi-Fi 列表数据
  1695. // */
  1696. // wifiList: any;
  1697. // }
  1698. // interface _onEvaluateWifiCallbackResult {
  1699. // /**
  1700. // * Wi-Fi 信息
  1701. // */
  1702. // wifi: object;
  1703. // }
  1704. // interface _onCompassChangeCallbackResult {
  1705. // /**
  1706. // * 面对的方向度数
  1707. // */
  1708. // direction: number;
  1709. // }
  1710. // interface _onBluetoothDeviceFoundCallbackResult {
  1711. // /**
  1712. // * 新搜索到的设备列表
  1713. // */
  1714. // devices: any;
  1715. // }
  1716. // interface _onBluetoothAdapterStateChangeCallbackResult {
  1717. // /**
  1718. // * 蓝牙适配器是否可用
  1719. // */
  1720. // available: boolean;
  1721. // /**
  1722. // * 蓝牙适配器是否处于搜索状态
  1723. // */
  1724. // discovering: boolean;
  1725. // }
  1726. // interface _onBeaconUpdateCallbackResult {
  1727. // /**
  1728. // * 当前搜寻到的所有 iBeacon 设备列表
  1729. // */
  1730. // beacons: any;
  1731. // }
  1732. // interface _onBeaconServiceChangeCallbackResult {
  1733. // /**
  1734. // * 服务目前是否可用
  1735. // */
  1736. // available: boolean;
  1737. // /**
  1738. // * 目前是否处于搜索状态
  1739. // */
  1740. // discovering: boolean;
  1741. // }
  1742. // interface _onBLEConnectionStateChangeCallbackResult {
  1743. // /**
  1744. // * 蓝牙设备 id,参考 device 对象
  1745. // */
  1746. // deviceId: string;
  1747. // /**
  1748. // * 连接目前的状态
  1749. // */
  1750. // connected: boolean;
  1751. // }
  1752. // interface _onBLECharacteristicValueChangeCallbackResult {
  1753. // /**
  1754. // * 蓝牙设备 id,参考 device 对象
  1755. // */
  1756. // deviceId: string;
  1757. // /**
  1758. // * 特征值所属服务 uuid
  1759. // */
  1760. // serviceId: string;
  1761. // /**
  1762. // * 特征值 uuid
  1763. // */
  1764. // characteristicId: string;
  1765. // /**
  1766. // * 特征值最新的值 **(注意:vConsole 无法打印出 ArrayBuffer 类型数据)**
  1767. // */
  1768. // value: any;
  1769. // }
  1770. // interface _onAccelerometerChangeCallbackResult {
  1771. // /**
  1772. // * X 轴
  1773. // */
  1774. // x: number;
  1775. // /**
  1776. // * Y 轴
  1777. // */
  1778. // y: number;
  1779. // /**
  1780. // * Z 轴
  1781. // */
  1782. // z: number;
  1783. // }
  1784. // interface _notifyBLECharacteristicValueChangeObject {
  1785. // /**
  1786. // * 蓝牙设备 id,参考 device 对象
  1787. // */
  1788. // deviceId: string;
  1789. // /**
  1790. // * 蓝牙特征值对应服务的 uuid
  1791. // */
  1792. // serviceId: string;
  1793. // /**
  1794. // * 蓝牙特征值的 uuid
  1795. // */
  1796. // characteristicId: string;
  1797. // /**
  1798. // * true: 启用 notify; false: 停用 notify
  1799. // */
  1800. // state: boolean;
  1801. // /**
  1802. // * 成功则返回本机蓝牙适配器状态
  1803. // */
  1804. // success: (result: _notifyBLECharacteristicValueChangeSuccessObject) => void;
  1805. // /**
  1806. // * 接口调用失败的回调函数
  1807. // */
  1808. // fail: () => void;
  1809. // /**
  1810. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1811. // */
  1812. // complete: () => void;
  1813. // }
  1814. // interface _notifyBLECharacteristicValueChangeSuccessObject {
  1815. // /**
  1816. // * 成功:ok,错误:详细信息
  1817. // */
  1818. // errMsg: string;
  1819. // }
  1820. // interface _navigateToMiniProgramObject {
  1821. // /**
  1822. // * 要打开的小程序 appId
  1823. // */
  1824. // appId: string;
  1825. // /**
  1826. // * 打开的页面路径,如果为空则打开首页
  1827. // */
  1828. // path: string;
  1829. // /**
  1830. // * 需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch()`,`App.onShow()` 中获取到这份数据。[详情](../framework/app-service/app.md)
  1831. // */
  1832. // extraData: object;
  1833. // /**
  1834. // * 要打开的小程序版本,有效值 develop(开发版),trial(体验版),release(正式版) ,仅在当前小程序为开发版或体验版时此参数有效;如果当前小程序是体验版或正式版,则打开的小程序必定是正式版。默认值 release
  1835. // */
  1836. // envVersion: string;
  1837. // /**
  1838. // * 接口调用成功的回调函数
  1839. // */
  1840. // success: (result: _navigateToMiniProgramSuccessObject) => void;
  1841. // /**
  1842. // * 接口调用失败的回调函数
  1843. // */
  1844. // fail: () => void;
  1845. // /**
  1846. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1847. // */
  1848. // complete: () => void;
  1849. // }
  1850. // interface _navigateToMiniProgramSuccessObject {
  1851. // /**
  1852. // * 调用结果
  1853. // */
  1854. // errMsg: string;
  1855. // }
  1856. // interface _navigateToObject {
  1857. // /**
  1858. // * 需要跳转的应用内非 tabBar 的页面的路径 , 路径后可以带参数。参数与路径之间使用`?`分隔,参数键与参数值用`=`相连,不同参数用`&`分隔;如 'path?key=value&key2=value2'
  1859. // */
  1860. // url: string;
  1861. // /**
  1862. // * 接口调用成功的回调函数
  1863. // */
  1864. // success: () => void;
  1865. // /**
  1866. // * 接口调用失败的回调函数
  1867. // */
  1868. // fail: () => void;
  1869. // /**
  1870. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1871. // */
  1872. // complete: () => void;
  1873. // }
  1874. // interface _navigateBackMiniProgramObject {
  1875. // /**
  1876. // * 需要返回给上一个小程序的数据,上一个小程序可在 `App.onShow()` 中获取到这份数据。[详情](../framework/app-service/app.md)
  1877. // */
  1878. // extraData: object;
  1879. // /**
  1880. // * 接口调用成功的回调函数
  1881. // */
  1882. // success: (result: _navigateBackMiniProgramSuccessObject) => void;
  1883. // /**
  1884. // * 接口调用失败的回调函数
  1885. // */
  1886. // fail: () => void;
  1887. // /**
  1888. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1889. // */
  1890. // complete: () => void;
  1891. // }
  1892. // interface _navigateBackMiniProgramSuccessObject {
  1893. // /**
  1894. // * 调用结果
  1895. // */
  1896. // errMsg: string;
  1897. // }
  1898. // interface _navigateBackObject {
  1899. // /**
  1900. // * 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
  1901. // */
  1902. // delta: number;
  1903. // }
  1904. // interface _makeVoIPCallObject {
  1905. // /**
  1906. // * 是否展示切换按钮以允许用户转换到后置摄像头
  1907. // */
  1908. // allowBackCamera: boolean;
  1909. // /**
  1910. // * 是否显示对端视频流
  1911. // */
  1912. // showOther: boolean;
  1913. // /**
  1914. // * 客服头像的图像链接
  1915. // */
  1916. // avatarUrl: string;
  1917. // /**
  1918. // * 用于区分业务上下文的透传值
  1919. // */
  1920. // context: string;
  1921. // /**
  1922. // * 返回用户选择的收货地址信息
  1923. // */
  1924. // success: () => void;
  1925. // /**
  1926. // * 接口调用失败的回调函数
  1927. // */
  1928. // fail: () => void;
  1929. // /**
  1930. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1931. // */
  1932. // complete: () => void;
  1933. // }
  1934. // interface _makePhoneCallObject {
  1935. // /**
  1936. // * 需要拨打的电话号码
  1937. // */
  1938. // phoneNumber: string;
  1939. // /**
  1940. // * 接口调用成功的回调
  1941. // */
  1942. // success: () => void;
  1943. // /**
  1944. // * 接口调用失败的回调函数
  1945. // */
  1946. // fail: () => void;
  1947. // /**
  1948. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1949. // */
  1950. // complete: () => void;
  1951. // }
  1952. // interface _loginObject {
  1953. // /**
  1954. // * 接口调用成功的回调函数
  1955. // */
  1956. // success: (result: _loginSuccessObject) => void;
  1957. // /**
  1958. // * 接口调用失败的回调函数
  1959. // */
  1960. // fail: () => void;
  1961. // /**
  1962. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1963. // */
  1964. // complete: () => void;
  1965. // }
  1966. // interface _loginSuccessObject {
  1967. // /**
  1968. // * 调用结果
  1969. // */
  1970. // errMsg: string;
  1971. // /**
  1972. // * 用户登录凭证(有效期五分钟)。开发者需要在开发者服务器后台调用 api,使用 code 换取 openid 和 session_key 等信息
  1973. // */
  1974. // code: string;
  1975. // }
  1976. // interface _hideTabBarRedDotObject {
  1977. // /**
  1978. // * tabBar的哪一项,从左边算起
  1979. // */
  1980. // index: number;
  1981. // /**
  1982. // * 接口调用成功的回调函数
  1983. // */
  1984. // success: () => void;
  1985. // /**
  1986. // * 接口调用失败的回调函数
  1987. // */
  1988. // fail: () => void;
  1989. // /**
  1990. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  1991. // */
  1992. // complete: () => void;
  1993. // }
  1994. // interface _hideTabBarObject {
  1995. // /**
  1996. // * 是否需要动画效果,默认无
  1997. // */
  1998. // aniamtion: boolean;
  1999. // /**
  2000. // * 接口调用成功的回调函数
  2001. // */
  2002. // success: () => void;
  2003. // /**
  2004. // * 接口调用失败的回调函数
  2005. // */
  2006. // fail: () => void;
  2007. // /**
  2008. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2009. // */
  2010. // complete: () => void;
  2011. // }
  2012. // interface _hideShareMenuObject {
  2013. // /**
  2014. // * 接口调用成功的回调函数
  2015. // */
  2016. // success: () => void;
  2017. // /**
  2018. // * 接口调用失败的回调函数
  2019. // */
  2020. // fail: () => void;
  2021. // /**
  2022. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2023. // */
  2024. // complete: () => void;
  2025. // }
  2026. // interface _getWifiListObject {
  2027. // /**
  2028. // * 接口调用成功的回调函数
  2029. // */
  2030. // success: () => void;
  2031. // /**
  2032. // * 接口调用失败的回调函数
  2033. // */
  2034. // fail: () => void;
  2035. // /**
  2036. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2037. // */
  2038. // complete: () => void;
  2039. // }
  2040. // interface _getWeRunDataObject {
  2041. // /**
  2042. // * 接口调用成功的回调函数
  2043. // */
  2044. // success: (result: _getWeRunDataSuccessObject) => void;
  2045. // /**
  2046. // * 接口调用失败的回调函数
  2047. // */
  2048. // fail: () => void;
  2049. // /**
  2050. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2051. // */
  2052. // complete: () => void;
  2053. // }
  2054. // interface _getWeRunDataSuccessObject {
  2055. // /**
  2056. // * 调用结果
  2057. // */
  2058. // errMsg: string;
  2059. // /**
  2060. // * 包括敏感数据在内的完整用户信息的加密数据,详细见[加密数据解密算法](./signature.md#加密数据解密算法)
  2061. // */
  2062. // encryptedData: string;
  2063. // /**
  2064. // * 加密算法的初始向量,详细见[加密数据解密算法](./signature.md#加密数据解密算法)
  2065. // */
  2066. // iv: string;
  2067. // }
  2068. // interface _getUserInfoObject {
  2069. // /**
  2070. // * 是否带上登录态信息
  2071. // */
  2072. // withCredentials: boolean;
  2073. // /**
  2074. // * 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。默认为en。
  2075. // */
  2076. // lang: string;
  2077. // /**
  2078. // * 接口调用成功的回调函数
  2079. // */
  2080. // success: (result: _getUserInfoSuccessObject) => void;
  2081. // /**
  2082. // * 接口调用失败的回调函数
  2083. // */
  2084. // fail: () => void;
  2085. // /**
  2086. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2087. // */
  2088. // complete: () => void;
  2089. // }
  2090. // interface _getUserInfoSuccessObject {
  2091. // /**
  2092. // * 用户信息对象,不包含 openid 等敏感信息
  2093. // */
  2094. // userInfo: object;
  2095. // /**
  2096. // * 不包括敏感信息的原始数据字符串,用于计算签名。
  2097. // */
  2098. // rawData: string;
  2099. // /**
  2100. // * 使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息,参考文档 [signature](./signature.md)。
  2101. // */
  2102. // signature: string;
  2103. // /**
  2104. // * 包括敏感数据在内的完整用户信息的加密数据,详细见[加密数据解密算法](./signature.md#加密数据解密算法)
  2105. // */
  2106. // encryptedData: string;
  2107. // /**
  2108. // * 加密算法的初始向量,详细见[加密数据解密算法](./signature.md#加密数据解密算法)
  2109. // */
  2110. // iv: string;
  2111. // }
  2112. // interface _getSystemInfoSyncReturnValue {
  2113. // /**
  2114. // * 手机品牌
  2115. // */
  2116. // brand: any;
  2117. // /**
  2118. // * 手机型号
  2119. // */
  2120. // model: any;
  2121. // /**
  2122. // * 设备像素比
  2123. // */
  2124. // pixelRatio: any;
  2125. // /**
  2126. // * 屏幕宽度
  2127. // */
  2128. // screenWidth: any;
  2129. // /**
  2130. // * 屏幕高度
  2131. // */
  2132. // screenHeight: any;
  2133. // /**
  2134. // * 可使用窗口宽度
  2135. // */
  2136. // windowWidth: any;
  2137. // /**
  2138. // * 可使用窗口高度
  2139. // */
  2140. // windowHeight: any;
  2141. // /**
  2142. // * 状态栏的高度
  2143. // */
  2144. // statusBarHeight: any;
  2145. // /**
  2146. // * 微信设置的语言
  2147. // */
  2148. // language: any;
  2149. // /**
  2150. // * 微信版本号
  2151. // */
  2152. // version: any;
  2153. // /**
  2154. // * 操作系统版本
  2155. // */
  2156. // system: any;
  2157. // /**
  2158. // * 客户端平台
  2159. // */
  2160. // platform: any;
  2161. // /**
  2162. // * 用户字体大小设置。以“我-设置-通用-字体大小”中的设置为准,单位:px
  2163. // */
  2164. // fontSizeSetting: any;
  2165. // /**
  2166. // * 客户端基础库版本
  2167. // */
  2168. // SDKVersion: any;
  2169. // }
  2170. // interface _getSystemInfoObject {
  2171. // /**
  2172. // * 接口调用成功的回调
  2173. // */
  2174. // success: (result: _getSystemInfoSuccessObject) => void;
  2175. // /**
  2176. // * 接口调用失败的回调函数
  2177. // */
  2178. // fail: () => void;
  2179. // /**
  2180. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2181. // */
  2182. // complete: () => void;
  2183. // }
  2184. // interface _getSystemInfoSuccessObject {
  2185. // /**
  2186. // * 手机品牌
  2187. // */
  2188. // brand: any;
  2189. // /**
  2190. // * 手机型号
  2191. // */
  2192. // model: any;
  2193. // /**
  2194. // * 设备像素比
  2195. // */
  2196. // pixelRatio: any;
  2197. // /**
  2198. // * 屏幕宽度
  2199. // */
  2200. // screenWidth: any;
  2201. // /**
  2202. // * 屏幕高度
  2203. // */
  2204. // screenHeight: any;
  2205. // /**
  2206. // * 可使用窗口宽度
  2207. // */
  2208. // windowWidth: any;
  2209. // /**
  2210. // * 可使用窗口高度
  2211. // */
  2212. // windowHeight: any;
  2213. // /**
  2214. // * 状态栏的高度
  2215. // */
  2216. // statusBarHeight: any;
  2217. // /**
  2218. // * 微信设置的语言
  2219. // */
  2220. // language: any;
  2221. // /**
  2222. // * 微信版本号
  2223. // */
  2224. // version: any;
  2225. // /**
  2226. // * 操作系统版本
  2227. // */
  2228. // system: any;
  2229. // /**
  2230. // * 客户端平台
  2231. // */
  2232. // platform: any;
  2233. // /**
  2234. // * 用户字体大小设置。以“我-设置-通用-字体大小”中的设置为准,单位:px
  2235. // */
  2236. // fontSizeSetting: any;
  2237. // /**
  2238. // * 客户端基础库版本
  2239. // */
  2240. // SDKVersion: any;
  2241. // }
  2242. // interface _getStorageInfoObject {
  2243. // /**
  2244. // * 接口调用的回调函数,详见返回参数说明
  2245. // */
  2246. // success: (result: _getStorageInfoSuccessObject) => void;
  2247. // /**
  2248. // * 接口调用失败的回调函数
  2249. // */
  2250. // fail: () => void;
  2251. // /**
  2252. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2253. // */
  2254. // complete: () => void;
  2255. // }
  2256. // interface _getStorageInfoSuccessObject {
  2257. // /**
  2258. // * 当前storage中所有的key
  2259. // */
  2260. // keys: any;
  2261. // /**
  2262. // * 当前占用的空间大小, 单位kb
  2263. // */
  2264. // currentSize: number;
  2265. // /**
  2266. // * 限制的空间大小,单位kb
  2267. // */
  2268. // limitSize: number;
  2269. // }
  2270. // interface _getStorageObject {
  2271. // /**
  2272. // * 本地缓存中的指定的 key
  2273. // */
  2274. // key: string;
  2275. // /**
  2276. // * 接口调用的回调函数,res = {data: key对应的内容}
  2277. // */
  2278. // success: (result: _getStorageSuccessObject) => void;
  2279. // /**
  2280. // * 接口调用失败的回调函数
  2281. // */
  2282. // fail: () => void;
  2283. // /**
  2284. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2285. // */
  2286. // complete: () => void;
  2287. // }
  2288. // interface _getStorageSuccessObject {
  2289. // /**
  2290. // * key对应的内容
  2291. // */
  2292. // data: string;
  2293. // }
  2294. // interface _getShareInfoObject {
  2295. // /**
  2296. // * shareTicket
  2297. // */
  2298. // shareTicket: string;
  2299. // /**
  2300. // * 接口调用成功的回调函数
  2301. // */
  2302. // success: (result: _getShareInfoSuccessObject) => void;
  2303. // /**
  2304. // * 接口调用失败的回调函数
  2305. // */
  2306. // fail: () => void;
  2307. // /**
  2308. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2309. // */
  2310. // complete: () => void;
  2311. // }
  2312. // interface _getShareInfoSuccessObject {
  2313. // /**
  2314. // * 错误信息
  2315. // */
  2316. // errMsg: string;
  2317. // /**
  2318. // * 包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](./signature.md#加密数据解密算法)
  2319. // */
  2320. // encryptedData: string;
  2321. // /**
  2322. // * 加密算法的初始向量,详细见[加密数据解密算法](./signature.md#加密数据解密算法)
  2323. // */
  2324. // iv: string;
  2325. // }
  2326. // interface _getSettingObject {
  2327. // /**
  2328. // * 接口调用成功的回调函数,返回内容详见返回参数说明。
  2329. // */
  2330. // success: (result: _getSettingSuccessObject) => void;
  2331. // /**
  2332. // * 接口调用失败的回调函数
  2333. // */
  2334. // fail: () => void;
  2335. // /**
  2336. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2337. // */
  2338. // complete: () => void;
  2339. // }
  2340. // interface _getSettingSuccessObject {
  2341. // /**
  2342. // * 用户授权结果,其中 key 为 scope 值,value 为 Bool 值,表示用户是否允许授权,详见 [scope 列表](./authorize-index.md#scope-列表)
  2343. // */
  2344. // authSetting: object;
  2345. // }
  2346. // interface _getScreenBrightnessObject {
  2347. // /**
  2348. // * 接口调用成功
  2349. // */
  2350. // success: (result: _getScreenBrightnessSuccessObject) => void;
  2351. // /**
  2352. // * 接口调用失败的回调函数
  2353. // */
  2354. // fail: () => void;
  2355. // /**
  2356. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2357. // */
  2358. // complete: () => void;
  2359. // }
  2360. // interface _getScreenBrightnessSuccessObject {
  2361. // /**
  2362. // * 屏幕亮度值,范围 0~1,0 最暗,1 最亮
  2363. // */
  2364. // value: number;
  2365. // }
  2366. // interface _getSavedFileListObject {
  2367. // /**
  2368. // * 接口调用成功的回调函数,返回结果见`success返回参数说明`
  2369. // */
  2370. // success: (result: _getSavedFileListSuccessObject) => void;
  2371. // /**
  2372. // * 接口调用失败的回调函数
  2373. // */
  2374. // fail: () => void;
  2375. // /**
  2376. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2377. // */
  2378. // complete: () => void;
  2379. // }
  2380. // interface _getSavedFileListSuccessObject {
  2381. // /**
  2382. // * 接口调用结果
  2383. // */
  2384. // errMsg: string;
  2385. // /**
  2386. // * 文件列表
  2387. // */
  2388. // fileList: any;
  2389. // }
  2390. // interface _getSavedFileInfoObject {
  2391. // /**
  2392. // * 文件路径
  2393. // */
  2394. // filePath: string;
  2395. // /**
  2396. // * 接口调用成功的回调函数,返回结果见`success返回参数说明`
  2397. // */
  2398. // success: (result: _getSavedFileInfoSuccessObject) => void;
  2399. // /**
  2400. // * 接口调用失败的回调函数
  2401. // */
  2402. // fail: () => void;
  2403. // /**
  2404. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2405. // */
  2406. // complete: () => void;
  2407. // }
  2408. // interface _getSavedFileInfoSuccessObject {
  2409. // /**
  2410. // * 接口调用结果
  2411. // */
  2412. // errMsg: string;
  2413. // /**
  2414. // * 文件大小,单位B
  2415. // */
  2416. // size: number;
  2417. // /**
  2418. // * 文件保存时的时间戳,从1970/01/01 08:00:00 到该时刻的秒数
  2419. // */
  2420. // createTime: number;
  2421. // }
  2422. // interface _getOpenDeviceIdObject {
  2423. // /**
  2424. // * 接口调用成功的回调函数
  2425. // */
  2426. // success: (result: _getOpenDeviceIdSuccessObject) => void;
  2427. // /**
  2428. // * 接口调用失败的回调函数
  2429. // */
  2430. // fail: () => void;
  2431. // /**
  2432. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2433. // */
  2434. // complete: () => void;
  2435. // }
  2436. // interface _getOpenDeviceIdSuccessObject {
  2437. // /**
  2438. // * 接口调用结果
  2439. // */
  2440. // errMsg: string;
  2441. // /**
  2442. // * 包括敏感数据在内的完整用户信息的加密数据,详细见[加密数据解密算法](./signature.md#加密数据解密算法)
  2443. // */
  2444. // encryptedData: string;
  2445. // /**
  2446. // * 加密算法的初始向量,详细见[加密数据解密算法](./signature.md#加密数据解密算法)
  2447. // */
  2448. // iv: string;
  2449. // }
  2450. // interface _getNetworkTypeObject {
  2451. // /**
  2452. // * 接口调用成功,返回网络类型 networkType
  2453. // */
  2454. // success: (result: _getNetworkTypeSuccessObject) => void;
  2455. // /**
  2456. // * 接口调用失败的回调函数
  2457. // */
  2458. // fail: () => void;
  2459. // /**
  2460. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2461. // */
  2462. // complete: () => void;
  2463. // }
  2464. // interface _getNetworkTypeSuccessObject {
  2465. // /**
  2466. // * 网络类型
  2467. // */
  2468. // networkType: any;
  2469. // }
  2470. // interface _getLocationObject {
  2471. // /**
  2472. // * 默认为 wgs84 返回 gps 坐标,gcj02 返回可用于`wx.openLocation`的坐标
  2473. // */
  2474. // type: string;
  2475. // /**
  2476. // * 传入 true 会返回高度信息,由于获取高度需要较高精确度,会减慢接口返回速度
  2477. // */
  2478. // altitude: boolean;
  2479. // /**
  2480. // * 接口调用成功的回调函数,返回内容详见返回参数说明。
  2481. // */
  2482. // success: (result: _getLocationSuccessObject) => void;
  2483. // /**
  2484. // * 接口调用失败的回调函数
  2485. // */
  2486. // fail: () => void;
  2487. // /**
  2488. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2489. // */
  2490. // complete: () => void;
  2491. // }
  2492. // interface _getLocationSuccessObject {
  2493. // /**
  2494. // * 纬度,浮点数,范围为-90~90,负数表示南纬
  2495. // */
  2496. // latitude: any;
  2497. // /**
  2498. // * 经度,浮点数,范围为-180~180,负数表示西经
  2499. // */
  2500. // longitude: any;
  2501. // /**
  2502. // * 速度,浮点数,单位m/s
  2503. // */
  2504. // speed: any;
  2505. // /**
  2506. // * 位置的精确度
  2507. // */
  2508. // accuracy: any;
  2509. // /**
  2510. // * 高度,单位 m
  2511. // */
  2512. // altitude: any;
  2513. // /**
  2514. // * 垂直精度,单位 m(Android 无法获取,返回 0)
  2515. // */
  2516. // verticalAccuracy: any;
  2517. // /**
  2518. // * 水平精度,单位 m
  2519. // */
  2520. // horizontalAccuracy: any;
  2521. // }
  2522. // interface _getImageInfoObject {
  2523. // /**
  2524. // * 图片的路径,可以是相对路径,临时文件路径,存储文件路径,网络图片路径
  2525. // */
  2526. // src: string;
  2527. // /**
  2528. // * 接口调用成功的回调函数
  2529. // */
  2530. // success: (result: _getImageInfoSuccessObject) => void;
  2531. // /**
  2532. // * 接口调用失败的回调函数
  2533. // */
  2534. // fail: () => void;
  2535. // /**
  2536. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2537. // */
  2538. // complete: () => void;
  2539. // }
  2540. // interface _getImageInfoSuccessObject {
  2541. // /**
  2542. // * 图片宽度,单位px
  2543. // */
  2544. // width: number;
  2545. // /**
  2546. // * 图片高度,单位px
  2547. // */
  2548. // height: number;
  2549. // /**
  2550. // * 返回图片的本地路径
  2551. // */
  2552. // path: string;
  2553. // }
  2554. // interface _getHCEStateObject {
  2555. // /**
  2556. // * 接口调用成功的回调函数
  2557. // */
  2558. // success: (result: _getHCEStateSuccessObject) => void;
  2559. // /**
  2560. // * 接口调用失败的回调函数
  2561. // */
  2562. // fail: () => void;
  2563. // /**
  2564. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2565. // */
  2566. // complete: () => void;
  2567. // }
  2568. // interface _getHCEStateSuccessObject {
  2569. // /**
  2570. // * 错误信息
  2571. // */
  2572. // errMsg: string;
  2573. // /**
  2574. // * 错误码
  2575. // */
  2576. // errCode: number;
  2577. // }
  2578. // interface _getFileInfoObject {
  2579. // /**
  2580. // * 本地文件路径
  2581. // */
  2582. // filePath: string;
  2583. // /**
  2584. // * 计算文件摘要的算法,默认值 md5,有效值:md5,sha1
  2585. // */
  2586. // digestAlgorithm: string;
  2587. // /**
  2588. // * 接口调用成功的回调函数
  2589. // */
  2590. // success: (result: _getFileInfoSuccessObject) => void;
  2591. // /**
  2592. // * 接口调用失败的回调函数
  2593. // */
  2594. // fail: () => void;
  2595. // /**
  2596. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2597. // */
  2598. // complete: () => void;
  2599. // }
  2600. // interface _getFileInfoSuccessObject {
  2601. // /**
  2602. // * 文件大小,单位:B
  2603. // */
  2604. // size: number;
  2605. // /**
  2606. // * 按照传入的 digestAlgorithm 计算得出的的文件摘要
  2607. // */
  2608. // digest: string;
  2609. // /**
  2610. // * 调用结果
  2611. // */
  2612. // errMsg: string;
  2613. // }
  2614. // interface _getExtConfigSyncReturnValue {
  2615. // /**
  2616. // * 第三方平台自定义的数据
  2617. // */
  2618. // extConfig: object;
  2619. // }
  2620. // interface _getExtConfigObject {
  2621. // /**
  2622. // * 返回第三方平台自定义的数据
  2623. // */
  2624. // success: (result: _getExtConfigSuccessObject) => void;
  2625. // /**
  2626. // * 接口调用失败的回调函数
  2627. // */
  2628. // fail: () => void;
  2629. // /**
  2630. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2631. // */
  2632. // complete: () => void;
  2633. // }
  2634. // interface _getExtConfigSuccessObject {
  2635. // /**
  2636. // * 调用结果
  2637. // */
  2638. // errMsg: string;
  2639. // /**
  2640. // * 第三方平台自定义的数据
  2641. // */
  2642. // extConfig: object;
  2643. // }
  2644. // interface _getConnectedWifiObject {
  2645. // /**
  2646. // * 接口调用成功的回调函数
  2647. // */
  2648. // success: (result: _getConnectedWifiSuccessObject) => void;
  2649. // /**
  2650. // * 接口调用失败的回调函数
  2651. // */
  2652. // fail: () => void;
  2653. // /**
  2654. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2655. // */
  2656. // complete: () => void;
  2657. // }
  2658. // interface _getConnectedWifiSuccessObject {
  2659. // /**
  2660. // * Wi-Fi 信息
  2661. // */
  2662. // wifi: object;
  2663. // }
  2664. // interface _getConnectedBluetoothDevicesObject {
  2665. // /**
  2666. // * 蓝牙设备主 service 的 uuid 列表
  2667. // */
  2668. // services: any;
  2669. // /**
  2670. // * 成功则返回本机蓝牙适配器状态
  2671. // */
  2672. // success: (result: _getConnectedBluetoothDevicesSuccessObject) => void;
  2673. // /**
  2674. // * 接口调用失败的回调函数
  2675. // */
  2676. // fail: () => void;
  2677. // /**
  2678. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2679. // */
  2680. // complete: () => void;
  2681. // }
  2682. // interface _getConnectedBluetoothDevicesSuccessObject {
  2683. // /**
  2684. // * 搜索到的设备列表
  2685. // */
  2686. // devices: any;
  2687. // /**
  2688. // * 成功:ok,错误:详细信息
  2689. // */
  2690. // errMsg: string;
  2691. // }
  2692. // interface _getClipboardDataObject {
  2693. // /**
  2694. // * 接口调用成功的回调函数
  2695. // */
  2696. // success: (result: _getClipboardDataSuccessObject) => void;
  2697. // /**
  2698. // * 接口调用失败的回调函数
  2699. // */
  2700. // fail: () => void;
  2701. // /**
  2702. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2703. // */
  2704. // complete: () => void;
  2705. // }
  2706. // interface _getClipboardDataSuccessObject {
  2707. // /**
  2708. // * 剪贴板的内容
  2709. // */
  2710. // data: string;
  2711. // }
  2712. // interface _getBluetoothDevicesObject {
  2713. // /**
  2714. // * 成功则返回本机蓝牙适配器状态
  2715. // */
  2716. // success: (result: _getBluetoothDevicesSuccessObject) => void;
  2717. // /**
  2718. // * 接口调用失败的回调函数
  2719. // */
  2720. // fail: () => void;
  2721. // /**
  2722. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2723. // */
  2724. // complete: () => void;
  2725. // }
  2726. // interface _getBluetoothDevicesSuccessObject {
  2727. // /**
  2728. // * uuid 对应的的已连接设备列表
  2729. // */
  2730. // devices: any;
  2731. // /**
  2732. // * 成功:ok,错误:详细信息
  2733. // */
  2734. // errMsg: string;
  2735. // }
  2736. // interface _getBluetoothAdapterStateObject {
  2737. // /**
  2738. // * 成功则返回本机蓝牙适配器状态
  2739. // */
  2740. // success: (result: _getBluetoothAdapterStateSuccessObject) => void;
  2741. // /**
  2742. // * 接口调用失败的回调函数
  2743. // */
  2744. // fail: () => void;
  2745. // /**
  2746. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2747. // */
  2748. // complete: () => void;
  2749. // }
  2750. // interface _getBluetoothAdapterStateSuccessObject {
  2751. // /**
  2752. // * 是否正在搜索设备
  2753. // */
  2754. // discovering: boolean;
  2755. // /**
  2756. // * 蓝牙适配器是否可用
  2757. // */
  2758. // available: boolean;
  2759. // /**
  2760. // * 成功:ok,错误:详细信息
  2761. // */
  2762. // errMsg: string;
  2763. // }
  2764. // interface _getBeaconsObject {
  2765. // /**
  2766. // * 接口调用成功的回调函数
  2767. // */
  2768. // success: (result: _getBeaconsSuccessObject) => void;
  2769. // /**
  2770. // * 接口调用失败的回调函数
  2771. // */
  2772. // fail: () => void;
  2773. // /**
  2774. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2775. // */
  2776. // complete: () => void;
  2777. // }
  2778. // interface _getBeaconsSuccessObject {
  2779. // /**
  2780. // * iBeacon 设备列表
  2781. // */
  2782. // beacons: any;
  2783. // /**
  2784. // * 调用结果
  2785. // */
  2786. // errMsg: string;
  2787. // }
  2788. // interface _getBackgroundAudioPlayerStateObject {
  2789. // /**
  2790. // * 接口调用成功的回调函数
  2791. // */
  2792. // success: (result: _getBackgroundAudioPlayerStateSuccessObject) => void;
  2793. // /**
  2794. // * 接口调用失败的回调函数
  2795. // */
  2796. // fail: () => void;
  2797. // /**
  2798. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2799. // */
  2800. // complete: () => void;
  2801. // }
  2802. // interface _getBackgroundAudioPlayerStateSuccessObject {
  2803. // /**
  2804. // * 选定音频的长度(单位:s),只有在当前有音乐播放时返回
  2805. // */
  2806. // duration: any;
  2807. // /**
  2808. // * 选定音频的播放位置(单位:s),只有在当前有音乐播放时返回
  2809. // */
  2810. // currentPosition: any;
  2811. // /**
  2812. // * 播放状态(2:没有音乐在播放,1:播放中,0:暂停中)
  2813. // */
  2814. // status: any;
  2815. // /**
  2816. // * 音频的下载进度(整数,80 代表 80%),只有在当前有音乐播放时返回
  2817. // */
  2818. // downloadPercent: any;
  2819. // /**
  2820. // * 歌曲数据链接,只有在当前有音乐播放时返回
  2821. // */
  2822. // dataUrl: any;
  2823. // }
  2824. // interface _getBackgroundAudioManagerReturnValue {
  2825. // /**
  2826. // * 当前音频的长度(单位:s),只有在当前有合法的 src 时返回
  2827. // */
  2828. // duration: number;
  2829. // /**
  2830. // * 当前音频的播放位置(单位:s),只有在当前有合法的 src 时返回
  2831. // */
  2832. // currentTime: number;
  2833. // /**
  2834. // * 当前是是否暂停或停止状态,true 表示暂停或停止,false 表示正在播放
  2835. // */
  2836. // paused: boolean;
  2837. // /**
  2838. // * 音频的数据源,默认为空字符串,**当设置了新的 src 时,会自动开始播放** ,目前支持的格式有 m4a, aac, mp3, wav
  2839. // */
  2840. // src: string;
  2841. // /**
  2842. // * 音频开始播放的位置(单位:s)
  2843. // */
  2844. // startTime: number;
  2845. // /**
  2846. // * 音频缓冲的时间点,仅保证当前播放时间点到此时间点内容已缓冲。
  2847. // */
  2848. // buffered: number;
  2849. // /**
  2850. // * 音频标题,用于做原生音频播放器音频标题。原生音频播放器中的分享功能,分享出去的卡片标题,也将使用该值。
  2851. // */
  2852. // title: string;
  2853. // /**
  2854. // * 专辑名,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值。
  2855. // */
  2856. // epname: string;
  2857. // /**
  2858. // * 歌手名,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值。
  2859. // */
  2860. // singer: string;
  2861. // /**
  2862. // * 封面图url,用于做原生音频播放器背景图。原生音频播放器中的分享功能,分享出去的卡片配图及背景也将使用该图。
  2863. // */
  2864. // coverImgUrl: string;
  2865. // /**
  2866. // * 页面链接,原生音频播放器中的分享功能,分享出去的卡片简介,也将使用该值。
  2867. // */
  2868. // webUrl: string;
  2869. // /**
  2870. // * 播放
  2871. // */
  2872. // play: () => void;
  2873. // /**
  2874. // * 暂停
  2875. // */
  2876. // pause: () => void;
  2877. // /**
  2878. // * 停止
  2879. // */
  2880. // stop: () => void;
  2881. // /**
  2882. // * 跳转到指定位置,单位 s
  2883. // */
  2884. // seek: () => void;
  2885. // /**
  2886. // * 背景音频进入可以播放状态,但不保证后面可以流畅播放
  2887. // */
  2888. // onCanplay: () => void;
  2889. // /**
  2890. // * 背景音频播放事件
  2891. // */
  2892. // onPlay: () => void;
  2893. // /**
  2894. // * 背景音频暂停事件
  2895. // */
  2896. // onPause: () => void;
  2897. // /**
  2898. // * 背景音频停止事件
  2899. // */
  2900. // onStop: () => void;
  2901. // /**
  2902. // * 背景音频自然播放结束事件
  2903. // */
  2904. // onEnded: () => void;
  2905. // /**
  2906. // * 背景音频播放进度更新事件
  2907. // */
  2908. // onTimeUpdate: () => void;
  2909. // /**
  2910. // * 用户在系统音乐播放面板点击上一曲事件(iOS only)
  2911. // */
  2912. // onPrev: () => void;
  2913. // /**
  2914. // * 用户在系统音乐播放面板点击下一曲事件(iOS only)
  2915. // */
  2916. // onNext: () => void;
  2917. // /**
  2918. // * 背景音频播放错误事件
  2919. // */
  2920. // onError: () => void;
  2921. // /**
  2922. // * 音频加载中事件,当音频因为数据不足,需要停下来加载时会触发
  2923. // */
  2924. // onWaiting: () => void;
  2925. // }
  2926. // interface _getBLEDeviceServicesObject {
  2927. // /**
  2928. // * 蓝牙设备 id,参考 getDevices 接口
  2929. // */
  2930. // deviceId: string;
  2931. // /**
  2932. // * 成功则返回本机蓝牙适配器状态
  2933. // */
  2934. // success: (result: _getBLEDeviceServicesSuccessObject) => void;
  2935. // /**
  2936. // * 接口调用失败的回调函数
  2937. // */
  2938. // fail: () => void;
  2939. // /**
  2940. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2941. // */
  2942. // complete: () => void;
  2943. // }
  2944. // interface _getBLEDeviceServicesSuccessObject {
  2945. // /**
  2946. // * 设备服务列表
  2947. // */
  2948. // services: any;
  2949. // /**
  2950. // * 成功:ok,错误:详细信息
  2951. // */
  2952. // errMsg: string;
  2953. // }
  2954. // interface _getBLEDeviceCharacteristicsObject {
  2955. // /**
  2956. // * 蓝牙设备 id,参考 device 对象
  2957. // */
  2958. // deviceId: string;
  2959. // /**
  2960. // * 蓝牙服务 uuid
  2961. // */
  2962. // serviceId: string;
  2963. // /**
  2964. // * 成功则返回本机蓝牙适配器状态
  2965. // */
  2966. // success: (result: _getBLEDeviceCharacteristicsSuccessObject) => void;
  2967. // /**
  2968. // * 接口调用失败的回调函数
  2969. // */
  2970. // fail: () => void;
  2971. // /**
  2972. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  2973. // */
  2974. // complete: () => void;
  2975. // }
  2976. // interface _getBLEDeviceCharacteristicsSuccessObject {
  2977. // /**
  2978. // * 设备特征值列表
  2979. // */
  2980. // characteristics: any;
  2981. // /**
  2982. // * 成功:ok,错误:详细信息
  2983. // */
  2984. // errMsg: string;
  2985. // }
  2986. // interface _downloadFileObject {
  2987. // /**
  2988. // * undefined
  2989. // */
  2990. // url: string;
  2991. // /**
  2992. // * undefined
  2993. // */
  2994. // header: object;
  2995. // /**
  2996. // * undefined
  2997. // */
  2998. // success: (result: _downloadFileSuccessObject) => void;
  2999. // /**
  3000. // * undefined
  3001. // */
  3002. // fail: () => void;
  3003. // /**
  3004. // * undefined
  3005. // */
  3006. // complete: () => void;
  3007. // }
  3008. // interface _downloadFileSuccessObject {
  3009. // /**
  3010. // * 临时文件路径,下载后的文件会存储到一个临时文件
  3011. // */
  3012. // tempFilePath: string;
  3013. // /**
  3014. // * 开发者服务器返回的 HTTP 状态码
  3015. // */
  3016. // statusCode: number;
  3017. // }
  3018. // interface _createBLEConnectionObject {
  3019. // /**
  3020. // * 蓝牙设备 id,参考 getDevices 接口
  3021. // */
  3022. // deviceId: string;
  3023. // /**
  3024. // * 成功则返回本机蓝牙适配器状态
  3025. // */
  3026. // success: (result: _createBLEConnectionSuccessObject) => void;
  3027. // /**
  3028. // * 接口调用失败的回调函数
  3029. // */
  3030. // fail: () => void;
  3031. // /**
  3032. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3033. // */
  3034. // complete: () => void;
  3035. // }
  3036. // interface _createBLEConnectionSuccessObject {
  3037. // /**
  3038. // * 成功:ok,错误:详细信息
  3039. // */
  3040. // errMsg: string;
  3041. // }
  3042. // interface _createAnimationObject {
  3043. // /**
  3044. // * 动画持续时间,单位ms
  3045. // */
  3046. // duration: any;
  3047. // /**
  3048. // * 定义动画的效果
  3049. // */
  3050. // timingFunction: string;
  3051. // /**
  3052. // * 动画延迟时间,单位 ms
  3053. // */
  3054. // delay: any;
  3055. // /**
  3056. // * 设置transform-origin
  3057. // */
  3058. // transformOrigin: string;
  3059. // }
  3060. // interface _connectWifiObject {
  3061. // /**
  3062. // * Wi-Fi 设备ssid
  3063. // */
  3064. // SSID: string;
  3065. // /**
  3066. // * Wi-Fi 设备bssid
  3067. // */
  3068. // BSSID: string;
  3069. // /**
  3070. // * Wi-Fi 设备密码
  3071. // */
  3072. // password: string;
  3073. // /**
  3074. // * 接口调用成功的回调函数
  3075. // */
  3076. // success: () => void;
  3077. // /**
  3078. // * 接口调用失败的回调函数
  3079. // */
  3080. // fail: () => void;
  3081. // /**
  3082. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3083. // */
  3084. // complete: () => void;
  3085. // }
  3086. // interface _connectSocketObject {
  3087. // /**
  3088. // * 开发者服务器接口地址,必须是 wss 协议,且域名必须是后台配置的合法域名
  3089. // */
  3090. // url: string;
  3091. // /**
  3092. // * HTTP Header , header 中不能设置 Referer
  3093. // */
  3094. // header: object;
  3095. // /**
  3096. // * 默认是GET,有效值:OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
  3097. // */
  3098. // method: string;
  3099. // /**
  3100. // * 子协议数组
  3101. // */
  3102. // protocols: any;
  3103. // /**
  3104. // * 接口调用成功的回调函数
  3105. // */
  3106. // success: () => void;
  3107. // /**
  3108. // * 接口调用失败的回调函数
  3109. // */
  3110. // fail: () => void;
  3111. // /**
  3112. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3113. // */
  3114. // complete: () => void;
  3115. // }
  3116. // interface _closeSocketObject {
  3117. // /**
  3118. // * 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。如果这个参数没有被指定,默认的取值是1000 (表示正常连接关闭)
  3119. // */
  3120. // code: number;
  3121. // /**
  3122. // * 一个可读的字符串,表示连接被关闭的原因。这个字符串必须是不长于123字节的UTF-8 文本(不是字符)
  3123. // */
  3124. // reason: string;
  3125. // /**
  3126. // * 接口调用成功的回调函数
  3127. // */
  3128. // success: () => void;
  3129. // /**
  3130. // * 接口调用失败的回调函数
  3131. // */
  3132. // fail: () => void;
  3133. // /**
  3134. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3135. // */
  3136. // complete: () => void;
  3137. // }
  3138. // interface _closeBluetoothAdapterObject {
  3139. // /**
  3140. // * 成功则返回成功关闭模块信息
  3141. // */
  3142. // success: () => void;
  3143. // /**
  3144. // * 接口调用失败的回调函数
  3145. // */
  3146. // fail: () => void;
  3147. // /**
  3148. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3149. // */
  3150. // complete: () => void;
  3151. // }
  3152. // interface _closeBLEConnectionObject {
  3153. // /**
  3154. // * 蓝牙设备 id,参考 getDevices 接口
  3155. // */
  3156. // deviceId: string;
  3157. // /**
  3158. // * 成功则返回本机蓝牙适配器状态
  3159. // */
  3160. // success: (result: _closeBLEConnectionSuccessObject) => void;
  3161. // /**
  3162. // * 接口调用失败的回调函数
  3163. // */
  3164. // fail: () => void;
  3165. // /**
  3166. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3167. // */
  3168. // complete: () => void;
  3169. // }
  3170. // interface _closeBLEConnectionSuccessObject {
  3171. // /**
  3172. // * 成功:ok,错误:详细信息
  3173. // */
  3174. // errMsg: string;
  3175. // }
  3176. // interface _chooseVideoObject {
  3177. // /**
  3178. // * album 从相册选视频,camera 使用相机拍摄,默认为:['album', 'camera']
  3179. // */
  3180. // sourceType: any;
  3181. // /**
  3182. // * 是否压缩所选的视频源文件,默认值为true,需要压缩
  3183. // */
  3184. // compressed: any;
  3185. // /**
  3186. // * 拍摄视频最长拍摄时间,单位秒。最长支持 60 秒
  3187. // */
  3188. // maxDuration: number;
  3189. // /**
  3190. // * 接口调用成功,返回视频文件的临时文件路径,详见返回参数说明
  3191. // */
  3192. // success: (result: _chooseVideoSuccessObject) => void;
  3193. // /**
  3194. // * 接口调用失败的回调函数
  3195. // */
  3196. // fail: () => void;
  3197. // /**
  3198. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3199. // */
  3200. // complete: () => void;
  3201. // }
  3202. // interface _chooseVideoSuccessObject {
  3203. // /**
  3204. // * 选定视频的临时文件路径
  3205. // */
  3206. // tempFilePath: any;
  3207. // /**
  3208. // * 选定视频的时间长度
  3209. // */
  3210. // duration: any;
  3211. // /**
  3212. // * 选定视频的数据量大小
  3213. // */
  3214. // size: any;
  3215. // /**
  3216. // * 返回选定视频的长
  3217. // */
  3218. // height: any;
  3219. // /**
  3220. // * 返回选定视频的宽
  3221. // */
  3222. // width: any;
  3223. // }
  3224. // interface _chooseLocationObject {
  3225. // /**
  3226. // * 接口调用成功的回调函数,返回内容详见返回参数说明。
  3227. // */
  3228. // success: (result: _chooseLocationSuccessObject) => void;
  3229. // /**
  3230. // * 接口调用失败的回调函数
  3231. // */
  3232. // fail: () => void;
  3233. // /**
  3234. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3235. // */
  3236. // complete: () => void;
  3237. // }
  3238. // interface _chooseLocationSuccessObject {
  3239. // /**
  3240. // * 位置名称
  3241. // */
  3242. // name: any;
  3243. // /**
  3244. // * 详细地址
  3245. // */
  3246. // address: any;
  3247. // /**
  3248. // * 纬度,浮点数,范围为-90~90,负数表示南纬
  3249. // */
  3250. // latitude: any;
  3251. // /**
  3252. // * 经度,浮点数,范围为-180~180,负数表示西经
  3253. // */
  3254. // longitude: any;
  3255. // }
  3256. // interface _chooseInvoiceTitleObject {
  3257. // /**
  3258. // * 接口调用成功的回调函数
  3259. // */
  3260. // success: (result: _chooseInvoiceTitleSuccessObject) => void;
  3261. // /**
  3262. // * 接口调用失败的回调函数
  3263. // */
  3264. // fail: () => void;
  3265. // /**
  3266. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3267. // */
  3268. // complete: () => void;
  3269. // }
  3270. // interface _chooseInvoiceTitleSuccessObject {
  3271. // /**
  3272. // * 抬头类型(0:单位,1:个人)
  3273. // */
  3274. // type: string;
  3275. // /**
  3276. // * 抬头名称
  3277. // */
  3278. // title: string;
  3279. // /**
  3280. // * 抬头税号
  3281. // */
  3282. // taxNumber: string;
  3283. // /**
  3284. // * 单位地址
  3285. // */
  3286. // companyAddress: string;
  3287. // /**
  3288. // * 手机号码
  3289. // */
  3290. // telephone: string;
  3291. // /**
  3292. // * 银行名称
  3293. // */
  3294. // bankName: string;
  3295. // /**
  3296. // * 银行账号
  3297. // */
  3298. // bankAccount: string;
  3299. // /**
  3300. // * 接口调用结果
  3301. // */
  3302. // errMsg: string;
  3303. // }
  3304. // interface _chooseImageObject {
  3305. // /**
  3306. // * 最多可以选择的图片张数,默认9
  3307. // */
  3308. // count: number;
  3309. // /**
  3310. // * original 原图,compressed 压缩图,默认二者都有
  3311. // */
  3312. // sizeType: any;
  3313. // /**
  3314. // * album 从相册选图,camera 使用相机,默认二者都有
  3315. // */
  3316. // sourceType: any;
  3317. // /**
  3318. // * 成功则返回图片的本地文件路径列表 tempFilePaths
  3319. // */
  3320. // success: (result: _chooseImageSuccessObject) => void;
  3321. // /**
  3322. // * 接口调用失败的回调函数
  3323. // */
  3324. // fail: () => void;
  3325. // /**
  3326. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3327. // */
  3328. // complete: () => void;
  3329. // }
  3330. // interface _chooseImageSuccessObject {
  3331. // /**
  3332. // * 图片的本地文件路径列表
  3333. // */
  3334. // tempFilePaths: any;
  3335. // /**
  3336. // * 图片的本地文件列表,每一项是一个 File 对象
  3337. // */
  3338. // tempFiles: any;
  3339. // }
  3340. // interface _chooseContactObject {
  3341. // /**
  3342. // * 返回用户选择的联系人信息
  3343. // */
  3344. // success: (result: _chooseContactSuccessObject) => void;
  3345. // /**
  3346. // * 接口调用失败的回调函数
  3347. // */
  3348. // fail: () => void;
  3349. // /**
  3350. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3351. // */
  3352. // complete: () => void;
  3353. // }
  3354. // interface _chooseContactSuccessObject {
  3355. // /**
  3356. // * 电话号码
  3357. // */
  3358. // phoneNumber: any;
  3359. // /**
  3360. // * 联系人名称
  3361. // */
  3362. // displayName: any;
  3363. // }
  3364. // interface _chooseAddressObject {
  3365. // /**
  3366. // * 返回用户选择的收货地址信息
  3367. // */
  3368. // success: (result: _chooseAddressSuccessObject) => void;
  3369. // /**
  3370. // * 接口调用失败的回调函数
  3371. // */
  3372. // fail: () => void;
  3373. // /**
  3374. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3375. // */
  3376. // complete: () => void;
  3377. // }
  3378. // interface _chooseAddressSuccessObject {
  3379. // /**
  3380. // * 调用结果
  3381. // */
  3382. // errMsg: string;
  3383. // /**
  3384. // * 收货人姓名
  3385. // */
  3386. // userName: string;
  3387. // /**
  3388. // * 邮编
  3389. // */
  3390. // postalCode: string;
  3391. // /**
  3392. // * 国标收货地址第一级地址
  3393. // */
  3394. // provinceName: string;
  3395. // /**
  3396. // * 国标收货地址第二级地址
  3397. // */
  3398. // cityName: string;
  3399. // /**
  3400. // * 国标收货地址第三级地址
  3401. // */
  3402. // countyName: string;
  3403. // /**
  3404. // * 详细收货地址信息
  3405. // */
  3406. // detailInfo: string;
  3407. // /**
  3408. // * 收货地址国家码
  3409. // */
  3410. // nationalCode: string;
  3411. // /**
  3412. // * 收货人手机号码
  3413. // */
  3414. // telNumber: string;
  3415. // }
  3416. // interface _checkSessionObject {
  3417. // /**
  3418. // * 接口调用成功的回调函数,登录态未过期
  3419. // */
  3420. // success: () => void;
  3421. // /**
  3422. // * 接口调用失败的回调函数,登录态已过期
  3423. // */
  3424. // fail: () => void;
  3425. // /**
  3426. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3427. // */
  3428. // complete: () => void;
  3429. // }
  3430. // interface _checkIsSupportSoterAuthenticationObject {
  3431. // /**
  3432. // * 接口调用成功的回调函数
  3433. // */
  3434. // success: (result: _checkIsSupportSoterAuthenticationSuccessObject) => void;
  3435. // /**
  3436. // * 接口调用失败的回调函数
  3437. // */
  3438. // fail: () => void;
  3439. // /**
  3440. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3441. // */
  3442. // complete: () => void;
  3443. // }
  3444. // interface _checkIsSupportSoterAuthenticationSuccessObject {
  3445. // /**
  3446. // * 该设备支持的可被SOTER识别的生物识别方式
  3447. // */
  3448. // supportMode: any;
  3449. // /**
  3450. // * 接口调用结果
  3451. // */
  3452. // errMsg: string;
  3453. // }
  3454. // interface _checkIsSoterEnrolledInDeviceObject {
  3455. // /**
  3456. // * 认证方式
  3457. // */
  3458. // checkAuthMode: string;
  3459. // /**
  3460. // * 接口调用成功的回调函数
  3461. // */
  3462. // success: (result: _checkIsSoterEnrolledInDeviceSuccessObject) => void;
  3463. // /**
  3464. // * 接口调用失败的回调函数
  3465. // */
  3466. // fail: () => void;
  3467. // /**
  3468. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3469. // */
  3470. // complete: () => void;
  3471. // }
  3472. // interface _checkIsSoterEnrolledInDeviceSuccessObject {
  3473. // /**
  3474. // * 是否已录入信息
  3475. // */
  3476. // isEnrolled: boolean;
  3477. // /**
  3478. // * 接口调用结果
  3479. // */
  3480. // errMsg: string;
  3481. // }
  3482. // interface _canvasToTempFilePathObject {
  3483. // /**
  3484. // * 画布x轴起点(默认0)
  3485. // */
  3486. // x: number;
  3487. // /**
  3488. // * 画布y轴起点(默认0)
  3489. // */
  3490. // y: number;
  3491. // /**
  3492. // * 画布宽度(默认为canvas宽度-x)
  3493. // */
  3494. // width: number;
  3495. // /**
  3496. // * 画布高度(默认为canvas高度-y)
  3497. // */
  3498. // height: number;
  3499. // /**
  3500. // * 输出图片宽度(默认为width)
  3501. // */
  3502. // destWidth: number;
  3503. // /**
  3504. // * 输出图片高度(默认为height)
  3505. // */
  3506. // destHeight: number;
  3507. // /**
  3508. // * 画布标识,传入 [`<canvas/>`](../../component/canvas.md) 的 canvas-id
  3509. // */
  3510. // canvasId: string;
  3511. // /**
  3512. // * 目标文件的类型,只支持 'jpg' 或 'png'。默认为 'png'
  3513. // */
  3514. // fileType: string;
  3515. // /**
  3516. // * 图片的质量,取值范围为 (0, 1],不在范围内时当作1.0处理
  3517. // */
  3518. // quality: number;
  3519. // /**
  3520. // * 接口调用成功的回调函数
  3521. // */
  3522. // success: () => void;
  3523. // /**
  3524. // * 接口调用失败的回调函数
  3525. // */
  3526. // fail: () => void;
  3527. // /**
  3528. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3529. // */
  3530. // complete: () => void;
  3531. // }
  3532. // interface _canvasPutImageDataObject {
  3533. // /**
  3534. // * 画布标识,传入 [`<canvas />`](../../component/canvas.md) 的 canvas-id
  3535. // */
  3536. // canvasId: string;
  3537. // /**
  3538. // * 图像像素点数据,一维数组,每四项表示一个像素点的rgba
  3539. // */
  3540. // data: any;
  3541. // /**
  3542. // * 源图像数据在目标画布中的位置偏移量(x 轴方向的偏移量)
  3543. // */
  3544. // x: number;
  3545. // /**
  3546. // * 源图像数据在目标画布中的位置偏移量(y 轴方向的偏移量)
  3547. // */
  3548. // y: number;
  3549. // /**
  3550. // * 源图像数据矩形区域的宽度
  3551. // */
  3552. // width: number;
  3553. // /**
  3554. // * 源图像数据矩形区域的高度
  3555. // */
  3556. // height: number;
  3557. // /**
  3558. // * 接口调用成功的回调函数
  3559. // */
  3560. // success: () => void;
  3561. // /**
  3562. // * 接口调用失败的回调函数
  3563. // */
  3564. // fail: () => void;
  3565. // /**
  3566. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3567. // */
  3568. // complete: () => void;
  3569. // }
  3570. // interface _canvasGetImageDataObject {
  3571. // /**
  3572. // * 画布标识,传入 [`<canvas />`](../../component/canvas.md) 的 canvas-id
  3573. // */
  3574. // canvasId: string;
  3575. // /**
  3576. // * 将要被提取的图像数据矩形区域的左上角 x 坐标
  3577. // */
  3578. // x: number;
  3579. // /**
  3580. // * 将要被提取的图像数据矩形区域的左上角 y 坐标
  3581. // */
  3582. // y: number;
  3583. // /**
  3584. // * 将要被提取的图像数据矩形区域的宽度
  3585. // */
  3586. // width: number;
  3587. // /**
  3588. // * 将要被提取的图像数据矩形区域的高度
  3589. // */
  3590. // height: number;
  3591. // /**
  3592. // * 接口调用成功的回调函数
  3593. // */
  3594. // success: (result: _canvasGetImageDataSuccessObject) => void;
  3595. // /**
  3596. // * 接口调用失败的回调函数
  3597. // */
  3598. // fail: () => void;
  3599. // /**
  3600. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3601. // */
  3602. // complete: () => void;
  3603. // }
  3604. // interface _canvasGetImageDataSuccessObject {
  3605. // /**
  3606. // *
  3607. // */
  3608. // errMsg: string;
  3609. // /**
  3610. // * 图像数据矩形的宽度
  3611. // */
  3612. // width: number;
  3613. // /**
  3614. // * 图像数据矩形的高度
  3615. // */
  3616. // height: number;
  3617. // /**
  3618. // * 图像像素点数据,一维数组,每四项表示一个像素点的rgba
  3619. // */
  3620. // data: any;
  3621. // }
  3622. // interface _authorizeObject {
  3623. // /**
  3624. // * 需要获取权限的scope,详见 [scope 列表](./authorize-index.md#scope-列表)
  3625. // */
  3626. // scope: string;
  3627. // /**
  3628. // * 接口调用成功的回调函数
  3629. // */
  3630. // success: (result: _authorizeSuccessObject) => void;
  3631. // /**
  3632. // * 接口调用失败的回调函数
  3633. // */
  3634. // fail: () => void;
  3635. // /**
  3636. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3637. // */
  3638. // complete: () => void;
  3639. // }
  3640. // interface _authorizeSuccessObject {
  3641. // /**
  3642. // * 调用结果
  3643. // */
  3644. // errMsg: string;
  3645. // }
  3646. // interface _addPhoneContactObject {
  3647. // /**
  3648. // * 头像本地文件路径
  3649. // */
  3650. // photoFilePath: string;
  3651. // /**
  3652. // * 昵称
  3653. // */
  3654. // nickName: string;
  3655. // /**
  3656. // * 姓氏
  3657. // */
  3658. // lastName: string;
  3659. // /**
  3660. // * 中间名
  3661. // */
  3662. // middleName: string;
  3663. // /**
  3664. // * 名字
  3665. // */
  3666. // firstName: string;
  3667. // /**
  3668. // * 备注
  3669. // */
  3670. // remark: string;
  3671. // /**
  3672. // * 手机号
  3673. // */
  3674. // mobilePhoneNumber: string;
  3675. // /**
  3676. // * 微信号
  3677. // */
  3678. // weChatNumber: string;
  3679. // /**
  3680. // * 联系地址国家
  3681. // */
  3682. // addressCountry: string;
  3683. // /**
  3684. // * 联系地址省份
  3685. // */
  3686. // addressState: string;
  3687. // /**
  3688. // * 联系地址城市
  3689. // */
  3690. // addressCity: string;
  3691. // /**
  3692. // * 联系地址街道
  3693. // */
  3694. // addressStreet: string;
  3695. // /**
  3696. // * 联系地址邮政编码
  3697. // */
  3698. // addressPostalCode: string;
  3699. // /**
  3700. // * 公司
  3701. // */
  3702. // organization: string;
  3703. // /**
  3704. // * 职位
  3705. // */
  3706. // title: string;
  3707. // /**
  3708. // * 工作传真
  3709. // */
  3710. // workFaxNumber: string;
  3711. // /**
  3712. // * 工作电话
  3713. // */
  3714. // workPhoneNumber: string;
  3715. // /**
  3716. // * 公司电话
  3717. // */
  3718. // hostNumber: string;
  3719. // /**
  3720. // * 电子邮件
  3721. // */
  3722. // email: string;
  3723. // /**
  3724. // * 网站
  3725. // */
  3726. // url: string;
  3727. // /**
  3728. // * 工作地址国家
  3729. // */
  3730. // workAddressCountry: string;
  3731. // /**
  3732. // * 工作地址省份
  3733. // */
  3734. // workAddressState: string;
  3735. // /**
  3736. // * 工作地址城市
  3737. // */
  3738. // workAddressCity: string;
  3739. // /**
  3740. // * 工作地址街道
  3741. // */
  3742. // workAddressStreet: string;
  3743. // /**
  3744. // * 工作地址邮政编码
  3745. // */
  3746. // workAddressPostalCode: string;
  3747. // /**
  3748. // * 住宅传真
  3749. // */
  3750. // homeFaxNumber: string;
  3751. // /**
  3752. // * 住宅电话
  3753. // */
  3754. // homePhoneNumber: string;
  3755. // /**
  3756. // * 住宅地址国家
  3757. // */
  3758. // homeAddressCountry: string;
  3759. // /**
  3760. // * 住宅地址省份
  3761. // */
  3762. // homeAddressState: string;
  3763. // /**
  3764. // * 住宅地址城市
  3765. // */
  3766. // homeAddressCity: string;
  3767. // /**
  3768. // * 住宅地址街道
  3769. // */
  3770. // homeAddressStreet: string;
  3771. // /**
  3772. // * 住宅地址邮政编码
  3773. // */
  3774. // homeAddressPostalCode: string;
  3775. // /**
  3776. // * 接口调用成功
  3777. // */
  3778. // success: () => void;
  3779. // /**
  3780. // * 接口调用失败的回调函数
  3781. // */
  3782. // fail: () => void;
  3783. // /**
  3784. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3785. // */
  3786. // complete: () => void;
  3787. // }
  3788. // interface _addCardObject {
  3789. // /**
  3790. // * 需要添加的卡券列表,列表内对象说明请参见[请求对象说明](#请求对象说明)
  3791. // */
  3792. // cardList: any;
  3793. // /**
  3794. // * 接口调用成功的回调函数
  3795. // */
  3796. // success: (result: _addCardSuccessObject) => void;
  3797. // /**
  3798. // * 接口调用失败的回调函数
  3799. // */
  3800. // fail: () => void;
  3801. // /**
  3802. // * 接口调用结束的回调函数(调用成功、失败都会执行)
  3803. // */
  3804. // complete: () => void;
  3805. // }
  3806. // interface _addCardSuccessObject {
  3807. // /**
  3808. // * 卡券添加结果列表,列表内对象说明请详见[返回对象说明](#返回对象说明)
  3809. // */
  3810. // cardList: any;
  3811. // }
  3812. // interface _ShareAppMessageReturnObject {
  3813. // /**
  3814. // * 分享标题。默认为当前小程序名称。
  3815. // */
  3816. // title: string;
  3817. // /**
  3818. // * 分享路径。默认为当前页面 path,必须是以 / 开头的完整路径。
  3819. // */
  3820. // path: string;
  3821. // }
  3822. // interface _AppShowOptions {
  3823. // /**
  3824. // * 打开小程序的路径
  3825. // */
  3826. // path: string;
  3827. // /**
  3828. // * 打开小程序的query
  3829. // */
  3830. // query: object;
  3831. // /**
  3832. // * 打开小程序的场景值
  3833. // */
  3834. // scene: number;
  3835. // /**
  3836. // * shareTicket
  3837. // */
  3838. // shareTicket: string;
  3839. // }
  3840. // declare interface _AppOptions {
  3841. // /**
  3842. // * 当小程序初始化完成时,会触发 onLaunch(全局只触发一次)
  3843. // */
  3844. // onLaunch?: (options: _AppShowOptions) => void;
  3845. // /**
  3846. // * 当小程序启动,或从后台进入前台显示,会触发 onShow
  3847. // */
  3848. // onShow?: (options: _AppShowOptions) => void;
  3849. // /**
  3850. // * 当小程序从前台进入后台,会触发 onHide
  3851. // */
  3852. // onHide?: () => void;
  3853. // /**
  3854. // * 当小程序发生脚本错误,或者 api 调用失败时,会触发 onError 并带上错误信息
  3855. // */
  3856. // onError?: (msg: string) => void;
  3857. // }
  3858. // declare function App(options: _AppOptions): void;
  3859. // /**
  3860. // * 获取到小程序实例
  3861. // */
  3862. // declare function getApp(): object;
  3863. // declare interface PageOptions {
  3864. // /**
  3865. // * 页面的初始数据
  3866. // */
  3867. // data?: any;
  3868. // /**
  3869. // * 生命周期函数--监听页面加载
  3870. // */
  3871. // onLoad?: (options?: object) => void;
  3872. // /**
  3873. // * 生命周期函数--监听页面初次渲染完成
  3874. // */
  3875. // onReady?: () => void;
  3876. // /**
  3877. // * 生命周期函数--监听页面显示
  3878. // */
  3879. // onShow?: () => void;
  3880. // /**
  3881. // * 生命周期函数--监听页面隐藏
  3882. // */
  3883. // onHide?: () => void;
  3884. // /**
  3885. // * 生命周期函数--监听页面卸载
  3886. // */
  3887. // onUnload?: () => void;
  3888. // /**
  3889. // * 页面相关事件处理函数--监听用户下拉动作
  3890. // */
  3891. // onPullDownRefresh?: () => void;
  3892. // /**
  3893. // * 页面上拉触底事件的处理函数
  3894. // */
  3895. // onReachBottom?: () => void;
  3896. // /**
  3897. // * 用户点击右上角分享
  3898. // */
  3899. // onShareAppMessage?: () => _ShareAppMessageReturnObject;
  3900. // }
  3901. // declare function Page(page: PageOptions): void;
  3902. // declare function getCurrentPages(): object[];
  3903. // declare namespace wx {
  3904. // /**
  3905. // * 批量添加卡券。
  3906. // */
  3907. // export function addCard(object: _addCardObject): void;
  3908. // /**
  3909. // * 调用后,用户可以选择将该表单以“新增联系人”或“添加到已有联系人”的方式,写入手机系统通讯录,完成手机通讯录联系人和联系方式的增加。
  3910. // */
  3911. // export function addPhoneContact(object: _addPhoneContactObject): void;
  3912. // /**
  3913. // * 将 ArrayBuffer 数据转成 Base64 字符串
  3914. // */
  3915. // export function arrayBufferToBase64(): void;
  3916. // /**
  3917. // * 提前向用户发起授权请求。调用后会立刻弹窗询问用户是否同意授权小程序使用某项功能或获取用户的某些数据,但不会实际调用对应接口。如果用户之前已经同意授权,则不会出现弹窗,直接返回成功。
  3918. // */
  3919. // export function authorize(object: _authorizeObject): void;
  3920. // /**
  3921. // * 将 Base64 字符串转成 ArrayBuffer 数据
  3922. // */
  3923. // export function base64ToArrayBuffer(base64: string): void;
  3924. // /**
  3925. // * 判断小程序的API,回调,参数,组件等是否在当前版本可用。
  3926. // */
  3927. // export function canIUse(string: string): void;
  3928. // /**
  3929. // * 返回一个数组,用来描述 canvas 区域隐含的像素数据
  3930. // */
  3931. // export function canvasGetImageData(object: _canvasGetImageDataObject): void;
  3932. // /**
  3933. // * 将像素数据绘制到画布的方法
  3934. // */
  3935. // export function canvasPutImageData(object: _canvasPutImageDataObject): void;
  3936. // /**
  3937. // * 把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径。
  3938. // */
  3939. // export function canvasToTempFilePath(
  3940. // this: string,
  3941. // object: _canvasToTempFilePathObject
  3942. // ): void;
  3943. // /**
  3944. // * 获取设备内是否录入如指纹等生物信息的接口
  3945. // */
  3946. // export function checkIsSoterEnrolledInDevice(
  3947. // object: _checkIsSoterEnrolledInDeviceObject
  3948. // ): void;
  3949. // /**
  3950. // * 获取本机支持的 SOTER 生物认证方式
  3951. // */
  3952. // export function checkIsSupportSoterAuthentication(
  3953. // object: _checkIsSupportSoterAuthenticationObject
  3954. // ): void;
  3955. // /**
  3956. // * 通过上述接口获得的用户登录态拥有一定的时效性。用户越久未使用小程序,用户登录态越有可能失效。反之如果用户一直在使用小程序,则用户登录态一直保持有效。具体时效逻辑由微信维护,对开发者透明。开发者只需要调用wx.checkSession接口**检测当前用户登录态是否有效**。登录态过期后开发者可以再调用wx.login获取新的用户登录态。
  3957. // */
  3958. // export function checkSession(object: _checkSessionObject): void;
  3959. // /**
  3960. // * 调起用户编辑收货地址原生界面,并在编辑完成后返回用户选择的地址。
  3961. // */
  3962. // export function chooseAddress(object: _chooseAddressObject): void;
  3963. // /**
  3964. // * 调起选择手机通讯录联系人界面,返回用户选择的联系人信息。
  3965. // */
  3966. // export function chooseContact(object: _chooseContactObject): void;
  3967. // /**
  3968. // * 从本地相册选择图片或使用相机拍照。
  3969. // */
  3970. // export function chooseImage(object: _chooseImageObject): void;
  3971. // /**
  3972. // * 选择用户的发票抬头。
  3973. // */
  3974. // export function chooseInvoiceTitle(object: _chooseInvoiceTitleObject): void;
  3975. // /**
  3976. // * 打开地图选择位置。
  3977. // */
  3978. // export function chooseLocation(object: _chooseLocationObject): void;
  3979. // /**
  3980. // * 拍摄视频或从手机相册中选视频,返回视频的临时文件路径。
  3981. // */
  3982. // export function chooseVideo(object: _chooseVideoObject): void;
  3983. // /**
  3984. // * 清理本地数据缓存。
  3985. // */
  3986. // export function clearStorage(): void;
  3987. // /**
  3988. // * 同步清理本地数据缓存
  3989. // */
  3990. // export function clearStorageSync(): void;
  3991. // /**
  3992. // * 断开与低功耗蓝牙设备的连接
  3993. // */
  3994. // export function closeBLEConnection(object: _closeBLEConnectionObject): void;
  3995. // /**
  3996. // * 关闭蓝牙模块,使其进入未初始化状态。调用该方法将断开所有已建立的链接并释放系统资源。建议在使用小程序蓝牙流程后调用,与`wx.openBluetoothAdapter`成对调用。
  3997. // */
  3998. // export function closeBluetoothAdapter(
  3999. // object: _closeBluetoothAdapterObject
  4000. // ): void;
  4001. // /**
  4002. // * 关闭 WebSocket 连接。
  4003. // */
  4004. // export function closeSocket(object: _closeSocketObject): void;
  4005. // /**
  4006. // * 创建一个 [WebSocket](https://developer.mozilla.org/zh-CN/docs/Web/API/WebSocket) 连接。**使用前请先阅读[说明](./api-network.md)**。
  4007. // */
  4008. // export function connectSocket(object: _connectSocketObject): void;
  4009. // /**
  4010. // * 连接 Wi-Fi。若已知 Wi-Fi 信息,可以直接利用该接口连接。仅 Android 与 iOS 11 以上版本支持。
  4011. // */
  4012. // export function connectWifi(object: _connectWifiObject): void;
  4013. // /**
  4014. // * 创建一个动画实例[animation](#animation)。调用实例的方法来描述动画。最后通过动画实例的`export`方法导出动画数据传递给组件的`animation`属性。
  4015. // */
  4016. // export function createAnimation(object: _createAnimationObject): void;
  4017. // /**
  4018. // * 创建并返回 audio 上下文 `audioContext` 对象。在自定义组件下,第二个参数传入组件实例this,以操作组件内 `<audio/>` 组件
  4019. // */
  4020. // export function createAudioContext(this: string, audioid: string): void;
  4021. // /**
  4022. // * 连接低功耗蓝牙设备。
  4023. // */
  4024. // export function createBLEConnection(object: _createBLEConnectionObject): void;
  4025. // /**
  4026. // * 创建并返回 camera 上下文 `cameraContext` 对象,`cameraContext` 与页面的 `camera` 组件绑定,一个页面只能有一个camera,通过它可以操作对应的 `<camera/>` 组件。
  4027. // */
  4028. // export function createCameraContext(this: string): void;
  4029. // /**
  4030. // * 创建 canvas 绘图上下文(指定 canvasId)。在自定义组件下,第二个参数传入组件实例this,以操作组件内 `<canvas/>` 组件
  4031. // */
  4032. // export function createCanvasContext(
  4033. // this: string,
  4034. // canvasid: string
  4035. // ): CanvasContext;
  4036. // /**
  4037. // * 创建并返回绘图上下文。
  4038. // */
  4039. // export function createContext(): CanvasContext;
  4040. // /**
  4041. // * 创建并返回内部 audio 上下文 `innerAudioContext` 对象。*本接口是 `wx.createAudioContext` 升级版。*
  4042. // */
  4043. // export function createInnerAudioContext(): void;
  4044. // /**
  4045. // * 操作对应的 `<live-player/>` 组件。
  4046. // */
  4047. // export function createLivePlayerContext(this: string, domid: string): void;
  4048. // /**
  4049. // * 创建并返回 `live-pusher` 上下文 `LivePusherContext` 对象,`LivePusherContext` 与页面的 `<live-pusher />` 组件绑定,一个页面只能有一个 `live-pusher`,通过它可以操作对应的 `<live-pusher/>` 组件。
  4050. // */
  4051. // export function createLivePusherContext(): void;
  4052. // /**
  4053. // * 创建并返回 map 上下文 `mapContext` 对象。在自定义组件下,第二个参数传入组件实例this,以操作组件内 `<map/>` 组件
  4054. // */
  4055. // export function createMapContext(this: string, mapid: string): void;
  4056. // /**
  4057. // * undefined
  4058. // */
  4059. // export function createSelectorQuery(): void;
  4060. // /**
  4061. // * 创建并返回 video 上下文 `videoContext` 对象。在自定义组件下,第二个参数传入组件实例this,以操作组件内 `<video/>` 组件
  4062. // */
  4063. // export function createVideoContext(this: string, videoid: string): void;
  4064. // /**
  4065. // * 下载文件资源到本地,客户端直接发起一个 HTTP GET 请求,返回文件的本地临时路径。**使用前请先阅读[说明](./api-network.md)**。
  4066. // */
  4067. // export function downloadFile(object: _downloadFileObject): void;
  4068. // /**
  4069. // * 蓝牙设备characteristic(特征值)信息
  4070. // */
  4071. // export function getBLEDeviceCharacteristics(
  4072. // object: _getBLEDeviceCharacteristicsObject
  4073. // ): void;
  4074. // /**
  4075. // * 获取蓝牙设备所有 service(服务)
  4076. // */
  4077. // export function getBLEDeviceServices(
  4078. // object: _getBLEDeviceServicesObject
  4079. // ): void;
  4080. // /**
  4081. // * 获取**全局唯一**的背景音频管理器 `backgroundAudioManager`。
  4082. // */
  4083. // export function getBackgroundAudioManager(): _getBackgroundAudioManagerReturnValue;
  4084. // /**
  4085. // * 获取后台音乐播放状态。
  4086. // */
  4087. // export function getBackgroundAudioPlayerState(
  4088. // object: _getBackgroundAudioPlayerStateObject
  4089. // ): void;
  4090. // /**
  4091. // * 获取所有已搜索到的`iBeacon`设备
  4092. // */
  4093. // export function getBeacons(object: _getBeaconsObject): void;
  4094. // /**
  4095. // * 获取本机蓝牙适配器状态
  4096. // */
  4097. // export function getBluetoothAdapterState(
  4098. // object: _getBluetoothAdapterStateObject
  4099. // ): void;
  4100. // /**
  4101. // * 获取在小程序蓝牙模块生效期间所有已发现的蓝牙设备,包括已经和本机处于连接状态的设备。
  4102. // */
  4103. // export function getBluetoothDevices(object: _getBluetoothDevicesObject): void;
  4104. // /**
  4105. // * 获取系统剪贴板内容
  4106. // */
  4107. // export function getClipboardData(object: _getClipboardDataObject): void;
  4108. // /**
  4109. // * 根据 uuid 获取处于已连接状态的设备
  4110. // */
  4111. // export function getConnectedBluetoothDevices(
  4112. // object: _getConnectedBluetoothDevicesObject
  4113. // ): void;
  4114. // /**
  4115. // * 获取已连接中的 Wi-Fi 信息
  4116. // */
  4117. // export function getConnectedWifi(object: _getConnectedWifiObject): void;
  4118. // /**
  4119. // * 获取第三方平台自定义的数据字段。
  4120. // */
  4121. // export function getExtConfig(object: _getExtConfigObject): void;
  4122. // /**
  4123. // * 获取第三方平台自定义的数据字段的同步接口。
  4124. // */
  4125. // export function getExtConfigSync(): _getExtConfigSyncReturnValue;
  4126. // /**
  4127. // * 获取文件信息
  4128. // */
  4129. // export function getFileInfo(object: _getFileInfoObject): void;
  4130. // /**
  4131. // * 判断当前设备是否支持 HCE 能力。
  4132. // */
  4133. // export function getHCEState(object: _getHCEStateObject): void;
  4134. // /**
  4135. // * 获取图片信息
  4136. // */
  4137. // export function getImageInfo(object: _getImageInfoObject): void;
  4138. // /**
  4139. // * 获取当前的地理位置、速度。当用户离开小程序后,此接口无法调用;当用户点击“显示在聊天顶部”时,此接口可继续调用。
  4140. // */
  4141. // export function getLocation(object: _getLocationObject): void;
  4142. // /**
  4143. // * 获取网络类型。
  4144. // */
  4145. // export function getNetworkType(object: _getNetworkTypeObject): void;
  4146. // /**
  4147. // * 获取微信替设备生成的唯一标识,用于判断设备是否更换。获取的数据为AES加密数据,需要自行解密。
  4148. // */
  4149. // export function getOpenDeviceId(object: _getOpenDeviceIdObject): void;
  4150. // /**
  4151. // * 获取**全局唯一**的录音管理器 `recorderManager`。
  4152. // */
  4153. // export function getRecorderManager(): void;
  4154. // /**
  4155. // * 获取本地文件的文件信息。此接口只能用于获取已保存到本地的文件,若需要获取临时文件信息,请使用 [wx.getFileInfo](./getFileInfo.md) 接口。
  4156. // */
  4157. // export function getSavedFileInfo(object: _getSavedFileInfoObject): void;
  4158. // /**
  4159. // * 获取本地已保存的文件列表
  4160. // */
  4161. // export function getSavedFileList(object: _getSavedFileListObject): void;
  4162. // /**
  4163. // * 获取屏幕亮度。
  4164. // */
  4165. // export function getScreenBrightness(object: _getScreenBrightnessObject): void;
  4166. // /**
  4167. // * 获取用户的当前设置。
  4168. // */
  4169. // export function getSetting(object: _getSettingObject): void;
  4170. // /**
  4171. // * 获取转发详细信息
  4172. // */
  4173. // export function getShareInfo(object: _getShareInfoObject): void;
  4174. // /**
  4175. // * 从本地缓存中异步获取指定 key 对应的内容。
  4176. // */
  4177. // export function getStorage(object: _getStorageObject): void;
  4178. // /**
  4179. // * 异步获取当前storage的相关信息
  4180. // */
  4181. // export function getStorageInfo(object: _getStorageInfoObject): void;
  4182. // /**
  4183. // * 同步获取当前storage的相关信息
  4184. // */
  4185. // export function getStorageInfoSync(): void;
  4186. // /**
  4187. // * 从本地缓存中同步获取指定 key 对应的内容。
  4188. // */
  4189. // export function getStorageSync(key: string): void;
  4190. // /**
  4191. // * 获取系统信息。
  4192. // */
  4193. // export function getSystemInfo(object: _getSystemInfoObject): void;
  4194. // /**
  4195. // * 获取系统信息同步接口
  4196. // */
  4197. // export function getSystemInfoSync(): _getSystemInfoSyncReturnValue;
  4198. // /**
  4199. // * 获取用户信息,withCredentials 为 true 时需要先调用 [wx.login](./api-login.md#wxloginobject) 接口。
  4200. // */
  4201. // export function getUserInfo(object: _getUserInfoObject): void;
  4202. // /**
  4203. // * 获取用户过去三十天微信运动步数,需要先调用 [wx.login](./api-login.md#wxloginobject) 接口。
  4204. // */
  4205. // export function getWeRunData(object: _getWeRunDataObject): void;
  4206. // /**
  4207. // * 请求获取 Wi-Fi 列表,在 `onGetWifiList` 注册的回调中返回 wifiList 数据。iOS 将跳转到系统的 Wi-Fi 界面,Android 不会跳转。
  4208. // */
  4209. // export function getWifiList(object: _getWifiListObject): void;
  4210. // /**
  4211. // * 隐藏 loading 提示框
  4212. // */
  4213. // export function hideLoading(): void;
  4214. // /**
  4215. // * 隐藏导航条加载动画。
  4216. // */
  4217. // export function hideNavigationBarLoading(): void;
  4218. // /**
  4219. // * 隐藏转发按钮
  4220. // */
  4221. // export function hideShareMenu(object: _hideShareMenuObject): void;
  4222. // /**
  4223. // * 隐藏 tabBar
  4224. // */
  4225. // export function hideTabBar(object: _hideTabBarObject): void;
  4226. // /**
  4227. // * 隐藏 tabBar 某一项的右上角的红点
  4228. // */
  4229. // export function hideTabBarRedDot(object: _hideTabBarRedDotObject): void;
  4230. // /**
  4231. // * 隐藏消息提示框
  4232. // */
  4233. // export function hideToast(): void;
  4234. // /**
  4235. // * 调用接口获取**登录凭证(code)**进而换取用户登录态信息,包括用户的**唯一标识(openid)** 及本次登录的 **会话密钥(session_key)**等。**用户数据的加解密通讯**需要依赖会话密钥完成。
  4236. // */
  4237. // export function login(object: _loginObject): void;
  4238. // /**
  4239. // * wx.makePhoneCall({
  4240. // */
  4241. // export function makePhoneCall(object: _makePhoneCallObject): void;
  4242. // /**
  4243. // * 调起 VoIP 音视频通话界面。
  4244. // */
  4245. // export function makeVoIPCall(object: _makeVoIPCallObject): void;
  4246. // /**
  4247. // * 关闭当前页面,返回上一页面或多级页面。可通过 [`getCurrentPages()`](../framework/app-service/page.md#getCurrentPages()) 获取当前的页面栈,决定需要返回几层。
  4248. // */
  4249. // export function navigateBack(object: _navigateBackObject): void;
  4250. // /**
  4251. // * 返回到上一个小程序,只有在当前小程序是被其他小程序打开时可以调用成功
  4252. // */
  4253. // export function navigateBackMiniProgram(
  4254. // object: _navigateBackMiniProgramObject
  4255. // ): void;
  4256. // /**
  4257. // * 保留当前页面,跳转到应用内的某个页面,使用`wx.navigateBack`可以返回到原页面。
  4258. // */
  4259. // export function navigateTo(object: _navigateToObject): void;
  4260. // /**
  4261. // * 打开同一公众号下关联的另一个小程序。**(注:必须是同一公众号下,而非同个 open 账号下)**
  4262. // */
  4263. // export function navigateToMiniProgram(
  4264. // object: _navigateToMiniProgramObject
  4265. // ): void;
  4266. // /**
  4267. // * 启用低功耗蓝牙设备特征值变化时的 notify 功能,订阅特征值。注意:必须设备的特征值支持`notify`或者`indicate`才可以成功调用,具体参照 characteristic 的 properties 属性
  4268. // */
  4269. // export function notifyBLECharacteristicValueChange(
  4270. // object: _notifyBLECharacteristicValueChangeObject
  4271. // ): void;
  4272. // /**
  4273. // * 监听加速度数据,频率:5次/秒,接口调用后会自动开始监听,可使用 `wx.stopAccelerometer` 停止监听。
  4274. // */
  4275. // export function onAccelerometerChange(
  4276. // callback: (result: _onAccelerometerChangeCallbackResult) => void
  4277. // ): void;
  4278. // /**
  4279. // * 监听低功耗蓝牙设备的特征值变化。必须先启用`notify`接口才能接收到设备推送的notification。
  4280. // */
  4281. // export function onBLECharacteristicValueChange(
  4282. // callback: (result: _onBLECharacteristicValueChangeCallbackResult) => void
  4283. // ): void;
  4284. // /**
  4285. // * 监听低功耗蓝牙连接的错误事件,包括设备丢失,连接异常断开等等。
  4286. // */
  4287. // export function onBLEConnectionStateChange(
  4288. // callback: (result: _onBLEConnectionStateChangeCallbackResult) => void
  4289. // ): void;
  4290. // /**
  4291. // * 监听音乐暂停。
  4292. // */
  4293. // export function onBackgroundAudioPause(callback: string): void;
  4294. // /**
  4295. // * 监听音乐播放。
  4296. // */
  4297. // export function onBackgroundAudioPlay(callback: string): void;
  4298. // /**
  4299. // * 监听音乐停止。
  4300. // */
  4301. // export function onBackgroundAudioStop(callback: string): void;
  4302. // /**
  4303. // * 监听 `iBeacon` 服务的状态变化
  4304. // */
  4305. // export function onBeaconServiceChange(
  4306. // callback: (result: _onBeaconServiceChangeCallbackResult) => void
  4307. // ): void;
  4308. // /**
  4309. // * 监听 `iBeacon` 设备的更新事件
  4310. // */
  4311. // export function onBeaconUpdate(
  4312. // callback: (result: _onBeaconUpdateCallbackResult) => void
  4313. // ): void;
  4314. // /**
  4315. // * 监听蓝牙适配器状态变化事件
  4316. // */
  4317. // export function onBluetoothAdapterStateChange(
  4318. // callback: (result: _onBluetoothAdapterStateChangeCallbackResult) => void
  4319. // ): void;
  4320. // /**
  4321. // * 监听寻找到新设备的事件
  4322. // */
  4323. // export function onBluetoothDeviceFound(
  4324. // callback: (result: _onBluetoothDeviceFoundCallbackResult) => void
  4325. // ): void;
  4326. // /**
  4327. // * 监听罗盘数据,频率:5次/秒,接口调用后会自动开始监听,可使用`wx.stopCompass`停止监听。
  4328. // */
  4329. // export function onCompassChange(
  4330. // callback: (result: _onCompassChangeCallbackResult) => void
  4331. // ): void;
  4332. // /**
  4333. // * 监听需要评估连上的 Wi-Fi 的请求,在回调里必须返回 `confidence` 字段
  4334. // */
  4335. // export function onEvaluateWifi(
  4336. // callback: (result: _onEvaluateWifiCallbackResult) => void
  4337. // ): void;
  4338. // /**
  4339. // * 监听在获取到 Wi-Fi 列表数据时的事件,在回调中将返回 wifiList。
  4340. // */
  4341. // export function onGetWifiList(
  4342. // callback: (result: _onGetWifiListCallbackResult) => void
  4343. // ): void;
  4344. // /**
  4345. // * 监听 NFC 设备的消息回调,并在回调中处理。返回参数中 `messageType` 表示消息类型,目前有如下值:
  4346. // */
  4347. // export function onHCEMessage(
  4348. // callback: (result: _onHCEMessageCallbackResult) => void
  4349. // ): void;
  4350. // /**
  4351. // * 监听网络状态变化。
  4352. // */
  4353. // export function onNetworkStatusChange(
  4354. // callback: (result: _onNetworkStatusChangeCallbackResult) => void
  4355. // ): void;
  4356. // /**
  4357. // * 监听WebSocket关闭。
  4358. // */
  4359. // export function onSocketClose(callback: string): void;
  4360. // /**
  4361. // * 监听WebSocket错误。
  4362. // */
  4363. // export function onSocketError(callback: string): void;
  4364. // /**
  4365. // * 监听WebSocket接受到服务器的消息事件。
  4366. // */
  4367. // export function onSocketMessage(
  4368. // callback: (result: _onSocketMessageCallbackResult) => void
  4369. // ): void;
  4370. // /**
  4371. // * 监听WebSocket连接打开事件。
  4372. // */
  4373. // export function onSocketOpen(callback: string): void;
  4374. // /**
  4375. // * 监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件
  4376. // */
  4377. // export function onUserCaptureScreen(
  4378. // callback: (result: _onUserCaptureScreenCallbackResult) => void
  4379. // ): void;
  4380. // /**
  4381. // * 监听连接上 Wi-Fi 的事件。
  4382. // */
  4383. // export function onWifiConnected(
  4384. // callback: (result: _onWifiConnectedCallbackResult) => void
  4385. // ): void;
  4386. // /**
  4387. // * 初始化小程序蓝牙模块,生效周期为调用`wx.openBluetoothAdapter`至调用`wx.closeBluetoothAdapter`或小程序被销毁为止。
  4388. // */
  4389. // export function openBluetoothAdapter(
  4390. // object: _openBluetoothAdapterObject
  4391. // ): void;
  4392. // /**
  4393. // * 查看微信卡包中的卡券。
  4394. // */
  4395. // export function openCard(object: _openCardObject): void;
  4396. // /**
  4397. // * 新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx
  4398. // */
  4399. // export function openDocument(object: _openDocumentObject): void;
  4400. // /**
  4401. // * ​使用微信内置地图查看位置。
  4402. // */
  4403. // export function openLocation(object: _openLocationObject): void;
  4404. // /**
  4405. // * 调起客户端小程序设置界面,返回用户设置的操作结果。
  4406. // */
  4407. // export function openSetting(object: _openSettingObject): void;
  4408. // /**
  4409. // * 将页面滚动到目标位置。
  4410. // */
  4411. // export function pageScrollTo(object: _pageScrollToObject): void;
  4412. // /**
  4413. // * 暂停播放音乐。
  4414. // */
  4415. // export function pauseBackgroundAudio(): void;
  4416. // /**
  4417. // * 暂停正在播放的语音。再次调用wx.playVoice播放同一个文件时,会从暂停处开始播放。如果想从头开始播放,需要先调用 wx.stopVoice。
  4418. // */
  4419. // export function pauseVoice(): void;
  4420. // /**
  4421. // * 使用后台播放器播放音乐,对于微信客户端来说,只能同时有一个后台音乐在播放。当用户离开小程序后,音乐将暂停播放;当用户点击“显示在聊天顶部”时,音乐不会暂停播放;当用户在其他小程序占用了音乐播放器,原有小程序内的音乐将停止播放。
  4422. // */
  4423. // export function playBackgroundAudio(object: _playBackgroundAudioObject): void;
  4424. // /**
  4425. // * 开始播放语音,同时只允许一个语音文件正在播放,如果前一个语音文件还没播放完,将中断前一个语音播放。
  4426. // */
  4427. // export function playVoice(object: _playVoiceObject): void;
  4428. // /**
  4429. // * 预览图片。
  4430. // */
  4431. // export function previewImage(object: _previewImageObject): void;
  4432. // /**
  4433. // * 关闭所有页面,打开到应用内的某个页面。
  4434. // */
  4435. // export function reLaunch(object: _reLaunchObject): void;
  4436. // /**
  4437. // * 读取低功耗蓝牙设备的特征值的二进制数据值。注意:必须设备的特征值支持`read`才可以成功调用,具体参照 characteristic 的 properties 属性
  4438. // */
  4439. // export function readBLECharacteristicValue(
  4440. // object: _readBLECharacteristicValueObject
  4441. // ): void;
  4442. // /**
  4443. // * 关闭当前页面,跳转到应用内的某个页面。
  4444. // */
  4445. // export function redirectTo(object: _redirectToObject): void;
  4446. // /**
  4447. // * 删除本地存储的文件
  4448. // */
  4449. // export function removeSavedFile(object: _removeSavedFileObject): void;
  4450. // /**
  4451. // * 从本地缓存中异步移除指定 key 。
  4452. // */
  4453. // export function removeStorage(object: _removeStorageObject): void;
  4454. // /**
  4455. // * 从本地缓存中同步移除指定 key 。
  4456. // */
  4457. // export function removeStorageSync(key: string): void;
  4458. // /**
  4459. // * 移除 tabBar 某一项右上角的文本
  4460. // */
  4461. // export function removeTabBarBadge(object: _removeTabBarBadgeObject): void;
  4462. // /**
  4463. // * 自定义分析数据上报接口。使用前,需要在小程序管理后台自定义分析中新建事件,配置好事件名与字段。
  4464. // */
  4465. // export function reportAnalytics(eventname: string, data: string): void;
  4466. // /**
  4467. // * 发起网络请求。**使用前请先阅读[说明](./api-network.md)**。
  4468. // */
  4469. // export function request(object: _requestObject): void;
  4470. // /**
  4471. // * 发起微信支付。
  4472. // */
  4473. // export function requestPayment(object: _requestPaymentObject): void;
  4474. // /**
  4475. // * 保存文件到本地。**注意:saveFile 会把临时文件移动,因此调用成功后传入的 tempFilePath 将不可用**
  4476. // */
  4477. // export function saveFile(object: _saveFileObject): void;
  4478. // /**
  4479. // * 保存图片到系统相册。需要[用户授权](./authorize-index.md) scope.writePhotosAlbum
  4480. // */
  4481. // export function saveImageToPhotosAlbum(
  4482. // object: _saveImageToPhotosAlbumObject
  4483. // ): void;
  4484. // /**
  4485. // * 保存视频到系统相册。需要[用户授权](./authorize-index.md) scope.writePhotosAlbum
  4486. // */
  4487. // export function saveVideoToPhotosAlbum(
  4488. // object: _saveVideoToPhotosAlbumObject
  4489. // ): void;
  4490. // /**
  4491. // * 调起客户端扫码界面,扫码成功后返回对应的结果
  4492. // */
  4493. // export function scanCode(object: _scanCodeObject): void;
  4494. // /**
  4495. // * 控制音乐播放进度。
  4496. // */
  4497. // export function seekBackgroundAudio(object: _seekBackgroundAudioObject): void;
  4498. // /**
  4499. // * 发送 NFC 消息。仅在安卓系统下有效。
  4500. // */
  4501. // export function sendHCEMessage(object: _sendHCEMessageObject): void;
  4502. // /**
  4503. // * 通过 WebSocket 连接发送数据,需要先 [wx.connectSocket](#wxconnectsocketobject),并在 [wx.onSocketOpen](#wxonsocketopencallback) 回调之后才能发送。
  4504. // */
  4505. // export function sendSocketMessage(object: _sendSocketMessageObject): void;
  4506. // /**
  4507. // * 设置系统剪贴板的内容
  4508. // */
  4509. // export function setClipboardData(object: _setClipboardDataObject): void;
  4510. // /**
  4511. // * 设置是否打开调试开关,此开关对正式版也能生效。
  4512. // */
  4513. // export function setEnableDebug(object: _setEnableDebugObject): void;
  4514. // /**
  4515. // * 设置是否保持常亮状态。仅在当前小程序生效,离开小程序后设置失效。
  4516. // */
  4517. // export function setKeepScreenOn(object: _setKeepScreenOnObject): void;
  4518. // /**
  4519. // * wx.setNavigationBarColor({
  4520. // */
  4521. // export function setNavigationBarColor(
  4522. // object: _setNavigationBarColorObject
  4523. // ): void;
  4524. // /**
  4525. // * 动态设置当前页面的标题。
  4526. // */
  4527. // export function setNavigationBarTitle(
  4528. // object: _setNavigationBarTitleObject
  4529. // ): void;
  4530. // /**
  4531. // * 设置屏幕亮度。
  4532. // */
  4533. // export function setScreenBrightness(object: _setScreenBrightnessObject): void;
  4534. // /**
  4535. // * 将数据存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个异步接口。
  4536. // */
  4537. // export function setStorage(object: _setStorageObject): void;
  4538. // /**
  4539. // * 将 data 存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个同步接口。
  4540. // */
  4541. // export function setStorageSync(key: string): void;
  4542. // /**
  4543. // * 为 tabBar 某一项的右上角添加文本
  4544. // */
  4545. // export function setTabBarBadge(object: _setTabBarBadgeObject): void;
  4546. // /**
  4547. // * 动态设置 tabBar 某一项的内容
  4548. // */
  4549. // export function setTabBarItem(object: _setTabBarItemObject): void;
  4550. // /**
  4551. // * 动态设置 tabBar 的整体样式
  4552. // */
  4553. // export function setTabBarStyle(object: _setTabBarStyleObject): void;
  4554. // /**
  4555. // * 动态设置置顶栏文字内容,只有当前小程序被置顶时能生效,如果当前小程序没有被置顶,也能调用成功,但是不会立即生效,只有在用户将这个小程序置顶后才换上设置的文字内容。**注意:调用成功后,需间隔 5s 才能再次调用此接口,如果在 5s 内再次调用此接口,会回调 fail,errMsg:"setTopBarText: fail invoke too frequently"**
  4556. // */
  4557. // export function setTopBarText(object: _setTopBarTextObject): void;
  4558. // /**
  4559. // * 在 `onGetWifiList` 回调后,利用接口设置 wifiList 中 AP 的相关信息。
  4560. // */
  4561. // export function setWifiList(object: _setWifiListObject): void;
  4562. // /**
  4563. // * ​显示操作菜单
  4564. // */
  4565. // export function showActionSheet(object: _showActionSheetObject): void;
  4566. // /**
  4567. // * 显示 loading 提示框, 需主动调用 [wx.hideLoading](#wxhideloading) 才能关闭提示框
  4568. // */
  4569. // export function showLoading(object: _showLoadingObject): void;
  4570. // /**
  4571. // * ​显示模态弹窗
  4572. // */
  4573. // export function showModal(object: _showModalObject): void;
  4574. // /**
  4575. // * 在当前页面显示导航条加载动画。
  4576. // */
  4577. // export function showNavigationBarLoading(): void;
  4578. // /**
  4579. // * 显示当前页面的转发按钮
  4580. // */
  4581. // export function showShareMenu(object: _showShareMenuObject): void;
  4582. // /**
  4583. // * 显示 tabBar
  4584. // */
  4585. // export function showTabBar(object: _showTabBarObject): void;
  4586. // /**
  4587. // * 显示 tabBar 某一项的右上角的红点
  4588. // */
  4589. // export function showTabBarRedDot(object: _showTabBarRedDotObject): void;
  4590. // /**
  4591. // * 显示消息提示框
  4592. // */
  4593. // export function showToast(object: _showToastObject): void;
  4594. // /**
  4595. // * 开始监听加速度数据。
  4596. // */
  4597. // export function startAccelerometer(object: _startAccelerometerObject): void;
  4598. // /**
  4599. // * 开始搜索附近的`iBeacon`设备
  4600. // */
  4601. // export function startBeaconDiscovery(
  4602. // object: _startBeaconDiscoveryObject
  4603. // ): void;
  4604. // /**
  4605. // * 开始搜寻附近的蓝牙外围设备。注意,该操作比较耗费系统资源,请在搜索并连接到设备后调用 stop 方法停止搜索。
  4606. // */
  4607. // export function startBluetoothDevicesDiscovery(
  4608. // object: _startBluetoothDevicesDiscoveryObject
  4609. // ): void;
  4610. // /**
  4611. // * 开始监听罗盘数据。
  4612. // */
  4613. // export function startCompass(object: _startCompassObject): void;
  4614. // /**
  4615. // * 初始化 NFC 模块。
  4616. // */
  4617. // export function startHCE(object: _startHCEObject): void;
  4618. // /**
  4619. // * 开始下拉刷新,调用后触发下拉刷新动画,效果与用户手动下拉刷新一致
  4620. // */
  4621. // export function startPullDownRefresh(
  4622. // object: _startPullDownRefreshObject
  4623. // ): void;
  4624. // /**
  4625. // * 开始录音。当主动调用`wx.stopRecord`,或者录音超过1分钟时自动结束录音,返回录音文件的临时文件路径。当用户离开小程序时,此接口无法调用。
  4626. // */
  4627. // export function startRecord(object: _startRecordObject): void;
  4628. // /**
  4629. // * 开始 SOTER 生物认证
  4630. // */
  4631. // export function startSoterAuthentication(
  4632. // object: _startSoterAuthenticationObject
  4633. // ): void;
  4634. // /**
  4635. // * 初始化 Wi-Fi 模块。
  4636. // */
  4637. // export function startWifi(object: _startWifiObject): void;
  4638. // /**
  4639. // * 停止监听加速度数据。
  4640. // */
  4641. // export function stopAccelerometer(object: _stopAccelerometerObject): void;
  4642. // /**
  4643. // * 停止播放音乐。
  4644. // */
  4645. // export function stopBackgroundAudio(): void;
  4646. // /**
  4647. // * 停止搜索附近的`iBeacon`设备
  4648. // */
  4649. // export function stopBeaconDiscovery(object: _stopBeaconDiscoveryObject): void;
  4650. // /**
  4651. // * 停止搜寻附近的蓝牙外围设备。若已经找到需要的蓝牙设备并不需要继续搜索时,建议调用该接口停止蓝牙搜索。
  4652. // */
  4653. // export function stopBluetoothDevicesDiscovery(
  4654. // object: _stopBluetoothDevicesDiscoveryObject
  4655. // ): void;
  4656. // /**
  4657. // * 停止监听罗盘数据。
  4658. // */
  4659. // export function stopCompass(object: _stopCompassObject): void;
  4660. // /**
  4661. // * 关闭 NFC 模块。仅在安卓系统下有效。
  4662. // */
  4663. // export function stopHCE(object: _stopHCEObject): void;
  4664. // /**
  4665. // * 停止当前页面下拉刷新。
  4666. // */
  4667. // export function stopPullDownRefresh(): void;
  4668. // /**
  4669. // * ​主动调用停止录音。
  4670. // */
  4671. // export function stopRecord(): void;
  4672. // /**
  4673. // * 结束播放语音。
  4674. // */
  4675. // export function stopVoice(): void;
  4676. // /**
  4677. // * 关闭 Wi-Fi 模块。
  4678. // */
  4679. // export function stopWifi(object: _stopWifiObject): void;
  4680. // /**
  4681. // * 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面
  4682. // */
  4683. // export function switchTab(object: _switchTabObject): void;
  4684. // /**
  4685. // * 更新转发属性
  4686. // */
  4687. // export function updateShareMenu(object: _updateShareMenuObject): void;
  4688. // /**
  4689. // * 将本地资源上传到开发者服务器,客户端发起一个 HTTPS POST 请求,其中 `content-type` 为 `multipart/form-data` 。**使用前请先阅读[说明](./api-network.md)**。
  4690. // */
  4691. // export function uploadFile(object: _uploadFileObject): void;
  4692. // /**
  4693. // * 使手机发生较长时间的振动(400ms)
  4694. // */
  4695. // export function vibrateLong(object: _vibrateLongObject): void;
  4696. // /**
  4697. // * 使手机发生较短时间的振动(15ms)
  4698. // */
  4699. // export function vibrateShort(object: _vibrateShortObject): void;
  4700. // /***
  4701. // * 监听主域发送的消息
  4702. // */
  4703. // export function onMessage(callback:Function):void;
  4704. // /**
  4705. // * 拉取当前用户所有同玩好友的托管数据。该接口只可在开放数据域下使用
  4706. // */
  4707. // export function getFriendCloudStorage(object):void;
  4708. // /**
  4709. // * 对用户托管数据进行写数据操作。允许同时写多组 KV 数据。
  4710. // * @param object
  4711. // */
  4712. // export function setUserCloudStorage(object):void;
  4713. // /**
  4714. // * 向低功耗蓝牙设备特征值中写入二进制数据。注意:必须设备的特征值支持`write`才可以成功调用,具体参照 characteristic 的 properties 属性
  4715. // */
  4716. // export function writeBLECharacteristicValue(
  4717. // object: _writeBLECharacteristicValueObject
  4718. // ): void;
  4719. // }