Skip to content

Commit

Permalink
[feat] sdk支持异步初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
huangriya committed Oct 20, 2023
1 parent 2c29dd1 commit 23ac770
Show file tree
Hide file tree
Showing 38 changed files with 28,414 additions and 242 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ANS=ALP
LIB=Alipay
LibVERSION=5.0.0
LibVERSION=5.0.1
22 changes: 18 additions & 4 deletions demo/demo/app.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
//app.js
let AnalysysEncryption = require('../../dist/AnalysysAgent_encryption.min.js') //加密板块,目前与sdk分开,为了缩小sdk的体积。需要的话单独引入。
AnalysysAgent.encrypt = AnalysysEncryption
// let AnalysysEncryption = require('../../dist/AnalysysAgent_encryption.min.js') //加密板块,目前与sdk分开,为了缩小sdk的体积。需要的话单独引入。
// AnalysysAgent.encrypt = AnalysysEncryption

import AnalysysAgent from '../../dist/AnalysysAgent_Alipay_SDK.es6.min.js';
import AnalysysAgent from './dist/AnalysysAgent_Alipay_SDK.es6.min.js';



setTimeout(()=> {



AnalysysAgent.identify('111111')
AnalysysAgent.alias('aaaa')
AnalysysAgent.init({
appkey: '2d01eb66efd95d2c',
uploadURL: 'https://uba-up.analysysdata.com',
debugMode: 2,
auto: true,
$appname: 'test_appname',
encryptType: 1,
$appid: 'test_app_id',
autoPageViewDuration: true,
autoShare: false,
autoTrack: true
autoTrack: true,
})



}, 2000)

AnalysysAgent.onReady = function(config) {
console.log('sdk已准备就绪')
}
Expand All @@ -29,6 +42,7 @@ AnalysysAgent.onAfterStartUp = function (res) {
console.log(res)
}


App({
onLaunch: function(options) {

Expand Down
Loading

0 comments on commit 23ac770

Please sign in to comment.