Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sport-train
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
tangjiale
sport-train
Commits
e009b253
Commit
e009b253
authored
Jun 14, 2022
by
tangjiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代码
parent
aa6ff24a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
43 deletions
+90
-43
my.js
pages/my/my.js
+41
-2
detail.js
subPages/course/detail/detail.js
+28
-4
pay.js
subPages/course/pay/pay.js
+17
-36
pay.wxml
subPages/course/pay/pay.wxml
+3
-0
index.js
subPages/login/login/index.js
+1
-1
No files found.
pages/my/my.js
View file @
e009b253
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @eMail: 932055106@qq.com
* @Date: 2022-06-06 16:44:43
* @Date: 2022-06-06 16:44:43
* @LastEditors: tangjiale
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-13
09:57:53
* @LastEditTime: 2022-06-13
14:10:54
*/
*/
var
app
=
getApp
();
var
app
=
getApp
();
var
API
=
require
(
"../../utils/request.js"
);
var
API
=
require
(
"../../utils/request.js"
);
...
@@ -13,7 +13,13 @@ Page({
...
@@ -13,7 +13,13 @@ Page({
data
:
{
data
:
{
userInfo
:
{},
userInfo
:
{},
tabs
:[]
tabs
:[],
sportCalorie
:
''
,
//消耗千卡
sportTotalDay
:
''
,
//累计天数
sportTime
:
''
,
//总时长
todayInfo
:[],
//今日运动信息
todaySportTime
:
0
,
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
...
@@ -26,6 +32,9 @@ Page({
...
@@ -26,6 +32,9 @@ Page({
selected
:
2
selected
:
2
})
})
}
}
this
.
getDataList
()
this
.
sportStatTotal
();
},
},
//跳转到运动记录页面
//跳转到运动记录页面
...
@@ -39,4 +48,33 @@ Page({
...
@@ -39,4 +48,33 @@ Page({
url
:
'../../subPages/sport/sportTime/sportTime?type=2'
,
url
:
'../../subPages/sport/sportTime/sportTime?type=2'
,
})
})
},
},
//获取运动日记录
getDataList
(){
var
that
=
this
;
API
.
getData
(
'/project/getDataList'
,
{
dateType
:
"day"
,
page
:
1
,
size
:
1
},
(
res
)
=>
{
console
.
log
(
'当天的运动记录'
,
res
)
that
.
setData
({
todaySportTime
:
parseInt
(
res
.
data
[
0
].
sportTime
/
60
),
todayInfo
:
res
.
data
[
0
]
})
})
},
//获取运动时长 千卡 累计
sportStatTotal
()
{
var
that
=
this
;
API
.
getData
(
'/project/getTotalData'
,
{},
(
res
)
=>
{
//console.log('获取总运动时长 千卡 累计',res);
that
.
setData
({
sportCalorie
:
res
.
data
.
calorie
,
sportTime
:
parseInt
(
res
.
data
.
sportTime
/
60
),
sportTotalDay
:
res
.
data
.
joinDayNum
})
},
function
()
{
wx
.
hideLoading
()
});
},
})
})
\ No newline at end of file
subPages/course/detail/detail.js
View file @
e009b253
...
@@ -3,29 +3,52 @@
...
@@ -3,29 +3,52 @@
* @eMail: 932055106@qq.com
* @eMail: 932055106@qq.com
* @Date: 2022-06-13 08:57:51
* @Date: 2022-06-13 08:57:51
* @LastEditors: tangjiale
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-13
08:58:38
* @LastEditTime: 2022-06-13
19:42:49
*/
*/
var
API
=
require
(
"../../../utils/request.js"
);
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
courseDetail
:{},
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
wx
.
makePhoneCall
({
phoneNumber
:
'1340000'
//仅为示例,并非真实的电话号码
})
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
queryCourseDetail
(
options
.
id
)
},
//收藏/取消收藏
courseCollect
(){
API
.
getData
(
'/px/course/getMobileCourseList'
,
{
id
:
that
.
data
.
page
,
opType
:
1
,
//1:收藏,2:取消收藏
},
(
res
)
=>
{
})
},
queryCourseDetail
(){
let
that
=
this
API
.
getData
(
'/px/course/getMobileCourseInfo'
,
{
id
:
that
.
data
.
page
,
},
(
res
)
=>
{
that
.
setData
({
courseDetail
:
res
})
})
}
}
})
})
\ No newline at end of file
subPages/course/pay/pay.js
View file @
e009b253
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
* @eMail: 932055106@qq.com
* @eMail: 932055106@qq.com
* @Date: 2022-06-13 08:59:17
* @Date: 2022-06-13 08:59:17
* @LastEditors: tangjiale
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-13
09:21:46
* @LastEditTime: 2022-06-13
19:52:21
*/
*/
// subPages/course/pay/pay.js
var
API
=
require
(
"../../../utils/request.js"
);
Page
({
Page
({
/**
/**
...
@@ -13,8 +13,12 @@ Page({
...
@@ -13,8 +13,12 @@ Page({
*/
*/
data
:
{
data
:
{
param
:{
param
:{
stuName
:
''
,
stuName
:
'超人霍华德'
,
//姓名
gender
:
1
,
//性别
phone
:
13975487978
,
schId
:
2
,
//所在校区
courserId
:
17095
,
//课程id
releationShip
:
1
,
//关系
}
}
},
},
...
@@ -38,39 +42,17 @@ Page({
...
@@ -38,39 +42,17 @@ Page({
onShow
:
function
()
{
onShow
:
function
()
{
},
},
callMan
(){
/**
wx
.
makePhoneCall
({
* 生命周期函数--监听页面隐藏
phoneNumber
:
'13975487978'
//仅为示例,并非真实的电话号码
*/
})
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
},
payOrder
(){
let
that
=
this
API
.
requestAll
(
'/px/order/addTyOrder'
,
that
.
data
.
param
,
function
(
res
)
{
/**
})
* 页面相关事件处理函数--监听用户下拉动作
}
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
})
})
\ No newline at end of file
subPages/course/pay/pay.wxml
View file @
e009b253
...
@@ -3,4 +3,6 @@
...
@@ -3,4 +3,6 @@
<!-- 支付订单 -->
<!-- 支付订单 -->
支付订单
支付订单
<view class="" bindtap="payOrder">支付</view>
<view class="" bindtap="callMan">打电话</view>
</view>
</view>
\ No newline at end of file
subPages/login/login/index.js
View file @
e009b253
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @eMail: 932055106@qq.com
* @Date: 2022-06-06 15:52:31
* @Date: 2022-06-06 15:52:31
* @LastEditors: tangjiale
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-1
1 16:13:22
* @LastEditTime: 2022-06-1
3 19:32:55
*/
*/
var
API
=
require
(
"../../../utils/request.js"
);
var
API
=
require
(
"../../../utils/request.js"
);
var
postData
=
{};
var
postData
=
{};
...
...
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