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
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
<
template
>
<
template
>
<!-- 单选题 -->
<!-- 单选题 -->
<view>
<view>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"name"
>
<view
class=
"name"
>
<view
class=
"grow"
>
<view
class=
"grow"
>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
<text
style=
"color: #999999"
</view>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
<view
class=
"ExamIndex_Box"
>
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<text
</view>
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<view
class=
"ExamIndex_Box"
>
</view>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
</view>
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<swiper
class=
"swiper-box"
:style=
"
{
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}" :autoplay="autoplay" :current="current" @change="onchange" :skip-hidden-item-layout="true"
}"
:disable-programmatic-animation="true">
:autoplay="autoplay"
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
:current="current"
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
@change="onchange"
<view
class=
"item1"
>
:skip-hidden-item-layout="true"
<view
class=
"flex flex_start_center"
>
:disable-programmatic-animation="true"
<view
class=
"num"
v-html=
"item1.Title"
></view>
>
</view>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
<view
class=
"flex item2 flex_start_center"
>
v-for=
"(item2, index2) in item1.QuestionContentObj"
<template
v-if=
"isOperate"
>
:key=
"index2"
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
class=
"flex item2 flex_start_center"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
>
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
<view
</
template
>
class=
"chooseNum"
<
template
v-else
>
:class=
"
{ myAnswer: item2.IsAnswer }"
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
@click="change(item1, item2)"
</view>
>
{{
item2
.
ShowName
}}
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
</view>
v-html="item2.Content">
<view
</view>
class=
"chooseName"
</
template
>
@
click=
"change(item1, item2)"
</view>
v-html=
"item2.Content"
</view>
></view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
</
template
>
<view>
<
template
v-else
>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<view
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
class=
"chooseNum"
<text>
您的答案是:
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
<
template
v-if=
"item1.StundetAnswer != ''"
>
>
{{
item2
.
Name
}}
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
</view>
{{
item1
.
StundetAnswer
}}
,回答正确
<view
</text>
class=
"chooseName"
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
</
template
>
v-html="item2.Content"
<
template
v-else
>
>
<text>
未作答
</text>
</view>
</
template
>
</
template
>
</text>
</view>
</view>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view>
<text
style=
"color: #000"
>
{{ item1.AnswerParse }}
</text>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
</view>
<text
class=
"isTrueAnswer"
>
{{ item1.Answer }}
</text
</view>
>
,
</swiper-item>
<text
<swiper-item
v-if=
"sortIndex != sortTotal"
>
>
您的答案是:
<!-- 最后一页 -->
<
template
v-if=
"item1.StundetAnswer != ''"
>
</swiper-item>
<text
</swiper>
v-if=
"item1.Answer == item1.StundetAnswer"
</view>
class=
"isTrueAnswer"
<van-toast
id=
"van-toast"
/>
>
</view>
{{
item1
.
StundetAnswer
}}
,回答正确
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #000"
>
{{ item1.AnswerParse }}
</text>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
>
<!-- 最后一页 -->
</swiper-item>
</swiper>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
toRef
,
toRef
,
getCurrentInstance
,
getCurrentInstance
,
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
import
{
changeNumToHan
}
from
"../../utils/index"
;
changeNumToHan
export
default
{
}
from
"../../utils/index"
;
props
:
{
export
default
{
paperData
:
Object
,
props
:
{
sort
:
Number
,
paperData
:
Object
,
sortTotal
:
Number
,
sort
:
Number
,
isLast
:
Boolean
,
sortTotal
:
Number
,
startIndex
:
Number
,
isLast
:
Boolean
,
isOperate
:
Boolean
,
startIndex
:
Number
,
},
isOperate
:
Boolean
,
setup
(
props
,
context
)
{
},
let
{
ctx
}
=
getCurrentInstance
();
setup
(
props
,
context
)
{
let
data
=
reactive
({
let
{
autoplay
:
false
,
ctx
sortIndex
:
props
.
sort
+
1
,
//大题序号
}
=
getCurrentInstance
();
sortTotal
:
props
.
sortTotal
,
//总共多少道大题
let
data
=
reactive
({
data
:
props
.
paperData
,
autoplay
:
false
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
sortIndex
:
props
.
sort
+
1
,
//大题序号
ExamIndex
:
1
,
//第几题
sortTotal
:
props
.
sortTotal
,
//总共多少道大题
isOperate
:
props
.
isOperate
,
data
:
props
.
paperData
,
statusBarHeight
:
0
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
});
ExamIndex
:
1
,
//第几题
//判断是否是第一大题
isOperate
:
props
.
isOperate
,
if
(
data
.
sortIndex
===
1
)
{
statusBarHeight
:
0
,
data
.
current
=
0
;
});
//从答题卡进入
//判断是否是第一大题
if
(
props
.
startIndex
)
{
if
(
data
.
sortIndex
===
1
)
{
data
.
current
=
props
.
startIndex
-
1
;
data
.
current
=
0
;
data
.
ExamIndex
=
props
.
startIndex
;
//从答题卡进入
}
if
(
props
.
startIndex
)
{
}
else
{
data
.
current
=
props
.
startIndex
-
1
;
if
(
props
.
startIndex
)
{
data
.
ExamIndex
=
props
.
startIndex
;
data
.
current
=
props
.
startIndex
;
}
data
.
ExamIndex
=
props
.
startIndex
;
}
else
{
}
if
(
props
.
startIndex
)
{
}
data
.
current
=
props
.
startIndex
;
data
.
ExamIndex
=
props
.
startIndex
;
}
}
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
jumpPage
()
{
jumpPage
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
url
:
"/pages/exam/examPaper"
,
});
});
},
},
back
()
{
back
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
//选题
//选题
change
(
item1
,
item2
)
{
change
(
item1
,
item2
)
{
context
.
emit
(
"answerChange"
,
data
.
data
);
context
.
emit
(
"answerChange"
,
data
.
data
);
item1
.
QuestionContentObj
.
map
((
e
)
=>
{
item1
.
QuestionContentObj
.
map
((
e
)
=>
{
if
(
e
.
Name
==
item2
.
Name
)
{
if
(
e
.
Name
==
item2
.
Name
)
{
e
.
IsAnswer
=
true
;
e
.
IsAnswer
=
true
;
}
else
{
}
else
{
e
.
IsAnswer
=
false
;
e
.
IsAnswer
=
false
;
}
}
if
(
e
.
IsAnswer
)
{
if
(
e
.
IsAnswer
)
{
//标记已回答
//标记已回答
item1
.
IsRes
=
true
;
item1
.
IsRes
=
true
;
}
}
});
});
},
},
onchange
(
e
)
{
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
sortIndex
==
1
)
{
if
(
data
.
sortIndex
==
1
)
{
data
.
ExamIndex
=
e
.
detail
.
current
+
1
;
data
.
ExamIndex
=
e
.
detail
.
current
+
1
;
}
}
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
this
.
$emit
(
"getAfterTopic"
);
this
.
$emit
(
"getAfterTopic"
);
}
}
if
(
e
.
detail
.
current
==
0
&&
data
.
sortIndex
!=
1
)
{
if
(
e
.
detail
.
current
==
0
&&
data
.
sortIndex
!=
1
)
{
this
.
$emit
(
"getBeforeTopic"
);
this
.
$emit
(
"getBeforeTopic"
);
}
}
},
},
jumpAnswerSheet
()
{
jumpAnswerSheet
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/answerSheet"
,
url
:
"/pages/exam/answerSheet"
,
});
});
}
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
if
(
data
.
sortIndex
===
1
)
{
if
(
data
.
sortIndex
===
1
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
-
1
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
-
1
;
}
else
{
}
else
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
}
}
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
});
});
let
that
=
methods
;
let
that
=
methods
;
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
font-weight
:
800
;
color
:
#111111
;
color
:
#111111
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
padding
:
25
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
color
:
gray
;
}
}
.answerSheet
{
.answerSheet
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
margin-left
:
20
rpx
;
margin-left
:
20
rpx
;
color
:
#000
;
color
:
#000
;
}
}
.swiper-box
{
.swiper-box
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
/* margin-bottom: 40rpx; */
/* margin-bottom: 40rpx; */
position
:
relative
;
position
:
relative
;
}
}
.item1
{
.item1
{
/* margin: 25rpx 0; */
/* margin: 25rpx 0; */
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
line-height
:
40
rpx
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
margin-right
:
30
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
</
style
>
</
style
>
src/pages.json
View file @
25b3c46b
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
},
{
},
{
"path"
:
"pages/progress/progress"
//进度
"path"
:
"pages/progress/progress"
//进度
},
{
},
{
"path"
:
"pages/activ
e/active
List"
//活动列表
"path"
:
"pages/activ
ity/activity
List"
//活动列表
}],
}],
"subPackages"
:
[{
"subPackages"
:
[{
"root"
:
"pages/course"
,
//课程分包
"root"
:
"pages/course"
,
//课程分包
...
@@ -69,12 +69,11 @@
...
@@ -69,12 +69,11 @@
"selectedColor"
:
"#3cc51f"
,
"selectedColor"
:
"#3cc51f"
,
"borderStyle"
:
"black"
,
"borderStyle"
:
"black"
,
"backgroundColor"
:
"#ffffff"
,
"backgroundColor"
:
"#ffffff"
,
"fontSize"
:
"24rpx"
,
"list"
:
[{
"list"
:
[{
"pagePath"
:
"pages/index/index"
,
"pagePath"
:
"pages/index/index"
,
"text"
:
"首页"
"text"
:
"首页"
},
{
},
{
"pagePath"
:
"pages/activ
e/active
List"
,
"pagePath"
:
"pages/activ
ity/activity
List"
,
"text"
:
"活动"
"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
<
template
>
<view
class=
"Jiaheactivity"
>
<van-toast
id=
"van-toast"
/>
<view
class=
"box-top"
>
<view
style=
"display: flex"
>
<view
class=
"box-t-item"
:class=
"
{ currentStyle: current == 1 }"
@click="listType(1)"
>即将开始
</view
>
<view
class=
"box-t-item"
:class=
"
{ currentStyle: current == 3 }"
@click="listType(3)"
>已结束
</view
>
<view
class=
"box-t-item"
:class=
"
{ currentStyle: current == 2 }"
@click="listType(2)"
>正在参加
</view
>
</view>
<view
class=
"box-top-r"
@
click=
"show = true"
>
<text
class=
"box-top-r-text"
>
{{
ActivityName
}}
</text>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/salesxiala.png"
style=
"width: 17px; height: 17px; margin-left: 7px"
></image>
</view>
</view>
<view
v-show=
"current == 1 || current == 3"
>
<van-empty
description=
"暂无活动"
v-if=
"g.length === 0"
/>
<view
v-if=
"g.length > 0"
class=
"scroll-box"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: 100%"
>
<view
class=
"details"
v-for=
"(item, index) in g"
:key=
"index"
>
<view
class=
"details-time"
>
{{
item
.
Dateitem
}}
</view>
<view
class=
"details-box"
v-for=
"(x, y) in item.list"
:key=
"y"
@
click=
"gourl(x)"
>
<view
v-if=
"x.IsJoinActivity == 0"
>
<view
class=
"details-box-top-z"
v-if=
"x.TotalMan - x.JoinNum > 0 && current == 1"
:style=
"
{ background: mainColor }"
>
</view>
<view
class=
"details-box-t-positions"
v-if=
"x.TotalMan - x.JoinNum > 0 && current == 1"
:style=
"
{ background: mainColor }"
>
<text>
{{
x
.
TotalMan
-
x
.
JoinNum
>=
6
?
"可预约"
:
x
.
TotalMan
-
x
.
JoinNum
<
6
?
"剩余"
+
(
x
.
TotalMan
-
x
.
JoinNum
)
+
"个空位"
:
""
}}
</text>
</view>
<view
class=
"details-box-top-f"
v-if=
"x.TotalMan - x.JoinNum
<
1
"
></view>
<view
class=
"details-box-t-positions"
v-if=
"x.TotalMan - x.JoinNum
<
1
"
style=
"background: #e2e2e2; color: #999999"
>
爆满
</view>
<view
class=
"details-box-top-f"
v-if=
"x.TotalMan - x.JoinNum > 0 && current == 3"
></view>
<view
v-if=
"current == 3 && x.TotalMan - x.JoinNum > 0"
class=
"details-box-t-positions"
style=
"background: #e2e2e2; color: #999999"
>
已结束
</view>
</view>
<view
v-if=
"x.IsJoinActivity == 1"
>
<view
class=
"details-box-top-f"
style=
"background: #40766e"
></view>
<view
class=
"details-box-t-positions"
:style=
"
{ background: '#40766E' }"
>
已报名
</view>
</view>
<!-- 内容 -->
<view
class=
"details-b-center"
>
<view
class=
"details-b-center-l"
>
<view
style=
"
font-size: 50rpx;
color: #1b1d1e;
font-weight: 800;
font-family: PingFang SC;
"
>
{{
x
.
DayStr
}}
</view>
<view
style=
"
font-size: 28rpx;
color: #999999;
font-weight: 500;
font-family: PingFang SC;
"
>
{{
x
.
WeekStr
}}
</view>
</view>
<view
style=
"width: 1px; background: #e2e2e2; height: 60px"
></view>
<view
class=
"details-b-center-r"
>
<view
class=
"details-b-title"
>
{{
x
.
ActivityName
}}
</view>
<view
class=
"details-b-time"
>
报名时间:
{{
x
.
BMStart
}}
-
{{
x
.
BMEnd
}}
</view>
</view>
</view>
<view
style=
"
width: 100%;
height: 1px;
background: #e2e2e2;
margin-top: 10px;
"
></view>
<view
class=
"details-b-bottom"
>
<view
class=
"details-b-time"
style=
"margin-top: 0"
>
活动时间:
{{
x
.
HDStart
}}
-
{{
x
.
HDEnd
}}
</view>
<view
:style=
"
{ color: pricecolor, 'font-size': '32rpx' }">
<text
v-if=
"x.IsFree == 1"
>
免费
</text>
<view
v-if=
"x.IsFree == 2 && x.Price > 0"
style=
"display: flex; align-items: flex-end"
>
<text
style=
"font-size: 22rpx"
>
¥
</text>
<text>
{{
x
.
Price
}}
</text>
</view>
<view
v-if=
"x.IsFree == 2 && x.Price == 0"
style=
"display: flex; align-items: flex-end"
>
<text>
{{
x
.
PointNum
}}
</text>
<text
style=
"font-size: 22rpx"
>
点
</text>
</view>
</view>
</view>
</view>
</view>
<Loadmore
:state=
"pageState"
/>
</scroll-view>
</view>
</view>
<view
v-show=
"current == 2"
style=
"height: calc(100vh - 50px)"
>
<signUp
ref=
"children"
></signUp>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<van-popup
:show=
"show"
closeable
position=
"bottom"
@
close=
"show = false"
>
<view
class=
"pubox"
>
<view
class=
"pubox-top"
>
<text>
选择活动类型
</text>
</view>
<scroll-view
scroll-y=
"true"
style=
"
max-height: calc(100vh * 0.7 - 65px);
padding-bottom: 20px;
min-height: calc(100vh * 0.4 - 65px);
"
>
<view
class=
"ht-box"
>
<view
v-for=
"(x, y) in activityTypeList"
:key=
"y"
class=
"foritem"
@
click=
"select(x)"
:style=
"
{
color: x.Id == msg.ActivityType ? '#FFF' : '#666666',
background: x.Id == msg.ActivityType ? mainColor : '#F9F9F9',
}"
>
{{
x
.
TypeName
}}
</view>
</view>
</scroll-view>
</view>
</van-popup>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
import
{
getActivityTypeList
,
getActivityList
}
from
"../../api/activity"
;
export
default
{
components
:
{
Loadmore
,
},
setup
()
{
let
JHdata
=
uni
.
getStorageSync
(
"userInfo"
);
let
data
=
reactive
({
show
:
false
,
pageState
:
"more"
,
current
:
1
,
showAuth
:
false
,
u
:
{},
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
ActivityType
:
0
,
SelectIsEnd
:
0
,
},
ActivityName
:
"不限"
,
PageCount
:
1
,
g
:
[],
activityTypeList
:
[],
});
let
methods
=
{
async
getActivityType
()
{
let
res
=
await
getActivityTypeList
();
if
(
res
)
{
data
.
activityTypeList
=
res
.
data
;
data
.
activityTypeList
.
unshift
({
Id
:
0
,
TypeName
:
"不限"
,
});
this
.
msg
.
ActivityType
=
0
;
this
.
ActivityName
=
"不限"
;
}
methods
.
getList
();
},
async
getList
()
{
let
res
=
await
getActivityList
(
data
.
msg
);
if
(
res
)
{
let
arr
=
methods
.
groupArr
(
res
.
data
.
pageData
,
"MonthStr"
);
let
arr2
=
arr
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
this
.
g
=
[];
}
if
(
data
.
g
.
length
>
0
)
{
arr2
.
forEach
((
x
)
=>
{
if
(
x
.
Day
==
data
.
g
[
data
.
g
.
length
-
1
].
Day
)
{
//判断当前第一条数据和已有的是否同一天 放在一起
console
.
log
(
"进入一次"
);
data
.
g
[
data
.
g
.
length
-
1
].
list
=
data
.
g
[
data
.
g
.
length
-
1
].
list
.
concat
(
x
.
list
);
arr
.
splice
(
0
,
1
);
}
});
}
data
.
g
=
data
.
g
.
concat
(
data
);
data
.
PageCount
=
res
.
data
.
pageCount
;
if
(
res
.
data
.
pageCount
==
1
)
{
data
.
pageState
=
"none"
;
}
}
},
groupArr
(
list
,
field
)
{
var
fieldList
=
[],
att
=
[];
list
.
map
((
e
)
=>
{
fieldList
.
push
(
e
[
field
]);
});
//数组去重
fieldList
=
fieldList
.
filter
((
e
,
i
,
self
)
=>
{
return
self
.
indexOf
(
e
)
==
i
;
});
for
(
var
j
=
0
;
j
<
fieldList
.
length
;
j
++
)
{
//过滤出匹配到的数据
var
arr
=
list
.
filter
((
e
)
=>
{
return
e
.
MonthStr
==
fieldList
[
j
];
});
att
.
push
({
Dateitem
:
arr
[
0
].
YearStr
+
"年"
+
arr
[
0
].
MonthStr
+
"月"
,
list
:
arr
,
});
}
return
att
;
},
getorder
()
{
//报名成功处理
data
.
current
=
2
;
//让他直接跳入我报名
if
(
Object
.
keys
(
this
.
$refs
).
length
>
0
&&
this
.
$refs
.
children
)
{
//判断
this
.
$refs
.
children
.
getfzuj
();
}
},
lower
(
e
)
{
if
(
data
.
msg
.
pageIndex
<
data
.
PageCount
)
{
data
.
pageState
=
"loading"
;
data
.
msg
.
pageIndex
++
;
that
.
getList
();
}
else
{
data
.
pageState
=
"none"
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
GetActivityTypeList
();
if
(
Object
.
keys
(
this
.
$refs
).
length
>
0
&&
this
.
$refs
.
children
)
{
//判断
this
.
$refs
.
children
.
getfzuj
();
}
},
listType
(
type
)
{
data
.
current
=
type
;
if
(
type
==
3
)
{
this
.
msg
.
SelectIsEnd
=
1
;
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
}
else
if
(
type
==
1
)
{
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
SelectIsEnd
=
0
;
this
.
getList
();
}
else
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
{
if
(
Object
.
keys
(
this
.
$refs
).
length
>
0
&&
this
.
$refs
.
children
)
{
//判断
this
.
$refs
.
children
.
getfzuj
();
}
}
}
},
select
(
x
)
{
data
.
msg
.
ActivityType
=
x
.
Id
;
data
.
ActivityName
=
x
.
TypeName
;
data
.
show
=
false
;
data
.
msg
.
pageIndex
=
1
;
data
.
g
=
[];
data
.
getList
();
},
gourl
(
x
)
{
uni
.
navigateTo
({
url
:
"/pages/school/JIaheactivitydetails?Id="
+
x
.
Id
,
});
},
};
onMounted
(()
=>
{
methods
.
getActivityType
();
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"活动列表"
,
});
},
};
</
script
>
<
style
scoped
>
.Jiaheactivity
.box-top
{
/* width: 100%; */
height
:
100
rpx
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.box-t-item
{
width
:
140
rpx
;
height
:
60
rpx
;
border-radius
:
8
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
26
rpx
;
color
:
#999999
;
margin-right
:
20
rpx
;
background-color
:
#edf0f3
;
}
.currentStyle
{
color
:
#fff
;
background-color
:
#40766e
;
}
.box-top-r
{
width
:
200
rpx
;
height
:
60
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
26
rpx
;
color
:
#40766e
;
background
:
#edf0f3
;
border-radius
:
8
rpx
;
box-sizing
:
border-box
;
padding
:
0
10
rpx
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.Jiaheactivity
.details
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.details-time
{
width
:
100%
;
font-size
:
24
rpx
;
color
:
#111111
;
margin-top
:
30
rpx
;
}
.details-box
{
width
:
100%
;
margin-top
:
30
rpx
;
box-shadow
:
0px
6
rpx
12
rpx
0px
rgba
(
139
,
115
,
64
,
0.16
);
border-radius
:
12
rpx
;
overflow
:
hidden
;
position
:
relative
;
min-height
:
196
rpx
;
}
.details-box-top-z
{
width
:
100%
;
height
:
6
rpx
;
}
.details-box-top-f
{
width
:
100%
;
height
:
6
rpx
;
background
:
#e2e2e2
;
}
.details-box-t-positions
{
height
:
40
rpx
;
font-size
:
20
rpx
;
color
:
#fff
;
background
:
#b7a264
;
display
:
flex
;
align-items
:
center
;
padding
:
0
26
rpx
;
border-top-right-radius
:
12
rpx
;
border-bottom-left-radius
:
12
rpx
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
.details-b-center
{
width
:
100%
;
display
:
flex
;
margin-top
:
40
rpx
;
}
.details-b-center-l
{
width
:
120
rpx
;
height
:
120
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
space-between
;
}
.details-b-center-r
{
width
:
1px
;
flex
:
1
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.details-b-title
{
width
:
100%
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
font-size
:
28
rpx
;
color
:
#111111
;
font-weight
:
bold
;
font-family
:
PingFang
SC
;
}
.details-b-time
{
font-size
:
24
rpx
;
color
:
#999999
;
margin-top
:
20
rpx
;
}
.details-b-bottom
{
width
:
100%
;
height
:
90
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
0
30
rpx
;
}
.Jiaheactivity
.scroll-box
{
height
:
calc
(
100vh
-
100
rpx
);
width
:
calc
(
100vw
);
overflow
:
hidden
;
padding-bottom
:
100
rpx
;
}
.Jiaheactivity
{
width
:
100%
;
height
:
100vh
;
background-color
:
#fff
;
/* font-family: aa; */
}
.Jiaheactivity
.pubox
{
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.Jiaheactivity
.pubox-top
{
height
:
90
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
28
rpx
;
color
:
#111
;
}
::-webkit-scrollbar
{
display
:
none
;
}
.Jiaheactivity
.foritem
{
height
:
60
rpx
;
font-size
:
24
rpx
;
padding
:
0
24
rpx
;
display
:
flex
;
align-items
:
center
;
border-radius
:
30
rpx
;
margin-right
:
50
rpx
;
margin-bottom
:
30
rpx
;
}
.ht-box
{
padding
:
0
30
rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
margin-top
:
20
rpx
;
}
</
style
>
\ No newline at end of file
src/pages/course/askForLeaveList.vue
View file @
25b3c46b
...
@@ -123,6 +123,8 @@ export default {
...
@@ -123,6 +123,8 @@ export default {
data
.
pageState
=
"loading"
;
data
.
pageState
=
"loading"
;
data
.
msg
.
pageIndex
++
;
data
.
msg
.
pageIndex
++
;
that
.
getList
();
that
.
getList
();
}
else
{
data
.
pageState
=
"none"
;
}
}
},
},
reload
()
{
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 {
...
@@ -129,6 +129,8 @@ export default {
data
.
pageState
=
"loading"
;
data
.
pageState
=
"loading"
;
data
.
msg
.
pageIndex
++
;
data
.
msg
.
pageIndex
++
;
that
.
getList
();
that
.
getList
();
}
else
{
data
.
pageState
=
"none"
;
}
}
},
},
async
getList
()
{
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) => {
...
@@ -19,6 +19,7 @@ let request = (param) => {
},
},
data
:
{
data
:
{
msg
:
param
.
data
,
msg
:
param
.
data
,
// ...param.data.activityMsg
},
},
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
data
.
Code
===
1
)
{
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