[{"data":1,"prerenderedAt":2511},["ShallowReactive",2],{"content-query-A6jY2DK49L":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"body":10,"_type":2505,"_id":2506,"_source":2507,"_file":2508,"_stem":2509,"_extension":2510},"\u002Fdocs\u002Fwebclip-sdk","docs",false,"","WebClip \u002F WAP SDK 接入指南","在 WebClip 或移动网页中集成 SDK，实现三级归因匹配。",{"type":11,"children":12,"toc":2488},"root",[13,21,42,47,163,168,175,188,247,253,258,285,360,365,371,1098,1104,1871,1881,1916,1921,2139,2144,2315,2321,2399,2405,2410,2418,2431,2443,2448,2461,2482],{"type":14,"tag":15,"props":16,"children":18},"element","h2",{"id":17},"概述",[19],{"type":20,"value":17},"text",{"type":14,"tag":22,"props":23,"children":24},"p",{},[25,27,33,35,40],{"type":20,"value":26},"WAP SDK 用于 ",{"type":14,"tag":28,"props":29,"children":30},"strong",{},[31],{"type":20,"value":32},"WebClip（iOS 桌面快捷方式）",{"type":20,"value":34}," 和 ",{"type":14,"tag":28,"props":36,"children":37},{},[38],{"type":20,"value":39},"移动网页",{"type":20,"value":41}," 场景。当用户通过 WebClip 或浏览器打开你的应用时，SDK 会执行三级归因匹配。",{"type":14,"tag":15,"props":43,"children":45},{"id":44},"归因优先级",[46],{"type":20,"value":44},{"type":14,"tag":48,"props":49,"children":50},"table",{},[51,80],{"type":14,"tag":52,"props":53,"children":54},"thead",{},[55],{"type":14,"tag":56,"props":57,"children":58},"tr",{},[59,65,70,75],{"type":14,"tag":60,"props":61,"children":62},"th",{},[63],{"type":20,"value":64},"优先级",{"type":14,"tag":60,"props":66,"children":67},{},[68],{"type":20,"value":69},"方式",{"type":14,"tag":60,"props":71,"children":72},{},[73],{"type":20,"value":74},"置信度",{"type":14,"tag":60,"props":76,"children":77},{},[78],{"type":20,"value":79},"说明",{"type":14,"tag":81,"props":82,"children":83},"tbody",{},[84,117,140],{"type":14,"tag":56,"props":85,"children":86},{},[87,93,107,112],{"type":14,"tag":88,"props":89,"children":90},"td",{},[91],{"type":20,"value":92},"1",{"type":14,"tag":88,"props":94,"children":95},{},[96,98,105],{"type":20,"value":97},"URL ",{"type":14,"tag":99,"props":100,"children":102},"code",{"className":101},[],[103],{"type":20,"value":104},"_attr",{"type":20,"value":106}," 参数",{"type":14,"tag":88,"props":108,"children":109},{},[110],{"type":20,"value":111},"100%",{"type":14,"tag":88,"props":113,"children":114},{},[115],{"type":20,"value":116},"mobileconfig 动态注入的 base64 参数",{"type":14,"tag":56,"props":118,"children":119},{},[120,125,130,135],{"type":14,"tag":88,"props":121,"children":122},{},[123],{"type":20,"value":124},"2",{"type":14,"tag":88,"props":126,"children":127},{},[128],{"type":20,"value":129},"剪贴板暗水印",{"type":14,"tag":88,"props":131,"children":132},{},[133],{"type":20,"value":134},"99%",{"type":14,"tag":88,"props":136,"children":137},{},[138],{"type":20,"value":139},"读取零宽字符解码出 clipCode",{"type":14,"tag":56,"props":141,"children":142},{},[143,148,153,158],{"type":14,"tag":88,"props":144,"children":145},{},[146],{"type":20,"value":147},"3",{"type":14,"tag":88,"props":149,"children":150},{},[151],{"type":20,"value":152},"指纹匹配",{"type":14,"tag":88,"props":154,"children":155},{},[156],{"type":20,"value":157},"65-95%",{"type":14,"tag":88,"props":159,"children":160},{},[161],{"type":20,"value":162},"采集指纹调用 resolve API 匹配",{"type":14,"tag":15,"props":164,"children":166},{"id":165},"安装",[167],{"type":20,"value":165},{"type":14,"tag":169,"props":170,"children":172},"h3",{"id":171},"方式一cdn-引入",[173],{"type":20,"value":174},"方式一：CDN 引入",{"type":14,"tag":22,"props":176,"children":177},{},[178,180,186],{"type":20,"value":179},"适合纯 HTML 页面，通过 ",{"type":14,"tag":99,"props":181,"children":183},{"className":182},[],[184],{"type":20,"value":185},"\u003Cscript>",{"type":20,"value":187}," 标签直接引入。",{"type":14,"tag":189,"props":190,"children":194},"pre",{"code":191,"language":192,"meta":7,"className":193,"style":7},"\u003Cscript src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@xxinstall\u002Fsdk@2.0.2\u002Fdist\u002Fxxinstall.global.js\">\u003C\u002Fscript>\n","html","language-html shiki shiki-themes github-dark",[195],{"type":14,"tag":99,"props":196,"children":197},{"__ignoreMap":7},[198],{"type":14,"tag":199,"props":200,"children":203},"span",{"class":201,"line":202},"line",1,[204,210,216,222,227,233,238,242],{"type":14,"tag":199,"props":205,"children":207},{"style":206},"--shiki-default:#E1E4E8",[208],{"type":20,"value":209},"\u003C",{"type":14,"tag":199,"props":211,"children":213},{"style":212},"--shiki-default:#85E89D",[214],{"type":20,"value":215},"script",{"type":14,"tag":199,"props":217,"children":219},{"style":218},"--shiki-default:#B392F0",[220],{"type":20,"value":221}," src",{"type":14,"tag":199,"props":223,"children":224},{"style":206},[225],{"type":20,"value":226},"=",{"type":14,"tag":199,"props":228,"children":230},{"style":229},"--shiki-default:#9ECBFF",[231],{"type":20,"value":232},"\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@xxinstall\u002Fsdk@2.0.2\u002Fdist\u002Fxxinstall.global.js\"",{"type":14,"tag":199,"props":234,"children":235},{"style":206},[236],{"type":20,"value":237},">\u003C\u002F",{"type":14,"tag":199,"props":239,"children":240},{"style":212},[241],{"type":20,"value":215},{"type":14,"tag":199,"props":243,"children":244},{"style":206},[245],{"type":20,"value":246},">\n",{"type":14,"tag":169,"props":248,"children":250},{"id":249},"方式二npm-安装",[251],{"type":20,"value":252},"方式二：npm 安装",{"type":14,"tag":22,"props":254,"children":255},{},[256],{"type":20,"value":257},"适合 Vue \u002F React 等前端工程化项目，支持 TypeScript 类型和 tree-shaking。",{"type":14,"tag":189,"props":259,"children":263},{"code":260,"language":261,"meta":7,"className":262,"style":7},"npm install @xxinstall\u002Fsdk\n","bash","language-bash shiki shiki-themes github-dark",[264],{"type":14,"tag":99,"props":265,"children":266},{"__ignoreMap":7},[267],{"type":14,"tag":199,"props":268,"children":269},{"class":201,"line":202},[270,275,280],{"type":14,"tag":199,"props":271,"children":272},{"style":218},[273],{"type":20,"value":274},"npm",{"type":14,"tag":199,"props":276,"children":277},{"style":229},[278],{"type":20,"value":279}," install",{"type":14,"tag":199,"props":281,"children":282},{"style":229},[283],{"type":20,"value":284}," @xxinstall\u002Fsdk\n",{"type":14,"tag":189,"props":286,"children":290},{"code":287,"language":288,"meta":7,"className":289,"style":7},"import { XXinstall } from '@xxinstall\u002Fsdk';\nimport type { AttributionResult } from '@xxinstall\u002Fsdk'; \u002F\u002F TypeScript 可选\n","typescript","language-typescript shiki shiki-themes github-dark",[291],{"type":14,"tag":99,"props":292,"children":293},{"__ignoreMap":7},[294,323],{"type":14,"tag":199,"props":295,"children":296},{"class":201,"line":202},[297,303,308,313,318],{"type":14,"tag":199,"props":298,"children":300},{"style":299},"--shiki-default:#F97583",[301],{"type":20,"value":302},"import",{"type":14,"tag":199,"props":304,"children":305},{"style":206},[306],{"type":20,"value":307}," { XXinstall } ",{"type":14,"tag":199,"props":309,"children":310},{"style":299},[311],{"type":20,"value":312},"from",{"type":14,"tag":199,"props":314,"children":315},{"style":229},[316],{"type":20,"value":317}," '@xxinstall\u002Fsdk'",{"type":14,"tag":199,"props":319,"children":320},{"style":206},[321],{"type":20,"value":322},";\n",{"type":14,"tag":199,"props":324,"children":326},{"class":201,"line":325},2,[327,331,336,341,345,349,354],{"type":14,"tag":199,"props":328,"children":329},{"style":299},[330],{"type":20,"value":302},{"type":14,"tag":199,"props":332,"children":333},{"style":299},[334],{"type":20,"value":335}," type",{"type":14,"tag":199,"props":337,"children":338},{"style":206},[339],{"type":20,"value":340}," { AttributionResult } ",{"type":14,"tag":199,"props":342,"children":343},{"style":299},[344],{"type":20,"value":312},{"type":14,"tag":199,"props":346,"children":347},{"style":229},[348],{"type":20,"value":317},{"type":14,"tag":199,"props":350,"children":351},{"style":206},[352],{"type":20,"value":353},"; ",{"type":14,"tag":199,"props":355,"children":357},{"style":356},"--shiki-default:#6A737D",[358],{"type":20,"value":359},"\u002F\u002F TypeScript 可选\n",{"type":14,"tag":15,"props":361,"children":363},{"id":362},"接入示例",[364],{"type":20,"value":362},{"type":14,"tag":169,"props":366,"children":368},{"id":367},"示例一cdn-引入纯-html-页面",[369],{"type":20,"value":370},"示例一：CDN 引入（纯 HTML 页面）",{"type":14,"tag":189,"props":372,"children":374},{"code":373,"language":192,"meta":7,"className":193,"style":7},"\u003C!DOCTYPE html>\n\u003Chtml>\n\u003Chead>\n  \u003Cmeta charset=\"UTF-8\">\n  \u003Cmeta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n  \u003Ctitle>我的 WebClip 应用\u003C\u002Ftitle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv id=\"result\">归因匹配中...\u003C\u002Fdiv>\n\n  \u003Cscript src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@xxinstall\u002Fsdk@2.0.2\u002Fdist\u002Fxxinstall.global.js\">\u003C\u002Fscript>\n  \u003Cscript>\n    XXinstall.resolve({\n      baseUrl: 'https:\u002F\u002Fyour-api-domain.com',\n      appKey: 'YOUR_APP_KEY',\n      appSecret: 'YOUR_APP_SECRET',\n      onResult: function(result) {\n        if (result && result.matchType !== 'none') {\n          document.getElementById('result').textContent =\n            '归因成功: ' + result.inviteCode + ' (' + result.matchType + ')';\n        } else {\n          document.getElementById('result').textContent = '未匹配到归因数据';\n        }\n      },\n      onError: function(err) {\n        console.error('归因失败:', err);\n      },\n    });\n  \u003C\u002Fscript>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n",[375],{"type":14,"tag":99,"props":376,"children":377},{"__ignoreMap":7},[378,400,415,432,464,508,534,551,568,608,618,654,670,689,708,726,744,779,817,850,900,919,956,965,974,1004,1032,1040,1049,1066,1082],{"type":14,"tag":199,"props":379,"children":380},{"class":201,"line":202},[381,386,391,396],{"type":14,"tag":199,"props":382,"children":383},{"style":206},[384],{"type":20,"value":385},"\u003C!",{"type":14,"tag":199,"props":387,"children":388},{"style":212},[389],{"type":20,"value":390},"DOCTYPE",{"type":14,"tag":199,"props":392,"children":393},{"style":218},[394],{"type":20,"value":395}," html",{"type":14,"tag":199,"props":397,"children":398},{"style":206},[399],{"type":20,"value":246},{"type":14,"tag":199,"props":401,"children":402},{"class":201,"line":325},[403,407,411],{"type":14,"tag":199,"props":404,"children":405},{"style":206},[406],{"type":20,"value":209},{"type":14,"tag":199,"props":408,"children":409},{"style":212},[410],{"type":20,"value":192},{"type":14,"tag":199,"props":412,"children":413},{"style":206},[414],{"type":20,"value":246},{"type":14,"tag":199,"props":416,"children":418},{"class":201,"line":417},3,[419,423,428],{"type":14,"tag":199,"props":420,"children":421},{"style":206},[422],{"type":20,"value":209},{"type":14,"tag":199,"props":424,"children":425},{"style":212},[426],{"type":20,"value":427},"head",{"type":14,"tag":199,"props":429,"children":430},{"style":206},[431],{"type":20,"value":246},{"type":14,"tag":199,"props":433,"children":435},{"class":201,"line":434},4,[436,441,446,451,455,460],{"type":14,"tag":199,"props":437,"children":438},{"style":206},[439],{"type":20,"value":440},"  \u003C",{"type":14,"tag":199,"props":442,"children":443},{"style":212},[444],{"type":20,"value":445},"meta",{"type":14,"tag":199,"props":447,"children":448},{"style":218},[449],{"type":20,"value":450}," charset",{"type":14,"tag":199,"props":452,"children":453},{"style":206},[454],{"type":20,"value":226},{"type":14,"tag":199,"props":456,"children":457},{"style":229},[458],{"type":20,"value":459},"\"UTF-8\"",{"type":14,"tag":199,"props":461,"children":462},{"style":206},[463],{"type":20,"value":246},{"type":14,"tag":199,"props":465,"children":467},{"class":201,"line":466},5,[468,472,476,481,485,490,495,499,504],{"type":14,"tag":199,"props":469,"children":470},{"style":206},[471],{"type":20,"value":440},{"type":14,"tag":199,"props":473,"children":474},{"style":212},[475],{"type":20,"value":445},{"type":14,"tag":199,"props":477,"children":478},{"style":218},[479],{"type":20,"value":480}," name",{"type":14,"tag":199,"props":482,"children":483},{"style":206},[484],{"type":20,"value":226},{"type":14,"tag":199,"props":486,"children":487},{"style":229},[488],{"type":20,"value":489},"\"apple-mobile-web-app-capable\"",{"type":14,"tag":199,"props":491,"children":492},{"style":218},[493],{"type":20,"value":494}," content",{"type":14,"tag":199,"props":496,"children":497},{"style":206},[498],{"type":20,"value":226},{"type":14,"tag":199,"props":500,"children":501},{"style":229},[502],{"type":20,"value":503},"\"yes\"",{"type":14,"tag":199,"props":505,"children":506},{"style":206},[507],{"type":20,"value":246},{"type":14,"tag":199,"props":509,"children":511},{"class":201,"line":510},6,[512,516,521,526,530],{"type":14,"tag":199,"props":513,"children":514},{"style":206},[515],{"type":20,"value":440},{"type":14,"tag":199,"props":517,"children":518},{"style":212},[519],{"type":20,"value":520},"title",{"type":14,"tag":199,"props":522,"children":523},{"style":206},[524],{"type":20,"value":525},">我的 WebClip 应用\u003C\u002F",{"type":14,"tag":199,"props":527,"children":528},{"style":212},[529],{"type":20,"value":520},{"type":14,"tag":199,"props":531,"children":532},{"style":206},[533],{"type":20,"value":246},{"type":14,"tag":199,"props":535,"children":537},{"class":201,"line":536},7,[538,543,547],{"type":14,"tag":199,"props":539,"children":540},{"style":206},[541],{"type":20,"value":542},"\u003C\u002F",{"type":14,"tag":199,"props":544,"children":545},{"style":212},[546],{"type":20,"value":427},{"type":14,"tag":199,"props":548,"children":549},{"style":206},[550],{"type":20,"value":246},{"type":14,"tag":199,"props":552,"children":554},{"class":201,"line":553},8,[555,559,564],{"type":14,"tag":199,"props":556,"children":557},{"style":206},[558],{"type":20,"value":209},{"type":14,"tag":199,"props":560,"children":561},{"style":212},[562],{"type":20,"value":563},"body",{"type":14,"tag":199,"props":565,"children":566},{"style":206},[567],{"type":20,"value":246},{"type":14,"tag":199,"props":569,"children":571},{"class":201,"line":570},9,[572,576,581,586,590,595,600,604],{"type":14,"tag":199,"props":573,"children":574},{"style":206},[575],{"type":20,"value":440},{"type":14,"tag":199,"props":577,"children":578},{"style":212},[579],{"type":20,"value":580},"div",{"type":14,"tag":199,"props":582,"children":583},{"style":218},[584],{"type":20,"value":585}," id",{"type":14,"tag":199,"props":587,"children":588},{"style":206},[589],{"type":20,"value":226},{"type":14,"tag":199,"props":591,"children":592},{"style":229},[593],{"type":20,"value":594},"\"result\"",{"type":14,"tag":199,"props":596,"children":597},{"style":206},[598],{"type":20,"value":599},">归因匹配中...\u003C\u002F",{"type":14,"tag":199,"props":601,"children":602},{"style":212},[603],{"type":20,"value":580},{"type":14,"tag":199,"props":605,"children":606},{"style":206},[607],{"type":20,"value":246},{"type":14,"tag":199,"props":609,"children":611},{"class":201,"line":610},10,[612],{"type":14,"tag":199,"props":613,"children":615},{"emptyLinePlaceholder":614},true,[616],{"type":20,"value":617},"\n",{"type":14,"tag":199,"props":619,"children":621},{"class":201,"line":620},11,[622,626,630,634,638,642,646,650],{"type":14,"tag":199,"props":623,"children":624},{"style":206},[625],{"type":20,"value":440},{"type":14,"tag":199,"props":627,"children":628},{"style":212},[629],{"type":20,"value":215},{"type":14,"tag":199,"props":631,"children":632},{"style":218},[633],{"type":20,"value":221},{"type":14,"tag":199,"props":635,"children":636},{"style":206},[637],{"type":20,"value":226},{"type":14,"tag":199,"props":639,"children":640},{"style":229},[641],{"type":20,"value":232},{"type":14,"tag":199,"props":643,"children":644},{"style":206},[645],{"type":20,"value":237},{"type":14,"tag":199,"props":647,"children":648},{"style":212},[649],{"type":20,"value":215},{"type":14,"tag":199,"props":651,"children":652},{"style":206},[653],{"type":20,"value":246},{"type":14,"tag":199,"props":655,"children":657},{"class":201,"line":656},12,[658,662,666],{"type":14,"tag":199,"props":659,"children":660},{"style":206},[661],{"type":20,"value":440},{"type":14,"tag":199,"props":663,"children":664},{"style":212},[665],{"type":20,"value":215},{"type":14,"tag":199,"props":667,"children":668},{"style":206},[669],{"type":20,"value":246},{"type":14,"tag":199,"props":671,"children":673},{"class":201,"line":672},13,[674,679,684],{"type":14,"tag":199,"props":675,"children":676},{"style":206},[677],{"type":20,"value":678},"    XXinstall.",{"type":14,"tag":199,"props":680,"children":681},{"style":218},[682],{"type":20,"value":683},"resolve",{"type":14,"tag":199,"props":685,"children":686},{"style":206},[687],{"type":20,"value":688},"({\n",{"type":14,"tag":199,"props":690,"children":692},{"class":201,"line":691},14,[693,698,703],{"type":14,"tag":199,"props":694,"children":695},{"style":206},[696],{"type":20,"value":697},"      baseUrl: ",{"type":14,"tag":199,"props":699,"children":700},{"style":229},[701],{"type":20,"value":702},"'https:\u002F\u002Fyour-api-domain.com'",{"type":14,"tag":199,"props":704,"children":705},{"style":206},[706],{"type":20,"value":707},",\n",{"type":14,"tag":199,"props":709,"children":711},{"class":201,"line":710},15,[712,717,722],{"type":14,"tag":199,"props":713,"children":714},{"style":206},[715],{"type":20,"value":716},"      appKey: ",{"type":14,"tag":199,"props":718,"children":719},{"style":229},[720],{"type":20,"value":721},"'YOUR_APP_KEY'",{"type":14,"tag":199,"props":723,"children":724},{"style":206},[725],{"type":20,"value":707},{"type":14,"tag":199,"props":727,"children":729},{"class":201,"line":728},16,[730,735,740],{"type":14,"tag":199,"props":731,"children":732},{"style":206},[733],{"type":20,"value":734},"      appSecret: ",{"type":14,"tag":199,"props":736,"children":737},{"style":229},[738],{"type":20,"value":739},"'YOUR_APP_SECRET'",{"type":14,"tag":199,"props":741,"children":742},{"style":206},[743],{"type":20,"value":707},{"type":14,"tag":199,"props":745,"children":747},{"class":201,"line":746},17,[748,753,758,763,768,774],{"type":14,"tag":199,"props":749,"children":750},{"style":218},[751],{"type":20,"value":752},"      onResult",{"type":14,"tag":199,"props":754,"children":755},{"style":206},[756],{"type":20,"value":757},": ",{"type":14,"tag":199,"props":759,"children":760},{"style":299},[761],{"type":20,"value":762},"function",{"type":14,"tag":199,"props":764,"children":765},{"style":206},[766],{"type":20,"value":767},"(",{"type":14,"tag":199,"props":769,"children":771},{"style":770},"--shiki-default:#FFAB70",[772],{"type":20,"value":773},"result",{"type":14,"tag":199,"props":775,"children":776},{"style":206},[777],{"type":20,"value":778},") {\n",{"type":14,"tag":199,"props":780,"children":782},{"class":201,"line":781},18,[783,788,793,798,803,808,813],{"type":14,"tag":199,"props":784,"children":785},{"style":299},[786],{"type":20,"value":787},"        if",{"type":14,"tag":199,"props":789,"children":790},{"style":206},[791],{"type":20,"value":792}," (result ",{"type":14,"tag":199,"props":794,"children":795},{"style":299},[796],{"type":20,"value":797},"&&",{"type":14,"tag":199,"props":799,"children":800},{"style":206},[801],{"type":20,"value":802}," result.matchType ",{"type":14,"tag":199,"props":804,"children":805},{"style":299},[806],{"type":20,"value":807},"!==",{"type":14,"tag":199,"props":809,"children":810},{"style":229},[811],{"type":20,"value":812}," 'none'",{"type":14,"tag":199,"props":814,"children":815},{"style":206},[816],{"type":20,"value":778},{"type":14,"tag":199,"props":818,"children":820},{"class":201,"line":819},19,[821,826,831,835,840,845],{"type":14,"tag":199,"props":822,"children":823},{"style":206},[824],{"type":20,"value":825},"          document.",{"type":14,"tag":199,"props":827,"children":828},{"style":218},[829],{"type":20,"value":830},"getElementById",{"type":14,"tag":199,"props":832,"children":833},{"style":206},[834],{"type":20,"value":767},{"type":14,"tag":199,"props":836,"children":837},{"style":229},[838],{"type":20,"value":839},"'result'",{"type":14,"tag":199,"props":841,"children":842},{"style":206},[843],{"type":20,"value":844},").textContent ",{"type":14,"tag":199,"props":846,"children":847},{"style":299},[848],{"type":20,"value":849},"=\n",{"type":14,"tag":199,"props":851,"children":853},{"class":201,"line":852},20,[854,859,864,869,874,879,883,887,891,896],{"type":14,"tag":199,"props":855,"children":856},{"style":229},[857],{"type":20,"value":858},"            '归因成功: '",{"type":14,"tag":199,"props":860,"children":861},{"style":299},[862],{"type":20,"value":863}," +",{"type":14,"tag":199,"props":865,"children":866},{"style":206},[867],{"type":20,"value":868}," result.inviteCode ",{"type":14,"tag":199,"props":870,"children":871},{"style":299},[872],{"type":20,"value":873},"+",{"type":14,"tag":199,"props":875,"children":876},{"style":229},[877],{"type":20,"value":878}," ' ('",{"type":14,"tag":199,"props":880,"children":881},{"style":299},[882],{"type":20,"value":863},{"type":14,"tag":199,"props":884,"children":885},{"style":206},[886],{"type":20,"value":802},{"type":14,"tag":199,"props":888,"children":889},{"style":299},[890],{"type":20,"value":873},{"type":14,"tag":199,"props":892,"children":893},{"style":229},[894],{"type":20,"value":895}," ')'",{"type":14,"tag":199,"props":897,"children":898},{"style":206},[899],{"type":20,"value":322},{"type":14,"tag":199,"props":901,"children":903},{"class":201,"line":902},21,[904,909,914],{"type":14,"tag":199,"props":905,"children":906},{"style":206},[907],{"type":20,"value":908},"        } ",{"type":14,"tag":199,"props":910,"children":911},{"style":299},[912],{"type":20,"value":913},"else",{"type":14,"tag":199,"props":915,"children":916},{"style":206},[917],{"type":20,"value":918}," {\n",{"type":14,"tag":199,"props":920,"children":922},{"class":201,"line":921},22,[923,927,931,935,939,943,947,952],{"type":14,"tag":199,"props":924,"children":925},{"style":206},[926],{"type":20,"value":825},{"type":14,"tag":199,"props":928,"children":929},{"style":218},[930],{"type":20,"value":830},{"type":14,"tag":199,"props":932,"children":933},{"style":206},[934],{"type":20,"value":767},{"type":14,"tag":199,"props":936,"children":937},{"style":229},[938],{"type":20,"value":839},{"type":14,"tag":199,"props":940,"children":941},{"style":206},[942],{"type":20,"value":844},{"type":14,"tag":199,"props":944,"children":945},{"style":299},[946],{"type":20,"value":226},{"type":14,"tag":199,"props":948,"children":949},{"style":229},[950],{"type":20,"value":951}," '未匹配到归因数据'",{"type":14,"tag":199,"props":953,"children":954},{"style":206},[955],{"type":20,"value":322},{"type":14,"tag":199,"props":957,"children":959},{"class":201,"line":958},23,[960],{"type":14,"tag":199,"props":961,"children":962},{"style":206},[963],{"type":20,"value":964},"        }\n",{"type":14,"tag":199,"props":966,"children":968},{"class":201,"line":967},24,[969],{"type":14,"tag":199,"props":970,"children":971},{"style":206},[972],{"type":20,"value":973},"      },\n",{"type":14,"tag":199,"props":975,"children":977},{"class":201,"line":976},25,[978,983,987,991,995,1000],{"type":14,"tag":199,"props":979,"children":980},{"style":218},[981],{"type":20,"value":982},"      onError",{"type":14,"tag":199,"props":984,"children":985},{"style":206},[986],{"type":20,"value":757},{"type":14,"tag":199,"props":988,"children":989},{"style":299},[990],{"type":20,"value":762},{"type":14,"tag":199,"props":992,"children":993},{"style":206},[994],{"type":20,"value":767},{"type":14,"tag":199,"props":996,"children":997},{"style":770},[998],{"type":20,"value":999},"err",{"type":14,"tag":199,"props":1001,"children":1002},{"style":206},[1003],{"type":20,"value":778},{"type":14,"tag":199,"props":1005,"children":1007},{"class":201,"line":1006},26,[1008,1013,1018,1022,1027],{"type":14,"tag":199,"props":1009,"children":1010},{"style":206},[1011],{"type":20,"value":1012},"        console.",{"type":14,"tag":199,"props":1014,"children":1015},{"style":218},[1016],{"type":20,"value":1017},"error",{"type":14,"tag":199,"props":1019,"children":1020},{"style":206},[1021],{"type":20,"value":767},{"type":14,"tag":199,"props":1023,"children":1024},{"style":229},[1025],{"type":20,"value":1026},"'归因失败:'",{"type":14,"tag":199,"props":1028,"children":1029},{"style":206},[1030],{"type":20,"value":1031},", err);\n",{"type":14,"tag":199,"props":1033,"children":1035},{"class":201,"line":1034},27,[1036],{"type":14,"tag":199,"props":1037,"children":1038},{"style":206},[1039],{"type":20,"value":973},{"type":14,"tag":199,"props":1041,"children":1043},{"class":201,"line":1042},28,[1044],{"type":14,"tag":199,"props":1045,"children":1046},{"style":206},[1047],{"type":20,"value":1048},"    });\n",{"type":14,"tag":199,"props":1050,"children":1052},{"class":201,"line":1051},29,[1053,1058,1062],{"type":14,"tag":199,"props":1054,"children":1055},{"style":206},[1056],{"type":20,"value":1057},"  \u003C\u002F",{"type":14,"tag":199,"props":1059,"children":1060},{"style":212},[1061],{"type":20,"value":215},{"type":14,"tag":199,"props":1063,"children":1064},{"style":206},[1065],{"type":20,"value":246},{"type":14,"tag":199,"props":1067,"children":1069},{"class":201,"line":1068},30,[1070,1074,1078],{"type":14,"tag":199,"props":1071,"children":1072},{"style":206},[1073],{"type":20,"value":542},{"type":14,"tag":199,"props":1075,"children":1076},{"style":212},[1077],{"type":20,"value":563},{"type":14,"tag":199,"props":1079,"children":1080},{"style":206},[1081],{"type":20,"value":246},{"type":14,"tag":199,"props":1083,"children":1085},{"class":201,"line":1084},31,[1086,1090,1094],{"type":14,"tag":199,"props":1087,"children":1088},{"style":206},[1089],{"type":20,"value":542},{"type":14,"tag":199,"props":1091,"children":1092},{"style":212},[1093],{"type":20,"value":192},{"type":14,"tag":199,"props":1095,"children":1096},{"style":206},[1097],{"type":20,"value":246},{"type":14,"tag":169,"props":1099,"children":1101},{"id":1100},"示例二npm-引入vue-3-项目",[1102],{"type":20,"value":1103},"示例二：npm 引入（Vue 3 项目）",{"type":14,"tag":189,"props":1105,"children":1107},{"code":1106,"language":192,"meta":7,"className":193,"style":7},"\u003Ctemplate>\n  \u003Cdiv>\n    \u003Cp v-if=\"loading\">归因匹配中...\u003C\u002Fp>\n    \u003Cdiv v-else-if=\"result\">\n      \u003Cp>inviteCode: {{ result.inviteCode }}\u003C\u002Fp>\n      \u003Cp>channel: {{ result.channel }}\u003C\u002Fp>\n      \u003Cp>matchType: {{ result.matchType }}\u003C\u002Fp>\n      \u003Cp>confidence: {{ (result.confidence * 100).toFixed(1) }}%\u003C\u002Fp>\n    \u003C\u002Fdiv>\n    \u003Cp v-else>未匹配到归因数据\u003C\u002Fp>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n\n\u003Cscript setup lang=\"ts\">\nimport { ref, onMounted } from 'vue'\nimport { XXinstall } from '@xxinstall\u002Fsdk'\nimport type { AttributionResult } from '@xxinstall\u002Fsdk'\n\nconst loading = ref(true)\nconst result = ref\u003CAttributionResult | null>(null)\n\nonMounted(() => {\n  XXinstall.resolve({\n    baseUrl: 'https:\u002F\u002Fyour-api-domain.com',\n    appKey: 'YOUR_APP_KEY',\n    appSecret: 'YOUR_APP_SECRET',\n    onResult(data) {\n      result.value = data?.matchType !== 'none' ? data : null\n      loading.value = false\n    },\n    onError(err) {\n      console.error('归因失败:', err)\n      loading.value = false\n    },\n  })\n})\n\u003C\u002Fscript>\n",[1108],{"type":14,"tag":99,"props":1109,"children":1110},{"__ignoreMap":7},[1111,1127,1142,1180,1208,1233,1257,1281,1305,1321,1350,1365,1380,1387,1421,1442,1462,1485,1492,1530,1583,1590,1612,1628,1644,1660,1676,1697,1742,1759,1767,1787,1813,1829,1837,1846,1855],{"type":14,"tag":199,"props":1112,"children":1113},{"class":201,"line":202},[1114,1118,1123],{"type":14,"tag":199,"props":1115,"children":1116},{"style":206},[1117],{"type":20,"value":209},{"type":14,"tag":199,"props":1119,"children":1120},{"style":212},[1121],{"type":20,"value":1122},"template",{"type":14,"tag":199,"props":1124,"children":1125},{"style":206},[1126],{"type":20,"value":246},{"type":14,"tag":199,"props":1128,"children":1129},{"class":201,"line":325},[1130,1134,1138],{"type":14,"tag":199,"props":1131,"children":1132},{"style":206},[1133],{"type":20,"value":440},{"type":14,"tag":199,"props":1135,"children":1136},{"style":212},[1137],{"type":20,"value":580},{"type":14,"tag":199,"props":1139,"children":1140},{"style":206},[1141],{"type":20,"value":246},{"type":14,"tag":199,"props":1143,"children":1144},{"class":201,"line":417},[1145,1150,1154,1159,1163,1168,1172,1176],{"type":14,"tag":199,"props":1146,"children":1147},{"style":206},[1148],{"type":20,"value":1149},"    \u003C",{"type":14,"tag":199,"props":1151,"children":1152},{"style":212},[1153],{"type":20,"value":22},{"type":14,"tag":199,"props":1155,"children":1156},{"style":218},[1157],{"type":20,"value":1158}," v-if",{"type":14,"tag":199,"props":1160,"children":1161},{"style":206},[1162],{"type":20,"value":226},{"type":14,"tag":199,"props":1164,"children":1165},{"style":229},[1166],{"type":20,"value":1167},"\"loading\"",{"type":14,"tag":199,"props":1169,"children":1170},{"style":206},[1171],{"type":20,"value":599},{"type":14,"tag":199,"props":1173,"children":1174},{"style":212},[1175],{"type":20,"value":22},{"type":14,"tag":199,"props":1177,"children":1178},{"style":206},[1179],{"type":20,"value":246},{"type":14,"tag":199,"props":1181,"children":1182},{"class":201,"line":434},[1183,1187,1191,1196,1200,1204],{"type":14,"tag":199,"props":1184,"children":1185},{"style":206},[1186],{"type":20,"value":1149},{"type":14,"tag":199,"props":1188,"children":1189},{"style":212},[1190],{"type":20,"value":580},{"type":14,"tag":199,"props":1192,"children":1193},{"style":218},[1194],{"type":20,"value":1195}," v-else-if",{"type":14,"tag":199,"props":1197,"children":1198},{"style":206},[1199],{"type":20,"value":226},{"type":14,"tag":199,"props":1201,"children":1202},{"style":229},[1203],{"type":20,"value":594},{"type":14,"tag":199,"props":1205,"children":1206},{"style":206},[1207],{"type":20,"value":246},{"type":14,"tag":199,"props":1209,"children":1210},{"class":201,"line":466},[1211,1216,1220,1225,1229],{"type":14,"tag":199,"props":1212,"children":1213},{"style":206},[1214],{"type":20,"value":1215},"      \u003C",{"type":14,"tag":199,"props":1217,"children":1218},{"style":212},[1219],{"type":20,"value":22},{"type":14,"tag":199,"props":1221,"children":1222},{"style":206},[1223],{"type":20,"value":1224},">inviteCode: {{ result.inviteCode }}\u003C\u002F",{"type":14,"tag":199,"props":1226,"children":1227},{"style":212},[1228],{"type":20,"value":22},{"type":14,"tag":199,"props":1230,"children":1231},{"style":206},[1232],{"type":20,"value":246},{"type":14,"tag":199,"props":1234,"children":1235},{"class":201,"line":510},[1236,1240,1244,1249,1253],{"type":14,"tag":199,"props":1237,"children":1238},{"style":206},[1239],{"type":20,"value":1215},{"type":14,"tag":199,"props":1241,"children":1242},{"style":212},[1243],{"type":20,"value":22},{"type":14,"tag":199,"props":1245,"children":1246},{"style":206},[1247],{"type":20,"value":1248},">channel: {{ result.channel }}\u003C\u002F",{"type":14,"tag":199,"props":1250,"children":1251},{"style":212},[1252],{"type":20,"value":22},{"type":14,"tag":199,"props":1254,"children":1255},{"style":206},[1256],{"type":20,"value":246},{"type":14,"tag":199,"props":1258,"children":1259},{"class":201,"line":536},[1260,1264,1268,1273,1277],{"type":14,"tag":199,"props":1261,"children":1262},{"style":206},[1263],{"type":20,"value":1215},{"type":14,"tag":199,"props":1265,"children":1266},{"style":212},[1267],{"type":20,"value":22},{"type":14,"tag":199,"props":1269,"children":1270},{"style":206},[1271],{"type":20,"value":1272},">matchType: {{ result.matchType }}\u003C\u002F",{"type":14,"tag":199,"props":1274,"children":1275},{"style":212},[1276],{"type":20,"value":22},{"type":14,"tag":199,"props":1278,"children":1279},{"style":206},[1280],{"type":20,"value":246},{"type":14,"tag":199,"props":1282,"children":1283},{"class":201,"line":553},[1284,1288,1292,1297,1301],{"type":14,"tag":199,"props":1285,"children":1286},{"style":206},[1287],{"type":20,"value":1215},{"type":14,"tag":199,"props":1289,"children":1290},{"style":212},[1291],{"type":20,"value":22},{"type":14,"tag":199,"props":1293,"children":1294},{"style":206},[1295],{"type":20,"value":1296},">confidence: {{ (result.confidence * 100).toFixed(1) }}%\u003C\u002F",{"type":14,"tag":199,"props":1298,"children":1299},{"style":212},[1300],{"type":20,"value":22},{"type":14,"tag":199,"props":1302,"children":1303},{"style":206},[1304],{"type":20,"value":246},{"type":14,"tag":199,"props":1306,"children":1307},{"class":201,"line":570},[1308,1313,1317],{"type":14,"tag":199,"props":1309,"children":1310},{"style":206},[1311],{"type":20,"value":1312},"    \u003C\u002F",{"type":14,"tag":199,"props":1314,"children":1315},{"style":212},[1316],{"type":20,"value":580},{"type":14,"tag":199,"props":1318,"children":1319},{"style":206},[1320],{"type":20,"value":246},{"type":14,"tag":199,"props":1322,"children":1323},{"class":201,"line":610},[1324,1328,1332,1337,1342,1346],{"type":14,"tag":199,"props":1325,"children":1326},{"style":206},[1327],{"type":20,"value":1149},{"type":14,"tag":199,"props":1329,"children":1330},{"style":212},[1331],{"type":20,"value":22},{"type":14,"tag":199,"props":1333,"children":1334},{"style":218},[1335],{"type":20,"value":1336}," v-else",{"type":14,"tag":199,"props":1338,"children":1339},{"style":206},[1340],{"type":20,"value":1341},">未匹配到归因数据\u003C\u002F",{"type":14,"tag":199,"props":1343,"children":1344},{"style":212},[1345],{"type":20,"value":22},{"type":14,"tag":199,"props":1347,"children":1348},{"style":206},[1349],{"type":20,"value":246},{"type":14,"tag":199,"props":1351,"children":1352},{"class":201,"line":620},[1353,1357,1361],{"type":14,"tag":199,"props":1354,"children":1355},{"style":206},[1356],{"type":20,"value":1057},{"type":14,"tag":199,"props":1358,"children":1359},{"style":212},[1360],{"type":20,"value":580},{"type":14,"tag":199,"props":1362,"children":1363},{"style":206},[1364],{"type":20,"value":246},{"type":14,"tag":199,"props":1366,"children":1367},{"class":201,"line":656},[1368,1372,1376],{"type":14,"tag":199,"props":1369,"children":1370},{"style":206},[1371],{"type":20,"value":542},{"type":14,"tag":199,"props":1373,"children":1374},{"style":212},[1375],{"type":20,"value":1122},{"type":14,"tag":199,"props":1377,"children":1378},{"style":206},[1379],{"type":20,"value":246},{"type":14,"tag":199,"props":1381,"children":1382},{"class":201,"line":672},[1383],{"type":14,"tag":199,"props":1384,"children":1385},{"emptyLinePlaceholder":614},[1386],{"type":20,"value":617},{"type":14,"tag":199,"props":1388,"children":1389},{"class":201,"line":691},[1390,1394,1398,1403,1408,1412,1417],{"type":14,"tag":199,"props":1391,"children":1392},{"style":206},[1393],{"type":20,"value":209},{"type":14,"tag":199,"props":1395,"children":1396},{"style":212},[1397],{"type":20,"value":215},{"type":14,"tag":199,"props":1399,"children":1400},{"style":218},[1401],{"type":20,"value":1402}," setup",{"type":14,"tag":199,"props":1404,"children":1405},{"style":218},[1406],{"type":20,"value":1407}," lang",{"type":14,"tag":199,"props":1409,"children":1410},{"style":206},[1411],{"type":20,"value":226},{"type":14,"tag":199,"props":1413,"children":1414},{"style":229},[1415],{"type":20,"value":1416},"\"ts\"",{"type":14,"tag":199,"props":1418,"children":1419},{"style":206},[1420],{"type":20,"value":246},{"type":14,"tag":199,"props":1422,"children":1423},{"class":201,"line":710},[1424,1428,1433,1437],{"type":14,"tag":199,"props":1425,"children":1426},{"style":299},[1427],{"type":20,"value":302},{"type":14,"tag":199,"props":1429,"children":1430},{"style":206},[1431],{"type":20,"value":1432}," { ref, onMounted } ",{"type":14,"tag":199,"props":1434,"children":1435},{"style":299},[1436],{"type":20,"value":312},{"type":14,"tag":199,"props":1438,"children":1439},{"style":229},[1440],{"type":20,"value":1441}," 'vue'\n",{"type":14,"tag":199,"props":1443,"children":1444},{"class":201,"line":728},[1445,1449,1453,1457],{"type":14,"tag":199,"props":1446,"children":1447},{"style":299},[1448],{"type":20,"value":302},{"type":14,"tag":199,"props":1450,"children":1451},{"style":206},[1452],{"type":20,"value":307},{"type":14,"tag":199,"props":1454,"children":1455},{"style":299},[1456],{"type":20,"value":312},{"type":14,"tag":199,"props":1458,"children":1459},{"style":229},[1460],{"type":20,"value":1461}," '@xxinstall\u002Fsdk'\n",{"type":14,"tag":199,"props":1463,"children":1464},{"class":201,"line":746},[1465,1469,1473,1477,1481],{"type":14,"tag":199,"props":1466,"children":1467},{"style":299},[1468],{"type":20,"value":302},{"type":14,"tag":199,"props":1470,"children":1471},{"style":299},[1472],{"type":20,"value":335},{"type":14,"tag":199,"props":1474,"children":1475},{"style":206},[1476],{"type":20,"value":340},{"type":14,"tag":199,"props":1478,"children":1479},{"style":299},[1480],{"type":20,"value":312},{"type":14,"tag":199,"props":1482,"children":1483},{"style":229},[1484],{"type":20,"value":1461},{"type":14,"tag":199,"props":1486,"children":1487},{"class":201,"line":781},[1488],{"type":14,"tag":199,"props":1489,"children":1490},{"emptyLinePlaceholder":614},[1491],{"type":20,"value":617},{"type":14,"tag":199,"props":1493,"children":1494},{"class":201,"line":819},[1495,1500,1506,1511,1516,1520,1525],{"type":14,"tag":199,"props":1496,"children":1497},{"style":299},[1498],{"type":20,"value":1499},"const",{"type":14,"tag":199,"props":1501,"children":1503},{"style":1502},"--shiki-default:#79B8FF",[1504],{"type":20,"value":1505}," loading",{"type":14,"tag":199,"props":1507,"children":1508},{"style":299},[1509],{"type":20,"value":1510}," =",{"type":14,"tag":199,"props":1512,"children":1513},{"style":218},[1514],{"type":20,"value":1515}," ref",{"type":14,"tag":199,"props":1517,"children":1518},{"style":206},[1519],{"type":20,"value":767},{"type":14,"tag":199,"props":1521,"children":1522},{"style":1502},[1523],{"type":20,"value":1524},"true",{"type":14,"tag":199,"props":1526,"children":1527},{"style":206},[1528],{"type":20,"value":1529},")\n",{"type":14,"tag":199,"props":1531,"children":1532},{"class":201,"line":852},[1533,1537,1542,1546,1550,1554,1559,1564,1569,1574,1579],{"type":14,"tag":199,"props":1534,"children":1535},{"style":299},[1536],{"type":20,"value":1499},{"type":14,"tag":199,"props":1538,"children":1539},{"style":1502},[1540],{"type":20,"value":1541}," result",{"type":14,"tag":199,"props":1543,"children":1544},{"style":299},[1545],{"type":20,"value":1510},{"type":14,"tag":199,"props":1547,"children":1548},{"style":218},[1549],{"type":20,"value":1515},{"type":14,"tag":199,"props":1551,"children":1552},{"style":206},[1553],{"type":20,"value":209},{"type":14,"tag":199,"props":1555,"children":1556},{"style":218},[1557],{"type":20,"value":1558},"AttributionResult",{"type":14,"tag":199,"props":1560,"children":1561},{"style":299},[1562],{"type":20,"value":1563}," |",{"type":14,"tag":199,"props":1565,"children":1566},{"style":1502},[1567],{"type":20,"value":1568}," null",{"type":14,"tag":199,"props":1570,"children":1571},{"style":206},[1572],{"type":20,"value":1573},">(",{"type":14,"tag":199,"props":1575,"children":1576},{"style":1502},[1577],{"type":20,"value":1578},"null",{"type":14,"tag":199,"props":1580,"children":1581},{"style":206},[1582],{"type":20,"value":1529},{"type":14,"tag":199,"props":1584,"children":1585},{"class":201,"line":902},[1586],{"type":14,"tag":199,"props":1587,"children":1588},{"emptyLinePlaceholder":614},[1589],{"type":20,"value":617},{"type":14,"tag":199,"props":1591,"children":1592},{"class":201,"line":921},[1593,1598,1603,1608],{"type":14,"tag":199,"props":1594,"children":1595},{"style":218},[1596],{"type":20,"value":1597},"onMounted",{"type":14,"tag":199,"props":1599,"children":1600},{"style":206},[1601],{"type":20,"value":1602},"(() ",{"type":14,"tag":199,"props":1604,"children":1605},{"style":299},[1606],{"type":20,"value":1607},"=>",{"type":14,"tag":199,"props":1609,"children":1610},{"style":206},[1611],{"type":20,"value":918},{"type":14,"tag":199,"props":1613,"children":1614},{"class":201,"line":958},[1615,1620,1624],{"type":14,"tag":199,"props":1616,"children":1617},{"style":206},[1618],{"type":20,"value":1619},"  XXinstall.",{"type":14,"tag":199,"props":1621,"children":1622},{"style":218},[1623],{"type":20,"value":683},{"type":14,"tag":199,"props":1625,"children":1626},{"style":206},[1627],{"type":20,"value":688},{"type":14,"tag":199,"props":1629,"children":1630},{"class":201,"line":967},[1631,1636,1640],{"type":14,"tag":199,"props":1632,"children":1633},{"style":206},[1634],{"type":20,"value":1635},"    baseUrl: ",{"type":14,"tag":199,"props":1637,"children":1638},{"style":229},[1639],{"type":20,"value":702},{"type":14,"tag":199,"props":1641,"children":1642},{"style":206},[1643],{"type":20,"value":707},{"type":14,"tag":199,"props":1645,"children":1646},{"class":201,"line":976},[1647,1652,1656],{"type":14,"tag":199,"props":1648,"children":1649},{"style":206},[1650],{"type":20,"value":1651},"    appKey: ",{"type":14,"tag":199,"props":1653,"children":1654},{"style":229},[1655],{"type":20,"value":721},{"type":14,"tag":199,"props":1657,"children":1658},{"style":206},[1659],{"type":20,"value":707},{"type":14,"tag":199,"props":1661,"children":1662},{"class":201,"line":1006},[1663,1668,1672],{"type":14,"tag":199,"props":1664,"children":1665},{"style":206},[1666],{"type":20,"value":1667},"    appSecret: ",{"type":14,"tag":199,"props":1669,"children":1670},{"style":229},[1671],{"type":20,"value":739},{"type":14,"tag":199,"props":1673,"children":1674},{"style":206},[1675],{"type":20,"value":707},{"type":14,"tag":199,"props":1677,"children":1678},{"class":201,"line":1034},[1679,1684,1688,1693],{"type":14,"tag":199,"props":1680,"children":1681},{"style":218},[1682],{"type":20,"value":1683},"    onResult",{"type":14,"tag":199,"props":1685,"children":1686},{"style":206},[1687],{"type":20,"value":767},{"type":14,"tag":199,"props":1689,"children":1690},{"style":770},[1691],{"type":20,"value":1692},"data",{"type":14,"tag":199,"props":1694,"children":1695},{"style":206},[1696],{"type":20,"value":778},{"type":14,"tag":199,"props":1698,"children":1699},{"class":201,"line":1042},[1700,1705,1709,1714,1718,1722,1727,1732,1737],{"type":14,"tag":199,"props":1701,"children":1702},{"style":206},[1703],{"type":20,"value":1704},"      result.value ",{"type":14,"tag":199,"props":1706,"children":1707},{"style":299},[1708],{"type":20,"value":226},{"type":14,"tag":199,"props":1710,"children":1711},{"style":206},[1712],{"type":20,"value":1713}," data?.matchType ",{"type":14,"tag":199,"props":1715,"children":1716},{"style":299},[1717],{"type":20,"value":807},{"type":14,"tag":199,"props":1719,"children":1720},{"style":229},[1721],{"type":20,"value":812},{"type":14,"tag":199,"props":1723,"children":1724},{"style":299},[1725],{"type":20,"value":1726}," ?",{"type":14,"tag":199,"props":1728,"children":1729},{"style":206},[1730],{"type":20,"value":1731}," data ",{"type":14,"tag":199,"props":1733,"children":1734},{"style":299},[1735],{"type":20,"value":1736},":",{"type":14,"tag":199,"props":1738,"children":1739},{"style":1502},[1740],{"type":20,"value":1741}," null\n",{"type":14,"tag":199,"props":1743,"children":1744},{"class":201,"line":1051},[1745,1750,1754],{"type":14,"tag":199,"props":1746,"children":1747},{"style":206},[1748],{"type":20,"value":1749},"      loading.value ",{"type":14,"tag":199,"props":1751,"children":1752},{"style":299},[1753],{"type":20,"value":226},{"type":14,"tag":199,"props":1755,"children":1756},{"style":1502},[1757],{"type":20,"value":1758}," false\n",{"type":14,"tag":199,"props":1760,"children":1761},{"class":201,"line":1068},[1762],{"type":14,"tag":199,"props":1763,"children":1764},{"style":206},[1765],{"type":20,"value":1766},"    },\n",{"type":14,"tag":199,"props":1768,"children":1769},{"class":201,"line":1084},[1770,1775,1779,1783],{"type":14,"tag":199,"props":1771,"children":1772},{"style":218},[1773],{"type":20,"value":1774},"    onError",{"type":14,"tag":199,"props":1776,"children":1777},{"style":206},[1778],{"type":20,"value":767},{"type":14,"tag":199,"props":1780,"children":1781},{"style":770},[1782],{"type":20,"value":999},{"type":14,"tag":199,"props":1784,"children":1785},{"style":206},[1786],{"type":20,"value":778},{"type":14,"tag":199,"props":1788,"children":1790},{"class":201,"line":1789},32,[1791,1796,1800,1804,1808],{"type":14,"tag":199,"props":1792,"children":1793},{"style":206},[1794],{"type":20,"value":1795},"      console.",{"type":14,"tag":199,"props":1797,"children":1798},{"style":218},[1799],{"type":20,"value":1017},{"type":14,"tag":199,"props":1801,"children":1802},{"style":206},[1803],{"type":20,"value":767},{"type":14,"tag":199,"props":1805,"children":1806},{"style":229},[1807],{"type":20,"value":1026},{"type":14,"tag":199,"props":1809,"children":1810},{"style":206},[1811],{"type":20,"value":1812},", err)\n",{"type":14,"tag":199,"props":1814,"children":1816},{"class":201,"line":1815},33,[1817,1821,1825],{"type":14,"tag":199,"props":1818,"children":1819},{"style":206},[1820],{"type":20,"value":1749},{"type":14,"tag":199,"props":1822,"children":1823},{"style":299},[1824],{"type":20,"value":226},{"type":14,"tag":199,"props":1826,"children":1827},{"style":1502},[1828],{"type":20,"value":1758},{"type":14,"tag":199,"props":1830,"children":1832},{"class":201,"line":1831},34,[1833],{"type":14,"tag":199,"props":1834,"children":1835},{"style":206},[1836],{"type":20,"value":1766},{"type":14,"tag":199,"props":1838,"children":1840},{"class":201,"line":1839},35,[1841],{"type":14,"tag":199,"props":1842,"children":1843},{"style":206},[1844],{"type":20,"value":1845},"  })\n",{"type":14,"tag":199,"props":1847,"children":1849},{"class":201,"line":1848},36,[1850],{"type":14,"tag":199,"props":1851,"children":1852},{"style":206},[1853],{"type":20,"value":1854},"})\n",{"type":14,"tag":199,"props":1856,"children":1858},{"class":201,"line":1857},37,[1859,1863,1867],{"type":14,"tag":199,"props":1860,"children":1861},{"style":206},[1862],{"type":20,"value":542},{"type":14,"tag":199,"props":1864,"children":1865},{"style":212},[1866],{"type":20,"value":215},{"type":14,"tag":199,"props":1868,"children":1869},{"style":206},[1870],{"type":20,"value":246},{"type":14,"tag":22,"props":1872,"children":1873},{},[1874,1879],{"type":14,"tag":28,"props":1875,"children":1876},{},[1877],{"type":20,"value":1878},"npm 方式的优势",{"type":20,"value":1880},"：",{"type":14,"tag":1882,"props":1883,"children":1884},"ul",{},[1885,1898,1903],{"type":14,"tag":1886,"props":1887,"children":1888},"li",{},[1889,1891,1896],{"type":20,"value":1890},"TypeScript 类型支持，",{"type":14,"tag":99,"props":1892,"children":1894},{"className":1893},[],[1895],{"type":20,"value":1558},{"type":20,"value":1897}," 等接口可直接 import",{"type":14,"tag":1886,"props":1899,"children":1900},{},[1901],{"type":20,"value":1902},"Vite \u002F Webpack tree-shaking，只打包用到的代码",{"type":14,"tag":1886,"props":1904,"children":1905},{},[1906,1908,1914],{"type":20,"value":1907},"版本锁定在 ",{"type":14,"tag":99,"props":1909,"children":1911},{"className":1910},[],[1912],{"type":20,"value":1913},"package.json",{"type":20,"value":1915},"，不依赖 CDN 可用性",{"type":14,"tag":15,"props":1917,"children":1919},{"id":1918},"配置参数",[1920],{"type":20,"value":1918},{"type":14,"tag":48,"props":1922,"children":1923},{},[1924,1949],{"type":14,"tag":52,"props":1925,"children":1926},{},[1927],{"type":14,"tag":56,"props":1928,"children":1929},{},[1930,1935,1940,1945],{"type":14,"tag":60,"props":1931,"children":1932},{},[1933],{"type":20,"value":1934},"参数",{"type":14,"tag":60,"props":1936,"children":1937},{},[1938],{"type":20,"value":1939},"类型",{"type":14,"tag":60,"props":1941,"children":1942},{},[1943],{"type":20,"value":1944},"必填",{"type":14,"tag":60,"props":1946,"children":1947},{},[1948],{"type":20,"value":79},{"type":14,"tag":81,"props":1950,"children":1951},{},[1952,1987,2013,2038,2063,2089,2114],{"type":14,"tag":56,"props":1953,"children":1954},{},[1955,1964,1969,1974],{"type":14,"tag":88,"props":1956,"children":1957},{},[1958],{"type":14,"tag":99,"props":1959,"children":1961},{"className":1960},[],[1962],{"type":20,"value":1963},"baseUrl",{"type":14,"tag":88,"props":1965,"children":1966},{},[1967],{"type":20,"value":1968},"string",{"type":14,"tag":88,"props":1970,"children":1971},{},[1972],{"type":20,"value":1973},"否",{"type":14,"tag":88,"props":1975,"children":1976},{},[1977,1979,1985],{"type":20,"value":1978},"API 地址，已调用 ",{"type":14,"tag":99,"props":1980,"children":1982},{"className":1981},[],[1983],{"type":20,"value":1984},"setHost()",{"type":20,"value":1986}," 时可省略",{"type":14,"tag":56,"props":1988,"children":1989},{},[1990,1999,2003,2008],{"type":14,"tag":88,"props":1991,"children":1992},{},[1993],{"type":14,"tag":99,"props":1994,"children":1996},{"className":1995},[],[1997],{"type":20,"value":1998},"appKey",{"type":14,"tag":88,"props":2000,"children":2001},{},[2002],{"type":20,"value":1968},{"type":14,"tag":88,"props":2004,"children":2005},{},[2006],{"type":20,"value":2007},"是",{"type":14,"tag":88,"props":2009,"children":2010},{},[2011],{"type":20,"value":2012},"应用 Key",{"type":14,"tag":56,"props":2014,"children":2015},{},[2016,2025,2029,2033],{"type":14,"tag":88,"props":2017,"children":2018},{},[2019],{"type":14,"tag":99,"props":2020,"children":2022},{"className":2021},[],[2023],{"type":20,"value":2024},"appSecret",{"type":14,"tag":88,"props":2026,"children":2027},{},[2028],{"type":20,"value":1968},{"type":14,"tag":88,"props":2030,"children":2031},{},[2032],{"type":20,"value":2007},{"type":14,"tag":88,"props":2034,"children":2035},{},[2036],{"type":20,"value":2037},"应用 Secret",{"type":14,"tag":56,"props":2039,"children":2040},{},[2041,2050,2054,2058],{"type":14,"tag":88,"props":2042,"children":2043},{},[2044],{"type":14,"tag":99,"props":2045,"children":2047},{"className":2046},[],[2048],{"type":20,"value":2049},"deviceId",{"type":14,"tag":88,"props":2051,"children":2052},{},[2053],{"type":20,"value":1968},{"type":14,"tag":88,"props":2055,"children":2056},{},[2057],{"type":20,"value":1973},{"type":14,"tag":88,"props":2059,"children":2060},{},[2061],{"type":20,"value":2062},"设备 ID（有则传，用于缓存归因）",{"type":14,"tag":56,"props":2064,"children":2065},{},[2066,2075,2080,2084],{"type":14,"tag":88,"props":2067,"children":2068},{},[2069],{"type":14,"tag":99,"props":2070,"children":2072},{"className":2071},[],[2073],{"type":20,"value":2074},"forceRefresh",{"type":14,"tag":88,"props":2076,"children":2077},{},[2078],{"type":20,"value":2079},"boolean",{"type":14,"tag":88,"props":2081,"children":2082},{},[2083],{"type":20,"value":1973},{"type":14,"tag":88,"props":2085,"children":2086},{},[2087],{"type":20,"value":2088},"跳过本地缓存强制重新归因",{"type":14,"tag":56,"props":2090,"children":2091},{},[2092,2101,2105,2109],{"type":14,"tag":88,"props":2093,"children":2094},{},[2095],{"type":14,"tag":99,"props":2096,"children":2098},{"className":2097},[],[2099],{"type":20,"value":2100},"onResult",{"type":14,"tag":88,"props":2102,"children":2103},{},[2104],{"type":20,"value":762},{"type":14,"tag":88,"props":2106,"children":2107},{},[2108],{"type":20,"value":2007},{"type":14,"tag":88,"props":2110,"children":2111},{},[2112],{"type":20,"value":2113},"归因结果回调",{"type":14,"tag":56,"props":2115,"children":2116},{},[2117,2126,2130,2134],{"type":14,"tag":88,"props":2118,"children":2119},{},[2120],{"type":14,"tag":99,"props":2121,"children":2123},{"className":2122},[],[2124],{"type":20,"value":2125},"onError",{"type":14,"tag":88,"props":2127,"children":2128},{},[2129],{"type":20,"value":762},{"type":14,"tag":88,"props":2131,"children":2132},{},[2133],{"type":20,"value":1973},{"type":14,"tag":88,"props":2135,"children":2136},{},[2137],{"type":20,"value":2138},"错误回调",{"type":14,"tag":15,"props":2140,"children":2142},{"id":2141},"归因结果",[2143],{"type":20,"value":2141},{"type":14,"tag":189,"props":2145,"children":2147},{"code":2146,"language":288,"meta":7,"className":289,"style":7},"interface AttributionResult {\n  inviteCode: string | null; \u002F\u002F 邀请码\n  channel: string;           \u002F\u002F 渠道\n  confidence: number;        \u002F\u002F 置信度 (0-1)\n  matchType: string;         \u002F\u002F 匹配方式：direct \u002F clipboard \u002F fingerprint \u002F ipua \u002F none\n  scene: string;             \u002F\u002F 匹配场景\n}\n",[2148],{"type":14,"tag":99,"props":2149,"children":2150},{"__ignoreMap":7},[2151,2168,2202,2228,2255,2281,2307],{"type":14,"tag":199,"props":2152,"children":2153},{"class":201,"line":202},[2154,2159,2164],{"type":14,"tag":199,"props":2155,"children":2156},{"style":299},[2157],{"type":20,"value":2158},"interface",{"type":14,"tag":199,"props":2160,"children":2161},{"style":218},[2162],{"type":20,"value":2163}," AttributionResult",{"type":14,"tag":199,"props":2165,"children":2166},{"style":206},[2167],{"type":20,"value":918},{"type":14,"tag":199,"props":2169,"children":2170},{"class":201,"line":325},[2171,2176,2180,2185,2189,2193,2197],{"type":14,"tag":199,"props":2172,"children":2173},{"style":770},[2174],{"type":20,"value":2175},"  inviteCode",{"type":14,"tag":199,"props":2177,"children":2178},{"style":299},[2179],{"type":20,"value":1736},{"type":14,"tag":199,"props":2181,"children":2182},{"style":1502},[2183],{"type":20,"value":2184}," string",{"type":14,"tag":199,"props":2186,"children":2187},{"style":299},[2188],{"type":20,"value":1563},{"type":14,"tag":199,"props":2190,"children":2191},{"style":1502},[2192],{"type":20,"value":1568},{"type":14,"tag":199,"props":2194,"children":2195},{"style":206},[2196],{"type":20,"value":353},{"type":14,"tag":199,"props":2198,"children":2199},{"style":356},[2200],{"type":20,"value":2201},"\u002F\u002F 邀请码\n",{"type":14,"tag":199,"props":2203,"children":2204},{"class":201,"line":417},[2205,2210,2214,2218,2223],{"type":14,"tag":199,"props":2206,"children":2207},{"style":770},[2208],{"type":20,"value":2209},"  channel",{"type":14,"tag":199,"props":2211,"children":2212},{"style":299},[2213],{"type":20,"value":1736},{"type":14,"tag":199,"props":2215,"children":2216},{"style":1502},[2217],{"type":20,"value":2184},{"type":14,"tag":199,"props":2219,"children":2220},{"style":206},[2221],{"type":20,"value":2222},";           ",{"type":14,"tag":199,"props":2224,"children":2225},{"style":356},[2226],{"type":20,"value":2227},"\u002F\u002F 渠道\n",{"type":14,"tag":199,"props":2229,"children":2230},{"class":201,"line":434},[2231,2236,2240,2245,2250],{"type":14,"tag":199,"props":2232,"children":2233},{"style":770},[2234],{"type":20,"value":2235},"  confidence",{"type":14,"tag":199,"props":2237,"children":2238},{"style":299},[2239],{"type":20,"value":1736},{"type":14,"tag":199,"props":2241,"children":2242},{"style":1502},[2243],{"type":20,"value":2244}," number",{"type":14,"tag":199,"props":2246,"children":2247},{"style":206},[2248],{"type":20,"value":2249},";        ",{"type":14,"tag":199,"props":2251,"children":2252},{"style":356},[2253],{"type":20,"value":2254},"\u002F\u002F 置信度 (0-1)\n",{"type":14,"tag":199,"props":2256,"children":2257},{"class":201,"line":466},[2258,2263,2267,2271,2276],{"type":14,"tag":199,"props":2259,"children":2260},{"style":770},[2261],{"type":20,"value":2262},"  matchType",{"type":14,"tag":199,"props":2264,"children":2265},{"style":299},[2266],{"type":20,"value":1736},{"type":14,"tag":199,"props":2268,"children":2269},{"style":1502},[2270],{"type":20,"value":2184},{"type":14,"tag":199,"props":2272,"children":2273},{"style":206},[2274],{"type":20,"value":2275},";         ",{"type":14,"tag":199,"props":2277,"children":2278},{"style":356},[2279],{"type":20,"value":2280},"\u002F\u002F 匹配方式：direct \u002F clipboard \u002F fingerprint \u002F ipua \u002F none\n",{"type":14,"tag":199,"props":2282,"children":2283},{"class":201,"line":510},[2284,2289,2293,2297,2302],{"type":14,"tag":199,"props":2285,"children":2286},{"style":770},[2287],{"type":20,"value":2288},"  scene",{"type":14,"tag":199,"props":2290,"children":2291},{"style":299},[2292],{"type":20,"value":1736},{"type":14,"tag":199,"props":2294,"children":2295},{"style":1502},[2296],{"type":20,"value":2184},{"type":14,"tag":199,"props":2298,"children":2299},{"style":206},[2300],{"type":20,"value":2301},";             ",{"type":14,"tag":199,"props":2303,"children":2304},{"style":356},[2305],{"type":20,"value":2306},"\u002F\u002F 匹配场景\n",{"type":14,"tag":199,"props":2308,"children":2309},{"class":201,"line":536},[2310],{"type":14,"tag":199,"props":2311,"children":2312},{"style":206},[2313],{"type":20,"value":2314},"}\n",{"type":14,"tag":15,"props":2316,"children":2318},{"id":2317},"缓存-api",[2319],{"type":20,"value":2320},"缓存 API",{"type":14,"tag":189,"props":2322,"children":2324},{"code":2323,"language":288,"meta":7,"className":289,"style":7},"\u002F\u002F 获取缓存的归因结果（localStorage，180 天有效）\nconst cached = XXinstall.getAttribution();\n\n\u002F\u002F 清除归因缓存（强制下次重新匹配）\nXXinstall.clearCache();\n",[2325],{"type":14,"tag":99,"props":2326,"children":2327},{"__ignoreMap":7},[2328,2336,2367,2374,2382],{"type":14,"tag":199,"props":2329,"children":2330},{"class":201,"line":202},[2331],{"type":14,"tag":199,"props":2332,"children":2333},{"style":356},[2334],{"type":20,"value":2335},"\u002F\u002F 获取缓存的归因结果（localStorage，180 天有效）\n",{"type":14,"tag":199,"props":2337,"children":2338},{"class":201,"line":325},[2339,2343,2348,2352,2357,2362],{"type":14,"tag":199,"props":2340,"children":2341},{"style":299},[2342],{"type":20,"value":1499},{"type":14,"tag":199,"props":2344,"children":2345},{"style":1502},[2346],{"type":20,"value":2347}," cached",{"type":14,"tag":199,"props":2349,"children":2350},{"style":299},[2351],{"type":20,"value":1510},{"type":14,"tag":199,"props":2353,"children":2354},{"style":206},[2355],{"type":20,"value":2356}," XXinstall.",{"type":14,"tag":199,"props":2358,"children":2359},{"style":218},[2360],{"type":20,"value":2361},"getAttribution",{"type":14,"tag":199,"props":2363,"children":2364},{"style":206},[2365],{"type":20,"value":2366},"();\n",{"type":14,"tag":199,"props":2368,"children":2369},{"class":201,"line":417},[2370],{"type":14,"tag":199,"props":2371,"children":2372},{"emptyLinePlaceholder":614},[2373],{"type":20,"value":617},{"type":14,"tag":199,"props":2375,"children":2376},{"class":201,"line":434},[2377],{"type":14,"tag":199,"props":2378,"children":2379},{"style":356},[2380],{"type":20,"value":2381},"\u002F\u002F 清除归因缓存（强制下次重新匹配）\n",{"type":14,"tag":199,"props":2383,"children":2384},{"class":201,"line":466},[2385,2390,2395],{"type":14,"tag":199,"props":2386,"children":2387},{"style":206},[2388],{"type":20,"value":2389},"XXinstall.",{"type":14,"tag":199,"props":2391,"children":2392},{"style":218},[2393],{"type":20,"value":2394},"clearCache",{"type":14,"tag":199,"props":2396,"children":2397},{"style":206},[2398],{"type":20,"value":2366},{"type":14,"tag":15,"props":2400,"children":2402},{"id":2401},"mobileconfig-集成",[2403],{"type":20,"value":2404},"mobileconfig 集成",{"type":14,"tag":22,"props":2406,"children":2407},{},[2408],{"type":20,"value":2409},"对于 iOS WebClip 场景，推荐使用 mobileconfig 动态配置文件实现 100% 准确归因：",{"type":14,"tag":189,"props":2411,"children":2413},{"code":2412},"GET \u002Fapi\u002Fv1\u002Fmobileconfig\u002Fgenerate?appKey=xxx&inviteCode=abc&channel=wechat\n",[2414],{"type":14,"tag":99,"props":2415,"children":2416},{"__ignoreMap":7},[2417],{"type":20,"value":2412},{"type":14,"tag":22,"props":2419,"children":2420},{},[2421,2423,2429],{"type":20,"value":2422},"该接口返回 ",{"type":14,"tag":99,"props":2424,"children":2426},{"className":2425},[],[2427],{"type":20,"value":2428},".mobileconfig",{"type":20,"value":2430}," 文件，自动将归因参数编码到 WebClip 的 URL 中。",{"type":14,"tag":22,"props":2432,"children":2433},{},[2434,2436,2441],{"type":20,"value":2435},"用户安装 WebClip 后，SDK 会自动从 URL 的 ",{"type":14,"tag":99,"props":2437,"children":2439},{"className":2438},[],[2440],{"type":20,"value":104},{"type":20,"value":2442}," 参数中解码出归因信息。",{"type":14,"tag":15,"props":2444,"children":2446},{"id":2445},"缓存机制",[2447],{"type":20,"value":2445},{"type":14,"tag":22,"props":2449,"children":2450},{},[2451,2453,2459],{"type":20,"value":2452},"归因成功后，结果会缓存到 ",{"type":14,"tag":99,"props":2454,"children":2456},{"className":2455},[],[2457],{"type":20,"value":2458},"localStorage",{"type":20,"value":2460},"，有效期 180 天。后续访问不再重复归因。",{"type":14,"tag":22,"props":2462,"children":2463},{},[2464,2466,2472,2474,2480],{"type":20,"value":2465},"可通过 ",{"type":14,"tag":99,"props":2467,"children":2469},{"className":2468},[],[2470],{"type":20,"value":2471},"forceRefresh: true",{"type":20,"value":2473}," 跳过缓存，或调用 ",{"type":14,"tag":99,"props":2475,"children":2477},{"className":2476},[],[2478],{"type":20,"value":2479},"XXinstall.clearCache()",{"type":20,"value":2481}," 手动清除。",{"type":14,"tag":2483,"props":2484,"children":2485},"style",{},[2486],{"type":20,"value":2487},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":325,"depth":325,"links":2489},[2490,2491,2492,2496,2500,2501,2502,2503,2504],{"id":17,"depth":325,"text":17},{"id":44,"depth":325,"text":44},{"id":165,"depth":325,"text":165,"children":2493},[2494,2495],{"id":171,"depth":417,"text":174},{"id":249,"depth":417,"text":252},{"id":362,"depth":325,"text":362,"children":2497},[2498,2499],{"id":367,"depth":417,"text":370},{"id":1100,"depth":417,"text":1103},{"id":1918,"depth":325,"text":1918},{"id":2141,"depth":325,"text":2141},{"id":2317,"depth":325,"text":2320},{"id":2401,"depth":325,"text":2404},{"id":2445,"depth":325,"text":2445},"markdown","content:docs:webclip-sdk.md","content","docs\u002Fwebclip-sdk.md","docs\u002Fwebclip-sdk","md",1784877317611]