Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
beb957cd
Commit
beb957cd
authored
Aug 02, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of
https://git.banshouhui.com/wuzhenzhe/study
into dev-v1.0.0
parents
cd6f9966
ff1475fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
26 deletions
+77
-26
upload.js
src/common/upload.js
+25
-25
record.vue
src/pages/learn/record.vue
+52
-1
No files found.
src/common/upload.js
View file @
beb957cd
...
...
@@ -40,33 +40,33 @@ function openSetting() {
//吊起设备原生相机相册取得文件,并自动上传七牛,返回七牛key,domain,本地file信息
function
getPhoto
(
type
,
token
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
hasPermissionOfCamera
().
then
((
r
)
=>
{
if
(
!
r
)
{
reject
(
false
)
}
let
sourceType
=
type
==
1
?
[
'album'
]
:
[
'album'
,
'camera'
]
uni
.
chooseImage
({
count
:
1
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
sourceType
,
//从相册选择
success
:
function
(
res
)
{
//上传七牛
let
filePath
=
res
.
tempFiles
[
0
].
path
//为需要上传的文件
upload
(
filePath
,
token
)
.
then
((
msg
)
=>
{
//最后七牛返回的key
resolve
({
key
:
msg
,
files
:
res
.
tempFiles
,
})
// hasPermissionOfCamera().then((r) => {
// if (!r) {
// reject(false)
// }
let
sourceType
=
type
==
1
?
[
'album'
]
:
[
'album'
,
'camera'
]
uni
.
chooseImage
({
count
:
1
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
sourceType
,
//从相册选择
success
:
function
(
res
)
{
//上传七牛
let
filePath
=
res
.
tempFiles
[
0
].
path
//为需要上传的文件
upload
(
filePath
,
token
)
.
then
((
msg
)
=>
{
//最后七牛返回的key
resolve
({
key
:
msg
,
files
:
res
.
tempFiles
,
})
.
catch
((
msg
)
=>
{
console
.
error
(
msg
)
reject
(
msg
)
}
)
},
}
)
})
.
catch
((
msg
)
=>
{
console
.
error
(
msg
)
reject
(
msg
)
})
}
,
})
// })
})
}
...
...
src/pages/learn/record.vue
View file @
beb957cd
...
...
@@ -82,6 +82,9 @@
canvasId=
"scroll-viewid"
:pageScrollTop=
"pageScrollTop"
background=
"none"
:opts=
"
{enableScroll:true,xAxis:{scrollShow:true,itemCount:4,disableGrid:true}}"
:ontouch="true"
:disableScroll="true"
/>
</view>
</view>
...
...
@@ -219,7 +222,54 @@ export default {
// ],
// },
// ]
this
.
studyRecord
(
this
.
nearlySevenDays
())
this
.
chartData
.
categories
=
[
'2013/1/24'
,
'2013/1/25'
,
'2013/1/28'
,
'2013/1/29'
,
'2013/1/30'
,
'2013/1/31'
,
'2013/2/1'
,
'2013/2/4'
,
'2013/2/5'
,
]
this
.
chartData
.
series
=
[
{
name
:
'成交量1'
,
pointShape
:
'circle'
,
legendShape
:
'circle'
,
data
:
[
15
,
20
,
45
,
37
,
43
,
15
,
20
,
45
,
37
,
],
},
{
name
:
'成交量2'
,
pointShape
:
'circle'
,
legendShape
:
'circle'
,
data
:
[
20
,
45
,
37
,
43
,
15
,
20
,
45
,
37
,
43
,
],
},
]
//this.studyRecord(this.nearlySevenDays())
},
// 每日一练统计
everyTaskList
(
year
,
month
)
{
...
...
@@ -254,6 +304,7 @@ export default {
this
.
chartData
.
series
[
0
].
data
=
[]
this
.
chartData
.
series
[
1
].
data
=
[]
this
.
chartData
.
categories
=
[]
for
(
var
item
in
res
)
{
// this.chartData.series[0].data.push([20210801, res[item].totalCount])
// this.chartData.series[0].data.push([20210802, res[item].totalCount])
...
...
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