index.js 482 B

123456789101112131415161718192021222324252627282930
  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. config.open = function(e)
  22. {
  23. var param = this.param(e);
  24. this.location('view', param);
  25. };
  26. Page(config);