Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
f24284d3
提交
f24284d3
authored
8月 03, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
购买页面添加购买完成弹窗,答题页面选中样式修改
上级
1dbbca2f
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
135 行增加
和
12 行删除
+135
-12
webpack.client.conf.js
build/webpack.client.conf.js
+1
-1
ExamTopic.vue
src/modules/exam-module/src/ExamTopic.vue
+2
-2
buyCourses.vue
src/pages/my/buyCourses.vue
+59
-0
questionsDetails.vue
src/pages/my/questionsDetails.vue
+2
-2
index.vue
src/pages/pay/index.vue
+71
-7
没有找到文件。
build/webpack.client.conf.js
浏览文件 @
f24284d3
...
...
@@ -26,7 +26,7 @@ if ($GLOBAL.isDev === 'development') {
port
:
$GLOBAL
.
webConf
.
serverPort
,
disableHostCheck
:
false
,
host
:
$GLOBAL
.
webConf
.
domain
||
'localhost'
,
http2
:
false
,
//
http2: false,
https
:
$GLOBAL
.
webConf
.
isHttps
&&
{
key
:
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'../static/cert/dev.ezijing.com.key'
)),
cert
:
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'../static/cert/dev.ezijing.com.pem'
))
...
...
src/modules/exam-module/src/ExamTopic.vue
浏览文件 @
f24284d3
...
...
@@ -862,8 +862,8 @@ export default {
background
:
#DDF1FF
;
}
.active2
{
color
:
#
fff
;
background
:
#67C23A
;
color
:
#
40A38B
;
background
:
#E4F9ED
;
}
}
.analy
{
...
...
src/pages/my/buyCourses.vue
浏览文件 @
f24284d3
...
...
@@ -23,6 +23,14 @@
</li>
</ul>
<van-empty
description=
"暂无内容"
v-else
/>
<div
class=
"succ-pop"
v-if=
"isPopShow"
>
<div
class=
"pop"
>
<div
class=
"close"
@
click=
"isPopShow = false"
>
×
</div>
<div
class=
"tit"
>
恭喜您,课程已购买成功!
</div>
<div
class=
"txt"
>
请添加助教微信,有任何问题可随时沟通老师。
</div>
<img
@
click=
"imagePreview"
src=
"https://zws-imgs-pub.ezijing.com/static/public/9d7a53493ff3c68ef33b7d9395edf718.png"
alt=
""
>
</div>
</div>
</div>
</
template
>
<
script
>
...
...
@@ -33,6 +41,7 @@ export default {
},
data
()
{
return
{
isPopShow
:
false
,
loaded
:
false
,
list
:
[],
orderTime
:
null
,
...
...
@@ -91,6 +100,12 @@ export default {
clearInterval
(
this
.
orderTime
)
this
.
orderTime
=
setInterval
(()
=>
{
this
.
getMyOrder
()
api
.
getOrderStatus
().
then
(
res
=>
{
if
(
this
.
orderStatus
===
1
)
{
this
.
isPopShow
=
true
clearInterval
(
this
.
orderTime
)
}
})
},
1000
)
setTimeout
(()
=>
{
this
.
goFlag
=
true
...
...
@@ -164,4 +179,48 @@ export default {
}
}
}
.succ-pop
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
.pop
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
-webkit-transform
:
translate
(
-50%
,
-50%
);
width
:
5
.9rem
;
height
:
6
.98rem
;
background
:rgba
(
255
,
255
,
255
,
1
)
;
border-radius
:
.12rem
;
.tit
{
line-height
:
1
.1rem
;
text-align
:
center
;
font-size
:
.3rem
;
color
:
#222
;
font-weight
:
bold
;
}
.txt
{
width
:
5
.1rem
;
font-size
:
.3rem
;
color
:rgba
(
34
,
34
,
34
,
1
)
;
margin
:
0
auto
;
}
img
{
width
:
4
.3rem
;
height
:
4
.3rem
;
margin
:
0
.4rem
auto
;
display
:
block
;
}
.close
{
position
:
absolute
;
top
:
-.8rem
;
right
:
0
;
font-size
:
.6rem
;
color
:
#fff
;
}
}
}
</
style
>
src/pages/my/questionsDetails.vue
浏览文件 @
f24284d3
...
...
@@ -510,8 +510,8 @@ export default {
background
:
#DDF1FF
;
}
.active2
{
color
:
#
fff
;
background
:
#67C23A
;
color
:
#
40A38B
;
background
:
#E4F9ED
;
}
}
.analy
{
...
...
src/pages/pay/index.vue
浏览文件 @
f24284d3
...
...
@@ -10,7 +10,7 @@
<div
class=
"num"
>
¥
<span>
199
</span>
.00
<i
v-if=
"orderStatus === 0"
>
课程有效期剩余
30
天
</i>
<i
v-if=
"orderStatus === 0"
>
课程有效期剩余
{{
expireDay
}}
天
</i>
</div>
<div
class=
"btn"
@
click=
"goPay"
v-if=
"orderStatus === 100"
>
立即购买
</div>
<div
class=
"btn active"
v-if=
"orderStatus === 1"
@
click=
"goHome"
>
已购买
</div>
...
...
@@ -18,9 +18,18 @@
<div
class=
"btn xf"
@
click=
"goPay"
v-if=
"orderStatus === 0"
>
续费
</div>
</div>
<pay-we-chart
:requestParam=
"requestParam"
></pay-we-chart>
<div
class=
"succ-pop"
v-if=
"isPopShow"
>
<div
class=
"pop"
>
<div
class=
"close"
@
click=
"isPopShow = false"
>
×
</div>
<div
class=
"tit"
>
恭喜您,课程已购买成功!
</div>
<div
class=
"txt"
>
请添加助教微信,有任何问题可随时沟通老师。
</div>
<img
@
click=
"imagePreview"
src=
"https://zws-imgs-pub.ezijing.com/static/public/9d7a53493ff3c68ef33b7d9395edf718.png"
alt=
""
>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
ImagePreview
}
from
'vant'
import
*
as
api
from
'@/api/pay.js'
import
{
getUser
}
from
'@/api/account'
...
...
@@ -28,12 +37,17 @@ export default {
metaInfo
:
{
title
:
'课程详情'
},
components
:
{
[
ImagePreview
.
name
]:
ImagePreview
},
data
()
{
const
productId
=
webConf
.
isDev
===
'production'
?
'6684359515615264768'
:
'6682927830365372416'
return
{
isPopShow
:
false
,
expireDay
:
0
,
userId
:
''
,
requestParam
:
{
product_id
:
productId
,
// 提前设定
...
...
@@ -46,11 +60,19 @@ export default {
orderStatus
:
100
}
},
mounted
()
{
api
.
getOrderStatus
().
then
(
res
=>
{
this
.
expireDay
=
res
.
expire_day
this
.
orderStatus
=
res
.
status
})
},
methods
:
{
async
init
()
{
imagePreview
()
{
ImagePreview
([
'https://zws-imgs-pub.ezijing.com/static/public/9d7a53493ff3c68ef33b7d9395edf718.png'
])
},
async
tikeOrderStatus
()
{
const
isLogin
=
await
this
.
$store
.
dispatch
(
'checkLogin'
)
if
(
isLogin
)
{
this
.
getOrderStatus
()
this
.
orderStatusTime
=
setInterval
(
this
.
getOrderStatus
,
1000
)
}
},
...
...
@@ -60,6 +82,7 @@ export default {
},
// 支付
goPay
()
{
this
.
tikeOrderStatus
()
wx
.
miniProgram
.
navigateTo
({
url
:
`/pages/pay/index?data=
${
this
.
requestParam
.
product_id
}
`
})
...
...
@@ -74,8 +97,8 @@ export default {
getOrderStatus
()
{
api
.
getOrderStatus
().
then
(
res
=>
{
this
.
orderStatus
=
res
.
status
console
.
log
(
this
.
orderStatus
)
if
(
this
.
orderStatus
===
1
)
{
this
.
isPopShow
=
true
this
.
orderStatusTime
&&
clearInterval
(
this
.
orderStatusTime
)
}
})
...
...
@@ -91,9 +114,6 @@ export default {
})
}
},
beforeMount
()
{
this
.
init
()
},
destroyed
()
{
this
.
orderStatusTime
&&
clearInterval
(
this
.
orderStatusTime
)
}
...
...
@@ -157,4 +177,48 @@ export default {
margin-top
:
.4rem
;
}
}
.succ-pop
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
.pop
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
-webkit-transform
:
translate
(
-50%
,
-50%
);
width
:
5
.9rem
;
height
:
6
.98rem
;
background
:rgba
(
255
,
255
,
255
,
1
)
;
border-radius
:
.12rem
;
.tit
{
line-height
:
1
.1rem
;
text-align
:
center
;
font-size
:
.3rem
;
color
:
#222
;
font-weight
:
bold
;
}
.txt
{
width
:
5
.1rem
;
font-size
:
.3rem
;
color
:rgba
(
34
,
34
,
34
,
1
)
;
margin
:
0
auto
;
}
img
{
width
:
4
.3rem
;
height
:
4
.3rem
;
margin
:
0
.4rem
auto
;
display
:
block
;
}
.close
{
position
:
absolute
;
top
:
-.8rem
;
right
:
0
;
font-size
:
.6rem
;
color
:
#fff
;
}
}
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论