Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wandouchengzhang_coach
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
石盼盼
wandouchengzhang_coach
Commits
e522a63c
Commit
e522a63c
authored
Nov 11, 2020
by
吴颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'教练端课表接口对接,财务对接,课程管理详情接口对接'
parent
c545fb1b
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
817 additions
and
750 deletions
+817
-750
app.js
app.js
+20
-7
classManagement.js
pages/index/classManagement/classManagement.js
+91
-80
classManagement.json
pages/index/classManagement/classManagement.json
+2
-1
classManagement.wxml
pages/index/classManagement/classManagement.wxml
+23
-52
classManagement.wxss
pages/index/classManagement/classManagement.wxss
+4
-0
bindTel.js
pages/sign/bindTel/bindTel.js
+10
-8
login.js
pages/sign/login/login.js
+2
-25
financial.js
pages/tabbar/financial/financial.js
+186
-74
financial.json
pages/tabbar/financial/financial.json
+5
-2
financial.wxml
pages/tabbar/financial/financial.wxml
+67
-96
financial.wxss
pages/tabbar/financial/financial.wxss
+194
-200
index.js
pages/tabbar/index/index.js
+14
-27
index.wxml
pages/tabbar/index/index.wxml
+24
-7
project.config.json
project.config.json
+166
-160
base.js
utils/base.js
+9
-11
No files found.
app.js
View file @
e522a63c
import
{
Base
}
from
'
./utils/base.js
'
;
const
base
=
new
Base
()
App
({
App
({
onLaunch
:
function
()
{
onLaunch
:
function
()
{
this
.
isReload
()
// 小程序是否有新版本
this
.
isReload
()
// 小程序是否有新版本
this
.
get
SessionKey
()
// 获取token
this
.
get
Token
()
},
},
// 小程序是否有新版本
// 小程序是否有新版本
isReload
:
function
()
{
isReload
:
function
()
{
...
@@ -40,7 +37,15 @@ App({
...
@@ -40,7 +37,15 @@ App({
})
})
}
}
},
},
getToken
()
{
var
that
=
this
try
{
var
token
=
wx
.
getStorageSync
(
'
token
'
)
if
(
token
)
{
that
.
globalData
.
token
=
token
}
}
catch
(
e
)
{}
},
// 获取sessionkey 提交后台换取基本openid unionid
// 获取sessionkey 提交后台换取基本openid unionid
getSessionKey
:
function
(
cb
)
{
getSessionKey
:
function
(
cb
)
{
let
that
=
this
let
that
=
this
...
@@ -95,10 +100,18 @@ App({
...
@@ -95,10 +100,18 @@ App({
method
:
'
POST
'
,
method
:
'
POST
'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
data
.
meta
.
code
==
200
)
{
if
(
res
.
data
.
meta
.
code
==
200
)
{
wx
.
showToast
({
title
:
'
授权成功
'
,
icon
:
'
none
'
,
duration
:
2000
})
that
.
globalData
.
hasTel
=
res
.
data
.
data
.
hasTel
that
.
globalData
.
userInfo
=
res
.
data
.
data
;
that
.
globalData
.
userInfo
=
res
.
data
.
data
;
wx
.
setStorageSync
(
'
userInfo
'
,
res
.
data
.
data
)
wx
.
setStorageSync
(
'
userInfo
'
,
res
.
data
.
data
)
if
(
res
.
data
.
data
.
userTel
)
{
wx
.
setStorageSync
(
'
userTel
'
,
res
.
data
.
data
.
userTel
)
}
}
else
{
}
else
{
console
.
log
(
res
.
data
.
meta
.
message
)
wx
.
showToast
({
wx
.
showToast
({
title
:
res
.
data
.
meta
.
message
,
title
:
res
.
data
.
meta
.
message
,
icon
:
'
none
'
,
icon
:
'
none
'
,
...
...
pages/index/classManagement/classManagement.js
View file @
e522a63c
// pages/index/classManagement/classManagement.js
const
app
=
getApp
()
import
{
Base
}
from
'
../../../utils/base.js
'
;
const
base
=
new
Base
()
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
showView
:
true
,
coach_id
:
'
5
'
,
class_id
:
'
16
'
,
lesson_id
:
'
69
'
,
classTime
:
''
,
// 上课时间
showView
:
true
,
list
:
[],
locked
:
false
,
},
},
...
@@ -13,71 +24,71 @@ Page({
...
@@ -13,71 +24,71 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
setData
({
// coach_id: '5',
class_id
:
options
.
class_id
,
lesson_id
:
options
.
lesson_id
,
classTime
:
options
.
classTime
,
// 上课时间
})
this
.
getDetail
()
},
getDetail
()
{
let
params
=
{
url
:
'
coach/manage_lesson
'
,
data
:
{
coach_id
:
this
.
data
.
coach_id
,
class_id
:
this
.
data
.
class_id
,
lesson_id
:
this
.
data
.
lesson_id
},
callback
:(
data
)
=>
{
this
.
setData
({
list
:
data
,
locked
:
false
})
console
.
log
(
data
)
}
}
base
.
newRequest
(
params
)
},
showButton
:
function
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
let
list
=
this
.
data
.
list
let
params
=
{
url
:
''
,
data
:
{
},
},
showButton
:
function
()
{
callback
:(
data
)
=>
{
var
that
=
this
;
base
.
toast
(
'
签到成功
'
)
that
.
setData
({
list
[
index
].
sign_status
=
1
showView
:
(
!
that
.
data
.
showView
)
this
.
setData
({
list
:
list
})
})
},
},
gocourseInstant
:
function
(){
}
base
.
newRequest
(
params
)
},
gocourseInstant
:
function
()
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'
../../index/courseInstant/courseInstant
'
,
url
:
'
../../index/courseInstant/courseInstant
'
,
})
})
},
},
goevaluation
:
function
()
{
goevaluation
:
function
()
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'
../../index/evaluation/evaluation
'
,
url
:
'
../../index/evaluation/evaluation
'
,
})
})
},
},
onPullDownRefresh
()
{
/**
this
.
setData
({
* 生命周期函数--监听页面初次渲染完成
list
:
[],
*/
locked
:
false
,
onReady
:
function
()
{
})
if
(
!
this
.
data
.
locked
)
{
},
this
.
setData
({
locked
:
true
/**
})
* 生命周期函数--监听页面显示
this
.
getDetail
()
*/
}
onShow
:
function
()
{
wx
.
stopPullDownRefresh
()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
}
})
})
\ No newline at end of file
pages/index/classManagement/classManagement.json
View file @
e522a63c
{
{
"usingComponents"
:
{},
"usingComponents"
:
{},
"navigationBarTitleText"
:
"课程管理"
"navigationBarTitleText"
:
"课程管理"
,
"enablePullDownRefresh"
:
true
}
}
\ No newline at end of file
pages/index/classManagement/classManagement.wxml
View file @
e522a63c
<view class="top flex-h flex-vc flex-hb">
<view class="top flex-h flex-vc flex-hb">
<view>
<view>
<view class="time">
15:00~16:00
</view>
<view class="time">
{{classTime}}
</view>
<view class="time_text">上课时间</view>
<view class="time_text">上课时间</view>
</view>
</view>
<view>
<view>
<view class="instant" catchtap="gocourseInstant">
<view class="instant
flex-h flex-vc flex-hc
" catchtap="gocourseInstant">
课程瞬间
课程瞬间
<image src="
../../..
/images/camera.png"></image>
<image src="/images/camera.png"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="cont">
<view class="cont">
<block wx:for="{{list}}" wx:key='index'>
<view class="item flex-h flex-vc flex-hb">
<view class="item flex-h flex-vc flex-hb">
<view class="flex-h flex-vc">
<view class="flex-h flex-vc">
<image src="../../../images/photo.png
"></image>
<image src="{{item.child.thumb !=null ? item.child.thumb: '/images/default_head.png'}}
"></image>
<view>
<view>
<view class="name">西西
</view>
<view class="name">{{item.child.nick_name != null ? item.child.nick_name: ''}}
</view>
<view class="big_name">大名:王梓西
</view>
<view class="big_name">大名:{{item.child.child_name}}
</view>
</view>
</view>
</view>
</view>
<view>
<view wx:if="{{item.is_leave == 1}}" class="leave">已请假</view>
<view class="sign {{showView?'show':'hide'}}" bindtap="showButton">已签到</view>
<view wx:if="{{item.is_leave == 0}}">
<view class="evaluation {{showView?'hide':'show'}}" catchtap="goevaluation">运动评价</view>
<!-- 未请假状态 -->
</view>
<view wx:if="{{item.sign_status == 1}}">
</view>
<view class="item flex-h flex-vc flex-hb">
<view class="flex-h flex-vc">
<image src="../../../images/photo.png"></image>
<view>
<view class="name">西西</view>
<view class="big_name">大名:王梓甜</view>
</view>
</view>
<view>
<view class="sign">已签到</view>
<view class="sign">已签到</view>
<view class="evaluation1">已评价</view>
<view class="evaluation1" wx:if='{{item.class_comment!=""}}'>已评价</view>
<view wx:if='{{item.class_comment==""}}' catchtap="goSport">运动评价</view>
</view>
</view>
<view wx:if="{{item.sign_status == 0}}">
<view class="sign1" bindtap="showButton" data-index="{{index}}">签到</view>
</view>
</view>
<view class="item flex-h flex-vc flex-hb">
<view class="flex-h flex-vc">
<image src="../../../images/photo.png"></image>
<view>
<view class="name">西西</view>
<view class="big_name">大名:王梓甜</view>
</view>
</view>
<view>
<!-- <view class="sign1">签到</view> -->
<view class="sign1 {{showView?'show':'hide'}}" bindtap="showButton">签到</view>
<view class="evaluation {{showView?'hide':'show'}}" catchtap="goevaluation">运动评价</view>
</view>
</view>
<view class="item flex-h flex-vc flex-hb">
<view class="flex-h flex-vc">
<image src="../../../images/photo.png"></image>
<view>
<view class="name">西西</view>
<view class="big_name">大名:王梓甜</view>
</view>
</view>
<view>
<view class="leave">已请假</view>
</view>
</view>
</view>
</view>
</block>
</view>
</view>
<view class="button">
<view class="button">
...
...
pages/index/classManagement/classManagement.wxss
View file @
e522a63c
page {
padding-bottom: 120rpx;
}
.top{
.top{
width: 100%;
width: 100%;
height: 220rpx;
height: 220rpx;
...
...
pages/sign/bindTel/bindTel.js
View file @
e522a63c
const
app
=
getApp
()
const
app
=
getApp
()
import
{
Base
}
from
'
../../../utils/base.js
'
;
import
{
Base
}
from
'
../../../utils/base.js
'
;
const
base
=
new
Base
()
const
base
=
new
Base
()
Page
({
Page
({
data
:
{
data
:
{
...
@@ -21,7 +23,7 @@ Page({
...
@@ -21,7 +23,7 @@ Page({
base
.
toast
(
'
授权成功
'
)
base
.
toast
(
'
授权成功
'
)
app
.
globalData
.
userTel
=
data
.
phoneNumber
app
.
globalData
.
userTel
=
data
.
phoneNumber
wx
.
setStorageSync
(
'
userTel
'
,
data
.
phoneNumber
)
wx
.
setStorageSync
(
'
userTel
'
,
data
.
phoneNumber
)
if
(
app
.
globalData
.
backurl
)
{
if
(
app
.
globalData
.
backurl
)
{
if
(
app
.
globalData
.
backurl
.
indexOf
(
'
/pages/tabbar
'
)
!=
-
1
)
{
if
(
app
.
globalData
.
backurl
.
indexOf
(
'
/pages/tabbar
'
)
!=
-
1
)
{
wx
.
switchTab
({
wx
.
switchTab
({
url
:
app
.
globalData
.
backurl
,
url
:
app
.
globalData
.
backurl
,
...
...
pages/sign/login/login.js
View file @
e522a63c
...
@@ -6,29 +6,6 @@ const base = new Base()
...
@@ -6,29 +6,6 @@ const base = new Base()
Page
({
Page
({
data
:
{
data
:
{
die
:
false
,
die
:
false
,
isBindTel
:
false
},
onLoad
:
function
(
options
)
{
// this.checkPhone()
},
checkPhone
()
{
let
params
=
{
// url: 'xcx/v2.0/checkphone',
data
:
{},
callback
:
(
data
)
=>
{
wx
.
setStorageSync
(
'
userTel
'
,
data
.
tel
)
this
.
setData
({
isBindTel
:
true
})
},
errorback
:
(
res
)
=>
{
base
.
toast
(
''
)
this
.
setData
({
isBindTel
:
false
})
}
}
base
.
newRequest
(
params
)
},
},
userInfoHandler
:
function
(
e
)
{
userInfoHandler
:
function
(
e
)
{
if
(
e
.
detail
.
errMsg
==
'
getUserInfo:ok
'
)
{
if
(
e
.
detail
.
errMsg
==
'
getUserInfo:ok
'
)
{
...
@@ -38,7 +15,7 @@ Page({
...
@@ -38,7 +15,7 @@ Page({
}
}
},
},
showUserInfo
:
function
()
{
showUserInfo
:
function
()
{
if
(
this
.
data
.
isBind
Tel
)
{
if
(
app
.
globalData
.
has
Tel
)
{
base
.
toast
(
'
登录成功
'
)
base
.
toast
(
'
登录成功
'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
app
.
globalData
.
backurl
)
{
if
(
app
.
globalData
.
backurl
)
{
...
...
pages/tabbar/financial/financial.js
View file @
e522a63c
// pages/financial/financial.js
const
app
=
getApp
()
import
{
Base
}
from
'
../../../utils/base.js
'
;
const
base
=
new
Base
()
Page
({
Page
({
/**
* 页面的初始数据
*/
data
:
{
data
:
{
activeIndex
:
1
,
activeIndex
:
1
,
coach_id
:
'
5
'
,
detail
:
''
,
type
:
'
1
'
,
// 1:收益 2:提现 3:预存储
profitList
:
[],
// 上课记录
profitPage
:
1
,
profitMore
:
true
,
profitLocked
:
false
,
withdrawList
:
[],
// 提现
withdrawPage
:
1
,
withdrawMore
:
true
,
withdrawLocked
:
false
,
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
getMoney
()
this
.
getList
(
1
)
this
.
getList
(
2
)
},
},
changeTab
(
e
)
{
changeTab
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
let
index
=
e
.
currentTarget
.
dataset
.
index
...
@@ -23,55 +37,153 @@ Page({
...
@@ -23,55 +37,153 @@ Page({
activeIndex
:
index
activeIndex
:
index
})
})
}
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
},
/**
getList
(
type
)
{
* 生命周期函数--监听页面显示
let
params
=
{
*/
url
:
'
commission/list
'
,
onShow
:
function
()
{
data
:
{
wx_user_id
:
this
.
data
.
coach_id
,
type
:
type
,
pageSize
:
'
15
'
,
page
:
this
.
data
.
profitPage
},
},
callback
:
(
data
)
=>
{
/**
if
(
type
==
1
)
{
* 生命周期函数--监听页面隐藏
this
.
setData
({
*/
profitList
:
this
.
data
.
profitList
.
concat
(
data
.
data
.
data
),
onHide
:
function
()
{
profitPage
:
data
.
data
.
current_page
+
1
,
profitMore
:
data
.
hasMorePage
,
profitLocked
:
false
})
console
.
log
(
this
.
data
.
profitList
)
}
else
if
(
type
==
2
)
{
this
.
setData
({
withdrawList
:
this
.
data
.
withdrawList
.
concat
(
data
.
data
.
data
),
withdrawPage
:
data
.
data
.
current_page
+
1
,
withdrawMore
:
data
.
hasMorePage
,
withdrawLocked
:
false
})
}
}
}
base
.
newRequest
(
params
)
},
},
/**
getMoney
()
{
* 生命周期函数--监听页面卸载
let
params
=
{
*/
url
:
'
commission
'
,
onUnload
:
function
()
{
data
:
{
wx_user_id
:
this
.
data
.
coach_id
},
callback
:
(
data
)
=>
{
this
.
setData
({
detail
:
data
})
}
}
base
.
newRequest
(
params
)
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
if
(
this
.
data
.
currentTabIndex
==
1
)
{
this
.
init2
()
}
else
if
(
this
.
data
.
currentTabIndex
==
2
)
{
this
.
init3
()
}
wx
.
stopPullDownRefresh
()
},
init2
()
{
this
.
setData
({
profitList
:
[],
// 收益列表
profitPage
:
1
,
profitMore
:
true
,
profitLocked
:
false
})
if
(
!
this
.
data
.
profitLocked
)
{
this
.
setData
({
profitLocked
:
true
})
this
.
getList
(
1
)
}
},
init3
()
{
this
.
setData
({
withdrawList
:
[],
// 提现
withdrawPage
:
1
,
withdrawMore
:
true
,
withdrawLocked
:
false
})
if
(
!
this
.
data
.
withdrawLocked
)
{
this
.
setData
({
withdrawLocked
:
true
})
this
.
getList
(
2
)
}
},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
if
(
!
this
.
data
.
locked
&&
this
.
data
.
hasMore
)
{
this
.
setData
({
locked
:
true
})
this
.
getStudent
()
}
if
(
!
this
.
data
.
profitLocked
&&
this
.
data
.
profitMore
)
{
this
.
setData
({
profitLocked
:
true
})
this
.
getList
(
1
)
}
if
(
!
this
.
data
.
withdrawLocked
&&
this
.
data
.
withdrawMore
)
{
this
.
setData
({
withdrawLocked
:
true
})
this
.
getList
(
2
)
}
},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
return
{
title
:
'
3-12岁儿童家门口的体育课,新人立享超级优惠!
'
,
imageUrl
:
this
.
data
.
detail
.
course
.
img
,
path
:
'
/pages/index/index?parent_id=
'
+
this
.
data
.
user_id
}
},
withdrawClick
()
{
// 提现
console
.
log
(
this
.
data
.
detail
)
console
.
log
(
this
.
data
.
detail
&&
this
.
data
.
detail
.
unrealized_revenue
<=
0
)
if
(
this
.
data
.
detail
==
''
||
this
.
data
.
detail
.
unrealized_revenue
<=
0
)
{
base
.
toast
(
'
提现金额不能小于0
'
)
return
}
wx
.
showModal
({
title
:
'
提示
'
,
content
:
'
您确定要提现所有金额
'
,
success
:(
res
)
=>
{
if
(
res
.
confirm
)
{
let
params
=
{
url
:
'
take_money
'
,
type
:
'
POST
'
,
data
:
{
wx_user_id
:
this
.
data
.
coach_id
,
amount
:
this
.
data
.
detail
.
unrealized_revenue
},
callback
:(
data
)
=>
{
base
.
toast
(
'
您的提现申请已提交
'
)
}
}
base
.
newRequest
(
params
)
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'
取消
'
)
}
}
})
}
}
})
})
\ No newline at end of file
pages/tabbar/financial/financial.json
View file @
e522a63c
{
{
"usingComponents"
:
{},
"usingComponents"
:
{
"navigationBarTitleText"
:
"财务"
"van-empty"
:
"/components/vant/empty/index"
},
"navigationBarTitleText"
:
"财务"
,
"enablePullDownRefresh"
:
true
}
}
\ No newline at end of file
pages/tabbar/financial/financial.wxml
View file @
e522a63c
...
@@ -4,119 +4,90 @@
...
@@ -4,119 +4,90 @@
<text class="{{activeIndex == 2 ? 'active': ''}}" catchtap="changeTab" data-index="2">提现记录</text>
<text class="{{activeIndex == 2 ? 'active': ''}}" catchtap="changeTab" data-index="2">提现记录</text>
</view>
</view>
<view class="item_detail">
<view class="item_detail">
<view hidden="{{activeIndex == 1}}">
<wxs module="time">
<view class="detailed flex-h">
var time = function(str){
var newstr = str.split(' ');
return newstr[0];
}
module.exports = {
time:time
}
</wxs>
<view hidden="{{activeIndex != 1}}">
<view class="detailed flex-h flex-vc flex-hc">
<view class="item-one">
<view class="item-one">
<view class="num">
500
</view>
<view class="num">
{{detail ? detail.estimated_revenue: 0}}
</view>
<view class="small">预计收益</view>
<view class="small">预计收益</view>
</view>
</view>
<view class="line"></view>
<view class="line"></view>
<view class="item-
two
">
<view class="item-
one
">
<view class="num">
300
</view>
<view class="num">
{{detail ? detail.total_revenue: 0}}
</view>
<view class="small">已结算</view>
<view class="small">已结算</view>
</view>
</view>
</view>
<van-icon class="question_icon" name="question-o" />
<van-icon class="question_icon" name="question-o" />
<view class="tx">全部提现</view>
<view class="tip">提示:每周二为提现日!其他日不支持提现</view>
<view class="table">
<view class="table-tr">
<view class="table-th">日期</view>
<view class="table-th">提现金额</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="content1" wx:if="{{profitList.length > 0}}">
<view class="table-td">10</view>
<view class="content1_head flex-h flex-vc">
<view style="width:30%">日期</view>
<view style="width:30%">结算金额</view>
<view style="width:40%">说明</view>
</view>
</view>
<view class="table-tr">
<view class="content1_body">
<view class="table-td">2020-10-28</view>
<block wx:for="{{profitList}}" wx:key='index'>
<view class="table-td">10</view>
<view class="content1_body_th flex-h flex-vc">
<view style="width:30%">{{time.time(item.created_at)}}</view>
<view style="width:30%">{{item.amount}}</view>
<view class="text-line-one" style="width:40%">{{item.remark}}</view>
</view>
</view>
<view class="table-tr">
</block>
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
</view>
<view class="table-tr">
<view wx:else class="empty">
<view class="table-td">2020-10-28</view>
<van-empty
<view class="table-td">10</view>
class="custom-image"
image="/images/without.png"
description="暂无上课记录"
/>
</view>
</view>
</view>
</view>
</view>
<view hidden="{{activeIndex != 2}}">
<view hidden="{{activeIndex == 2}}">
<view class="detailed flex-h flex-hc flex-vc">
<view class="detailed flex-h">
<view class="item-one">
<view class="item-one">
<view class="num">
2000
</view>
<view class="num">
{{detail? detail.unrealized_revenue: 0}}
</view>
<view class="small">
预计收益
</view>
<view class="small">
余额
</view>
</view>
</view>
<view class="line"></view>
<view class="line"></view>
<view class="item-
two
">
<view class="item-
one
">
<view class="num">
1520
</view>
<view class="num">
{{detail? detail.sales_revenue: 0}}
</view>
<view class="small">已结算</view>
<view class="small">已结算</view>
</view>
</view>
</view>
<van-icon class="question_icon" name="question-o" />
<van-icon class="question_icon" name="question-o" />
<view class="table">
<view class="share" catchtap="withdrawClick">全部提现</view>
<view class="table-tr">
<view class="table-th">日期</view>
<view class="table-th">结算金额</view>
<view class="table-th">说明</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view>
</view>
<view class="tip">提示:每周二为提现日!其他日不支持提现</view>
<view class="content1" wx:if='{{withdrawList.length > 0}}'>
<view class="content1_head flex-h flex-vc">
<view style="width:50%">日期</view>
<view style="width:50%">提现金额</view>
</view>
<view class="content1_body">
<block wx:for="{{withdrawList}}" wx:key='index'>
<view class="content1_body_th flex-h flex-vc">
<view style="width:50%">{{time.time(item.created_at)}}</view>
<view style="width:50%">{{item.amount}}</view>
</view>
</block>
</view>
</view>
<view wx:else class="empty">
<van-empty
class="custom-image"
image="/images/without.png"
description="暂无提现记录"
/>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/tabbar/financial/financial.wxss
View file @
e522a63c
.tablist {
.tablist {
width: 690rpx;
width: 690rpx;
height: 68rpx;
height: 68rpx;
...
@@ -10,15 +9,18 @@
...
@@ -10,15 +9,18 @@
margin: 56rpx auto 30rpx;
margin: 56rpx auto 30rpx;
overflow: hidden;
overflow: hidden;
}
}
.tablist text{
.tablist text {
width: 50%;
width: 50%;
font-size: 26rpx;
font-size: 26rpx;
color: #000000;
color: #000000;
}
}
.tablist text.active {
.tablist text.active {
background: #FFC600;
background: #FFC600;
}
}
.number{
.number {
width: 690rpx;
width: 690rpx;
height: 180rpx;
height: 180rpx;
background: #FFFFFF;
background: #FFFFFF;
...
@@ -27,50 +29,59 @@
...
@@ -27,50 +29,59 @@
box-shadow: 0 10rpx 20rpx 10rpx rgba(239, 240, 241, 0.72);
box-shadow: 0 10rpx 20rpx 10rpx rgba(239, 240, 241, 0.72);
position: relative;
position: relative;
}
}
.number .item-one{
.number .item-one {
position: absolute;
position: absolute;
top: 32rpx;
top: 32rpx;
left: 100rpx;
left: 100rpx;
}
}
.number .item-one .num{
.number .item-one .num {
color: #000000;
color: #000000;
font-size: 50rpx;
font-size: 50rpx;
}
}
.number .item-one .small{
.number .item-one .small {
color: #B3B3B3;
color: #B3B3B3;
font-size: 24rpx;
font-size: 24rpx;
text-align: center;
text-align: center;
}
}
.number .line{
.number .line {
width: 2rpx;
width: 2rpx;
height: 80rpx;
height: 80rpx;
background:
#EBEBEB;
background:
#EBEBEB;
position: absolute;
position: absolute;
top: 46rpx;
top: 46rpx;
left: 344rpx;
left: 344rpx;
}
}
.number .item-two{
.number .item-two {
position: absolute;
position: absolute;
top: 32rpx;
top: 32rpx;
right: 142rpx;
right: 142rpx;
}
}
.number .item-two .num{
.number .item-two .num {
color: #000000;
color: #000000;
font-size: 50rpx;
font-size: 50rpx;
}
}
.number .item-two .small{
.number .item-two .small {
color: #B3B3B3;
color: #B3B3B3;
font-size: 24rpx;
font-size: 24rpx;
text-align: center;
text-align: center;
}
}
.number .question_icon{
.number .question_icon {
position: absolute;
position: absolute;
right: 30rpx;
right: 30rpx;
top: 40rpx;
top: 40rpx;
font-size: 30rpx;
font-size: 30rpx;
color: #999999;
color: #999999;
}
}
.number .share{
.number .share {
width: 105rpx;
width: 105rpx;
height: 40rpx;
height: 40rpx;
background: linear-gradient(-62deg, #FF7800 0%, #FF9D1F 100%);
background: linear-gradient(-62deg, #FF7800 0%, #FF9D1F 100%);
...
@@ -83,61 +94,50 @@
...
@@ -83,61 +94,50 @@
top: 100rpx;
top: 100rpx;
right: 0;
right: 0;
}
}
.detailed{
.detailed {
width: 690rpx;
width: 690rpx;
height: 180rpx;
height: 180rpx;
background: linear-gradient(25deg, #212121 0%, #3B3B3B 100%);
background: url('https://wdty.xueyoubangedu.com/wandou/moneybg.png') no-repeat;
background-size: 100% 100%;
border-radius: 15px;
border-radius: 15px;
margin: 30rpx auto;
margin: 30rpx auto;
box-shadow: 0 10rpx 20rpx 10rpx rgba(239, 240, 241, 0.72);
box-shadow: 0 10rpx 20rpx 10rpx rgba(239, 240, 241, 0.72);
position: relative;
position: relative;
}
}
.detailed .item-one{
.detailed .item-one {
position: absolute;
text-align: center;
top: 32rpx;
width: 50%;
left: 100rpx;
}
}
.detailed .item-one .num{
.detailed .item-one .num
{
color: #FFDEAA;
color: #FFDEAA;
font-size: 50rpx;
font-size: 50rpx;
}
}
.detailed .item-one .small{
.detailed .item-one .small {
color: #999999;
color: #999999;
font-size: 24rpx;
font-size: 24rpx;
text-align: center;
}
}
.detailed .line{
.detailed .line {
width: 2rpx;
width: 2rpx;
height: 80rpx;
height: 80rpx;
background:
#EBEBEB;
background:
#EBEBEB;
position: absolute;
position: absolute;
top: 46rpx;
top: 46rpx;
left: 344rpx;
left: 344rpx;
}
}
.detailed .item-two{
position: absolute;
.question_icon {
top: 32rpx;
right: 142rpx;
}
.detailed .item-two .num{
color: #FFDEAA;
font-size: 50rpx;
}
.detailed .item-two .small{
color: #999999;
font-size: 24rpx;
text-align: center;
}
.question_icon{
position: absolute;
position: absolute;
right: 6
0rpx;
right: 3
0rpx;
top: 18
0rpx;
top: 2
0rpx;
font-size: 30rpx;
font-size: 30rpx;
color: #999999;
color: #999999;
}
}
.
tx
{
.
share
{
width: 116
rpx;
padding: 0 15
rpx;
height: 40rpx;
height: 40rpx;
background: linear-gradient(-62deg, #FF7800 0%, #FF9D1F 100%);
background: linear-gradient(-62deg, #FF7800 0%, #FF9D1F 100%);
border-radius: 20px 0px 0px 20px;
border-radius: 20px 0px 0px 20px;
...
@@ -146,12 +146,11 @@
...
@@ -146,12 +146,11 @@
text-align: center;
text-align: center;
line-height: 40rpx;
line-height: 40rpx;
position: absolute;
position: absolute;
top: 234rpx;
top: 90rpx;
right: 32rpx;
right: 0;
padding-left: 10rpx;
padding-right: 4rpx;
}
}
.tip{
.tip {
width: 690rpx;
width: 690rpx;
height: 53rpx;
height: 53rpx;
background: #FFF2DD;
background: #FFF2DD;
...
@@ -162,44 +161,39 @@
...
@@ -162,44 +161,39 @@
padding-left: 12rpx;
padding-left: 12rpx;
margin-left: 30rpx;
margin-left: 30rpx;
}
}
/* table表格 */
/* table表格 */
.table
{
.content1
{
width: 690rpx;
width: 690rpx;
height: 750rpx;
background: #FFFFFF;
background: #FFFFFF;
border-radius: 15px;
border-radius: 15px;
box-shadow: 0 10rpx 20rpx 10rpx rgba(239, 240, 241, 0.72);
box-shadow: 0 10rpx 20rpx 10rpx rgba(239, 240, 241, 0.72);
margin-bottom: 20rpx;
display: table;
border-collapse: collapse;
box-sizing: border-box;
display: table;
text-align: center;
}
}
.table, .table div {
margin: 30rpx auto;
.content1_head {
}
height: 80rpx;
.table-tr {
display: table-row;
height: 92rpx;
border-bottom: 1px solid #EBEBEB;
border-bottom: 1px solid #EBEBEB;
}
line-height: 80rpx;
.table-tr:last-child{
font-size: 24rpx;
border-bottom: none;
}
.table-tr:nth-child(2n){
background: #F7F8FA;
}
.table-th{
display: table-cell;
font-weight: bold;
text-align: center;
vertical-align: middle;
color: #333333;
color: #333333;
}
padding: 0 10rpx;
.table-td{
}
display: table-cell;
text-align: center;
.content1_body {
vertical-align: middle;
padding: 0 10rpx;
}
.content1_body_th {
height: 80rpx;
line-height: 80rpx;
font-size: 24rpx;
color: #B3B3B3;
color: #B3B3B3;
}
}
\ No newline at end of file
.content1_body_th view:nth-child(1) {
color: #666;
}
.content1_body_th:nth-child(2n) {
background: #F7F8FA;
}
\ No newline at end of file
pages/tabbar/index/index.js
View file @
e522a63c
...
@@ -13,25 +13,8 @@ Page({
...
@@ -13,25 +13,8 @@ Page({
data
:
{
data
:
{
coach_id
:
'
5
'
,
coach_id
:
'
5
'
,
isOpen
:
false
,
isOpen
:
false
,
daysColor
:
[{
daysColor
:
[],
month
:
'
current
'
,
today
:
''
,
// 今天日期
day
:
'
12
'
,
color
:
'
#fff
'
,
background
:
'
#FF6E00
'
},
{
month
:
'
current
'
,
day
:
'
10
'
,
color
:
'
#fff
'
,
background
:
'
linear-gradient(#5791FE 0%, #3E63F8 100%);
'
},
{
month
:
'
current
'
,
day
:
'
8
'
,
color
:
'
#fff
'
,
background
:
'
linear-gradient(#5791FE 0%, #3E63F8 100%);
'
}
],
curDate
:
''
,
curDate
:
''
,
list
:
[],
list
:
[],
allList
:
[]
allList
:
[]
...
@@ -45,8 +28,10 @@ Page({
...
@@ -45,8 +28,10 @@ Page({
title
:
'
加载中...
'
,
title
:
'
加载中...
'
,
})
})
this
.
setData
({
this
.
setData
({
today
:
util
.
formatTime
(
new
Date
()),
curDate
:
util
.
formatTime
(
new
Date
())
curDate
:
util
.
formatTime
(
new
Date
())
})
})
console
.
log
(
this
.
data
.
today
==
this
.
data
.
curDate
)
this
.
getAllList
()
this
.
getAllList
()
this
.
getList
()
this
.
getList
()
},
},
...
@@ -146,21 +131,23 @@ Page({
...
@@ -146,21 +131,23 @@ Page({
isOpen
:
!
this
.
data
.
isOpen
isOpen
:
!
this
.
data
.
isOpen
})
})
},
},
goclassManagement
:
function
()
{
goclassManagement
:
function
(
e
)
{
wx
.
navigateTo
({
let
item
=
e
.
currentTarget
.
dataset
.
item
url
:
'
../../index/classManagement/classManagement
'
,
let
classTime
=
item
.
start_time
+
'
~
'
+
item
.
end_time
})
},
goclassDetail
:
function
()
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'
../../index/classDetail/classDetail
'
,
url
:
'
/pages/index/classManagement/classManagement?classTime=
'
+
classTime
+
'
&class_id=
'
+
item
.
class_id
+
'
&lesson_id=
'
+
item
.
id
,
})
})
},
},
goDetail
(
e
)
{
goDetail
(
e
)
{
let
item
=
e
.
currentTarget
.
dataset
.
item
let
item
=
e
.
currentTarget
.
dataset
.
item
console
.
log
(
item
)
console
.
log
(
item
)
let
classTime
=
item
.
start_time
+
'
~
'
+
item
.
end_time
// console.log(item)
// wx.navigateTo({
// url: '/pages/index/classDetail/classDetail',
// })
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'
/pages/index/class
Detail/classDetail
'
,
url
:
'
/pages/index/class
Management/classManagement?classTime=
'
+
classTime
+
'
&class_id=
'
+
item
.
class_id
+
'
&lesson_id=
'
+
item
.
id
,
})
})
},
},
})
})
\ No newline at end of file
pages/tabbar/index/index.wxml
View file @
e522a63c
...
@@ -10,27 +10,44 @@
...
@@ -10,27 +10,44 @@
</view>
</view>
</view>
</view>
</view>
</view>
<wxs module="util">
var time = function() {
var hour = getDate().getHours()
var minute = getDate().getMinutes()
var time = hour + ':' + minute
console.log(hour)
console.log(minute)
return time
}
module.exports = {
time: time
}
</wxs>
<view wx:if='{{list.length > 0}}'>
<view wx:if='{{list.length > 0}}'>
<block wx:for="{{list}}" wx:key='index' >
<block wx:for="{{list}}" wx:key='index' >
<view class="cont flex-v flex-hb" catchtap="goclassDetail">
<view class="cont flex-v flex-hb" catchtap="goclassDetail">
<view class="top">
<view class="top">
<view class="time_title">{{item.course.name}}</view>
<view class="time_title">{{item.course.name}}</view>
<view wx:if='{{today != curDate}}'>
<view class="over" wx:if="{{item.class_status_display == '已结束'}}">{{item.class_status_display}}</view>
<view class="over" wx:if="{{item.class_status_display == '已结束'}}">{{item.class_status_display}}</view>
<view class="state" wx:if="{{item.class_status_display == '即将开课'}}">{{item.class_status_display}}</view>
</view>
<view wx:else>
<view wx:else>
<view class="state">{{item.class_status_display}}</view>
<view class="state" wx:if='{{util.time() < item.start_time}}'>即将开课</view>
<view class="inclass">上课中</view>
<view class="inclass" wx:if='{{util.time() > item.start_time && util.time()< end_time}}'>开课中</view>
<view class="over" wx:if='{{util.time() > item.end_time }}'>已结束</view>
</view>
</view>
</view>
</view>
<view class="time">上课时间:{{item.class_date}} {{item.start_time}}-{{item.end_time}} </view>
<view class="time">上课时间:{{item.class_date}} {{item.start_time}}-{{item.end_time}} </view>
<view class="place">上课地点:{{item.stadium.name}}</view>
<view class="place">上课地点:{{item.stadium.name}}</view>
<view>
<view>
<view class="manage1" catchtap="goDetail" wx:if="{{item.
class_status_display == '已结束'
}}" data-item='{{item}}'>查看详情</view>
<view class="manage1" catchtap="goDetail" wx:if="{{item.
lesson_status == 1
}}" data-item='{{item}}'>查看详情</view>
<view wx:else class="manage" catchtap="goclassManagement">管理</view>
<view wx:else class="manage" catchtap="goclassManagement"
data-item="{{item}}"
>管理</view>
</view>
</view>
</view>
</view>
</block>
</block>
</view>
</view>
<view wx:else class="empty">
<view wx:else class="empty">
<van-empty
<van-empty
...
...
project.config.json
View file @
e522a63c
...
@@ -42,12 +42,6 @@
...
@@ -42,12 +42,6 @@
"simulatorType"
:
"wechat"
,
"simulatorType"
:
"wechat"
,
"simulatorPluginLibVersion"
:
{},
"simulatorPluginLibVersion"
:
{},
"condition"
:
{
"condition"
:
{
"search"
:
{
"list"
:
[]
},
"conversation"
:
{
"list"
:
[]
},
"plugin"
:
{
"plugin"
:
{
"list"
:
[]
"list"
:
[]
},
},
...
@@ -154,6 +148,18 @@
...
@@ -154,6 +148,18 @@
"id"
:
-1
,
"id"
:
-1
,
"name"
:
"pages/team/teamDetail/teamDetail"
,
"name"
:
"pages/team/teamDetail/teamDetail"
,
"pathName"
:
"pages/team/teamDetail/teamDetail"
,
"pathName"
:
"pages/team/teamDetail/teamDetail"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"财务"
,
"pathName"
:
"pages/tabbar/financial/financial"
,
"query"
:
""
,
"scene"
:
null
},
{
"name"
:
"课程管理详情页面"
,
"pathName"
:
"pages/index/classManagement/classManagement"
,
"scene"
:
null
"scene"
:
null
}
}
]
]
...
...
utils/base.js
View file @
e522a63c
...
@@ -12,22 +12,15 @@ class Base {
...
@@ -12,22 +12,15 @@ class Base {
params
.
type
=
'
GET
'
params
.
type
=
'
GET
'
}
}
var
cur_url
=
that
.
baseUrl
+
params
.
url
var
cur_url
=
that
.
baseUrl
+
params
.
url
// if (flag) {
// params.url = params.url;
// } else {
// params.url = that.baseUrl + params.url;
// }
console
.
log
(
cur_url
)
wx
.
request
({
wx
.
request
({
url
:
cur_url
,
url
:
cur_url
,
data
:
params
.
data
,
data
:
params
.
data
,
method
:
params
.
type
,
method
:
params
.
type
,
header
:
{
header
:
{
'
token
'
:
wx
.
getStorageSync
(
'
token
'
)
,
'
token
'
:
app
.
globalData
.
token
,
'
app
'
:
'
coach
'
'
app
'
:
'
coach
'
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
res
)
params
.
ischeckedCallback
&&
params
.
ischeckedCallback
()
//防止用户多次点击,请求完成后让用户可点
params
.
ischeckedCallback
&&
params
.
ischeckedCallback
()
//防止用户多次点击,请求完成后让用户可点
if
(
wx
.
showLoading
())
{
if
(
wx
.
showLoading
())
{
wx
.
hideLoading
()
//隐藏加载动画
wx
.
hideLoading
()
//隐藏加载动画
...
@@ -35,11 +28,11 @@ class Base {
...
@@ -35,11 +28,11 @@ class Base {
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
statusCode
==
200
)
{
let
rstcode
=
res
.
data
.
meta
.
code
.
toString
()
//接口返回的错误码
let
rstcode
=
res
.
data
.
meta
.
code
.
toString
()
//接口返回的错误码
if
(
rstcode
==
'
200
'
)
{
if
(
rstcode
==
'
200
'
)
{
params
.
callback
&&
params
.
callback
(
res
.
data
.
data
)
params
.
callback
&&
params
.
callback
(
res
.
data
.
data
,
res
)
// 请求成功
}
else
if
(
rstcode
==
'
400
'
)
{
}
else
if
(
rstcode
==
'
400
'
)
{
if
(
!
flag
)
{
// 400 token过期
if
(
!
flag
)
{
app
.
getSessionKey
(
function
()
{
app
.
getSessionKey
(
function
()
{
that
.
newRequest
(
params
,
true
)
that
.
newRequest
(
params
,
true
,
tips
)
})
})
}
}
}
else
if
(
rstcode
==
'
404
'
)
{
}
else
if
(
rstcode
==
'
404
'
)
{
...
@@ -56,8 +49,12 @@ class Base {
...
@@ -56,8 +49,12 @@ class Base {
duration
:
2000
duration
:
2000
})
})
}
}
}
}
}
else
{
}
else
{
if
(
wx
.
showLoading
())
{
wx
.
hideLoading
()
//隐藏加载动画
}
wx
.
showModal
({
wx
.
showModal
({
title
:
'
错误
'
,
title
:
'
错误
'
,
content
:
'
网络请求失败
'
content
:
'
网络请求失败
'
...
@@ -66,6 +63,7 @@ class Base {
...
@@ -66,6 +63,7 @@ class Base {
}
}
})
})
}
}
//富文本
//富文本
richText
(
detail
)
{
richText
(
detail
)
{
if
(
detail
!=
''
&&
detail
!=
null
&&
detail
!=
undefined
)
{
if
(
detail
!=
''
&&
detail
!=
null
&&
detail
!=
undefined
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment