Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
51d4b583
提交
51d4b583
authored
7月 07, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updata
上级
9d929bb5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
55 行增加
和
30 行删除
+55
-30
pay.js
src/api/pay.js
+5
-14
answerCard.vue
src/modules/exam-module/components/answerCard.vue
+14
-0
ExamTopic.vue
src/modules/exam-module/src/ExamTopic.vue
+12
-11
index.vue
src/pages/pay/index.vue
+24
-5
没有找到文件。
src/api/pay.js
浏览文件 @
51d4b583
...
@@ -16,21 +16,12 @@ export function getMyOrder() {
...
@@ -16,21 +16,12 @@ export function getMyOrder() {
return
httpRequest
.
get
(
'/zy/v2/mall/order/my'
)
return
httpRequest
.
get
(
'/zy/v2/mall/order/my'
)
}
}
/* 模拟考试设置角色 */
export
function
setRole
(
data
)
{
return
httpRequest
.
post
(
'/zy/v2/examination/role'
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
/* 获取考试状态 */
export
function
getExamStatus
(
data
)
{
return
httpRequest
.
get
(
'/zy/v2/examination/examination-papers-status'
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
/* 获取openid */
/* 获取openid */
export
function
getOpenid
(
data
)
{
export
function
getOpenid
(
data
)
{
return
httpRequest
.
get
(
'/usercenter/user/get-user-openid'
,
data
)
return
httpRequest
.
get
(
'/usercenter/user/get-user-openid'
,
data
)
}
}
/* 监听支付状态 */
export
function
getOrderStatus
()
{
return
httpRequest
.
get
(
'/v2/mall/order/status'
)
}
src/modules/exam-module/components/answerCard.vue
浏览文件 @
51d4b583
...
@@ -94,6 +94,20 @@ export default {
...
@@ -94,6 +94,20 @@ export default {
bottomView
.
style
.
height
=
(
clientHeight
-
topViewH
)
+
'px'
bottomView
.
style
.
height
=
(
clientHeight
-
topViewH
)
+
'px'
console
.
log
(
bottomView
.
style
.
height
)
console
.
log
(
bottomView
.
style
.
height
)
}
}
},
computed
:
{
changeData
()
{
return
this
.
questionsData
}
},
watch
:
{
changeData
:
{
handler
(
newV
,
oldV
)
{
this
.
$forceUpdate
()
console
.
log
(
newV
)
},
deep
:
true
}
}
}
}
}
</
script
>
</
script
>
...
...
src/modules/exam-module/src/ExamTopic.vue
浏览文件 @
51d4b583
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
</div>
</div>
<div
class=
"btn-box"
v-show=
"!topicCard.isShow"
>
<div
class=
"btn-box"
v-show=
"!topicCard.isShow"
>
<div
class=
"padd"
>
<div
class=
"padd"
>
<div
class=
"analysis"
@
click=
"analyShow"
v-if=
"$route.query.id || $route.query.course_id || $route.query.
chapter
_id"
>
查看解析
</div>
<div
class=
"analysis"
@
click=
"analyShow"
v-if=
"$route.query.id || $route.query.course_id || $route.query.
tag
_id"
>
查看解析
</div>
<div
class=
"btn left"
@
click=
"switchQuestions('left')"
v-show=
"currentNum !== 1"
>
上一题
</div>
<div
class=
"btn left"
@
click=
"switchQuestions('left')"
v-show=
"currentNum !== 1"
>
上一题
</div>
<div
class=
"btn right"
@
click=
"switchQuestions('right')"
v-show=
"nextBtnShow"
>
下一题
</div>
<div
class=
"btn right"
@
click=
"switchQuestions('right')"
v-show=
"nextBtnShow"
>
下一题
</div>
</div>
</div>
...
@@ -122,20 +122,22 @@ export default {
...
@@ -122,20 +122,22 @@ export default {
observer
:
true
,
observer
:
true
,
on
:
{
on
:
{
slideChangeTransitionStart
:
function
()
{
slideChangeTransitionStart
:
function
()
{
const
itemDid
=
_this
.
swiper
.
slides
[
_this
.
swiper
.
activeIndex
].
attributes
[
'data-dId'
].
nodeValue
if
(
_this
.
swiper
.
slides
[
_this
.
swiper
.
activeIndex
].
attributes
[
'data-dId'
])
{
const
itemCid
=
_this
.
swiper
.
slides
[
_this
.
swiper
.
activeIndex
].
attributes
[
'data-cId'
].
nodeValue
const
itemDid
=
_this
.
swiper
.
slides
[
_this
.
swiper
.
activeIndex
].
attributes
[
'data-dId'
].
nodeValue
if
(
_this
.
requestData
[
itemCid
])
{
const
itemCid
=
_this
.
swiper
.
slides
[
_this
.
swiper
.
activeIndex
].
attributes
[
'data-cId'
].
nodeValue
if
(
_this
.
requestData
[
itemCid
][
itemDid
])
{
if
(
_this
.
requestData
[
itemCid
])
{
if
(
_this
.
requestData
[
itemCid
][
itemDid
].
sign
)
{
if
(
_this
.
requestData
[
itemCid
][
itemDid
])
{
_this
.
signText
=
'已标记'
if
(
_this
.
requestData
[
itemCid
][
itemDid
].
sign
)
{
_this
.
signText
=
'已标记'
}
else
{
_this
.
signText
=
'标记'
}
}
else
{
}
else
{
_this
.
signText
=
'标记'
_this
.
signText
=
'标记'
}
}
}
else
{
}
else
{
_this
.
signText
=
'标记'
_this
.
signText
=
'标记'
}
}
}
else
{
_this
.
signText
=
'标记'
}
}
if
(
this
.
activeIndex
===
_this
.
questionsData
.
sheet
.
question_count
)
{
if
(
this
.
activeIndex
===
_this
.
questionsData
.
sheet
.
question_count
)
{
_this
.
topicCard
.
isShow
=
true
_this
.
topicCard
.
isShow
=
true
...
@@ -290,7 +292,7 @@ export default {
...
@@ -290,7 +292,7 @@ export default {
setClock
(
time
)
{
setClock
(
time
)
{
let
sec
=
parseInt
(
time
)
let
sec
=
parseInt
(
time
)
this
.
clockCount
=
setInterval
(()
=>
{
this
.
clockCount
=
setInterval
(()
=>
{
if
(
this
.
requestParam
.
course_id
)
{
if
(
this
.
requestParam
.
course_id
||
this
.
requestParam
.
tag_id
)
{
this
.
remainingTime
=
this
.
secondToDate
(
sec
)
this
.
remainingTime
=
this
.
secondToDate
(
sec
)
sec
++
sec
++
}
else
{
}
else
{
...
@@ -436,7 +438,6 @@ export default {
...
@@ -436,7 +438,6 @@ export default {
}
else
{
}
else
{
this
.
questionsData
=
res
this
.
questionsData
=
res
}
}
console
.
log
(
this
.
questionsData
)
window
.
localStorage
.
userId
=
res
.
user_id
window
.
localStorage
.
userId
=
res
.
user_id
this
.
remainingTime
=
this
.
secondToDate
(
times
)
this
.
remainingTime
=
this
.
secondToDate
(
times
)
this
.
setClock
(
times
)
this
.
setClock
(
times
)
...
...
src/pages/pay/index.vue
浏览文件 @
51d4b583
...
@@ -27,10 +27,16 @@ export default {
...
@@ -27,10 +27,16 @@ export default {
prepay_id
:
''
,
// 通过调用接口获取
prepay_id
:
''
,
// 通过调用接口获取
app_id
:
''
,
// 提前设定
app_id
:
''
,
// 提前设定
app_secret
:
''
// 提前设定
app_secret
:
''
// 提前设定
}
},
orderStatusTime
:
null
}
}
},
},
mounted
()
{
mounted
()
{
window
.
addEventListener
(
'pageshow'
,
function
(
event
)
{
if
((
event
.
persisted
||
window
.
performance
)
&&
window
.
performance
.
navigation
.
type
===
2
)
{
Toast
(
'页面返回'
)
}
},
false
)
this
.
getOpenid
()
this
.
getOpenid
()
this
.
getGoodsDetail
()
this
.
getGoodsDetail
()
},
},
...
@@ -44,10 +50,19 @@ export default {
...
@@ -44,10 +50,19 @@ export default {
})
})
})
})
},
},
getGoodsDetail
()
{
getOrderStatus
()
{
// api.getGoodsDetails('6682927830365372416').then(res => {
api
.
getOrderStatus
().
then
(
res
=>
{
// console.log(res)
switch
(
res
.
status
)
{
// })
case
1
:
break
case
-
1
:
break
case
100
:
break
default
:
}
Toast
(
res
.
status
)
})
},
},
goPay
()
{
goPay
()
{
// this.VueEvent.$emit('pay-wx-h5', {})
// this.VueEvent.$emit('pay-wx-h5', {})
...
@@ -72,6 +87,10 @@ export default {
...
@@ -72,6 +87,10 @@ export default {
},
},
success
:
function
(
res
)
{}
success
:
function
(
res
)
{}
})
})
// clearInterval(this.orderStatusTime)
// this.orderStatusTime = setInterval(() => {
// this.getOrderStatus()
// }, 1000)
}
}
// this.VueEvent.$emit('pay-wx-chart', {})
// this.VueEvent.$emit('pay-wx-chart', {})
// this.VueEvent.$off('pay-wx-chart-callback').$on('pay-wx-chart-callback', obj => {
// this.VueEvent.$off('pay-wx-chart-callback').$on('pay-wx-chart-callback', obj => {
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论