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
cb7c4243
Commit
cb7c4243
authored
Oct 16, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 1.3.0ui完成
parent
42977b7a
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1011 additions
and
306 deletions
+1011
-306
.env.js
.env.js
+1
-1
index.vue
src/components/advertisement-swiper/index.vue
+49
-0
index.vue
src/components/mask-tip/index.vue
+0
-1
index.vue
src/components/question-bank-cell/index.vue
+154
-95
index.vue
src/components/toast-pop/index.vue
+31
-5
pages.json
src/pages.json
+23
-0
questionnaire.vue
src/pages/advertisement/questionnaire.vue
+234
-0
results.vue
src/pages/advertisement/results.vue
+172
-0
index.vue
src/pages/index/index.vue
+71
-14
answer.vue
src/pages/learn/answer.vue
+61
-2
detail.vue
src/pages/learn/detail.vue
+214
-187
selectedList.vue
src/pages/learn/selectedList.vue
+1
-1
No files found.
.env.js
View file @
cb7c4243
;(
function
()
{
;(
function
()
{
let
NODE_ENV
=
'prod'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'prod'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
let
ENV_VAR
=
null
let
VERSION
=
'v1.
2
.0'
let
VERSION
=
'v1.
3
.0'
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
NODE_ENV
===
'dev'
)
{
if
(
NODE_ENV
===
'dev'
)
{
ENV_VAR
=
require
(
'./.env.dev.js'
)
ENV_VAR
=
require
(
'./.env.dev.js'
)
...
...
src/components/advertisement-swiper/index.vue
0 → 100644
View file @
cb7c4243
<
template
>
<view
class=
"wrap"
>
<u-swiper
:list=
"list"
@
click=
"handleClick"
height=
"180"
border-radius=
"16"
:mode=
"mode"
></u-swiper>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
list
:
[{
image
:
process
.
uniEnv
.
qn_base_url
+
'wenjuandatiguagngao.jpg'
,
title
:
'昨夜星辰昨夜风,画楼西畔桂堂东'
,
id
:
0
}
],
}
},
created
()
{
this
.
loadList
()
},
computed
:
{
mode
()
{
return
this
.
list
.
length
>
1
?
'round'
:
'none'
}
},
methods
:
{
loadList
()
{
// this.$u.api
// .queryQuestionWarehouseById()
// .then((res) => {
// this.list = res.data
// })
// .catch((err) => {
// console.log(err)
// })
},
handleClick
(
index
)
{
console
.
log
(
index
)
this
.
$emit
(
'click'
,
this
.
list
[
index
].
id
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.wrap
{
}
</
style
>
\ No newline at end of file
src/components/mask-tip/index.vue
View file @
cb7c4243
...
@@ -43,7 +43,6 @@ export default {
...
@@ -43,7 +43,6 @@ export default {
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
console
.
log
(
'--------------'
)
this
.
$emit
(
'update:show'
,
false
)
this
.
$emit
(
'update:show'
,
false
)
this
.
$emit
(
'click'
)
this
.
$emit
(
'click'
)
},
},
...
...
src/components/question-bank-cell/index.vue
View file @
cb7c4243
<
template
>
<
template
>
<view
class=
"question-bank-cell"
>
<view
class=
"question-cell"
>
<view
class=
"label-normal"
>
<image
<view
class=
"title-view"
>
{{
questionData
.
label
||
questionData
.
title
}}
</view>
v-if=
"beSelected"
<view
class=
"type-view"
v-if=
"!isAdd"
><text>
{{
class=
"selected-image"
provinceName
+
'-'
+
examTypeText
:src=
"yixuanzetikuleImage"
}}
</text><text
:style=
"statusData.statusStyle"
>
{{
'('
+
statusData
.
status
+
statusData
.
subtitle
+
')'
}}
</text></view>
></image>
<view
class=
"label-text"
>
<view
共
:class=
"[
<text
class=
"label-blue"
>
{{
questionData
.
number
||
0
}}
</text
'question-bank-cell',
>
道精编试题,通过率
{ 'selet-type': isSelect },
<text
class=
"label-blue"
>
{{
questionData
.
version
||
questionData
.
key
}}
</text>
{ selected: beSelected },
]"
@click="handleClickCell"
>
<view
class=
"label-normal"
>
<view
class=
"title-view"
>
{{
questionData
.
label
||
questionData
.
title
}}
</view>
<view
class=
"type-view"
v-if=
"!isAdd"
><text>
{{
provinceName
+
'-'
+
examTypeText
}}
</text
><text
:style=
"statusData.statusStyle"
>
{{
'('
+
statusData
.
status
+
')'
}}
</text></view
>
<view
class=
"label-text"
>
共
<text
class=
"label-blue"
>
{{
questionData
.
number
||
questionData
.
questionCount
||
0
}}
</text
>
道精编试题,通过率
<text
class=
"label-blue"
>
{{
questionData
.
version
||
questionData
.
key
}}
</text>
</view>
</view>
</view>
<u-button
v-if=
"!isNone"
:customStyle=
"buttonStyle"
@
click
.
stop=
"handleClick(index)"
type=
"primary"
>
<u-icon
v-if=
"isAdd"
class=
"button-icon"
name=
"plus"
></u-icon
>
{{
buttonText
}}
</u-button>
</view>
</view>
<u-button
v-if=
"!isNone"
:customStyle=
"buttonStyle"
@
click=
"handleClick(index)"
type=
"primary"
>
<u-icon
v-if=
"isAdd"
class=
"button-icon"
name=
"plus"
></u-icon
>
{{
buttonText
}}
</u-button>
</view>
</view>
</
template
>
</
template
>
...
@@ -38,13 +61,21 @@ export default {
...
@@ -38,13 +61,21 @@ export default {
return
{}
return
{}
},
},
},
},
beSelected
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
data
()
{
data
()
{
return
{}
return
{}
},
},
computed
:
{
computed
:
{
questionData
()
{
questionData
()
{
return
this
.
isAdd
?
this
.
info
:
this
.
info
&&
this
.
info
.
echoMap
&&
this
.
info
.
echoMap
.
questionWarehouseId
return
this
.
isAdd
?
this
.
info
:
this
.
info
&&
this
.
info
.
echoMap
&&
this
.
info
.
echoMap
.
questionWarehouseId
},
},
examTypeText
()
{
examTypeText
()
{
var
str
=
this
.
questionData
.
echoMap
&&
this
.
questionData
.
echoMap
.
type
var
str
=
this
.
questionData
.
echoMap
&&
this
.
questionData
.
echoMap
.
type
...
@@ -60,8 +91,15 @@ export default {
...
@@ -60,8 +91,15 @@ export default {
isAdd
()
{
isAdd
()
{
return
this
.
type
==
'add'
return
this
.
type
==
'add'
},
},
isSelect
()
{
return
this
.
type
==
'select'
},
isNone
()
{
isNone
()
{
return
this
.
type
==
'none'
||
this
.
questionWarehouseId
==
this
.
questionData
.
id
return
(
this
.
type
==
'none'
||
this
.
isSelect
||
this
.
questionWarehouseId
==
this
.
questionData
.
id
)
},
},
buttonText
()
{
buttonText
()
{
var
text
=
''
var
text
=
''
...
@@ -89,55 +127,59 @@ export default {
...
@@ -89,55 +127,59 @@ export default {
}
}
},
},
statusData
()
{
statusData
()
{
var
data
=
{
status
:
''
,
statusStyle
:
''
,
subtitle
:
''
}
var
data
=
{
status
:
''
,
statusStyle
:
''
,
subtitle
:
''
}
if
(
!
this
.
info
.
echoMap
||
!
this
.
info
.
echoMap
.
questionWarehouseId
||
!
this
.
info
.
echoMap
.
cardId
)
{
data
.
status
=
'未激活'
// 未绑卡
data
.
statusStyle
=
'color: #9EA5BB'
return
data
}
switch
(
this
.
info
.
echoMap
.
cardId
.
cardStatus
)
{
case
0
:
break
case
5
:
data
.
status
=
'已激活'
// 绑卡未激活
data
.
statusStyle
=
'color: #2953FF'
break
case
10
:
data
.
statusStyle
=
'color: #2953FF'
let
leaveDay
=
0
if
(
if
(
!
this
.
info
.
echoMap
||
this
.
info
.
echoMap
.
cardId
&&
!
this
.
info
.
echoMap
.
questionWarehouseId
||
this
.
info
.
echoMap
.
cardId
.
activationTime
!
this
.
info
.
echoMap
.
cardId
)
{
)
{
data
.
status
=
'未激活'
// 未绑卡
let
diff
=
this
.
datedifference
(
data
.
statusStyle
=
'color: #9EA5BB'
this
.
info
.
echoMap
.
cardId
.
activationTime
.
split
(
' '
)[
0
],
return
data
this
.
getTodayDate
()
}
)
switch
(
this
.
info
.
echoMap
.
cardId
.
cardStatus
)
{
leaveDay
=
this
.
info
.
echoMap
.
cardId
.
effectiveDay
-
diff
case
0
:
leaveDay
=
leaveDay
>
0
?
leaveDay
:
0
break
case
5
:
data
.
status
=
'已激活'
// 绑卡未激活
data
.
statusStyle
=
'color: #2953FF'
data
.
subtitle
=
'-未使用'
break
case
10
:
data
.
status
=
'已激活'
data
.
statusStyle
=
'color: #2953FF'
let
leaveDay
=
0
if
(
this
.
info
.
echoMap
.
cardId
&&
this
.
info
.
echoMap
.
cardId
.
activationTime
)
{
let
diff
=
this
.
datedifference
(
this
.
info
.
echoMap
.
cardId
.
activationTime
.
split
(
' '
)[
0
],
this
.
getTodayDate
()
)
leaveDay
=
this
.
info
.
echoMap
.
cardId
.
effectiveDay
-
diff
leaveDay
=
leaveDay
>
0
?
leaveDay
:
0
}
data
.
subtitle
=
'-'
+
leaveDay
+
'天后到期'
break
case
15
:
data
.
status
=
'已失效'
data
.
statusStyle
=
'color: #9EA5BB'
break
default
:
break
}
}
return
data
data
.
status
=
leaveDay
+
'天后到期'
}
break
case
15
:
data
.
status
=
'已失效'
data
.
statusStyle
=
'color: #9EA5BB'
break
default
:
break
}
return
data
},
yixuanzetikuleImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'yixuanzetikule.png'
},
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
this
.
$emit
(
'action'
,
this
.
questionData
,
this
.
type
)
this
.
$emit
(
'action'
,
this
.
questionData
,
this
.
type
)
},
},
handleClickCell
()
{
this
.
$emit
(
'click'
,
this
.
questionData
)
},
getTodayDate
()
{
getTodayDate
()
{
let
day
=
new
Date
()
let
day
=
new
Date
()
day
.
setTime
(
day
.
getTime
())
day
.
setTime
(
day
.
getTime
())
...
@@ -166,42 +208,59 @@ export default {
...
@@ -166,42 +208,59 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.question-bank-cell
{
.question-cell
{
padding
:
40rpx
24rpx
40rpx
30rpx
;
position
:
relative
;
background-color
:
#ffffff
;
.selected-image
{
border-radius
:
12rpx
;
position
:
absolute
;
display
:
flex
;
width
:
54rpx
;
justify-content
:
space-between
;
height
:
62rpx
;
align-items
:
center
;
bottom
:
0
;
.label-normal
{
right
:
0
;
width
:
470rpx
;
}
word-break
:
break-all
;
.question-bank-cell
{
.title-view
{
padding
:
30rpx
24rpx
32rpx
30rpx
;
font-size
:
36rpx
;
background-color
:
#ffffff
;
color
:
#191c27
;
border-radius
:
12rpx
;
font-weight
:
bold
;
display
:
flex
;
margin-bottom
:
12rpx
;
justify-content
:
space-between
;
align-items
:
center
;
&
.selet-type
{
background-color
:
#f7f9fc
;
border
:
1px
solid
#f7f9fc
;
}
}
.type-view
{
&
.selected
{
font-size
:
28rpx
;
border
:
1px
solid
#2953ff
;
color
:
#5a6073
;
font-weight
:
bold
;
}
}
.label-text
{
.label-normal
{
margin-top
:
12rpx
;
width
:
470rpx
;
font-size
:
26rpx
;
word-break
:
break-all
;
color
:
#5a6073
;
.title-view
{
.label-blue
{
font-size
:
36rpx
;
color
:
#2953ff
;
color
:
#191c27
;
padding-left
:
6rpx
;
font-weight
:
bold
;
padding-right
:
6rpx
;
margin-bottom
:
14rpx
;
}
.type-view
{
font-size
:
28rpx
;
color
:
#5a6073
;
font-weight
:
bold
;
}
.label-text
{
margin-top
:
14rpx
;
font-size
:
26rpx
;
color
:
#5a6073
;
.label-blue
{
color
:
#2953ff
;
padding-left
:
6rpx
;
padding-right
:
6rpx
;
}
}
}
}
}
}
.button-icon
{
.button-icon
{
margin-right
:
4rpx
;
margin-right
:
4
rpx
;
font-size
:
28
rpx
;
font-size
:
28rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
}
}
}
</
style
>
</
style
>
src/components/toast-pop/index.vue
View file @
cb7c4243
...
@@ -17,13 +17,15 @@
...
@@ -17,13 +17,15 @@
<text>
{{
title
}}
</text>
<text>
{{
title
}}
</text>
</view>
</view>
<view
class=
"pop-message"
>
<view
class=
"pop-message"
>
<text>
{{
message
}}
</text>
<text>
{{
messages
[
0
]
}}
</text>
<text
v-if=
"isPause"
class=
"message-count"
>
{{
data
.
answered
}}
</text>
<text
v-if=
"messages[1]"
>
{{
messages
[
1
]
}}
</text>
</view>
</view>
<view
class=
"pop-btn-view"
>
<view
class=
"pop-btn-view"
>
<view
class=
"line-view"
>
</view>
<view
class=
"line-view"
>
</view>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"cancel-button"
@
click=
"handleClickCancel"
>
<view
class=
"cancel-button"
@
click=
"handleClickCancel"
>
取消
{{
cancelText
}}
</view>
</view>
<view
class=
"line-view-v"
/>
<view
class=
"line-view-v"
/>
<view
class=
"sure-button"
@
click=
"$u.throttle(handleClickSure, 500)"
>
<view
class=
"sure-button"
@
click=
"$u.throttle(handleClickSure, 500)"
>
...
@@ -51,6 +53,10 @@ export default {
...
@@ -51,6 +53,10 @@ export default {
type
:
String
,
type
:
String
,
default
:
'select'
,
default
:
'select'
,
},
},
data
:
{
noStart
:
0
,
answered
:
0
}
},
},
data
()
{
data
()
{
return
{}
return
{}
...
@@ -59,20 +65,36 @@ export default {
...
@@ -59,20 +65,36 @@ export default {
tanchuangdingbuImage
()
{
tanchuangdingbuImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'tanchuangdingbu.png'
return
process
.
uniEnv
.
qn_base_url
+
'tanchuangdingbu.png'
},
},
message
()
{
message
s
()
{
switch
(
this
.
type
)
{
switch
(
this
.
type
)
{
case
'select'
:
case
'select'
:
return
'为了您能更好的使用“模考大师”小程序请先选择题库'
return
[
'为了您能更好的使用“模考大师”小程序请先选择题库'
]
case
'bound'
:
case
'bound'
:
return
'为了您能更好的使用“模考大师”小程序请去绑定用户卡'
return
[
'为了您能更好的使用“模考大师”小程序请去绑定用户卡'
]
case
'pause'
:
return
[
'您已回答 '
,
' 题,剩余 '
+
this
.
data
.
noStart
+
' 题'
]
}
}
},
},
isPause
()
{
return
this
.
type
==
'pause'
},
buttonText
()
{
buttonText
()
{
switch
(
this
.
type
)
{
switch
(
this
.
type
)
{
case
'select'
:
case
'select'
:
return
'去选择'
return
'去选择'
case
'bound'
:
case
'bound'
:
return
'去绑定'
return
'去绑定'
case
'pause'
:
return
'保存并退出'
}
},
cancelText
()
{
switch
(
this
.
type
)
{
case
'select'
:
case
'bound'
:
return
'取消'
case
'pause'
:
return
'重新开始'
}
}
},
},
customStyleCancel
()
{
customStyleCancel
()
{
...
@@ -120,6 +142,7 @@ export default {
...
@@ -120,6 +142,7 @@ export default {
}
}
.toast-pop
{
.toast-pop
{
min-height
:
480rpx
;
min-height
:
480rpx
;
overflow
:
hidden
;
position
:
relative
;
position
:
relative
;
// background-image: linear-gradient(to top, #ffffff 0%, #e9f3ff 50%);
// background-image: linear-gradient(to top, #ffffff 0%, #e9f3ff 50%);
// background-size: 100% 240rpx;
// background-size: 100% 240rpx;
...
@@ -138,6 +161,9 @@ export default {
...
@@ -138,6 +161,9 @@ export default {
color
:
#191c27
;
color
:
#191c27
;
font-weight
:
bold
;
font-weight
:
bold
;
padding
:
90rpx
30rpx
80rpx
30rpx
;
padding
:
90rpx
30rpx
80rpx
30rpx
;
.message-count
{
color
:
#2953FF
;
}
}
}
.pop-btn-view
{
.pop-btn-view
{
...
...
src/pages.json
View file @
cb7c4243
...
@@ -70,6 +70,29 @@
...
@@ -70,6 +70,29 @@
}
}
]
]
},
},
{
"root"
:
"pages/advertisement"
,
"pages"
:
[
{
"path"
:
"questionnaire"
,
"name"
:
"questionnaire"
,
"style"
:
{
"navigationBarTitleText"
:
"调查问卷"
,
"navigationStyle"
:
"custom"
,
"disableScroll"
:
true
}
},
{
"path"
:
"results"
,
"name"
:
"results"
,
"style"
:
{
"navigationBarTitleText"
:
"领取奖励"
,
"navigationStyle"
:
"custom"
,
"disableScroll"
:
true
}
}
]
},
{
{
"root"
:
"pages/learn"
,
"root"
:
"pages/learn"
,
"pages"
:
[
"pages"
:
[
...
...
src/pages/advertisement/questionnaire.vue
0 → 100644
View file @
cb7c4243
<
template
>
<view
class=
"questionnaire"
>
<u-navbar
back-icon-color=
"#FFFFFF"
background=
"transparent"
title=
" "
titleColor=
"#FFFFFF"
:border-bottom=
"false"
title-bold
></u-navbar>
<image
class=
"background-image"
:src=
"wenjuandatiImage"
mode=
"widthFix"
></image>
<!-- 问卷题目 -->
<view
class=
"body-view"
>
<view
v-for=
"(item, index) in list"
:key=
"index"
>
<!-- 选有计划才展示第三个选项 -->
<template
v-if=
"index != 2 || bePlanning"
>
<view
class=
"question-title"
>
{{
item
.
title
}}
</view>
<view
class=
"question-content"
>
<view
v-for=
"(answer, i) in item.answerList"
:key=
"i"
:class=
"['item-view',
{ active: answer.checked }]"
>
<u-checkbox
icon-size=
"24"
label-size=
"28"
size=
"36"
v-model=
"answer.checked"
@
change=
"handleChange($event, index, i)"
shape=
"circle"
>
{{
answer
.
text
}}
</u-checkbox
>
</view>
</view>
</
template
>
</view>
</view>
<!-- 底部按钮 -->
<view
class=
"bottom-view"
>
<u-button
:customStyle=
"buttonStyle"
@
click=
"handleClick"
type=
"primary"
shape=
"circle"
>
绑定学习卡
</u-button>
</view>
</view>
</template>
<
script
>
export
default
{
data
()
{
return
{
list
:
[
{
title
:
'您通过什么渠道了解到模考大师?'
,
answerList
:
[
{
text
:
'抖音/快手'
,
checked
:
false
},
{
text
:
'培训机构'
,
checked
:
false
},
{
text
:
'他人推荐'
,
checked
:
false
},
{
text
:
'他人推荐'
,
checked
:
false
},
],
},
{
title
:
'您是否需要考取相关证书?'
,
answerList
:
[
{
text
:
'有计划'
,
checked
:
false
},
{
text
:
'正在考'
,
checked
:
false
},
],
},
{
title
:
'您是否需要为您推荐培训机构?'
,
answerList
:
[
{
text
:
'需要'
,
checked
:
false
},
{
text
:
'不需要'
,
checked
:
false
},
],
},
],
}
},
computed
:
{
wenjuandatiImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'wenjuandati.jpg'
},
checked
()
{
var
count
=
0
var
bePlanning
=
!
this
.
bePlanning
var
i
=
0
for
(
var
item
of
this
.
list
)
{
var
j
=
0
for
(
var
question
of
item
.
answerList
)
{
if
(
question
.
checked
==
true
)
{
count
++
}
j
++
}
i
++
if
(
i
==
2
&&
bePlanning
)
{
count
++
break
}
}
return
count
>=
this
.
list
.
length
},
// 选中了有计划
bePlanning
()
{
return
this
.
list
[
1
].
answerList
[
0
].
checked
},
buttonStyle
()
{
return
this
.
checked
?
{
height
:
'104rpx'
,
backgroundColor
:
'#2953FF'
,
color
:
'#FFFFFF'
,
fontSize
:
'32rpx'
,
fontWeight
:
'bold'
,
}
:
{
height
:
'104rpx'
,
backgroundColor
:
'#D4D7DF'
,
color
:
'#FFFFFF'
,
fontSize
:
'32rpx'
,
fontWeight
:
'bold'
,
}
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'问卷调查'
)
if
(
e
&&
e
.
id
)
{
// this.queryQuestionWarehouseById(e.id)
}
},
methods
:
{
queryQuestionWarehouseById
(
id
)
{
// 埋点-调查问卷信息信息
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
id
:
id
,
}
getApp
().
track
(
'queryQuestionWarehouseById-DetailPage'
,
trackParams
)
this
.
$u
.
api
.
queryQuestionWarehouseById
(
id
)
.
then
((
res
)
=>
{
this
.
list
=
res
.
data
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
handleChange
(
event
,
index
,
i
)
{
for
(
var
question
of
this
.
list
[
index
].
answerList
)
{
question
.
checked
=
false
}
this
.
list
[
index
].
answerList
[
i
].
checked
=
event
.
value
},
handleClick
()
{
if
(
!
this
.
checked
)
return
this
.
$u
.
route
({
url
:
'pages/advertisement/results'
,
type
:
'redirectTo'
,
})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
/
deep
/
.u-checkbox__label
{
width
:
220rpx
;
padding-left
:
6rpx
;
}
::-webkit-scrollbar
{
width
:
0
;
height
:
0
;
color
:
transparent
;
display
:
none
;
}
.questionnaire
{
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
position
:
relative
;
background-color
:
#F7F9FC
;
.background-image
{
position
:
absolute
;
width
:
100%
;
}
.body-view
{
border-radius
:
12rpx
;
background-color
:
#ffffff
;
height
:
100%
;
overflow
:
auto
;
margin
:
176rpx
24rpx
30rpx
24rpx
;
padding
:
30rpx
24rpx
;
z-index
:
1
;
.question-title
{
color
:
#191c27
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
.question-content
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
flex-wrap
:
wrap
;
margin-bottom
:
60rpx
;
.item-view
{
background-color
:
#f7f9fc
;
border-radius
:
12rpx
;
color
:
#5a6073
;
width
:
316rpx
;
height
:
104rpx
;
border
:
1px
solid
#f7f9fc
;
display
:
flex
;
align-items
:
center
;
padding
:
24rpx
;
margin-top
:
32rpx
;
&
.active
{
border
:
1px
solid
#2953ff
;
color
:
#2953ff
;
background-color
:
white
;
}
}
}
}
.bottom-view
{
padding
:
36rpx
24rpx
44rpx
24rpx
;
}
}
</
style
>
src/pages/advertisement/results.vue
0 → 100644
View file @
cb7c4243
<
template
>
<view
class=
"results-list"
>
<u-navbar
back-icon-color=
"#FFFFFF"
background=
"transparent"
title=
" "
titleColor=
"#FFFFFF"
:border-bottom=
"false"
title-bold
></u-navbar>
<image
class=
"background-image"
:src=
"lingqujiangliImage"
mode=
"widthFix"
></image>
<view
class=
"results-list-content"
>
<view
v-for=
"(label, index) in list"
:key=
"index"
class=
"label-item"
>
<QuestionBankCell
:info=
"label"
:beSelected=
"
label.echoMap && label.echoMap.questionWarehouseId.id == selectedData.id
"
type=
"select"
@
click=
"handleClickCell"
></QuestionBankCell>
</view>
</view>
<view
class=
"bottom-view"
>
<u-button
:customStyle=
"buttonStyle"
@
click=
"handleClick"
type=
"primary"
shape=
"circle"
>
领取10天体验卡
</u-button>
</view>
</view>
</
template
>
<
script
>
import
QuestionBankCell
from
'@/components/question-bank-cell'
export
default
{
components
:
{
QuestionBankCell
,
},
data
()
{
return
{
list
:
[],
// 已选题库列表
loading
:
true
,
selectedData
:
{},
}
},
computed
:
{
lingqujiangliImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'lingqujiangli.jpg'
},
buttonStyle
()
{
return
this
.
selected
?
{
height
:
'104rpx'
,
backgroundColor
:
'#2953FF'
,
color
:
'#FFFFFF'
,
fontSize
:
'32rpx'
,
fontWeight
:
'bold'
,
}
:
{
height
:
'104rpx'
,
backgroundColor
:
'#D4D7DF'
,
color
:
'#FFFFFF'
,
fontSize
:
'32rpx'
,
fontWeight
:
'bold'
,
}
},
selected
()
{
return
this
.
selectedData
.
id
>
0
},
type
()
{
return
this
.
list
.
length
>
1
?
'change'
:
'none'
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'问卷结束-领取奖励'
)
this
.
loadList
()
// 获取已选题库列表
},
methods
:
{
handleClickCell
(
questionData
)
{
this
.
selectedData
=
questionData
},
handleClick
()
{
if
(
!
this
.
selected
)
return
// 切换题库
this
.
setPageInfo
(
this
.
selectedData
)
this
.
$u
.
vuex
(
'searchHistory'
,
[])
this
.
$u
.
route
({
type
:
'back'
,
})
},
// 获取题库列表
loadList
()
{
// 埋点-获取题库列表
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'getUserQuestionWareHouse-results'
,
trackParams
)
this
.
$u
.
api
.
getUserQuestionWareHouse
()
.
then
((
res
)
=>
{
this
.
list
=
res
if
(
this
.
list
.
length
==
1
)
{
this
.
selectedData
=
this
.
list
[
0
].
echoMap
.
questionWarehouseId
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
setPageInfo
(
info
)
{
var
pages
=
getCurrentPages
()
if
(
pages
.
length
>=
2
)
{
var
page
=
pages
[
pages
.
length
-
2
]
page
.
info
=
info
}
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
::-webkit-scrollbar
{
width
:
0
;
height
:
0
;
color
:
transparent
;
display
:
none
;
}
.results-list
{
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
position
:
relative
;
background-color
:
#f7f9fc
;
.background-image
{
position
:
absolute
;
width
:
100%
;
}
.results-list-content
{
border-radius
:
12rpx
;
background-color
:
#ffffff
;
height
:
100%
;
overflow
:
auto
;
margin
:
176rpx
24rpx
30rpx
24rpx
;
padding
:
30rpx
24rpx
;
z-index
:
1
;
.label-item
{
margin-bottom
:
24rpx
;
}
}
.bottom-view
{
margin
:
0
24rpx
44rpx
24rpx
;
.button-icon
{
margin-right
:
10rpx
;
font-size
:
46rpx
;
font-weight
:
bold
;
}
}
}
</
style
>
src/pages/index/index.vue
View file @
cb7c4243
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</view>
</view>
<view
v-if=
"showOrgId"
>
{{
orgIdText
}}
</view>
<view
v-if=
"showOrgId"
>
{{
orgIdText
}}
</view>
<view
v-if=
"noExam"
class=
"tip-view"
>
<view
v-if=
"noExam"
class=
"tip-view"
>
<text>
您还未选择题库,请
先选择题库
</text>
<text>
您还未选择题库,请
点击选择
</text>
</view>
</view>
<view
<view
v-else-if=
"!info.cardId"
v-else-if=
"!info.cardId"
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
><text
class=
"left-label"
v-if=
"info.cardId"
>
{{
><text
class=
"left-label"
v-if=
"info.cardId"
>
{{
item
.
leftLabel
item
.
leftLabel
}}
</text
}}
</text
><text>
{{
item
.
label
}}
</text></view
><text
:style=
"item.labelStyle"
>
{{
item
.
label
}}
</text></view
>
>
</view>
</view>
</view>
</view>
...
@@ -87,6 +87,7 @@
...
@@ -87,6 +87,7 @@
<view>
{{
item
.
title
}}
</view>
<view>
{{
item
.
title
}}
</view>
</view>
</view>
</view>
</view>
<AdvertisementSwiper
v-if=
"showAdvertisement"
@
click=
"handleClickAdvertisement"
/>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<image
<image
class=
"bottom-image"
class=
"bottom-image"
...
@@ -105,7 +106,7 @@
...
@@ -105,7 +106,7 @@
</view>
</view>
<MaskTip
<MaskTip
:show
.
sync=
"showMask"
:show
.
sync=
"showMask"
imageName=
"mengce
ng1
.png"
imageName=
"mengce
gn-xuanti
.png"
:imageStyle=
"imageStyle0"
:imageStyle=
"imageStyle0"
/>
/>
<MaskTip
<MaskTip
...
@@ -121,9 +122,10 @@ import SubjectStatistics from '@/components/subject-statistics'
...
@@ -121,9 +122,10 @@ import SubjectStatistics from '@/components/subject-statistics'
import
ExperiencePop
from
'@/components/experience-pop'
import
ExperiencePop
from
'@/components/experience-pop'
import
ToastPop
from
'@/components/toast-pop'
import
ToastPop
from
'@/components/toast-pop'
import
MaskTip
from
'@/components/mask-tip'
import
MaskTip
from
'@/components/mask-tip'
import
AdvertisementSwiper
from
'@/components/advertisement-swiper'
export
default
{
export
default
{
components
:
{
SubjectStatistics
,
ExperiencePop
,
ToastPop
,
MaskTip
},
components
:
{
SubjectStatistics
,
ExperiencePop
,
ToastPop
,
MaskTip
,
AdvertisementSwiper
},
data
()
{
data
()
{
return
{
return
{
visible
:
false
,
// 免费体验弹窗
visible
:
false
,
// 免费体验弹窗
...
@@ -178,12 +180,17 @@ export default {
...
@@ -178,12 +180,17 @@ export default {
image
:
process
.
uniEnv
.
qn_base_url
+
'quanbushiti.png'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'quanbushiti.png'
,
},
},
{
{
name
:
'模拟考试'
,
name
:
this
.
havingExamination
?
'继续考试'
:
'模拟考试'
,
label
:
'真题模拟强化'
,
label
:
this
.
havingExamination
?
'有考试未完成'
:
'真题模拟强化'
,
labelStyle
:
this
.
havingExamination
?
'color: #FA5A49'
:
''
,
image
:
process
.
uniEnv
.
qn_base_url
+
'monishiti.png'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'monishiti.png'
,
},
},
]
]
},
},
// 有进行中的考试
havingExamination
()
{
return
false
},
examText
()
{
examText
()
{
return
this
.
info
.
cardId
?
'/'
+
this
.
info
.
totalExam
:
'题库进阶练习'
return
this
.
info
.
cardId
?
'/'
+
this
.
info
.
totalExam
:
'题库进阶练习'
},
},
...
@@ -271,8 +278,11 @@ export default {
...
@@ -271,8 +278,11 @@ export default {
return
`width:640rpx;margin-top:
${
this
.
tipTop
}
rpx;margin-left:56rpx;`
return
`width:640rpx;margin-top:
${
this
.
tipTop
}
rpx;margin-left:56rpx;`
},
},
imageStyle0
()
{
imageStyle0
()
{
return
`width:5
02
rpx;margin-top:
${
this
.
tipTop0
}
rpx`
return
`width:5
70
rpx;margin-top:
${
this
.
tipTop0
}
rpx`
},
},
showAdvertisement
()
{
return
true
}
},
},
watch
:
{
watch
:
{
'detail.totalCount'
(
val
)
{
'detail.totalCount'
(
val
)
{
...
@@ -509,10 +519,15 @@ export default {
...
@@ -509,10 +519,15 @@ export default {
},
},
})
})
}
else
{
}
else
{
// 模拟考试
if
(
this
.
havingExamination
)
{
this
.
$u
.
route
({
// 继续考试
url
:
'pages/learn/beginAnswer'
,
this
.
handleContinue
()
})
}
else
{
// 模拟考试
this
.
$u
.
route
({
url
:
'pages/learn/beginAnswer'
,
})
}
}
}
}
else
if
(
this
.
info
.
id
)
{
}
else
if
(
this
.
info
.
id
)
{
// 已选题库
// 已选题库
...
@@ -522,6 +537,40 @@ export default {
...
@@ -522,6 +537,40 @@ export default {
this
.
show
=
true
this
.
show
=
true
}
}
},
},
// 继续考试
handleContinue
()
{
const
params
=
{
questionWarehouseId
:
this
.
questionWarehouseId
,
paperId
:
this
.
info
.
id
,
}
uni
.
showLoading
({
title
:
'载入试题中'
,
})
// 埋点-去模拟考试
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
params
,
}
getApp
().
track
(
'applyExam-beginAnswerPage'
,
trackParams
)
// 不用调这个获取id的
this
.
$u
.
api
.
applyExam
(
params
).
then
((
res
)
=>
{
uni
.
hideLoading
()
if
(
res
)
{
this
.
$u
.
route
({
url
:
'/pages/learn/answer'
,
params
:
{
recordId
:
res
.
id
,
source
:
3
,
passPoint
:
this
.
info
.
passPoint
,
totalPoint
:
this
.
info
.
totalPoint
,
duration
:
this
.
info
.
durationNumber
,
},
})
}
})
},
handleClick
(
path
,
params
)
{
handleClick
(
path
,
params
)
{
if
(
!
this
.
checkToken
())
{
if
(
!
this
.
checkToken
())
{
return
return
...
@@ -602,10 +651,9 @@ export default {
...
@@ -602,10 +651,9 @@ export default {
if
(
this
.
firstLauch
)
{
if
(
this
.
firstLauch
)
{
this
.
$u
.
vuex
(
'firstLauch'
,
false
)
this
.
$u
.
vuex
(
'firstLauch'
,
false
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
console
.
log
(
uni
.
getSystemInfoSync
().
statusBarHeight
)
uni
.
getSystemInfo
({
uni
.
getSystemInfo
({
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
this
.
tipTop0
=
res
.
statusBarHeight
*
2
+
15
this
.
tipTop0
=
res
.
statusBarHeight
*
2
+
70
this
.
showMask
=
true
this
.
showMask
=
true
},
},
})
})
...
@@ -629,6 +677,14 @@ export default {
...
@@ -629,6 +677,14 @@ export default {
},
},
})
})
},
},
handleClickAdvertisement
(
id
)
{
this
.
$u
.
route
({
url
:
'pages/advertisement/questionnaire'
,
params
:
{
advertisementId
:
id
,
},
})
}
},
},
}
}
</
script
>
</
script
>
...
@@ -745,7 +801,7 @@ export default {
...
@@ -745,7 +801,7 @@ export default {
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
margin
:
30rpx
0
14
0rpx
0
;
margin
:
30rpx
0
3
0rpx
0
;
.sub-content-item
{
.sub-content-item
{
color
:
#5a6073
;
color
:
#5a6073
;
font-size
:
26rpx
;
font-size
:
26rpx
;
...
@@ -809,6 +865,7 @@ export default {
...
@@ -809,6 +865,7 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#adbdd4
;
color
:
#adbdd4
;
margin-top
:
32rpx
;
.bottom-image
{
.bottom-image
{
width
:
520rpx
;
width
:
520rpx
;
height
:
28rpx
;
height
:
28rpx
;
...
...
src/pages/learn/answer.vue
View file @
cb7c4243
...
@@ -122,6 +122,8 @@
...
@@ -122,6 +122,8 @@
>
>
</dailyPop>
</dailyPop>
</view>
</view>
<!-- 返回提示窗口 -->
<ToastPop
:visible
.
sync=
"showPause"
:data=
"pauseData"
type=
"pause"
@
click=
"handleClickPause"
@
cancel=
"handleClickRestart"
/>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
...
@@ -133,6 +135,7 @@ import answerOperationTips from '@/components/answer-operation-tips/index.vue'
...
@@ -133,6 +135,7 @@ import answerOperationTips from '@/components/answer-operation-tips/index.vue'
import
answerCompletePop
from
'@/components/answer-complete-pop/index.vue'
import
answerCompletePop
from
'@/components/answer-complete-pop/index.vue'
import
dailyPop
from
'@/components/daily-pop/index.vue'
import
dailyPop
from
'@/components/daily-pop/index.vue'
import
Utils
from
'./utils.js'
import
Utils
from
'./utils.js'
import
ToastPop
from
'@/components/toast-pop'
const
NO_PREV_PAGE
=
-
1
const
NO_PREV_PAGE
=
-
1
const
NO_NEXT_PAGE
=
-
2
const
NO_NEXT_PAGE
=
-
2
...
@@ -143,6 +146,7 @@ export default {
...
@@ -143,6 +146,7 @@ export default {
answerOperationTips
,
answerOperationTips
,
answerCompletePop
,
answerCompletePop
,
dailyPop
,
dailyPop
,
ToastPop
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -189,7 +193,11 @@ export default {
...
@@ -189,7 +193,11 @@ export default {
// 考试题数
// 考试题数
totalPoint
:
100
,
totalPoint
:
100
,
// 已做题数
// 已做题数
count
:
0
count
:
0
,
// 后退之后弹出暂停弹窗
showPause
:
false
,
// 答题和未答题
pauseData
:
{}
}
}
},
},
computed
:
{
computed
:
{
...
@@ -368,7 +376,12 @@ export default {
...
@@ -368,7 +376,12 @@ export default {
return
accumulator
return
accumulator
},
0
)
},
0
)
if
(
count
>
0
)
{
if
(
count
>
0
)
{
this
.
handPapers
()
// 显示暂停弹窗
this
.
pauseData
=
{
answered
:
count
,
noStart
:
this
.
list
.
length
-
count
}
this
.
showPause
=
true
return
return
}
}
}
}
...
@@ -580,6 +593,52 @@ export default {
...
@@ -580,6 +593,52 @@ export default {
this
.
complete
.
type
=
fraction
<
this
.
passPoint
?
'fail'
:
'pass'
this
.
complete
.
type
=
fraction
<
this
.
passPoint
?
'fail'
:
'pass'
if
(
type
!==
1
)
this
.
complete
.
visible
=
true
if
(
type
!==
1
)
this
.
complete
.
visible
=
true
},
},
// 点击了暂停弹窗的暂停
handleClickPause
()
{
const
params
=
{
answer
:
info
.
userAnswer
,
answerRight
:
info
.
result
===
'pass'
,
questionId
:
info
.
id
,
questionWarehouseId
:
this
.
questionWarehouseId
,
recordId
:
this
.
recordId
,
source
:
this
.
source
,
}
// 埋点-暂停答题
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
params
}
getApp
().
track
(
'getUserQuestionWareHouse-questionnaire'
,
trackParams
)
this
.
$u
.
api
.
getUserQuestionWareHouse
()
.
then
((
res
)
=>
{
this
.
$u
.
route
({
type
:
'back'
,
})
})
.
catch
((
err
)
=>
{
this
.
$u
.
route
({
type
:
'back'
,
})
console
.
log
(
err
)
})
},
// 点击了暂停弹窗的重新开始
handleClickRestart
()
{
this
.
$u
.
route
({
url
:
'/pages/learn/answer'
,
type
:
'redirectTo'
,
params
:
{
recordId
:
this
.
recordId
,
source
:
this
.
source
,
passPoint
:
this
.
passPoint
,
totalPoint
:
this
.
totalPoint
,
},
})
},
// 考试成绩弹框确认
// 考试成绩弹框确认
submit
()
{
submit
()
{
const
data
=
{
const
data
=
{
...
...
src/pages/learn/detail.vue
View file @
cb7c4243
This diff is collapsed.
Click to expand it.
src/pages/learn/selectedList.vue
View file @
cb7c4243
...
@@ -145,7 +145,7 @@ export default {
...
@@ -145,7 +145,7 @@ export default {
.selected-list-content
{
.selected-list-content
{
height
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow
:
auto
;
margin
-top
:
24rpx
;
padding
-top
:
24rpx
;
.label-content
{
.label-content
{
margin-bottom
:
44rpx
;
margin-bottom
:
44rpx
;
.label-item
{
.label-item
{
...
...
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