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