123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //index.js
- //获取应用实例
- const app = getApp()
- Page({
- data: {
- spinShow: false,
- groups: [],
- pushPaper: [],
- timeLimitPaper: [],
- taskList: []
- },
- onLoad: function() {
- this.setData({
- spinShow: true
- });
- app.checkLogin( this.indexLoad)
- },
- onPullDownRefresh() {
- this.setData({
- spinShow: true
- });
- if (!this.loading) {
- this.indexLoad()
- }
- },
- indexLoad: function() {
- let _this = this
- app.formPost('Exam.index', {}).then(res => {
- _this.setData({
- spinShow: false
- });
- wx.stopPullDownRefresh()
- if (res.code === 200) {
- console.log( res.data )
- _this.setData({
- groups: res.data.groups
- });
- }
- })
- }
- })
|