phoneLogin.js 484 B

1234567891011121314151617181920212223242526272829303132
  1. const app = getApp();
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. height:400
  8. },
  9. /**
  10. * 生命周期函数--监听页面加载
  11. */
  12. onLoad: function (options) {
  13. //获取设备信息
  14. var that = this;
  15. wx.getSystemInfo({
  16. success(res) {
  17. console.log(res.windowHeight);
  18. that.setData({
  19. height: res.screenHeight
  20. })
  21. }
  22. })
  23. },
  24. login: function () {
  25. wx.showToast({
  26. title: '成功',
  27. })
  28. }
  29. })