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
1d15f88a
Commit
1d15f88a
authored
Nov 19, 2020
by
吴颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'修改图表'
parent
4c5206b3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
27 deletions
+60
-27
performance.js
pages/index/performance/performance.js
+35
-9
performance.wxml
pages/index/performance/performance.wxml
+3
-3
performance.wxss
pages/index/performance/performance.wxss
+14
-13
project.config.json
project.config.json
+8
-2
No files found.
pages/index/performance/performance.js
View file @
1d15f88a
...
@@ -17,17 +17,10 @@ Page({
...
@@ -17,17 +17,10 @@ Page({
lesson_id
:
''
,
lesson_id
:
''
,
child_id
:
''
,
child_id
:
''
,
class_single_id
:
''
,
class_single_id
:
''
,
ec
:
{
ec
:
null
,
onInit
:
function
(
canvas
,
width
,
height
)
{
chartLine
=
echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
});
canvas
.
setChart
(
chartLine
);
}
}
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
init
()
this
.
setData
({
this
.
setData
({
coach_id
:
app
.
globalData
.
coach_id
,
coach_id
:
app
.
globalData
.
coach_id
,
class_id
:
options
.
class_id
,
class_id
:
options
.
class_id
,
...
@@ -38,6 +31,33 @@ Page({
...
@@ -38,6 +31,33 @@ Page({
this
.
getcomment
()
this
.
getcomment
()
this
.
getbadges
()
this
.
getbadges
()
},
},
init
()
{
const
getPixelRatio
=
()
=>
{
let
pixelRatio
=
0
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
pixelRatio
=
res
.
pixelRatio
},
fail
:
function
()
{
pixelRatio
=
0
}
})
return
pixelRatio
}
var
dpr
=
getPixelRatio
()
this
.
setData
({
ec
:
{
onInit
:
function
(
canvas
,
width
,
height
)
{
chartLine
=
echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
dpr
});
canvas
.
setChart
(
chartLine
);
}
}
})
},
getcomment
:
function
()
{
getcomment
:
function
()
{
let
params
=
{
let
params
=
{
url
:
'
coach/comment
'
,
url
:
'
coach/comment
'
,
...
@@ -46,6 +66,10 @@ Page({
...
@@ -46,6 +66,10 @@ Page({
class_id
:
this
.
data
.
class_id
,
class_id
:
this
.
data
.
class_id
,
lesson_id
:
this
.
data
.
lesson_id
,
lesson_id
:
this
.
data
.
lesson_id
,
child_id
:
this
.
data
.
child_id
,
child_id
:
this
.
data
.
child_id
,
// coach_id: 5,
// class_id: 16,
// lesson_id: 69,
// child_id: 303,
},
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
this
.
setData
({
this
.
setData
({
...
@@ -79,6 +103,8 @@ Page({
...
@@ -79,6 +103,8 @@ Page({
show
:
false
show
:
false
},
},
radar
:
{
radar
:
{
// radius: 100
center
:
[
'
52%
'
,
'
50%
'
],
shape
:
'
circle
'
,
shape
:
'
circle
'
,
splitNumber
:
4
,
// 分割段数
splitNumber
:
4
,
// 分割段数
indicator
:
xData
,
// 数据
indicator
:
xData
,
// 数据
...
...
pages/index/performance/performance.wxml
View file @
1d15f88a
<view class="
top
">
<view class="
canvasbox
">
<view class="title">运动表现</view>
<view class="
canvas_
title">运动表现</view>
<view class="canvasbox">
<view class="canvasbox
1
">
<ec-canvas id="mychart" class="canvas" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
<ec-canvas id="mychart" class="canvas" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
</view>
</view>
...
...
pages/index/performance/performance.wxss
View file @
1d15f88a
.container {
width: 100%;
height: 500rpx;
}
ec-canvas {
width: 100%;
height: 100%;
}
page {
page {
background: #F7F8FA;
background: #F7F8FA;
...
@@ -19,15 +10,25 @@ page {
...
@@ -19,15 +10,25 @@ page {
margin-bottom: 20rpx;
margin-bottom: 20rpx;
padding: 50rpx 30rpx;
padding: 50rpx 30rpx;
}
}
.
top .
canvasbox {
.canvasbox {
width: 100%;
width: 100%;
height: 6
0
5rpx;
height: 6
3
5rpx;
background: #FFFFFF;
background: #FFFFFF;
border-radius: 15rpx;
border-radius: 15rpx;
position: relative;
margin-bottom: 20rpx;
}
.canvas_title {
padding-left: 30rpx;
padding-top: 50rpx;
font-size: 26rpx;
font-weight: bold;
color: #1A1A1A;
z-index: 100;
}
}
.
top .canvasbox .canvas
{
.
canvasbox .canvasbox1
{
width: 100%;
width: 100%;
height:
100%
;
height:
555rpx
;
}
}
.one {
.one {
padding: 49rpx 28rpx 32rpx 28rpx;
padding: 49rpx 28rpx 32rpx 28rpx;
...
...
project.config.json
View file @
1d15f88a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"ignore"
:
[]
"ignore"
:
[]
},
},
"setting"
:
{
"setting"
:
{
"urlCheck"
:
fals
e
,
"urlCheck"
:
tru
e
,
"es6"
:
true
,
"es6"
:
true
,
"enhance"
:
false
,
"enhance"
:
false
,
"postcss"
:
true
,
"postcss"
:
true
,
...
@@ -21,14 +21,20 @@
...
@@ -21,14 +21,20 @@
"checkSiteMap"
:
true
,
"checkSiteMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"compileHotReLoad"
:
false
,
"compileHotReLoad"
:
false
,
"useMultiFrameRuntime"
:
false
,
"useApiHook"
:
true
,
"babelSetting"
:
{
"babelSetting"
:
{
"ignore"
:
[],
"ignore"
:
[],
"disablePlugins"
:
[],
"disablePlugins"
:
[],
"outputPath"
:
""
"outputPath"
:
""
},
},
"enableEngineNative"
:
false
,
"useIsolateContext"
:
true
,
"useIsolateContext"
:
true
,
"useCompilerModule"
:
false
,
"useCompilerModule"
:
false
,
"userConfirmedUseCompilerModuleSwitch"
:
false
"userConfirmedUseCompilerModuleSwitch"
:
false
,
"packNpmManually"
:
false
,
"packNpmRelationList"
:
[],
"minifyWXSS"
:
true
},
},
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.14.0"
,
"libVersion"
:
"2.14.0"
,
...
...
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