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
2b46ef27
Commit
2b46ef27
authored
Jul 24, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of
https://git.banshouhui.com/wuzhenzhe/study
into dev-v1.0.0
parents
e39f3951
b72a4a28
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
155 additions
and
53 deletions
+155
-53
pages.json
src/pages.json
+5
-11
answer.vue
src/pages/learn/answer.vue
+5
-21
boundQuestions.vue
src/pages/learn/boundQuestions.vue
+64
-1
detail.vue
src/pages/learn/detail.vue
+10
-11
index.vue
src/pages/login/index.vue
+71
-9
No files found.
src/pages.json
View file @
2b46ef27
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
"name"
:
"login"
,
"name"
:
"login"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"授权登录"
,
"navigationBarTitleText"
:
"授权登录"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
...
@@ -91,16 +92,6 @@
...
@@ -91,16 +92,6 @@
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
},
{
"path"
:
"detail"
,
"name"
:
"learnDetail"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
//
题库详情
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
{
"path"
:
"selectCategory"
,
"path"
:
"selectCategory"
,
"name"
:
"learnSelectCategory"
,
"name"
:
"learnSelectCategory"
,
...
@@ -230,7 +221,10 @@
...
@@ -230,7 +221,10 @@
"path"
:
"detail"
,
"path"
:
"detail"
,
"name"
:
"certDetail"
,
"name"
:
"certDetail"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"证书详情"
"navigationBarTitleText"
:
"证书详情"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
false
}
}
}
}
]
]
...
...
src/pages/learn/answer.vue
View file @
2b46ef27
...
@@ -292,25 +292,15 @@ export default {
...
@@ -292,25 +292,15 @@ export default {
this
.
currentIndex
=
current
this
.
currentIndex
=
current
if
(
current
==
NO_PREV_PAGE
||
current
==
NO_NEXT_PAGE
)
{
if
(
current
==
NO_PREV_PAGE
||
current
==
NO_NEXT_PAGE
)
{
if
(
this
.
requesting
)
{
if
(
this
.
requesting
)
{
uni
.
showToast
({
return
this
.
$u
.
toast
(
'数据加载中'
)
title
:
'数据加载中'
,
icon
:
'none'
,
})
return
}
}
if
(
current
==
NO_PREV_PAGE
)
{
if
(
current
==
NO_PREV_PAGE
)
{
return
uni
.
showToast
({
return
this
.
$u
.
toast
(
'已经是第一道试题'
)
title
:
'已经是第一道试题'
,
icon
:
'none'
,
})
}
}
if
(
current
==
NO_NEXT_PAGE
)
{
if
(
current
==
NO_NEXT_PAGE
)
{
return
uni
.
showToast
({
return
this
.
$u
.
toast
(
'已经是最后一道试题'
)
title
:
'已经是最后一道试题'
,
icon
:
'none'
,
})
}
}
}
}
...
@@ -424,10 +414,7 @@ export default {
...
@@ -424,10 +414,7 @@ export default {
},
0
)
},
0
)
if
(
count
===
this
.
total
)
{
if
(
count
===
this
.
total
)
{
return
uni
.
showToast
({
return
this
.
$u
.
toast
(
'您已经答完全部试题'
)
title
:
'您已经答完全部试题'
,
icon
:
'none'
,
})
}
}
}
}
...
@@ -617,10 +604,7 @@ export default {
...
@@ -617,10 +604,7 @@ export default {
this
.
list
=
list
this
.
list
=
list
if
(
this
.
list
.
length
===
0
)
{
if
(
this
.
list
.
length
===
0
)
{
uni
.
showToast
({
this
.
$u
.
toast
(
'暂无数据'
)
title
:
'暂无数据'
,
icon
:
'none'
,
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$u
.
route
({
this
.
$u
.
route
({
delta
:
1
,
delta
:
1
,
...
...
src/pages/learn/boundQuestions.vue
View file @
2b46ef27
...
@@ -52,6 +52,7 @@ export default {
...
@@ -52,6 +52,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
relationId
:
0
,
// 绑卡用
relationId
:
0
,
// 绑卡用
info
:
{}
}
}
},
},
...
@@ -99,7 +100,27 @@ export default {
...
@@ -99,7 +100,27 @@ export default {
},
},
})
})
},
},
handleClickBuy
()
{},
handleClickBuy
()
{
const
lists
=
[
{
questionWarehouseId
:
this
.
questionWarehouseId
,
amount
:
this
.
info
.
discount
,
count
:
1
,
}
]
const
data
=
{
instrtutionId
:
getApp
().
globalData
.
orgId
,
orders
:
JSON
.
stringify
(
lists
),
openId
:
this
.
openId
,
}
uni
.
showLoading
({
title
:
'加载中'
,
})
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
this
.
pay
(
res
)
})
},
handleChange
()
{
handleChange
()
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/manualBinding'
,
url
:
'pages/learn/manualBinding'
,
...
@@ -108,6 +129,48 @@ export default {
...
@@ -108,6 +129,48 @@ export default {
},
},
})
})
},
},
pay
(
data
)
{
uni
.
requestPayment
({
provider
:
'wxpay'
,
timeStamp
:
data
.
timeStamp
,
nonceStr
:
data
.
nonce_str
,
package
:
`prepay_id=
${
data
.
prepay_id
}
`
,
signType
:
'MD5'
,
paySign
:
data
.
sign
,
success
:
(
res
)
=>
{
console
.
log
(
'success:'
+
JSON
.
stringify
(
res
))
this
.
checkPayStatus
(
data
.
out_trade_no
)
},
fail
:
(
err
)
=>
{
console
.
log
(
'fail:'
+
JSON
.
stringify
(
err
))
if
(
err
.
errMsg
===
'requestPayment:fail cancel'
)
{
this
.
$u
.
toast
(
'取消支付'
)
}
else
{
this
.
checkPayStatus
(
data
.
out_trade_no
)
}
},
})
},
checkPayStatus
(
no
)
{
const
params
=
{
outTradeNo
:
no
,
}
uni
.
showLoading
({
title
:
'支付中'
,
})
this
.
$u
.
api
.
payQuery
(
params
).
then
((
res
)
=>
{
uni
.
hideLoading
()
if
(
res
.
trade_state
===
'SUCCESS'
)
{
this
.
$u
.
toast
(
'支付成功'
)
}
else
if
(
res
.
trade_state
===
'NOTPAY'
)
{
this
.
$u
.
toast
(
'请稍后核实订单状态,不要重复发起支付'
)
}
else
if
(
res
.
trade_state
===
'PAYERROR'
)
{
this
.
$u
.
toast
(
'支付失败'
)
}
else
{
this
.
$u
.
toast
(
res
.
trade_state_desc
)
}
})
},
},
},
}
}
</
script
>
</
script
>
...
...
src/pages/learn/detail.vue
View file @
2b46ef27
...
@@ -90,7 +90,6 @@
...
@@ -90,7 +90,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
md5
from
'@/common/md5.js'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -104,14 +103,7 @@ export default {
...
@@ -104,14 +103,7 @@ export default {
multipleChoice
:
322
,
multipleChoice
:
322
,
trueOrFalse
:
526
,
trueOrFalse
:
526
,
total
:
986
,
total
:
986
,
},
}
lists
:
[
{
questionWarehouseId
:
1
,
amount
:
0.01
,
count
:
1
,
},
],
}
}
},
},
...
@@ -214,9 +206,16 @@ export default {
...
@@ -214,9 +206,16 @@ export default {
})
})
},
},
handleClickBuy
()
{
handleClickBuy
()
{
const
lists
=
[
{
questionWarehouseId
:
this
.
questionWarehouseId
,
amount
:
this
.
info
.
discount
,
count
:
1
,
}
]
const
data
=
{
const
data
=
{
instrtutionId
:
1
,
instrtutionId
:
getApp
().
globalData
.
orgId
,
orders
:
JSON
.
stringify
(
this
.
lists
),
orders
:
JSON
.
stringify
(
lists
),
openId
:
this
.
openId
,
openId
:
this
.
openId
,
}
}
uni
.
showLoading
({
uni
.
showLoading
({
...
...
src/pages/login/index.vue
View file @
2b46ef27
<
template
>
<
template
>
<view
class=
"begin-answer"
>
<u-navbar
back-icon-color=
"#000000"
background=
"transparent"
titleColor=
"#000000"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"content"
>
<view
class=
"content"
>
<view>
<view>
<uni-icons
type=
"weixin"
size=
"120"
color=
"#04BE02"
></uni-icons>
<uni-icons
type=
"weixin"
size=
"120"
color=
"#04BE02"
></uni-icons>
</view>
</view>
<view
class=
"view-image"
>
<u-image
:src=
"targetImage"
class=
"target-image"
width=
"160"
height=
"160"
></u-image>
</view>
<view
class=
"target"
>
<text
class=
"tips"
>
想要轻松考过,首选模考大师
</text>
</view>
<view
class=
"text-area"
>
<view
class=
"text-area"
>
<button
class=
"bottom"
type=
"primary"
@
tap=
"wxLogin"
>
授权登录
</button>
<button
class=
"bottom"
type=
"primary"
@
tap=
"wxLogin"
>
授权登录
</button>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -17,8 +37,12 @@ export default {
...
@@ -17,8 +37,12 @@ export default {
host
:
''
,
//配置为自己的额服务器即可
host
:
''
,
//配置为自己的额服务器即可
}
}
},
},
onShow
()
{
computed
:
{
targetImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'LOGO@3x.png'
},
},
},
onShow
()
{},
methods
:
{
methods
:
{
wxLogin
()
{
wxLogin
()
{
// 获取code 小程序专有,用户登录凭证。
// 获取code 小程序专有,用户登录凭证。
...
@@ -40,7 +64,7 @@ export default {
...
@@ -40,7 +64,7 @@ export default {
orgId
:
getApp
().
globalData
.
orgId
orgId
:
getApp
().
globalData
.
orgId
}
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
,
})
})
this
.
$u
.
api
.
loginWechatAuth
(
data
).
then
((
res
)
=>
{
this
.
$u
.
api
.
loginWechatAuth
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -69,6 +93,23 @@ export default {
...
@@ -69,6 +93,23 @@ export default {
</
script
>
</
script
>
<
style
>
<
style
>
::-webkit-scrollbar
{
width
:
0
;
height
:
0
;
color
:
transparent
;
display
:
none
;
}
.begin-answer
{
display
:
flex
;
flex-direction
:
column
;
background-color
:
#ffffff
;
background-size
:
100%
920
rpx
;
background-repeat
:
no-repeat
;
height
:
120vh
;
position
:
absolute
;
top
:
0
;
width
:
100%
;
}
.content
{
.content
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -78,10 +119,31 @@ export default {
...
@@ -78,10 +119,31 @@ export default {
.text-area
{
.text-area
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
position
:
relative
;
margin-top
:
500
rpx
;
}
.bottom
{
width
:
600
rpx
;
height
:
104
rpx
;
border-radius
:
52
rpx
;
background-color
:
#2953ff
!important
;
}
}
.title
{
.title
{
font-size
:
36
rpx
;
font-size
:
36
rpx
;
color
:
#8f8f94
;
color
:
#8f8f94
;
}
}
.target
{
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
}
.tips
{
font-size
:
40
rpx
;
color
:
#adbdd4
;
margin-top
:
64
rpx
;
}
.target-image
{
margin
:
auto
;
padding-top
:
450
rpx
;
}
</
style
>
</
style
>
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