Commit e6e94808 authored by 吴颖's avatar 吴颖

Merge branch 'wuying' into 'master'

Wuying

See merge request !21
parents c7015f20 885f0058
App({
onLaunch: function () {
console.log('222222222')
this.isReload() // 小程序是否有新版本
// this.getLogin()
this.getLogin()
this.getToken()
},
// 小程序是否有新版本
......@@ -44,7 +43,6 @@ App({
if (userInfo) {
this.globalData.userInfo = userInfo
}
console.log(userInfo)
if (userInfo) {
wx.switchTab({
url: '/pages/tabbar/index/index',
......@@ -143,14 +141,12 @@ App({
fail: function () {}
})
},
fail() {// session_key 已经失效,需要重新执行登录流程
fail() { // session_key 已经失效,需要重新执行登录流程
that.getSessionKey(() => that.saveUserInfo(info, cb))
}
})
},
globalData: {
extAppid: 'wx6e6eaca9cc1c406d', // 当前appid
userInfo: '', //微信user信息
......
......@@ -24,7 +24,8 @@
</view>
</view>
<view class="status">
<view class="evaluation" data-id="{{item.id}}" catchtap="goperformance" wx:if="{{item.is_leave == 0}}">运动评价</view>
<view class="evaluation" data-id="{{item.id}}" catchtap="goperformance" wx:if="{{item.is_leave == 0}}">运动评价
</view>
<view class="leave" wx:else>已请假</view>
<view class="unread" wx:if="{{ !item.class_moment }}"></view>
</view>
......
......@@ -76,6 +76,7 @@ Page({
callback : (data) => {
base.toast('抢班成功')
console.log(data)
console.log('1111111111111')
this.setData({
datalList: []
......
......@@ -17,7 +17,8 @@ Page({
today: '', // 今天日期
curDate: '',
list: [],
allList: []
allList: [],
month: ''
},
/**
......@@ -27,21 +28,26 @@ Page({
wx.showLoading({
title: '加载中...',
})
console.log(app.globalData)
let year = new Date().getFullYear()
let month = util.formatNumber(new Date().getMonth() + 1)
this.setData({
// coach_id: app.globalData.userInfo.id,
today: util.formatTime(new Date()),
curDate: util.formatTime(new Date())
curDate: util.formatTime(new Date()),
month: year + month
})
console.log(this.data.today == this.data.curDate)
this.getAllList()
this.getList()
},
getAllList() {
wx.showLoading({
title: '加载中...',
})
let params = {
url: 'coach/timetable',
data: {
coach_id: this.data.coach_id,
month: this.data.month
},
callback: (data) => {
console.log(data)
......@@ -80,20 +86,19 @@ Page({
}
}
base.newRequest(params)
},
prev: function (event) {
let currentMonth = util.formatNumber(event.detail.currentMonth)
this.setData({
month: event.detail.currentYear + '-' + currentMonth
month: event.detail.currentYear + currentMonth
})
this.getAllList();
},
next: function (event) {
let currentMonth = util.formatNumber(event.detail.currentMonth)
this.setData({
month: event.detail.currentYear + '-' + currentMonth
month: event.detail.currentYear + currentMonth
})
this.getAllList();
},
......
......@@ -15,9 +15,6 @@
var hour = getDate().getHours()
var minute = getDate().getMinutes()
var time = hour + ':' + minute
console.log(hour)
console.log(minute)
return time
}
module.exports = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment