schedule.js 1.24 KB
import {API_HOST, SERVICE_HOST} from '../../libs/config';
import {GET, POST} from '../../libs/request';
import { loginAndRegisterTapped } from '../../utils/login';

var app = getApp()

Page({
  data: {
    array: [ { 'applyed': false, 'activityId': '123' }, { 'applyed': false, 'activityId': '456' }],
    contentArray: [ 'Aug.26', 'Aug.27', 'Aug.28', 'Aug.29', 'Aug.30', 'Aug.31', 'Aug.32', 'Aug.33'],
  },
  onLoad: function(options) {
    //Do some initialize when page load.
    
  },
  onReady: function() {
    //Do some when page ready.
    
  },
  onShow: function() {
    //Do some when page show.
    
  },

  selectTab(e) {
    let select = e.detail.index;
    this.setData({
      select
    })
  },

  applyAction(e) {
    let activityId = e.detail.activityId;
    let array = this.data.array;

    if (app.globalData.userInfo.uid) {//已登录

    } else {
      loginAndRegisterTapped();
    }
  },

  jumpMap() {
    wx.navigateTo({
      url: `../webview/webview?url=https://activity.yoho.cn/feature/507.html?share_id=2647`,
    })
  },

  onHide: function() {
    //Do some when page hide.
    
  },
  onUnload: function() {
    //Do some when page unload.
    
  },
  onPullDownRefresh: function() {
    //Do some when page pull down.
    
  }
})