index.js 491 B

123456789101112131415161718192021222324
  1. var app = getApp()
  2. Page({
  3. onLoad: function () {
  4. wx.getSystemInfo({
  5. success: (res) => {
  6. this.setData({
  7. screenWidth: res.screenWidth,
  8. screenHeight: res.screenHeight,
  9. bannerWidth: res.screenWidth,
  10. bannerHeight: res.screenWidth * 363 / 543
  11. })
  12. }
  13. })
  14. var pt_student_id = wx.getStorageSync('pt_student_id')
  15. if (!pt_student_id) {
  16. wx.redirectTo({
  17. url: '/pages/login/index',
  18. })
  19. }
  20. }
  21. })