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
62156b8e
Commit
62156b8e
authored
Aug 10, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
cbccd6de
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
753 additions
and
632 deletions
+753
-632
App.vue
src/App.vue
+15
-14
contract.vue
src/pages/contract/contract.vue
+19
-16
course.vue
src/pages/course/course.vue
+26
-25
timeTable-item.vue
src/pages/course/timeTable-item.vue
+10
-5
answerSheet.vue
src/pages/exam/answerSheet.vue
+68
-65
examPaper.vue
src/pages/exam/examPaper.vue
+17
-17
examPaperList.vue
src/pages/exam/examPaperList.vue
+114
-54
subject1.vue
src/pages/exam/subject1.vue
+180
-173
index.vue
src/pages/index/index.vue
+72
-68
index2.vue
src/pages/index/index2.vue
+73
-121
login.vue
src/pages/login/login.vue
+95
-23
progress.vue
src/pages/progress/progress.vue
+26
-25
surplusTime.vue
src/pages/surplusTime/surplusTime.vue
+27
-26
common.css
src/static/css/common.css
+11
-0
No files found.
src/App.vue
View file @
62156b8e
<
script
>
export
default
{
onLaunch
()
{
// console.log('App Launch')
},
onShow
()
{
// console.log('App Show')
},
onHide
()
{
// console.log('App Hide')
}
}
export
default
{
onLaunch
()
{
// console.log('App Launch')
},
onShow
()
{
// console.log('App Show')
},
onHide
()
{
// console.log('App Hide')
},
};
</
script
>
<
style
>
/*每个页面公共css */
@import
"wxcomponents/vant/common/index.wxss"
;
@import
"static/css/common.css"
;
/*每个页面公共css */
@import
"wxcomponents/vant/common/index.wxss"
;
@import
"static/css/common.css"
;
@import
"static/font/iconfont.css"
;
</
style
>
src/pages/contract/contract.vue
View file @
62156b8e
...
...
@@ -45,23 +45,26 @@ import {
}
from
"vue"
;
export
default
{
setup
()
{
let
data
=
ref
([]);
data
.
value
=
[
{
name
:
"电子合同的名称"
,
con
:
"一点小内容吧,放在这里,一点小内容吧"
,
},
{
name
:
"电子合同的名称"
,
con
:
"一点小内容吧,放在这里,一点小内容吧"
,
},
{
name
:
"电子合同的名称"
,
con
:
"一点小内容吧,放在这里,一点小内容吧"
,
},
];
let
data
=
reactive
({
data
:
[
{
name
:
"电子合同的名称"
,
con
:
"一点小内容吧,放在这里,一点小内容吧"
,
},
{
name
:
"电子合同的名称"
,
con
:
"一点小内容吧,放在这里,一点小内容吧"
,
},
{
name
:
"电子合同的名称"
,
con
:
"一点小内容吧,放在这里,一点小内容吧"
,
},
],
});
let
methods
=
{};
return
{
data
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
...
...
src/pages/course/course.vue
View file @
62156b8e
...
...
@@ -80,33 +80,34 @@ import {
}
from
"vue"
;
export
default
{
setup
()
{
let
showLayer
=
ref
(
false
);
let
openLayer
=
()
=>
{
showLayer
.
value
=
true
;
};
let
closeLayer
=
()
=>
{
showLayer
.
value
=
false
;
};
let
data
=
ref
([]);
data
.
value
=
[
{
name
:
"第一次课"
,
coursetime
:
"4课时
"
,
children
:
[
{
name
:
"4.1 第一课活动篇****你好"
,
}
,
{
name
:
"4.2 第一课理解篇****平假名"
,
},
],
let
data
=
reactive
({
showLayer
:
false
,
data
:
[
{
name
:
"第一次课"
,
coursetime
:
"4课时"
,
children
:
[
{
name
:
"4.1 第一课活动篇****你好"
,
},
{
name
:
"4.2 第一课理解篇****平假名
"
,
},
],
}
,
]
,
});
let
methods
=
{
openLayer
()
{
data
.
showLayer
=
true
;
},
];
closeLayer
()
{
data
.
showLayer
=
false
;
},
};
return
{
showLayer
,
openLayer
,
closeLayer
,
data
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
...
...
src/pages/course/timeTable-item.vue
View file @
62156b8e
...
...
@@ -46,13 +46,18 @@ export default {
props
:
{},
components
:
{},
setup
(
props
)
{
let
jumpPage
=
(
url
)
=>
{
uni
.
navigateTo
({
url
:
url
,
});
let
data
=
reactive
({});
let
methods
=
{
jumpPage
(
url
)
{
uni
.
navigateTo
({
url
:
url
,
});
},
};
return
{
jumpPage
,
...
toRefs
(
data
),
...
methods
,
};
},
};
...
...
src/pages/exam/answerSheet.vue
View file @
62156b8e
...
...
@@ -46,75 +46,78 @@ import {
}
from
"vue"
;
export
default
{
setup
()
{
let
jumpPage
=
()
=>
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
};
let
questionList
=
ref
([
{
name
:
"一、单选题"
,
type
:
1
,
children
:
[
{
num
:
1
,
choose
:
1
,
children
:
[
1
,
2
,
3
,
4
,
5
],
},
{
num
:
2
,
choose
:
0
,
children
:
[
1
,
2
,
3
,
4
,
5
],
},
{
num
:
3
,
choose
:
0
,
children
:
[
1
,
2
,
3
,
4
,
5
],
},
],
},
{
name
:
"二、多选题"
,
type
:
2
,
children
:
[
{
num
:
1
,
choose
:
[
1
,
2
],
children
:
[
1
,
2
,
3
,
4
,
5
],
},
{
num
:
2
,
choose
:
[],
children
:
[
1
,
2
,
3
,
4
,
5
],
},
{
num
:
3
,
choose
:
[],
children
:
[
1
,
2
,
3
,
4
,
5
],
},
],
let
data
=
reactive
({
questionList
:
[
{
name
:
"一、单选题"
,
type
:
1
,
children
:
[
{
num
:
1
,
choose
:
1
,
children
:
[
1
,
2
,
3
,
4
,
5
],
},
{
num
:
2
,
choose
:
0
,
children
:
[
1
,
2
,
3
,
4
,
5
],
},
{
num
:
3
,
choose
:
0
,
children
:
[
1
,
2
,
3
,
4
,
5
],
},
],
},
{
name
:
"二、多选题"
,
type
:
2
,
children
:
[
{
num
:
1
,
choose
:
[
1
,
2
],
children
:
[
1
,
2
,
3
,
4
,
5
],
},
{
num
:
2
,
choose
:
[],
children
:
[
1
,
2
,
3
,
4
,
5
],
},
{
num
:
3
,
choose
:
[],
children
:
[
1
,
2
,
3
,
4
,
5
],
},
],
},
],
});
let
methods
=
{
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
]);
//选题
let
change
=
(
type
,
index
,
index1
,
index2
)
=>
{
if
(
type
===
1
)
{
questionList
.
value
[
index
].
children
[
index1
].
choose
=
questionList
.
value
[
index
].
children
[
index1
].
children
[
index2
];
}
else
if
(
type
===
2
)
{
let
choose
=
questionList
.
value
[
index
].
children
[
index1
].
choose
;
let
res
=
questionList
.
value
[
index
].
children
[
index1
].
children
[
index2
]
;
let
find
=
choose
.
indexOf
(
res
);
if
(
find
==
-
1
)
{
choose
.
push
(
res
);
}
else
{
choose
.
splice
(
find
,
1
);
//选题
change
(
type
,
index
,
index1
,
index2
)
{
if
(
type
===
1
)
{
data
.
questionList
[
index
].
children
[
index1
].
choose
=
data
.
questionList
[
index
].
children
[
index1
].
children
[
index2
];
}
else
if
(
type
===
2
)
{
let
choose
=
data
.
questionList
[
index
].
children
[
index1
].
choose
;
let
res
=
data
.
questionList
[
index
].
children
[
index1
].
children
[
index2
]
;
let
find
=
choose
.
indexOf
(
res
)
;
if
(
find
==
-
1
)
{
choose
.
push
(
res
);
}
else
{
choose
.
splice
(
find
,
1
);
}
}
}
}
,
};
return
{
questionList
,
jumpPage
,
change
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
...
...
src/pages/exam/examPaper.vue
View file @
62156b8e
...
...
@@ -45,26 +45,26 @@ export default {
components
:
{
Sub1
},
setup
(
props
,
context
)
{
let
{
refs
}
=
getCurrentInstance
();
let
time
=
ref
(
0
);
// let countdown = ref(null);
time
.
value
=
2
*
60
*
60
*
1000
;
let
jumpPage
=
()
=>
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
};
let
start
=
()
=>
{
refs
.
countdown
.
start
();
};
let
back
=
()
=>
{
uni
.
navigateBack
();
let
data
=
reactive
({
time
:
2
*
60
*
60
*
1000
,
});
let
methods
=
{
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
start
()
{
refs
.
countdown
.
start
();
},
back
()
{
uni
.
navigateBack
();
},
};
onMounted
(()
=>
{});
return
{
jumpPage
,
time
,
start
,
back
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{},
...
...
src/pages/exam/examPaperList.vue
View file @
62156b8e
...
...
@@ -13,34 +13,42 @@
<van-tab
title=
"已完成"
name=
"d"
></van-tab>
</van-tabs>
<view
class=
"exampaper-con"
>
<view
v-for=
"(item, index) in examList"
:key=
"index"
class=
"exam-item"
:style=
"
{ 'background-image': `url(${item.bgimg})` }"
@click="jumpPage"
<scroll-view
:scroll-top=
"0"
scroll-y=
"true"
class=
"scroll-box"
@
scrolltolower=
"lower"
>
<view
class=
"testName"
>
{{
item
.
testName
}}
</view>
<view
class=
"testTime"
>
考试时间:
{{
item
.
testTime
}}
</view>
<view
class=
"teacherInfo-bg"
></view>
<view
class=
"teacherInfo flex flex_between_center"
>
<view
class=
"flex flex_start_center"
>
<van-image
round
width=
"45rpx"
height=
"45rpx"
fit=
"cover"
src=
"https://img.yzcdn.cn/vant/cat.jpeg"
/>
<view
class=
"teacherName"
>
{{
item
.
teacherName
}}
</view>
<view
v-for=
"(item, index) in examList"
:key=
"index"
class=
"exam-item"
:style=
"
{ 'background-image': `url(${item.bgimg})` }"
@click="jumpPage"
>
<view
class=
"testName"
>
{{
item
.
testName
}}
</view>
<view
class=
"exam-status"
>
{{
item
.
status
}}
<view
class=
"testTime"
>
考试时间:
{{
item
.
testTime
}}
</view>
<view
class=
"teacherInfo-bg"
></view>
<view
class=
"teacherInfo flex flex_between_center"
>
<view
class=
"flex flex_start_center"
>
<van-image
round
width=
"45rpx"
height=
"45rpx"
fit=
"cover"
src=
"https://img.yzcdn.cn/vant/cat.jpeg"
/>
<view
class=
"teacherName"
>
{{
item
.
teacherName
}}
</view>
</view>
<view
class=
"exam-status"
>
{{
item
.
status
}}
</view>
</view>
</view>
</view>
<Loadmore
:state=
"pageState"
/>
</scroll-view>
</view>
</view>
</
template
>
...
...
@@ -56,40 +64,86 @@ import {
computed
,
onMounted
,
}
from
"vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
export
default
{
components
:
{
Loadmore
,
},
setup
()
{
let
curtab
=
ref
(
"b"
);
let
changeTab
=
(
e
)
=>
{
// console.log(62, e);
};
let
jumpPage
=
()
=>
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
};
let
examList
=
ref
([
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
teacherName
:
"纳豆"
,
teacherImg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
status
:
"未开始"
,
let
data
=
reactive
({
pageState
:
"more"
,
examList
:
[
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
teacherName
:
"纳豆"
,
teacherImg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
],
curtab
:
"b"
,
});
let
methods
=
{
changeTab
(
e
)
{
console
.
log
(
123
,
e
);
},
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
lower
(
e
)
{
data
.
pageState
=
"loading"
;
console
.
log
(
131
,
e
);
},
]);
};
onMounted
(()
=>
{
console
.
log
(
135
,
data
);
});
return
{
curtab
,
changeTab
,
examList
,
jumpPage
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
...
...
@@ -111,9 +165,9 @@ export default {
font-weight
:
bold
!important
;
}
.exampaper-con
{
height
:
calc
(
100vh
-
100
rpx
);
box-sizing
:
border-box
;
margin-top
:
10
rpx
;
padding
:
0
30
rpx
;
}
.exam-item
{
height
:
250
rpx
;
...
...
@@ -177,4 +231,10 @@ export default {
font-weight
:
bold
;
color
:
#00acf9
;
}
.scroll-box
{
height
:
100%
;
width
:
100%
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
40
rpx
;
}
</
style
>
src/pages/exam/subject1.vue
View file @
62156b8e
...
...
@@ -56,186 +56,193 @@ import {
export
default
{
setup
(
props
,
context
)
{
// let { refs } = getCurrentInstance();
let
jumpPage
=
()
=>
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
};
let
back
=
()
=>
{
uni
.
navigateBack
();
};
let
questionList
=
ref
([
{
name
:
"一、单选题"
,
type
:
1
,
children
:
[
{
num
:
"1、真実はいつも一つ?"
,
choose
:
"A"
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
"2、"
,
choose
:
0
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
3
,
choose
:
0
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
],
let
data
=
reactive
({
questionList
:
[
{
name
:
"一、单选题"
,
type
:
1
,
children
:
[
{
num
:
"1、真実はいつも一つ?"
,
choose
:
"A"
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
"2、"
,
choose
:
0
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
3
,
choose
:
0
,
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
],
},
{
name
:
"二、多选题"
,
type
:
2
,
children
:
[
{
num
:
"1、真実はいつも二つ?"
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
2
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
3
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
],
},
],
});
let
methods
=
{
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
{
name
:
"二、多选题"
,
type
:
2
,
children
:
[
{
num
:
"1、真実はいつも二つ?"
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
2
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
{
num
:
3
,
choose
:
[],
children
:
[
{
chooseNum
:
"A"
,
itemName
:
"答案1"
,
},
{
chooseNum
:
"B"
,
itemName
:
"答案2"
,
},
{
chooseNum
:
"c"
,
itemName
:
"答案3"
,
},
{
chooseNum
:
"D"
,
itemName
:
"答案4"
,
},
],
},
],
//选题
change
(
type
,
index
,
index1
,
index2
)
{
if
(
type
===
1
)
{
data
.
questionList
[
index
].
children
[
index1
].
choose
=
data
.
questionList
[
index
].
children
[
index1
].
children
[
index2
].
chooseNum
;
}
else
if
(
type
===
2
)
{
let
choose
=
data
.
questionList
[
index
].
children
[
index1
].
choose
;
let
res
=
data
.
questionList
[
index
].
children
[
index1
].
children
[
index2
]
.
chooseNum
;
let
find
=
choose
.
indexOf
(
res
);
if
(
find
==
-
1
)
{
choose
.
push
(
res
);
}
else
{
choose
.
splice
(
find
,
1
);
}
console
.
log
(
230
,
choose
);
}
},
])
;
//选题
}
;
let
change
=
(
type
,
index
,
index1
,
index2
)
=>
{
console
.
log
(
158
,
type
);
if
(
type
===
1
)
{
questionList
.
value
[
index
].
children
[
index1
].
choose
=
questionList
.
value
[
index
].
children
[
index1
].
children
[
index2
].
chooseNum
;
}
else
if
(
type
===
2
)
{
let
choose
=
questionList
.
value
[
index
].
children
[
index1
].
choose
;
let
res
=
questionList
.
value
[
index
].
children
[
index1
].
children
[
index2
].
chooseNum
;
let
find
=
choose
.
indexOf
(
res
);
if
(
find
==
-
1
)
{
choose
.
push
(
res
);
}
else
{
choose
.
splice
(
find
,
1
);
}
console
.
log
(
230
,
choose
);
}
};
onMounted
(()
=>
{});
return
{
jumpPage
,
back
,
questionList
,
change
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{},
...
...
src/pages/index/index.vue
View file @
62156b8e
...
...
@@ -115,78 +115,82 @@ export default {
props
:
{},
components
:
{},
setup
(
props
)
{
let
baseInfo
=
ref
([
{
name
:
"学区"
,
desc
:
"锦江校区"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon1.png"
,
bgcolor
:
"#CCEDFE"
,
jumpUrl
:
"/pages/exam/answerSheet"
,
},
{
name
:
"课程"
,
desc
:
"N1~N3"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon2.png"
,
bgcolor
:
"#DDE6FF"
,
jumpUrl
:
"/pages/course/course"
,
},
{
name
:
"进度"
,
desc
:
"上到哪里了"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon3.png"
,
bgcolor
:
"#FFEFE4"
,
jumpUrl
:
"/pages/progress/progress"
,
},
{
name
:
"剩余时间"
,
desc
:
"100课时"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon4.png"
,
bgcolor
:
"#FFEAFE"
,
jumpUrl
:
"/pages/surplusTime/surplusTime"
,
},
{
name
:
"电子合同"
,
desc
:
"5个"
,
img
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
bgcolor
:
"#D9FAF1"
,
jumpUrl
:
"/pages/contract/contract"
,
},
{
name
:
"我的老师"
,
desc
:
"李琴"
,
img
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
bgcolor
:
"#FFE7E6"
,
jumpUrl
:
""
,
},
]);
let
testList
=
ref
([
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
teacherName
:
"纳豆"
,
teacherImg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
let
data
=
reactive
({
baseInfo
:
[
{
name
:
"学区"
,
desc
:
"锦江校区"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon1.png"
,
bgcolor
:
"#CCEDFE"
,
jumpUrl
:
"/pages/exam/answerSheet"
,
},
{
name
:
"课程"
,
desc
:
"N1~N3"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon2.png"
,
bgcolor
:
"#DDE6FF"
,
jumpUrl
:
"/pages/course/course"
,
},
{
name
:
"进度"
,
desc
:
"上到哪里了"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon3.png"
,
bgcolor
:
"#FFEFE4"
,
jumpUrl
:
"/pages/progress/progress"
,
},
{
name
:
"剩余时间"
,
desc
:
"100课时"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon4.png"
,
bgcolor
:
"#FFEAFE"
,
jumpUrl
:
"/pages/surplusTime/surplusTime"
,
},
{
name
:
"电子合同"
,
desc
:
"5个"
,
img
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
bgcolor
:
"#D9FAF1"
,
jumpUrl
:
"/pages/contract/contract"
,
},
{
name
:
"我的老师"
,
desc
:
"李琴"
,
img
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
bgcolor
:
"#FFE7E6"
,
jumpUrl
:
""
,
},
],
testList
:
[
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
teacherName
:
"纳豆"
,
teacherImg
:
"https://img.yzcdn.cn/vant/cat.jpeg"
,
status
:
"未开始"
,
},
{
testName
:
"あぃお试卷名称"
,
testTime
:
"2021-07-29 14:00"
,
bgimg
:
""
,
teacherName
:
"纳豆"
,
teacherImg
:
""
,
status
:
"未开始"
,
},
],
});
let
methods
=
{
jumpPage
(
url
)
{
uni
.
navigateTo
({
url
:
url
,
});
},
]);
let
jumpPage
=
(
url
)
=>
{
uni
.
navigateTo
({
url
:
url
,
});
};
onMounted
(()
=>
{});
return
{
baseInfo
,
testList
,
jumpPage
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
...
...
src/pages/index/index2.vue
View file @
62156b8e
<
template
>
<view
class=
"content"
>
<image
class=
"logo"
src=
"/static/logo.png"
></image>
<view>
<van-button
type=
"warning"
size=
"mini"
@
click=
"add"
>
{{
title
}}
</van-button>
<van-icon
name=
"location-o"
info=
"9"
size=
"200rpx"
/>
</view>
<van-cell-group>
<van-field
v-model=
"yzm"
center
clearable
label=
"短信验证码"
placeholder=
"请输入短信验证码"
use-button-slot
>
<van-button
slot=
"button"
size=
"small"
type=
"primary"
>
发送验证码
</van-button>
</van-field>
<view
class=
""
>
<!--
{{
count
}}{{
name
.
firstname
}}
-->
</view>
<view
class=
""
>
{{
firstname
}}
</view>
</van-cell-group>
<!--
<van-radio-group
v-model=
"radio"
>
<van-radio
name=
'1'
>
单选框 1
</van-radio>
<van-radio
name=
'2'
>
单选框 2
</van-radio>
</van-radio-group>
-->
</view>
</
template
>
<
script
>
/**
/**
* 因为 props 是响应式的,你不能使用 ES6 解构,因为它会消除 prop 的响应性。
如果需要解构 prop,可以通过使用 setup 函数中的 toRefs 来完成此操作
* // ref和reactive的区别: ref()传入的是js的基本数据类型; reactive()中传入的是object普通对象
*@reactive:处理的是对象的双向绑定, 对象不能被***解构或展开***,一旦被解构或者展开,返回的值将失去响应式
* @getCurrentInstance,获取当前页面实例,使用const { ctx,proxy } = getCurrentInstance(); ctx或proxy.$挂载的方法
*/
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
}
from
"vue"
export
default
{
name
:
''
,
props
:
{},
components
:
{},
setup
(
props
)
{
let
{
titles
}
=
toRefs
(
props
)
let
{
ctx
}
=
getCurrentInstance
()
let
title
=
ref
(
"hello"
)
let
count
=
ref
(
0
)
let
yzm
=
ref
(
1234
)
let
add
=
()
=>
{
count
.
value
++
name
.
firstname
+=
"x"
console
.
log
(
58
,
titles
)
}
let
name
=
reactive
({
firstname
:
"x"
,
lastname
:
"w"
})
// 第一个参数: 要监听的响应式对象
// 第二个参数: 回调函数
// watch(count,(newVal,oldVal)=>{
// console.log(51,newVal)
// })
watch
(
name
,
(
newVal
,
oldVal
)
=>
{
console
.
log
(
51
,
newVal
)
})
// computed 计算属性 : 适合计算一个属性, 并且绑定.
// computed将监听它里面所有的变量, 里面变量发生变化就会触发结果重新计算
// 计算出来的结果是只读的, 所以fullName是不能被改变的
const
fullName
=
computed
(()
=>
name
.
firstname
+
name
.
lastname
)
// 高级用法: 可以修改值
const
fullName2
=
computed
({
get
:
()
=>
name
.
firstname
+
name
.
lastname
,
set
:
(
val
)
=>
{
title
.
value
=
val
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
export
default
{
name
:
""
,
props
:
{},
components
:
{},
setup
(
props
)
{
let
{
titles
}
=
toRefs
(
props
);
let
{
ctx
}
=
getCurrentInstance
();
let
title
=
ref
(
"hello"
);
let
count
=
ref
(
0
);
let
yzm
=
ref
(
1234
);
let
add
=
()
=>
{
count
.
value
++
;
name
.
firstname
+=
"x"
;
console
.
log
(
58
,
titles
);
};
let
name
=
reactive
({
firstname
:
"x"
,
lastname
:
"w"
,
});
// 第一个参数: 要监听的响应式对象
// 第二个参数: 回调函数
// watch(count,(newVal,oldVal)=>{
// console.log(51,newVal)
// })
watch
(
name
,
(
newVal
,
oldVal
)
=>
{
console
.
log
(
51
,
newVal
);
});
// computed 计算属性 : 适合计算一个属性, 并且绑定.
// computed将监听它里面所有的变量, 里面变量发生变化就会触发结果重新计算
}
})
fullName2
.
value
=
7
console
.
log
(
76
,
fullName2
)
onMounted
(()
=>
{
console
.
log
(
84
,
"onmounted"
)
})
return
{
title
,
count
,
add
,
yzm
,
// name,
...
toRefs
(
name
),
fullName
,
fullName2
}
},
onLoad
()
{
console
.
log
(
'index load'
)
},
onShow
()
{
console
.
log
(
'index Show'
)
},
}
// 计算出来的结果是只读的, 所以fullName是不能被改变的
const
fullName
=
computed
(()
=>
name
.
firstname
+
name
.
lastname
);
// 高级用法: 可以修改值
const
fullName2
=
computed
({
get
:
()
=>
name
.
firstname
+
name
.
lastname
,
set
:
(
val
)
=>
{
title
.
value
=
val
;
},
});
fullName2
.
value
=
7
;
console
.
log
(
76
,
fullName2
);
onMounted
(()
=>
{
console
.
log
(
84
,
"onmounted"
);
});
return
{
title
,
count
,
add
,
yzm
,
// name,
...
toRefs
(
name
),
fullName
,
fullName2
,
};
},
onLoad
()
{
console
.
log
(
"index load"
);
},
onShow
()
{
console
.
log
(
"index Show"
);
},
};
</
script
>
<
style
>
.content
{
text-align
:
center
;
height
:
400
rpx
;
}
.logo
{
height
:
200
rpx
;
width
:
200
rpx
;
margin-top
:
200
rpx
;
}
.title
{
font-size
:
36
rpx
;
color
:
#8f8f94
;
}
</
style
>
src/pages/login/login.vue
View file @
62156b8e
...
...
@@ -16,25 +16,27 @@
<view
class=
"main"
>
<van-cell-group>
<van-field
v-model=
"msg.
username"
:value=
"
username"
clearable
placeholder=
"请输入用户名"
clearable
left-icon=
"manager-o"
@
input=
"usernameInput"
/>
>
<i
class=
"iconfont icon-user2 left-iconfont"
slot=
"left-icon"
></i>
</van-field>
<van-field
:value=
"
msg.
password"
:value=
"password"
password
placeholder=
"请输入密码"
clearable
left-icon=
"manager-o"
@
input=
"passwordInput"
/>
>
<i
class=
"iconfont icon-password left-iconfont"
slot=
"left-icon"
></i>
</van-field>
</van-cell-group>
</view>
<van-button
block
custom-class=
"loginBtn"
>
登录
</van-button>
<view
class=
"auth"
>
授权手机号一键登录
</view>
<view
class=
"auth"
@
click=
"authLogin"
>
授权手机号一键登录
</view>
</view>
</
template
>
...
...
@@ -52,27 +54,92 @@ import {
export
default
{
setup
(
props
,
context
)
{
let
msg
=
{
username
:
"123"
,
let
msg
=
reactive
(
{
username
:
"123
123123
"
,
password
:
""
,
});
let
methods
=
{
usernameInput
(
val
)
{
msg
.
username
=
val
.
detail
;
console
.
log
(
74
,
msg
);
},
passwordInput
(
val
)
{
msg
.
password
=
val
.
detail
;
},
back
()
{
uni
.
navigateBack
();
},
authLogin
()
{
let
that
=
methods
;
that
.
getUserProfile
();
},
getUserProfile
()
{
//新的获取用户资料
var
that
=
methods
;
wx
.
getUserProfile
({
desc
:
"用于完善资料"
,
// 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success
:
(
info
)
=>
{
console
.
log
(
info
);
// this.msg = {
// Id: 0,
// AliasName: info.userInfo.nickName,
// Photo: info.userInfo.avatarUrl,
// };
that
.
getUserInfo
(
info
);
},
fail
:
()
=>
{
uni
.
showToast
({
title
:
"微信登录授权失败"
,
icon
:
"none"
,
});
},
});
},
getUserInfo
(
info
)
{
uni
.
getProvider
({
service
:
"oauth"
,
success
:
function
(
res
)
{
if
(
~
res
.
provider
.
indexOf
(
"weixin"
))
{
uni
.
login
({
provider
:
"weixin"
,
success
:
(
_res
)
=>
{
console
.
log
(
107
,
_res
);
// //这里请求接口
// let obj = {
// Source: 1,
// OpenId: "",
// Name: info.userInfo.nickName,
// Photo: info.userInfo.avatarUrl,
// Gender: info.userInfo.gender,
// Moblie: "",
// SuperiorId: 0,
// code: res.code,
// };
// that.getCode(obj);
},
fail
:
()
=>
{
uni
.
showToast
({
title
:
"微信登录授权失败"
,
icon
:
"none"
,
});
},
});
}
else
{
uni
.
showToast
({
title
:
"请先安装微信或升级版本"
,
icon
:
"none"
,
});
}
},
});
},
};
let
usernameInput
=
(
val
)
=>
{
msg
.
username
=
val
.
detail
;
};
let
passwordInput
=
(
val
)
=>
{
msg
.
password
=
val
.
detail
;
};
let
back
=
()
=>
{
uni
.
navigateBack
();
};
onMounted
(()
=>
{});
return
{
msg
,
usernameInput
,
passwordInput
,
back
,
...
toRefs
(
msg
),
...
methods
,
};
},
onLoad
()
{},
};
</
script
>
...
...
@@ -123,4 +190,9 @@ export default {
color
:
#00acf9
;
margin-top
:
30
rpx
;
}
.left-iconfont
{
margin-right
:
20
rpx
;
font-size
:
30
rpx
;
color
:
#111111
;
}
</
style
>
src/pages/progress/progress.vue
View file @
62156b8e
...
...
@@ -80,33 +80,34 @@ import {
}
from
"vue"
;
export
default
{
setup
()
{
let
showLayer
=
ref
(
false
);
let
openLayer
=
()
=>
{
showLayer
.
value
=
true
;
};
let
closeLayer
=
()
=>
{
showLayer
.
value
=
false
;
};
let
data
=
ref
([]);
data
.
value
=
[
{
name
:
"第一次课"
,
coursetime
:
"4课时
"
,
children
:
[
{
name
:
"4.1 第一课活动篇****你好"
,
}
,
{
name
:
"4.2 第一课理解篇****平假名"
,
},
],
let
data
=
reactive
({
showLayer
:
false
,
data
:
[
{
name
:
"第一次课"
,
coursetime
:
"4课时"
,
children
:
[
{
name
:
"4.1 第一课活动篇****你好"
,
},
{
name
:
"4.2 第一课理解篇****平假名
"
,
},
],
}
,
]
,
});
let
methods
=
{
openLayer
()
{
data
.
showLayer
=
true
;
},
];
closeLayer
()
{
data
.
showLayer
=
false
;
},
};
return
{
showLayer
,
openLayer
,
closeLayer
,
data
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
...
...
src/pages/surplusTime/surplusTime.vue
View file @
62156b8e
...
...
@@ -75,34 +75,35 @@ import {
}
from
"vue"
;
export
default
{
setup
()
{
let
showLayer
=
ref
(
false
);
let
openLayer
=
()
=>
{
showLayer
.
value
=
true
;
};
let
closeLayer
=
()
=>
{
showLayer
.
value
=
false
;
};
let
data
=
ref
([]);
data
.
value
=
[
{
classroom
:
"奈良"
,
teacherName
:
"李琴"
,
date
:
"2021-08-02
"
,
children
:
[
{
name
:
"1节课 09:30-11:00 / 2节课 11:30-12:45"
,
}
,
{
name
:
"1节课 09:30-11:00 / 2节课 11:30-12:45"
,
},
],
let
data
=
reactive
({
showLayer
:
false
,
data
:
[
{
classroom
:
"奈良"
,
teacherName
:
"李琴"
,
date
:
"2021-08-02"
,
children
:
[
{
name
:
"1节课 09:30-11:00 / 2节课 11:30-12:45"
,
}
,
{
name
:
"1节课 09:30-11:00 / 2节课 11:30-12:45
"
,
},
],
}
,
]
,
});
let
methods
=
{
openLayer
()
{
data
.
showLayer
=
true
;
},
];
closeLayer
()
{
data
.
showLayer
=
false
;
},
};
return
{
showLayer
,
openLayer
,
closeLayer
,
data
,
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
...
...
src/static/css/common.css
View file @
62156b8e
...
...
@@ -70,6 +70,10 @@
flex-wrap
:
wrap
;
}
.between
{
justify-content
:
space-between
;
}
.grow
{
flex-grow
:
1
;
}
...
...
@@ -88,3 +92,10 @@
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
}
.fixed_center
{
display
:
fixed
;
top
:
50vh
;
left
:
50vw
;
transform
:
translate
(
-50%
,
-50%
);
z-index
:
999
;
}
\ No newline at end of file
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