碧桂园
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

34 linhas
1.2 KiB

  1. // app.js
  2. import './utils/umtrack-wx';
  3. // import "./components/umtrack-wx";
  4. // require('umtrack-wx');
  5. App({
  6. umengConfig: {
  7. appKey: '6260d691d024421570c69177', //由友盟分配的APP_KEY
  8. // 使用Openid进行统计,此项为false时将使用友盟+uuid进行用户统计。
  9. // 使用Openid来统计微信小程序的用户,会使统计的指标更为准确,对系统准确性要求高的应用推荐使用Openid。
  10. useOpenid: true,
  11. // 使用openid进行统计时,是否授权友盟自动获取Openid,
  12. // 如若需要,请到友盟后台"设置管理-应用信息"(https://mp.umeng.com/setting/appset)中设置appId及secret
  13. autoGetOpenid: false,
  14. debug: true, //是否打开调试模式
  15. uploadUserInfo: true // 自动上传用户信息,设为false取消上传,默认为false
  16. },
  17. onLaunch() {
  18. // 展示本地存储能力
  19. const logs = wx.getStorageSync('logs') || []
  20. logs.unshift(Date.now())
  21. wx.setStorageSync('logs', logs)
  22. // 登录
  23. wx.login({
  24. success: res => {
  25. // 发送 res.code 到后台换取 openId, sessionKey, unionId
  26. }
  27. })
  28. },
  29. globalData: {
  30. userInfo: null,
  31. token: ''
  32. }
  33. })