app.js 884 B

12345678910111213141516171819202122232425262728293031323334
  1. //app.js
  2. const AUTH = require('utils/auth')
  3. App({
  4. onLaunch:async function () {
  5. // 处理登录
  6. // 自动登录
  7. // await AUTH.checkHasLogined().then(async isLogined => {
  8. // if (!isLogined) {
  9. // AUTH.login().then(async res=>{
  10. // api.getopenId(res.code).then((res)=>{
  11. // let openId = res.data.openId;
  12. // this.globalData.openId= openId;
  13. // wx.setStorageSync({
  14. // data: openId,
  15. // key: 'openId',
  16. // })
  17. // this.check();
  18. // });
  19. // });
  20. // }
  21. // })
  22. },
  23. globalData: {
  24. userInfo: null,
  25. hasUserInfo:false,
  26. openId:null,
  27. userId:null,
  28. projectId:"",
  29. tenantId:"",
  30. tenants:[],
  31. projectName:null,
  32. imgbaseUrl:"http://api.sagacloud.cn/dp-auxiliary/image-service/common/image_get?systemId=dataPlatform&key=",
  33. }
  34. })