index.js 387 B

123456789101112131415161718192021222324
  1. var config = getApp().page;
  2. /**
  3. * 页面加载
  4. */
  5. config.oLoad = function (options)
  6. {
  7. var self = this;
  8. var success = function(data, res)
  9. {
  10. self.set('focus', data.push_focus);
  11. self.set('news', data.news);
  12. };
  13. self.request('main.content.home', {}, {success: success});
  14. };
  15. config.isCard = function(e)
  16. {
  17. this.setData({
  18. isCard: e.detail.value
  19. })
  20. };
  21. Page(config);