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
25b3c46b
Commit
25b3c46b
authored
Sep 15, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
405b4c18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1401 additions
and
382 deletions
+1401
-382
activity.js
src/api/activity.js
+25
-0
SingleChoice.vue
src/components/subject/SingleChoice.vue
+292
-261
pages.json
src/pages.json
+2
-3
activeList.vue
src/pages/active/activeList.vue
+0
-118
activityList.vue
src/pages/activity/activityList.vue
+583
-0
askForLeaveList.vue
src/pages/course/askForLeaveList.vue
+2
-0
answerSheet.vue
src/pages/exam/answerSheet.vue
+187
-0
examPaperList.vue
src/pages/exam/examPaperList.vue
+2
-0
subject1.vue
src/pages/exam/subject1.vue
+307
-0
request.js
src/utils/request.js
+1
-0
No files found.
src/api/activity.js
0 → 100644
View file @
25b3c46b
import
request
from
'../utils/request.js'
/**
* 获取活动类型列表
* @param {JSON参数} data
*/
export
function
getActivityTypeList
(
data
)
{
return
request
({
url
:
'/AppletEducation/GetActivityTypeList'
,
method
:
'post'
,
data
})
}
/**
* 获取活动列表
* @param {JSON参数} data
*/
export
function
getActivityList
(
data
)
{
return
request
({
url
:
'/AppletEducation/GetActivityPageJXH'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/subject/SingleChoice.vue
View file @
25b3c46b
This diff is collapsed.
Click to expand it.
src/pages.json
View file @
25b3c46b
...
...
@@ -19,7 +19,7 @@
},
{
"path"
:
"pages/progress/progress"
//进度
},
{
"path"
:
"pages/activ
e/active
List"
//活动列表
"path"
:
"pages/activ
ity/activity
List"
//活动列表
}],
"subPackages"
:
[{
"root"
:
"pages/course"
,
//课程分包
...
...
@@ -69,12 +69,11 @@
"selectedColor"
:
"#3cc51f"
,
"borderStyle"
:
"black"
,
"backgroundColor"
:
"#ffffff"
,
"fontSize"
:
"24rpx"
,
"list"
:
[{
"pagePath"
:
"pages/index/index"
,
"text"
:
"首页"
},
{
"pagePath"
:
"pages/activ
e/active
List"
,
"pagePath"
:
"pages/activ
ity/activity
List"
,
"text"
:
"活动"
}]
},
...
...
src/pages/active/activeList.vue
deleted
100644 → 0
View file @
405b4c18
<
template
>
<view
class=
"course-box"
>
<van-toast
id=
"van-toast"
/>
<van-empty
description=
"暂无数据"
v-if=
"data.length === 0"
/>
<view
v-for=
"(item, index) in data"
:key=
"index"
class=
"data-item"
v-if=
"data.length > 0"
>
<view
class=
"contract-name"
>
<van-image
width=
"22rpx"
height=
"24rpx"
fit=
"cover"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/contracticon.png"
style=
"margin-right: 10rpx"
/>
{{
item
.
ContractNo
}}
</view
>
<view
class=
"contract-con"
v-if=
"item.Type === 1"
>
订单合同
</view>
<view
class=
"contract-con"
v-if=
"item.Type === 2"
>
退课合同
</view>
<van-image
width=
"80rpx"
height=
"80rpx"
fit=
"cover"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/contract.png"
class=
"contract-icon"
v-if=
"item.IsCompanySeal === 1"
/>
</view>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
getContract
}
from
"../../api/index"
;
let
{
CourseName
}
=
uni
.
getStorageSync
(
"indexData"
);
export
default
{
setup
()
{
let
data
=
reactive
({
pageloading
:
false
,
CourseName
,
data
:
[],
});
let
methods
=
{
async
getdata
()
{
let
res
=
await
getContract
({});
if
(
res
)
{
if
(
res
.
Data
.
length
===
0
)
{
data
.
pageloading
=
true
;
}
else
{
data
.
pageloading
=
false
;
}
console
.
log
(
69
,
res
);
data
.
data
=
res
.
Data
;
}
},
};
onMounted
(()
=>
{
// that.getdata();
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"活动列表"
,
});
},
};
</
script
>
<
style
scoped
>
.course-box
{
padding
:
30
rpx
;
}
.data-item
{
margin-top
:
30
rpx
;
box-sizing
:
border-box
;
padding
:
30
rpx
;
box-shadow
:
0
rpx
4
rpx
10
rpx
0
rpx
rgba
(
36
,
36
,
36
,
0.2
);
position
:
relative
;
}
.contract-icon
{
position
:
absolute
;
top
:
10
rpx
;
right
:
10
rpx
;
}
.contract-name
{
max-width
:
80%
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
margin-bottom
:
20
rpx
;
}
.contract-con
{
max-width
:
80%
;
font-size
:
22
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#999999
;
margin-left
:
30
rpx
;
}
</
style
>
src/pages/activity/activityList.vue
0 → 100644
View file @
25b3c46b
This diff is collapsed.
Click to expand it.
src/pages/course/askForLeaveList.vue
View file @
25b3c46b
...
...
@@ -123,6 +123,8 @@ export default {
data
.
pageState
=
"loading"
;
data
.
msg
.
pageIndex
++
;
that
.
getList
();
}
else
{
data
.
pageState
=
"none"
;
}
},
reload
()
{
...
...
src/pages/exam/answerSheet.vue
0 → 100644
View file @
25b3c46b
<
template
>
<view>
<view
class=
"answer-sheets"
>
<view
v-for=
"(item, index) in questionList"
:key=
"index"
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
index
+
1
)
}}
、
{{
item
.
GroupName
}}
</view
>
<view
class=
"flex flex_wrap"
>
<view
v-for=
"(item1, index1) in item.DetailsList"
:key=
"index1"
class=
"flex flex_wrap"
>
<view
class=
"item1-1"
v-if=
"
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
"
>
{{
index1
+
1
}}
.
</view
>
<view
class=
"item1"
v-else
@
click=
"jumpPage(index, index1)"
>
{{
index1
+
1
}}
</view>
<view
v-if=
"
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
"
class=
"flex flex_wrap"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
>
<view
class=
"item1"
>
{{
index2
+
1
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"submitBox"
>
<view
class=
"submit"
>
立即提交
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
setup
()
{
let
paperData
=
uni
.
getStorageSync
(
"paperData"
);
console
.
log
(
66
,
paperData
);
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
data
=
reactive
({
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
questionList
:
paperData
.
Paper
.
GroupList
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
(
index
,
index1
)
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper?index="
+
index
+
"&&index1="
+
(
index1
+
1
),
});
},
// async getPaperDetail() {
// let res = await getPaperDetail(data.msg);
// if (res) {
// data.questionList = res.Data.Paper.GroupList;
// console.log(90, res.Data.Paper.GroupList);
// }
// },
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"答题卡"
,
});
},
};
</
script
>
<
style
scoped
>
.answer-sheets
{
box-sizing
:
border-box
;
padding
:
30
rpx
;
height
:
calc
(
100vh
-
150
rpx
);
overflow-y
:
auto
;
}
.name
,
.num
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
width
:
100
rpx
;
text-align
:
center
;
}
.item
{
margin-bottom
:
20
rpx
;
}
.item1-1
{
width
:
690
rpx
;
margin
:
22
rpx
0
0
0
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
600
;
color
:
#111111
;
}
.item1
{
width
:
44
rpx
;
height
:
44
rpx
;
border
:
1px
solid
#e2e2e2
;
border-radius
:
50%
;
margin
:
22
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
600
;
color
:
#111111
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
box-sizing
:
border-box
;
}
.item2
{
width
:
44
rpx
;
height
:
44
rpx
;
border
:
1px
solid
#e2e2e2
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
44
rpx
;
margin-right
:
55
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.submitBox
{
width
:
750
rpx
;
height
:
150
rpx
;
background-color
:
#e2e2e2
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
box-sizing
:
border-box
;
padding-top
:
40
rpx
;
}
.submit
{
width
:
600
rpx
;
height
:
70
rpx
;
border-radius
:
35
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#00acf9
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#fff
;
margin
:
0
auto
;
}
</
style
>
src/pages/exam/examPaperList.vue
View file @
25b3c46b
...
...
@@ -129,6 +129,8 @@ export default {
data
.
pageState
=
"loading"
;
data
.
msg
.
pageIndex
++
;
that
.
getList
();
}
else
{
data
.
pageState
=
"none"
;
}
},
async
getList
()
{
...
...
src/pages/exam/subject1.vue
0 → 100644
View file @
25b3c46b
<
template
>
<!-- 选择题 -->
<view>
<view
v-for=
"(item, index) in questionList"
:key=
"index"
class=
"item"
>
<view
class=
"name"
>
{{
item
.
name
}}
</view>
<view
v-for=
"(item1, index1) in item.children"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"num"
>
{{
item1
.
num
}}
</view>
<view
v-for=
"(item2, index2) in item1.children"
:key=
"item2.id"
class=
"flex item2 flex_start_center"
v-if=
"item.type === 1"
>
<view
class=
"chooseNum"
:class=
"
{ choose: item1.choose === item2.chooseNum }"
@click="change(item.type, index, index1, index2)"
>
{{
item2
.
chooseNum
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item.type, index, index1, index2)"
>
{{
item2
.
itemName
}}
</view
>
</view>
<view
v-for=
"(item2, index2) in item1.children"
:key=
"item2.id"
class=
"item2 flex flex_start_center"
v-if=
"item.type === 2"
>
<view
class=
"chooseNum"
:class=
"
{ choose: item1.choose.find((e) => e == item2.chooseNum) }"
@click="change(item.type, index, index1, index2)"
>
{{
item2
.
chooseNum
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item.type, index, index1, index2)"
>
{{
item2
.
itemName
}}
</view
>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
export
default
{
setup
(
props
,
context
)
{
// let { refs } = getCurrentInstance();
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
();
},
//选题
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
);
};
onMounted
(()
=>
{});
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
\ No newline at end of file
src/utils/request.js
View file @
25b3c46b
...
...
@@ -19,6 +19,7 @@ let request = (param) => {
},
data
:
{
msg
:
param
.
data
,
// ...param.data.activityMsg
},
success
:
res
=>
{
if
(
res
.
data
.
Code
===
1
)
{
...
...
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