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
568dc59e
Commit
568dc59e
authored
Jul 24, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0
parents
833802ec
e2e85b81
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
210 additions
and
55 deletions
+210
-55
.env.dev.js
.env.dev.js
+2
-2
learn.js
src/api/learn.js
+8
-2
http.interceptor.js
src/common/http.interceptor.js
+2
-1
index.vue
src/pages/index/index.vue
+59
-17
boundQuestions.vue
src/pages/learn/boundQuestions.vue
+19
-5
boundTest.vue
src/pages/learn/boundTest.vue
+58
-19
detail.vue
src/pages/learn/detail.vue
+11
-3
manualBinding.vue
src/pages/learn/manualBinding.vue
+49
-4
selectedList.vue
src/pages/learn/selectedList.vue
+2
-2
No files found.
.env.dev.js
View file @
568dc59e
const
UNI_APP
=
{
const
UNI_APP
=
{
apiUrl
:
'http://192.168.0.20
4
:8760'
,
apiUrl
:
'http://192.168.0.20
8
:8760'
,
qn_base_url
:
'https://qn-static.banshouhui.com/study/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/study/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
uCenterUrl
:
'http://192.168.0.5:8093/'
,
//'http://rest-u.yunya.com/'
uCenterUrl
:
'http://192.168.0.5:8093/'
,
//'http://rest-u.yunya.com/'
argoDebugMode
:
1
,
argoDebugMode
:
1
,
version
:
'v1.0.0'
,
version
:
'v1.0.0'
,
}
}
...
...
src/api/learn.js
View file @
568dc59e
...
@@ -79,8 +79,13 @@ let learnApiFun = function(vm) {
...
@@ -79,8 +79,13 @@ let learnApiFun = function(vm) {
let
getMyQuestionWarehouseList
=
async
(
params
=
{})
=>
let
getMyQuestionWarehouseList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/rest/question/query/getMyQuestionWarehouseList'
,
params
)
await
vm
.
$u
.
get
(
'/rest/question/query/getMyQuestionWarehouseList'
,
params
)
let
bindCard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/rest/card/bind'
,
params
)
let
searchQuestion
=
async
(
params
=
{})
=>
let
searchQuestion
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
`/rest/question/searchQuestion/
${
params
.
questionWarehouseId
}
`
,
params
)
await
vm
.
$u
.
get
(
`/rest/question/searchQuestion/
${
params
.
questionWarehouseId
}
`
,
params
)
const
learnApi
=
{
const
learnApi
=
{
getQuestion
,
getQuestion
,
...
@@ -101,7 +106,8 @@ let learnApiFun = function(vm) {
...
@@ -101,7 +106,8 @@ let learnApiFun = function(vm) {
queryExamRecord
,
queryExamRecord
,
queryExamRecordOne
,
queryExamRecordOne
,
getMyQuestionWarehouseList
,
getMyQuestionWarehouseList
,
searchQuestion
bindCard
,
searchQuestion
,
}
}
return
learnApi
return
learnApi
}
}
...
...
src/common/http.interceptor.js
View file @
568dc59e
...
@@ -55,7 +55,7 @@ const install = (Vue, vm) => {
...
@@ -55,7 +55,7 @@ const install = (Vue, vm) => {
}
else
{
}
else
{
// 如果返回false,则会调用Promise的reject回调,
// 如果返回false,则会调用Promise的reject回调,
vm
.
$u
.
toast
(
data
.
msg
)
vm
.
$u
.
toast
(
data
.
msg
)
return
data
return
false
}
}
}
else
if
(
res
.
statusCode
===
401
)
{
}
else
if
(
res
.
statusCode
===
401
)
{
// 登录过期
// 登录过期
...
@@ -68,6 +68,7 @@ const install = (Vue, vm) => {
...
@@ -68,6 +68,7 @@ const install = (Vue, vm) => {
}
else
{
}
else
{
// HTTP状态非200
// HTTP状态非200
vm
.
$u
.
toast
(
data
.
msg
||
'服务器错误'
)
vm
.
$u
.
toast
(
data
.
msg
||
'服务器错误'
)
return
false
}
}
}
}
}
}
...
...
src/pages/index/index.vue
View file @
568dc59e
...
@@ -17,7 +17,10 @@
...
@@ -17,7 +17,10 @@
></u-navbar>
></u-navbar>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"exam-title-view"
@
click=
"$u.throttle(handleSelect, 500)"
>
<view
class=
"exam-title-view"
@
click=
"$u.throttle(handleSelect, 500)"
>
<text>
{{
title
}}
</text>
<view
class=
"title-loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<text
v-else
>
{{
title
}}
</text>
<u-icon
class=
"icon-view"
name=
"arrow-up-fill"
></u-icon>
<u-icon
class=
"icon-view"
name=
"arrow-up-fill"
></u-icon>
</view>
</view>
<view
v-if=
"noExam"
class=
"tip-view"
>
<view
v-if=
"noExam"
class=
"tip-view"
>
...
@@ -108,6 +111,8 @@ export default {
...
@@ -108,6 +111,8 @@ export default {
detail
:
{
questionWarehouse
:
{}
},
detail
:
{
questionWarehouse
:
{}
},
selected
:
{},
selected
:
{},
data
:
{},
data
:
{},
relationId
:
0
,
// 绑卡用
loading
:
false
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -131,7 +136,7 @@ export default {
...
@@ -131,7 +136,7 @@ export default {
{
{
name
:
'全部试题'
,
name
:
'全部试题'
,
label
:
this
.
examText
,
label
:
this
.
examText
,
leftLabel
:
this
.
selected
.
count
,
// 已做题目数
leftLabel
:
String
(
this
.
finishCount
)
,
// 已做题目数
image
:
process
.
uniEnv
.
qn_base_url
+
'quanbushiti.png'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'quanbushiti.png'
,
},
},
{
{
...
@@ -141,9 +146,14 @@ export default {
...
@@ -141,9 +146,14 @@ export default {
},
},
]
]
},
},
finishCount
()
{
return
this
.
questionList
.
reduce
((
accumulator
,
currentValue
)
=>
{
if
(
currentValue
.
id
)
accumulator
++
return
accumulator
},
0
)
},
examText
()
{
examText
()
{
return
this
.
info
.
cardId
?
'/'
+
this
.
selected
.
totalExam
:
'题库进阶练习'
return
this
.
info
.
cardId
?
'/'
+
this
.
info
.
totalExam
:
'题库进阶练习'
},
},
info
()
{
info
()
{
return
{
return
{
...
@@ -152,7 +162,9 @@ export default {
...
@@ -152,7 +162,9 @@ export default {
this
.
detail
.
questionWarehouse
&&
this
.
detail
.
questionWarehouse
.
cardId
,
this
.
detail
.
questionWarehouse
&&
this
.
detail
.
questionWarehouse
.
cardId
,
provinceName
:
this
.
provinceName
,
provinceName
:
this
.
provinceName
,
experience
:
experience
:
this
.
selected
.
state
&&
!
this
.
detail
.
questionWarehouse
.
cardId
this
.
selected
.
state
&&
(
!
this
.
detail
.
questionWarehouse
||
!
this
.
detail
.
questionWarehouse
.
cardId
)
?
true
?
true
:
false
,
:
false
,
pass
:
this
.
$u
.
random
(
95
,
99
)
+
'%'
,
pass
:
this
.
$u
.
random
(
95
,
99
)
+
'%'
,
...
@@ -240,17 +252,27 @@ export default {
...
@@ -240,17 +252,27 @@ export default {
this
.
visible
=
info
.
state
this
.
visible
=
info
.
state
this
.
queryMyQuestionWarehouseDetail
(
this
.
selected
.
id
)
this
.
queryMyQuestionWarehouseDetail
(
this
.
selected
.
id
)
}
}
let
refresh
=
page
.
refresh
if
(
refresh
)
{
page
.
refresh
=
null
this
.
queryMyQuestionWarehouseDetail
(
this
.
info
.
id
)
}
},
},
methods
:
{
methods
:
{
// 题库详情
// 题库详情
async
queryQuestionWarehouseById
(
id
)
{
queryQuestionWarehouseById
(
id
)
{
let
res
=
await
this
.
$u
.
api
this
.
$u
.
api
.
queryQuestionWarehouseById
(
id
)
.
queryQuestionWarehouseById
(
id
)
.
then
((
res
)
=>
{
this
.
loading
=
false
this
.
data
=
res
||
{
questionWarehouse
:
{}
}
this
.
selected
=
this
.
data
.
questionWarehouse
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
loading
=
false
console
.
log
(
err
)
console
.
log
(
err
)
})
})
this
.
data
=
res
||
{
questionWarehouse
:
{}
}
this
.
selected
=
this
.
data
.
questionWarehouse
// this.$u.vuex(
// this.$u.vuex(
// 'experience',
// 'experience',
// this.selected.state && !this.detail.questionWarehouse.cardId
// this.selected.state && !this.detail.questionWarehouse.cardId
...
@@ -259,14 +281,20 @@ export default {
...
@@ -259,14 +281,20 @@ export default {
// )
// )
},
},
// 学生查询题库首页
// 学生查询题库首页
async
queryMyQuestionWarehouseDetail
(
id
)
{
queryMyQuestionWarehouseDetail
(
id
)
{
let
res
=
await
this
.
$u
.
api
this
.
loading
=
true
this
.
$u
.
api
.
queryMyQuestionWarehouseDetail
(
id
)
.
queryMyQuestionWarehouseDetail
(
id
)
.
then
((
res
)
=>
{
this
.
detail
=
res
||
{
questionWarehouse
:
{}
}
this
.
relationId
=
res
.
questionWarehouse
.
id
this
.
queryQuestionWarehouseById
(
res
.
questionWarehouse
.
questionWarehouseId
)
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
})
})
this
.
detail
=
res
||
{
questionWarehouse
:
{}
}
this
.
queryQuestionWarehouseById
(
res
.
questionWarehouse
.
questionWarehouseId
)
},
},
handleSelect
()
{
handleSelect
()
{
...
@@ -301,6 +329,9 @@ export default {
...
@@ -301,6 +329,9 @@ export default {
// this.show = true
// this.show = true
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/detail'
,
url
:
'pages/learn/detail'
,
params
:
{
relationId
:
this
.
relationId
,
},
})
})
}
}
}
else
{
}
else
{
...
@@ -319,6 +350,9 @@ export default {
...
@@ -319,6 +350,9 @@ export default {
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/'
+
str
,
url
:
'pages/learn/'
+
str
,
params
:
{
relationId
:
this
.
relationId
,
},
})
})
},
},
handleClickItem
(
key
)
{
handleClickItem
(
key
)
{
...
@@ -375,6 +409,9 @@ export default {
...
@@ -375,6 +409,9 @@ export default {
// this.show = true
// this.show = true
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/detail'
,
url
:
'pages/learn/detail'
,
params
:
{
relationId
:
this
.
relationId
,
},
})
})
}
else
{
}
else
{
// 未选题库
// 未选题库
...
@@ -399,6 +436,9 @@ export default {
...
@@ -399,6 +436,9 @@ export default {
// this.show = true
// this.show = true
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/detail'
,
url
:
'pages/learn/detail'
,
params
:
{
relationId
:
this
.
relationId
,
},
})
})
}
else
{
}
else
{
this
.
$u
.
route
({
this
.
$u
.
route
({
...
@@ -466,10 +506,12 @@ export default {
...
@@ -466,10 +506,12 @@ export default {
font-size
:
40rpx
;
font-size
:
40rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
.titleImage
{
.title-loading
{
width
:
40rpx
;
width
:
240rpx
;
height
:
40rpx
;
height
:
56rpx
;
margin-right
:
14rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
.icon-view
{
.icon-view
{
font-size
:
24rpx
;
font-size
:
24rpx
;
...
...
src/pages/learn/boundQuestions.vue
View file @
568dc59e
...
@@ -50,7 +50,9 @@
...
@@ -50,7 +50,9 @@
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{}
return
{
relationId
:
0
,
// 绑卡用
}
},
},
computed
:
{
computed
:
{
...
@@ -74,7 +76,11 @@ export default {
...
@@ -74,7 +76,11 @@ export default {
}
}
},
},
},
},
onLoad
()
{},
onLoad
(
e
)
{
if
(
e
&&
e
.
relationId
)
{
this
.
relationId
=
e
.
relationId
}
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
wx
.
scanCode
({
wx
.
scanCode
({
...
@@ -83,9 +89,10 @@ export default {
...
@@ -83,9 +89,10 @@ export default {
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
result
)
{
if
(
res
.
result
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/
manualBinding
'
,
url
:
'pages/learn/
boundTest
'
,
params
:
{
params
:
{
code
:
res
.
result
,
code
:
res
.
result
,
relationId
:
this
.
relationId
,
},
},
})
})
}
}
...
@@ -93,7 +100,14 @@ export default {
...
@@ -93,7 +100,14 @@ export default {
})
})
},
},
handleClickBuy
()
{},
handleClickBuy
()
{},
handleChange
()
{},
handleChange
()
{
this
.
$u
.
route
({
url
:
'pages/learn/manualBinding'
,
params
:
{
relationId
:
this
.
relationId
,
},
})
},
},
},
}
}
</
script
>
</
script
>
...
@@ -132,7 +146,7 @@ export default {
...
@@ -132,7 +146,7 @@ export default {
.first-line
{
.first-line
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
5
6
rpx
;
margin-bottom
:
5
0
rpx
;
.blue-text
{
.blue-text
{
color
:
#2953ff
;
color
:
#2953ff
;
...
...
src/pages/learn/boundTest.vue
View file @
568dc59e
...
@@ -9,27 +9,34 @@
...
@@ -9,27 +9,34 @@
title-bold
title-bold
></u-navbar>
></u-navbar>
<view
class=
"body-view"
>
<view
class=
"body-view"
>
<
image
class=
"image-view"
:src=
"successImage"
></image
>
<
!--
<image
class=
"image-view"
:src=
"successImage"
></image>
--
>
<view
class=
"content-view"
>
学习卡已绑定成功
</view>
<view
class=
"content-view"
>
是否绑定该学习卡
</view>
<view
class=
"tip-view"
>
可以前往首页进行答题或模拟考试学习
</view>
<view
class=
"tip-view"
>
学习卡完成绑定后,不支持解绑操作
</view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<u-button
<u-button
:customStyle=
"buttonStyle"
:customStyle=
"buttonStyle"
@
click=
"handleClick"
@
click=
"handleClick"
type=
"primary"
type=
"primary"
shape=
"circle"
shape=
"circle"
:loading=
"loading"
>
>
去首页
绑定
</u-button>
</u-button>
</view>
</view>
</view>
</view>
<view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{}
return
{
loading
:
false
,
param
:
{
cardNumber
:
''
,
cardSecret
:
''
},
}
},
},
computed
:
{
computed
:
{
...
@@ -41,9 +48,9 @@ export default {
...
@@ -41,9 +48,9 @@ export default {
guize
:
'出题规则'
,
guize
:
'出题规则'
,
}
}
},
},
successImage
()
{
//
successImage() {
return
process
.
uniEnv
.
qn_base_url
+
'shenqingtijiaochenggong.png'
//
return process.uniEnv.qn_base_url + 'shenqingtijiaochenggong.png'
},
//
},
buttonStyle
()
{
buttonStyle
()
{
return
{
return
{
height
:
'104rpx'
,
height
:
'104rpx'
,
...
@@ -55,13 +62,45 @@ export default {
...
@@ -55,13 +62,45 @@ export default {
}
}
},
},
},
},
onLoad
()
{},
onLoad
(
e
)
{
if
(
e
&&
e
.
code
)
{
var
code
=
e
.
code
this
.
param
.
cardNumber
=
code
.
slice
(
0
,
15
)
this
.
param
.
cardSecret
=
code
.
slice
(
15
)
}
if
(
e
&&
e
.
relationId
)
{
this
.
param
.
questionWarehouseId
=
e
.
relationId
}
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
this
.
loading
=
true
this
.
$u
.
api
.
bindCard
(
this
.
param
)
.
then
((
res
)
=>
{
this
.
$refs
.
uToast
.
show
({
title
:
'绑定成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{
this
.
setPageInfo
()
uni
.
switchTab
({
uni
.
switchTab
({
url
:
'/pages/index/index'
,
url
:
'/pages/index/index'
,
})
})
},
},
})
})
.
catch
((
err
)
=>
{
this
.
loading
=
false
})
},
setPageInfo
()
{
var
pages
=
getCurrentPages
()
if
(
pages
.
length
>=
2
)
{
var
page
=
pages
[
pages
.
length
-
2
]
page
.
refresh
=
true
}
},
},
},
}
}
</
script
>
</
script
>
...
@@ -84,13 +123,13 @@ export default {
...
@@ -84,13 +123,13 @@ export default {
.body-view
{
.body-view
{
height
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow
:
auto
;
padding-top
:
1
00rpx
;
padding-top
:
2
00rpx
;
text-align
:
center
;
text-align
:
center
;
.image-view
{
//
.image-view {
margin-top
:
100rpx
;
//
margin-top: 100rpx;
width
:
224rpx
;
//
width: 224rpx;
height
:
224rpx
;
//
height: 224rpx;
}
//
}
.content-view
{
.content-view
{
font-size
:
40rpx
;
font-size
:
40rpx
;
color
:
#2953ff
;
color
:
#2953ff
;
...
@@ -99,7 +138,7 @@ export default {
...
@@ -99,7 +138,7 @@ export default {
.tip-view
{
.tip-view
{
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#9ea5bb
;
color
:
#9ea5bb
;
margin-top
:
1
0
rpx
;
margin-top
:
1
4
rpx
;
}
}
.bottom-view
{
.bottom-view
{
margin-top
:
180rpx
;
margin-top
:
180rpx
;
...
...
src/pages/learn/detail.vue
View file @
568dc59e
...
@@ -91,6 +91,7 @@ import md5 from '@/common/md5.js'
...
@@ -91,6 +91,7 @@ import md5 from '@/common/md5.js'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
relationId
:
0
,
// 绑卡用
info
:
{
info
:
{
title
:
'高处安装、维护、拆除作业人员题库'
,
title
:
'高处安装、维护、拆除作业人员题库'
,
money
:
80.0
,
money
:
80.0
,
...
@@ -180,11 +181,18 @@ export default {
...
@@ -180,11 +181,18 @@ export default {
]
]
},
},
},
},
onLoad
()
{},
onLoad
(
e
)
{
if
(
e
&&
e
.
relationId
)
{
this
.
relationId
=
e
.
relationId
}
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/boundQuestions'
,
url
:
'pages/learn/boundQuestions'
,
params
:
{
relationId
:
this
.
relationId
,
},
})
})
},
},
handleClickBuy
()
{
handleClickBuy
()
{
...
@@ -194,7 +202,7 @@ export default {
...
@@ -194,7 +202,7 @@ export default {
openId
:
this
.
openId
,
openId
:
this
.
openId
,
}
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
,
})
})
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -228,7 +236,7 @@ export default {
...
@@ -228,7 +236,7 @@ export default {
outTradeNo
:
no
,
outTradeNo
:
no
,
}
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'支付中'
title
:
'支付中'
,
})
})
this
.
$u
.
api
.
payQuery
(
params
).
then
((
res
)
=>
{
this
.
$u
.
api
.
payQuery
(
params
).
then
((
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
...
...
src/pages/learn/manualBinding.vue
View file @
568dc59e
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<view
class=
"field-view"
>
<view
class=
"field-view"
>
<input
<input
type=
"number"
type=
"number"
class=
"input-
code
"
class=
"input-
view
"
:value=
"code"
:value=
"code"
placeholder=
"请输入卡号"
placeholder=
"请输入卡号"
:placeholder-style=
"placeplaceholderStyle"
:placeholder-style=
"placeplaceholderStyle"
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<view
class=
"field-title"
>
学习卡密码
</view>
<view
class=
"field-title"
>
学习卡密码
</view>
<view
class=
"field-view"
>
<view
class=
"field-view"
>
<input
<input
class=
"input-
password
"
class=
"input-
view
"
password
password
:value=
"password"
:value=
"password"
placeholder=
"请输入密码"
placeholder=
"请输入密码"
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
<u-button
<u-button
:customStyle=
"customStyle"
:customStyle=
"customStyle"
@
click=
"handleClick"
@
click=
"handleClick"
:loading=
"loading"
type=
"primary"
type=
"primary"
shape=
"circle"
shape=
"circle"
>
>
...
@@ -54,6 +55,9 @@
...
@@ -54,6 +55,9 @@
>
>
</view>
</view>
</view>
</view>
<view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -66,6 +70,8 @@ export default {
...
@@ -66,6 +70,8 @@ export default {
code
:
''
,
code
:
''
,
password
:
''
,
password
:
''
,
focus
:
true
,
focus
:
true
,
loading
:
false
,
relationId
:
0
,
}
}
},
},
...
@@ -93,9 +99,44 @@ export default {
...
@@ -93,9 +99,44 @@ export default {
return
'color:#9EA5BB;font-size:28rpx'
return
'color:#9EA5BB;font-size:28rpx'
},
},
},
},
onLoad
(
e
)
{},
onLoad
(
e
)
{
if
(
e
&&
e
.
relationId
)
{
this
.
relationId
=
e
.
relationId
}
},
methods
:
{
methods
:
{
handleClick
()
{},
handleClick
()
{
this
.
loading
=
true
this
.
$u
.
api
.
bindCard
({
cardNumber
:
this
.
code
,
cardSecret
:
this
.
password
,
questionWarehouseId
:
this
.
relationId
,
})
.
then
((
res
)
=>
{
this
.
$refs
.
uToast
.
show
({
title
:
'绑定成功'
,
type
:
'success'
,
duration
:
1500
,
callback
:
()
=>
{
this
.
setPageInfo
()
uni
.
switchTab
({
url
:
'/pages/index/index'
,
})
},
})
})
.
catch
((
err
)
=>
{
this
.
loading
=
false
})
},
setPageInfo
()
{
var
pages
=
getCurrentPages
()
if
(
pages
.
length
>=
2
)
{
var
page
=
pages
[
pages
.
length
-
2
]
page
.
refresh
=
true
}
},
},
},
}
}
</
script
>
</
script
>
...
@@ -146,6 +187,10 @@ export default {
...
@@ -146,6 +187,10 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
border-right
:
12rpx
;
border-right
:
12rpx
;
padding
:
0
24rpx
;
padding
:
0
24rpx
;
.input-view
{
width
:
100%
;
text-align
:
center
;
}
}
}
}
}
...
...
src/pages/learn/selectedList.vue
View file @
568dc59e
...
@@ -84,10 +84,10 @@ export default {
...
@@ -84,10 +84,10 @@ export default {
})
})
},
},
// 获取题库列表
// 获取题库列表
async
loadList
()
{
loadList
()
{
this
.
loading
=
true
this
.
loading
=
true
let
param
=
{}
let
param
=
{}
let
res
=
await
this
.
$u
.
api
this
.
$u
.
api
.
getMyQuestionWarehouseList
(
param
)
.
getMyQuestionWarehouseList
(
param
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
...
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