Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
e7ab9789
Commit
e7ab9789
authored
Jan 11, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
135fc38d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
18 deletions
+63
-18
index.vue
src/pages/index/index.vue
+22
-7
word.vue
src/pages/word/word.vue
+41
-11
No files found.
src/pages/index/index.vue
View file @
e7ab9789
...
...
@@ -7,7 +7,7 @@
首页
</view>
<view
class=
"loginBox"
>
<indexassembly
@
success=
'againdata'
v-if=
"userData.AccountId==0"
>
<indexassembly
@
success=
'againdata'
v-if=
"
!userData.AccountId||
userData.AccountId==0"
>
<view
class=
"flex_start_center"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/login2x.png"
...
...
@@ -54,7 +54,8 @@
<view
class=
"flex_around_center "
>
<view
class=
"wordItem"
>
<text
class=
"wordItemTitle"
>
今日新词
</text>
<text
class=
"wordItemText"
>
{{
pageData
.
Words
.
NextWord
||
0
}}
<text
class=
"wordItemTextUnit"
>
词
</text></text>
<text
class=
"wordItemText"
>
{{
pageData
.
Words
.
NextWord
||
0
}}
<text
class=
"wordItemTextUnit"
>
词
</text></text>
</view>
<view
class=
"wordItem"
>
<text
class=
"wordItemTitle"
>
复习词语
</text>
...
...
@@ -108,6 +109,9 @@
<view
v-for=
"(item,index) in pageData.LearningGardenList"
:key=
"index"
v-if=
"item.List.length>0"
>
<view
class=
"learningGardenTitle"
>
<text>
{{
item
.
Name
}}
</text>
<text
style=
"font-size: 24rpx;
font-weight: 500;
color: #4C50E7;"
@
click=
"jumpGarden(item.Id)"
>
查看更多
</text>
</view>
<view
class=
"gardenCon"
v-for=
"(item1,index1) in item.List"
:key=
"index1"
id=
"img"
>
<image
:src=
"item1.Img"
mode=
"aspectFill"
...
...
@@ -115,7 +119,6 @@
<view
class=
"gardenTextBox"
:style=
"
{background:'linear-gradient(0deg,'+getColor(item1.Img)}">
<view
class=
"gardenTitle one_line"
>
{{
item1
.
Title
}}
{{
getColor
(
item1
.
Img
)
}}
</view>
<view
class=
"gardenDigest one_line"
>
{{
item1
.
Digest
}}
...
...
@@ -171,7 +174,7 @@
},
ActivityList
:
[],
pageData
:
{},
userData
:{}
userData
:
{}
});
let
methods
=
{
...
...
@@ -188,8 +191,8 @@
},
getIndexData
()
{
proxy
.
$request
(
"/AppletIndex/GetIndexInfo_V2"
,
{}).
then
(
res
=>
{
// console.log(222, res)
data
.
pageData
=
res
.
Data
uni
.
setStorageSync
(
"indexData"
,
res
.
Data
);
})
},
async
getColor
(
src
)
{
...
...
@@ -202,13 +205,23 @@
data
.
pageData
=
uni
.
getStorageSync
(
"userInfo"
);
methods
.
getIndexData
();
methods
.
getActivityData
();
},
jumpGarden
(
id
){
if
(
id
==
1
){
uni
.
navigateTo
({
url
:
"/pages/learningGarden/learningGardenList"
})
}
else
if
(
id
==
2
){
// uni.navigateTo({
// url:"/pages/learningGarden/learningGardenList"
// })
}
}
};
onMounted
(()
=>
{
methods
.
getIndexData
();
data
.
userData
=
uni
.
getStorageSync
(
'userInfo'
);
console
.
log
(
208
,
data
.
userData
)
data
.
userData
=
uni
.
getStorageSync
(
'userInfo'
);
});
return
{
...
toRefs
(
data
),
...
...
@@ -525,6 +538,8 @@
color
:
#111111
;
margin-bottom
:
35
rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.gardenCon
{
...
...
src/pages/word/word.vue
View file @
e7ab9789
...
...
@@ -42,7 +42,7 @@
},
StudyList
:
[],
ReviewList
:
[],
current
:
0
,
current
:
25
,
readMsg
:
{
Id
:
0
,
ClassId
:
1
,
...
...
@@ -50,6 +50,14 @@
Stu_Account_Id
:
1
,
ChapterId
:
1
,
StudyNum
:
1
},
reviewMsg
:
{
Id
:
0
,
ClassId
:
1
,
CourseId
:
1
,
Stu_Account_Id
:
1
,
ChapterId
:
1
,
ReviewNum
:
1
}
})
let
methods
=
{
...
...
@@ -60,6 +68,12 @@
})
},
swiperChange
(
val
)
{
console
.
log
(
63
,
val
.
detail
.
current
,
'study'
,
data
.
StudyList
.
length
)
if
(
data
.
current
<=
data
.
StudyList
.
length
)
{
methods
.
completeRead
(
val
.
detail
.
current
)
}
else
if
(
data
.
current
>
data
.
StudyList
.
length
&&
data
.
current
<=
data
.
ReviewList
.
length
)
{
methods
.
completeReview
(
val
.
detail
.
current
)
}
const
total
=
data
.
StudyList
.
length
+
data
.
ReviewList
.
length
+
1
if
(
val
.
detail
.
current
+
1
==
total
&&
total
>
1
)
{
...
...
@@ -68,8 +82,19 @@
})
}
},
completeRead
()
{
proxy
.
$request
(
'/AppletWords/SetStuWordsPrep'
,
)
completeRead
(
n
)
{
console
.
log
(
74
,
n
)
// data.readMsg.StudyNum = n
// proxy.$request('/AppletWords/SetStuWordsPrep', data.readMsg).then(res => {
// c
// })
},
completeReview
(
n
)
{
console
.
log
(
75
,
n
-
data
.
StudyList
.
length
)
// data.readMsg.ReviewNum = n
// proxy.$request('/AppletWords/SetStuWordsReview', data.reviewMsg).then(res => {
// })
}
}
...
...
@@ -86,14 +111,19 @@
uni
.
setNavigationBarTitle
({
title
:
'新的标题'
});
this
.
msg
.
ChapterId
=
options
.
ChapterId
this
.
msg
.
CourseId
=
options
.
CourseId
this
.
msg
.
PrevChapterId
=
options
.
PrevChapterId
this
.
readMsg
.
CourseId
=
options
.
CourseId
this
.
readMsg
.
ChapterId
=
options
.
ChapterId
this
.
getData
()
const
userInfo
=
uni
.
getStorageSync
(
'userinfo'
);
this
.
readMsg
.
Stu_Account_Id
=
userInfo
.
AccountId
this
.
msg
.
ChapterId
=
options
.
ChapterId
??
0
this
.
msg
.
CourseId
=
options
.
CourseId
??
0
this
.
msg
.
PrevChapterId
=
options
.
PrevChapterId
??
0
if
(
options
.
ChapterId
&&
options
.
CourseId
&&
options
.
PrevChapterId
){
this
.
getData
()
}
const
userInfo
=
uni
.
getStorageSync
(
'userinfo'
);
this
.
readMsg
.
Stu_Account_Id
=
userInfo
.
AccountId
??
0
this
.
readMsg
.
CourseId
=
options
.
CourseId
??
0
this
.
readMsg
.
ChapterId
=
options
.
ChapterId
??
0
this
.
reviewMsg
.
Stu_Account_Id
=
userInfo
.
AccountId
??
0
this
.
reviewMsg
.
CourseId
=
options
.
CourseId
??
0
this
.
reviewMsg
.
ChapterId
=
options
.
ChapterId
??
0
},
}
</
script
>
...
...
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