Commit babbfb44 authored by 吴颖's avatar 吴颖

'test'

parent 0836c0c1
App({ App({
onLaunch: function () { onLaunch: function () {
console.log('222222222')
this.isReload() // 小程序是否有新版本 this.isReload() // 小程序是否有新版本
// this.getLogin() this.getLogin()
this.getToken() this.getToken()
}, },
// 小程序是否有新版本 // 小程序是否有新版本
...@@ -44,7 +43,6 @@ App({ ...@@ -44,7 +43,6 @@ App({
if (userInfo) { if (userInfo) {
this.globalData.userInfo = userInfo this.globalData.userInfo = userInfo
} }
console.log(userInfo)
if (userInfo) { if (userInfo) {
wx.switchTab({ wx.switchTab({
url: '/pages/tabbar/index/index', url: '/pages/tabbar/index/index',
...@@ -143,14 +141,12 @@ App({ ...@@ -143,14 +141,12 @@ App({
fail: function () {} fail: function () {}
}) })
}, },
fail() {// session_key 已经失效,需要重新执行登录流程 fail() { // session_key 已经失效,需要重新执行登录流程
that.getSessionKey(() => that.saveUserInfo(info, cb)) that.getSessionKey(() => that.saveUserInfo(info, cb))
} }
}) })
}, },
globalData: { globalData: {
extAppid: 'wx6e6eaca9cc1c406d', // 当前appid extAppid: 'wx6e6eaca9cc1c406d', // 当前appid
userInfo: '', //微信user信息 userInfo: '', //微信user信息
......
...@@ -17,14 +17,15 @@ ...@@ -17,14 +17,15 @@
<view class="item flex-h flex-vc flex-hb" wx:for="{{stuList}}" wx:key="index" data-id="{{item.id}}"> <view class="item flex-h flex-vc flex-hb" wx:for="{{stuList}}" wx:key="index" data-id="{{item.id}}">
<view class="flex-h flex-vc"> <view class="flex-h flex-vc">
<image src="/images/default_head.png" wx:if="{{item.child.thumb == null}}"></image> <image src="/images/default_head.png" wx:if="{{item.child.thumb == null}}"></image>
<image src="{{item.child.thumb}}" wx:else></image> <image src="{{item.child.thumb}}" wx:else></image>
<view> <view>
<view class="name">{{item.child.nick_name !=null ? item.child.nick_name : ''}}</view> <view class="name">{{item.child.nick_name !=null ? item.child.nick_name : ''}}</view>
<view class="big_name">{{item.child.child_name}}</view> <view class="big_name">{{item.child.child_name}}</view>
</view> </view>
</view> </view>
<view class="status"> <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="leave" wx:else>已请假</view>
<view class="unread" wx:if="{{ !item.class_moment }}"></view> <view class="unread" wx:if="{{ !item.class_moment }}"></view>
</view> </view>
......
...@@ -75,6 +75,7 @@ Page({ ...@@ -75,6 +75,7 @@ Page({
}, },
callback : (data) => { callback : (data) => {
console.log(data) console.log(data)
console.log('1111111111111')
this.setData({ this.setData({
datalList: data datalList: data
}) })
......
...@@ -17,7 +17,8 @@ Page({ ...@@ -17,7 +17,8 @@ Page({
today: '', // 今天日期 today: '', // 今天日期
curDate: '', curDate: '',
list: [], list: [],
allList: [] allList: [],
month: ''
}, },
/** /**
...@@ -27,21 +28,26 @@ Page({ ...@@ -27,21 +28,26 @@ Page({
wx.showLoading({ wx.showLoading({
title: '加载中...', title: '加载中...',
}) })
console.log(app.globalData) let year = new Date().getFullYear()
let month = util.formatNumber(new Date().getMonth() + 1)
this.setData({ this.setData({
// coach_id: app.globalData.userInfo.id, // coach_id: app.globalData.userInfo.id,
today: util.formatTime(new Date()), 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.getAllList()
this.getList() this.getList()
}, },
getAllList() { getAllList() {
wx.showLoading({
title: '加载中...',
})
let params = { let params = {
url: 'coach/timetable', url: 'coach/timetable',
data: { data: {
coach_id: this.data.coach_id, coach_id: this.data.coach_id,
month: this.data.month
}, },
callback: (data) => { callback: (data) => {
console.log(data) console.log(data)
...@@ -80,20 +86,19 @@ Page({ ...@@ -80,20 +86,19 @@ Page({
} }
} }
base.newRequest(params) base.newRequest(params)
}, },
prev: function (event) { prev: function (event) {
let currentMonth = util.formatNumber(event.detail.currentMonth) let currentMonth = util.formatNumber(event.detail.currentMonth)
this.setData({ this.setData({
month: event.detail.currentYear + '-' + currentMonth month: event.detail.currentYear + currentMonth
}) })
this.getAllList(); this.getAllList();
}, },
next: function (event) { next: function (event) {
let currentMonth = util.formatNumber(event.detail.currentMonth) let currentMonth = util.formatNumber(event.detail.currentMonth)
this.setData({ this.setData({
month: event.detail.currentYear + '-' + currentMonth month: event.detail.currentYear + currentMonth
}) })
this.getAllList(); this.getAllList();
}, },
......
...@@ -15,9 +15,6 @@ ...@@ -15,9 +15,6 @@
var hour = getDate().getHours() var hour = getDate().getHours()
var minute = getDate().getMinutes() var minute = getDate().getMinutes()
var time = hour + ':' + minute var time = hour + ':' + minute
console.log(hour)
console.log(minute)
return time return time
} }
module.exports = { 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