scan.js 795 B

1234567891011121314151617181920212223242526272829303132333435
  1. const { default: api } = require("../../js/api");
  2. Page({
  3. data: {
  4. isLoggedIn: true,
  5. userInfo: null,
  6. scanTitle:'扫码加油',
  7. scanTip:'请扫描加油机键盘上的二维码'
  8. },
  9. /**
  10. * 生命周期函数--监听页面加载
  11. */
  12. onLoad(options) {
  13. var wxChatID = wx.getStorageSync("WachatID")
  14. console.log("wxchatid",wxChatID);
  15. if(wxChatID) {
  16. api.request_GetSiteInfo().then(res => {
  17. console.log(res)
  18. })
  19. // this.setData({
  20. // isLoggedIn: true,
  21. // userInfo: null,
  22. // scanTitle:'扫码加油',
  23. // scanTip:'请扫码加油机键盘上的二维码'
  24. // })
  25. }
  26. },
  27. handleGetUserInfo: function(e) {
  28. wx.redirectTo({
  29. url: '../login/login'
  30. })
  31. }
  32. });