Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
6a8a2996
Commit
6a8a2996
authored
Oct 14, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ad1e0095
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5977 additions
and
1 deletion
+5977
-1
pages.json
pages.json
+2
-0
component.vue
pages/school/components/u-charts/component.vue
+165
-0
u-charts.js
pages/school/components/u-charts/u-charts.js
+5662
-0
u-charts.min.js
pages/school/components/u-charts/u-charts.min.js
+1
-0
mystudy.vue
pages/school/mystudy/mystudy.vue
+145
-0
cardList.vue
pages/school/personal/cardList.vue
+2
-1
No files found.
pages.json
View file @
6a8a2996
...
...
@@ -383,6 +383,8 @@
"path"
:
"personal/studycard"
},{
"path"
:
"personal/cardList"
//学习卡中心
},{
"path"
:
"mystudy/mystudy"
}]
},
...
...
pages/school/components/u-charts/component.vue
0 → 100755
View file @
6a8a2996
<
template
>
<canvas
v-if=
"canvasId"
:id=
"canvasId"
:canvasId=
"canvasId"
:style=
"
{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"
@touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @error="error">
</canvas>
</
template
>
<
script
>
import
uCharts
from
'./u-charts.js'
;
var
canvases
=
{};
export
default
{
props
:
{
chartType
:
{
required
:
true
,
type
:
String
,
default
:
'column'
},
opts
:
{
required
:
true
,
type
:
Object
,
default
()
{
return
null
;
},
},
canvasId
:
{
type
:
String
,
default
:
'u-canvas'
,
},
cWidth
:
{
default
:
375
,
},
cHeight
:
{
default
:
250
,
},
pixelRatio
:
{
type
:
Number
,
default
:
1
,
},
},
mounted
()
{
this
.
init
();
},
methods
:
{
init
()
{
switch
(
this
.
chartType
)
{
case
'column'
:
this
.
initColumnChart
();
break
;
case
'line'
:
this
.
initLineChart
();
break
;
default
:
break
;
}
},
initColumnChart
()
{
canvases
[
this
.
canvasId
]
=
new
uCharts
({
$this
:
this
,
canvasId
:
this
.
canvasId
,
type
:
'column'
,
legend
:
true
,
fontSize
:
11
,
background
:
'#FFFFFF'
,
pixelRatio
:
this
.
pixelRatio
,
animation
:
true
,
categories
:
this
.
opts
.
categories
,
series
:
this
.
opts
.
series
,
enableScroll
:
true
,
xAxis
:
{
disableGrid
:
true
,
itemCount
:
4
,
scrollShow
:
true
},
yAxis
:
{
//disabled:true
},
dataLabel
:
true
,
width
:
this
.
cWidth
*
this
.
pixelRatio
,
height
:
this
.
cHeight
*
this
.
pixelRatio
,
extra
:
{
column
:
{
type
:
'group'
,
}
}
});
},
initLineChart
()
{
canvases
[
this
.
canvasId
]
=
new
uCharts
({
$this
:
this
,
canvasId
:
this
.
canvasId
,
type
:
'line'
,
fontSize
:
11
,
legend
:
true
,
dataLabel
:
false
,
dataPointShape
:
true
,
background
:
'#FFFFFF'
,
pixelRatio
:
this
.
pixelRatio
,
categories
:
this
.
opts
.
categories
,
series
:
this
.
opts
.
series
,
animation
:
true
,
enableScroll
:
true
,
xAxis
:
{
type
:
'grid'
,
gridColor
:
'#CCCCCC'
,
gridType
:
'dash'
,
dashLength
:
8
,
itemCount
:
4
,
scrollShow
:
true
},
yAxis
:
{
gridType
:
'dash'
,
gridColor
:
'#CCCCCC'
,
dashLength
:
8
,
splitNumber
:
5
,
min
:
10
,
max
:
180
,
format
:
(
val
)
=>
{
return
val
.
toFixed
(
0
)
+
'元'
}
},
width
:
this
.
cWidth
*
this
.
pixelRatio
,
height
:
this
.
cHeight
*
this
.
pixelRatio
,
extra
:
{
line
:
{
type
:
'straight'
}
}
});
},
// 这里仅作为示例传入两个参数,cid为canvas-id,newdata为更新的数据,需要更多参数请自行修改
changeData
(
cid
,
newdata
)
{
canvases
[
cid
].
updateData
({
series
:
newdata
.
series
,
categories
:
newdata
.
categories
});
},
touchStart
(
e
)
{
canvases
[
this
.
canvasId
].
showToolTip
(
e
,
{
format
:
function
(
item
,
category
)
{
return
category
+
' '
+
item
.
name
+
':'
+
item
.
data
}
});
canvases
[
this
.
canvasId
].
scrollStart
(
e
);
},
touchMove
(
e
)
{
canvases
[
this
.
canvasId
].
scroll
(
e
);
},
touchEnd
(
e
)
{
canvases
[
this
.
canvasId
].
scrollEnd
(
e
);
},
error
(
e
)
{
console
.
log
(
e
)
}
},
};
</
script
>
<
style
scoped
>
.charts
{
width
:
100%
;
height
:
100%
;
flex
:
1
;
background-color
:
#FFFFFF
;
}
</
style
>
pages/school/components/u-charts/u-charts.js
0 → 100755
View file @
6a8a2996
This diff is collapsed.
Click to expand it.
pages/school/components/u-charts/u-charts.min.js
0 → 100755
View file @
6a8a2996
This diff is collapsed.
Click to expand it.
pages/school/mystudy/mystudy.vue
0 → 100644
View file @
6a8a2996
<
template
>
<scroll-view
:scroll-y=
"true"
@
scroll=
"scrollHandler"
@
scrolltoupper=
"scrollTopHandler"
style=
"height: 100vh;"
>
<view
class=
"mystudy"
>
<view
class=
"headStatus"
v-if=
"scrollTop > 50 "
:style=
"[
headStyle,
{
zIndex: scrollTop
<
10
?
'
unset
'
:
2
,
opacity:
scrollTop
<
10
?
'
100
'
:
scrollTop
,
background:
'#
FFF
'
},
]"
>
<view
class=
"arrow"
@
click=
"goback"
>
<u-icon
name=
"arrow-left"
size=
"48"
color=
"#000"
></u-icon>
</view>
<view
class=
"title"
style=
"color: #000000;"
v-if=
"scrollTop > 50"
>
{{
pageTitle
}}
</view>
<view
class=
"arrow"
></view>
</view>
<view
class=
"goback"
@
click=
"goback"
:style=
"
{'padding-top':paddingHTop}">
<u-icon
name=
"arrow-left"
size=
"48"
color=
"#121212"
></u-icon>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gob'
></auth>
</view>
</scroll-view>
</
template
>
<
script
>
import
hParse
from
"@/components/u-parse/parse.vue"
;
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
data
(){
return
{
mc
:
''
,
pricecolor
:
''
,
secondary
:
''
,
paddingHTop
:
0
,
id
:
0
,
teacher
:{},
windowWidth
:
0
,
scrollTop
:
0
,
headStyle
:{},
pageTitle
:
'教师详情'
,
UserId
:
0
,
u
:{},
showAuth
:
false
,
}
},
components
:
{
hParse
,
auth
},
onLoad
(
options
)
{
console
.
log
(
options
,
'options'
)
if
(
options
&&
options
.
ID
){
this
.
id
=
options
.
ID
if
(
uni
.
getStorageSync
(
"mall_UserInfo"
)){
this
.
UserId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
}
}
},
created
()
{
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
pricecolor
=
this
.
$uiConfig
.
pricecolor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
this
.
paddingHTop
=
this
.
nav
+
'px'
;
this
.
windowWidth
=
this
.
$utils
.
SystemInfo
().
windowWidth
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
},
methods
:{
clickDescription
(
e
)
{
console
.
log
(
e
);
},
goback
(){
uni
.
navigateBack
({})
},
clickHandler
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/school/courseInfo?GoodsId="
+
item
.
Id
});
},
scrollHandler
(
e
)
{
this
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
scrollTopHandler
()
{
this
.
scrollTop
=
0
;
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
},
gob
(){
this
.
showAuth
=
false
;
},
}
}
</
script
>
<
style
>
.mystudy
.headStatus
{
overflow
:
hidden
;
position
:
relative
;
width
:
140vw
;
padding-right
:
40vw
;
padding-bottom
:
10px
;
position
:
fixed
;
left
:
0
;
right
:
0
;
top
:
0
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
}
.mystudy
.arrow
{
height
:
24px
;
margin
:
5px
10px
;
width
:
24px
;
}
.mystudy
.goback
{
margin-left
:
8px
;
position
:
fixed
;
top
:
0
;
left
:
0
;
}
</
style
>
pages/school/personal/cardList.vue
View file @
6a8a2996
...
...
@@ -28,7 +28,8 @@
<view
class=
"coupond"
>
<view
class=
"name"
>
{{
x
.
Name
}}
</view>
<view
class=
"rule"
>
{{
x
.
UseTypeStr
}}
</view>
<view
class=
"date"
>
{{
x
.
StartDate
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
+
"-"
+
x
.
EndDate
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
}}
</view>
<view
class=
"date"
v-if=
"x.IndateType==1"
>
领券后
{{
x
.
IndateDay
}}
天过期
</view>
<view
class=
"date"
v-if=
"x.IndateType==2"
>
{{
x
.
StartDate
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
+
"-"
+
x
.
EndDate
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
}}
</view>
</view>
<view
class=
"chosen"
:style=
"
{'background':mainColor}" @click="receive(x,i)">
<Text>
{{
x
.
IsReceive
==
1
?
'已领取'
:
'立即领取'
}}
</Text>
...
...
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