Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
85cc985e
提交
85cc985e
authored
7月 05, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab.ezijing.com/ezijing/transport-weapp-h5
上级
f67d5357
da45b191
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
447 行增加
和
112 行删除
+447
-112
course.js
src/api/course.js
+12
-4
Card.vue
src/components/Card.vue
+2
-1
FreeCourseItem.vue
src/components/FreeCourseItem.vue
+1
-0
index.js
src/modules/pay-module/index.js
+5
-2
PayH5.vue
src/modules/pay-module/src/PayH5.vue
+1
-37
PayWeChart.vue
src/modules/pay-module/src/PayWeChart.vue
+91
-0
courseTag.vue
src/pages/course/learn/courseTag.vue
+0
-28
item.vue
src/pages/course/learn/item.vue
+3
-10
messageCard.vue
src/pages/course/learn/messageCard.vue
+0
-22
courseTagMessage.vue
src/pages/course/tag/courseTagMessage.vue
+73
-0
index.vue
src/pages/course/tag/index.vue
+91
-0
messageCard.vue
src/pages/course/tag/messageCard.vue
+63
-0
searchTagMessage.vue
src/pages/course/tag/searchTagMessage.vue
+44
-0
tagMessage.vue
src/pages/course/tag/tagMessage.vue
+27
-0
login.vue
src/pages/login/login.vue
+1
-1
index.vue
src/pages/pay/index.vue
+30
-4
courseList.vue
src/pages/search/courseList.vue
+1
-1
tagList.vue
src/pages/search/tagList.vue
+1
-1
videoList.vue
src/pages/search/videoList.vue
+1
-1
没有找到文件。
src/api/course.js
浏览文件 @
85cc985e
...
@@ -28,10 +28,18 @@ export function getCourse(courseId) {
...
@@ -28,10 +28,18 @@ export function getCourse(courseId) {
* 获取课程知识点
* 获取课程知识点
* @param {string} courseId 课程ID
* @param {string} courseId 课程ID
*/
*/
export
function
getCourseTag
(
courseId
)
{
export
function
getCourseTag
List
(
courseId
)
{
return
httpRequest
.
get
(
`/zy/v2/education/tag/tree/
${
courseId
}
`
)
return
httpRequest
.
get
(
`/zy/v2/education/tag/tree/
${
courseId
}
`
)
}
}
/**
* 知识点详情
* @param {string} tagId 知识点ID
*/
export
function
getCourseTag
(
tagId
)
{
return
httpRequest
.
get
(
`/zy/v2/education/tag/
${
tagId
}
`
)
}
/**
/**
* 获取搜索记录
* 获取搜索记录
*/
*/
...
@@ -42,7 +50,7 @@ export function getSearchTips() {
...
@@ -42,7 +50,7 @@ export function getSearchTips() {
/**
/**
* 知识点搜索
* 知识点搜索
*/
*/
export
function
get
TagSearch
List
(
data
)
{
export
function
get
SearchTag
List
(
data
)
{
return
httpRequest
.
post
(
'/zy/v2/education/search/tag'
,
data
,
{
return
httpRequest
.
post
(
'/zy/v2/education/search/tag'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
})
...
@@ -51,7 +59,7 @@ export function getTagSearchList(data) {
...
@@ -51,7 +59,7 @@ export function getTagSearchList(data) {
/**
/**
* 视频课程搜索
* 视频课程搜索
*/
*/
export
function
get
CourseVideoSearch
List
(
data
)
{
export
function
get
SearchCourseVideo
List
(
data
)
{
return
httpRequest
.
post
(
'/zy/v2/education/search/chapter1'
,
data
,
{
return
httpRequest
.
post
(
'/zy/v2/education/search/chapter1'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
})
...
@@ -60,7 +68,7 @@ export function getCourseVideoSearchList(data) {
...
@@ -60,7 +68,7 @@ export function getCourseVideoSearchList(data) {
/**
/**
* 课程搜索
* 课程搜索
*/
*/
export
function
get
CourseSearch
List
(
data
)
{
export
function
get
SearchCourse
List
(
data
)
{
return
httpRequest
.
post
(
'/zy/v2/education/search/chapter2'
,
data
,
{
return
httpRequest
.
post
(
'/zy/v2/education/search/chapter2'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
})
...
...
src/components/Card.vue
浏览文件 @
85cc985e
...
@@ -30,7 +30,8 @@ export default {
...
@@ -30,7 +30,8 @@ export default {
margin
:
0
;
margin
:
0
;
padding-bottom
:
0
.1rem
;
padding-bottom
:
0
.1rem
;
font-size
:
0
.3rem
;
font-size
:
0
.3rem
;
font-weight
:
600
;
font-weight
:
bold
;
line-height
:
1
;
color
:
#333
;
color
:
#333
;
border-bottom
:
0
.06rem
solid
#2b7ce9
;
border-bottom
:
0
.06rem
solid
#2b7ce9
;
}
}
...
...
src/components/FreeCourseItem.vue
浏览文件 @
85cc985e
...
@@ -70,6 +70,7 @@ export default {
...
@@ -70,6 +70,7 @@ export default {
}
}
.course-item__text
{
.course-item__text
{
font-size
:
0
.26rem
;
font-size
:
0
.26rem
;
line-height
:
0
.42rem
;
color
:
#999
;
color
:
#999
;
display
:
-
webkit-box
;
display
:
-
webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-box-orient
:
vertical
;
...
...
src/modules/pay-module/index.js
浏览文件 @
85cc985e
import
'./index.scss'
import
'./index.scss'
import
PayH5
from
'./src/PayH5.vue'
import
PayH5
from
'./src/PayH5.vue'
import
PayWeChart
from
'./src/PayWeChart.vue'
const
components
=
[
const
components
=
[
PayH5
PayH5
,
PayWeChart
]
]
const
install
=
function
(
Vue
,
opts
=
{})
{
const
install
=
function
(
Vue
,
opts
=
{})
{
...
@@ -26,5 +28,6 @@ if (typeof window !== 'undefined' && window.Vue) {
...
@@ -26,5 +28,6 @@ if (typeof window !== 'undefined' && window.Vue) {
export
default
{
export
default
{
install
,
install
,
PayH5
PayH5
,
PayWeChart
}
}
src/modules/pay-module/src/PayH5.vue
浏览文件 @
85cc985e
...
@@ -3,45 +3,10 @@
...
@@ -3,45 +3,10 @@
<div
class=
"pay-box"
></div>
<div
class=
"pay-box"
></div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Toast
}
from
'vant'
import
Pay
from
'../action'
import
Pay
from
'../action'
export
default
{
export
default
{
name
:
'PayH5'
,
name
:
'PayH5'
,
components
:
{
data
()
{},
[
Toast
.
name
]:
Toast
},
data
()
{
const
_this
=
this
return
{
isCard
:
false
,
opaKey
:
[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
],
remainingTime
:
'01:00:00'
,
currentNum
:
1
,
isAnalysis
:
false
,
swiperOptions
:
{
observer
:
true
,
on
:
{
slideChangeTransitionStart
:
function
()
{
document
.
getElementById
(
'bottom-view'
).
scrollTop
=
0
_this
.
isAnalysis
=
false
_this
.
currentNum
=
this
.
activeIndex
+
1
}
}
},
questionsData
:
{
questions
:
[]
},
requestData
:
{},
requestData2
:
{},
clockCount
:
null
,
isExamEnd
:
true
,
// examIsShow: false,
isExamSubPop
:
false
,
timePopIsShow
:
false
,
initTime
:
null
,
cache
:
null
}
},
props
:
{
props
:
{
requestParam
:
{
requestParam
:
{
type
:
Object
,
type
:
Object
,
...
@@ -125,7 +90,6 @@ export default {
...
@@ -125,7 +90,6 @@ export default {
})
})
},
},
wxWakeUpToPay
(
obj
)
{
wxWakeUpToPay
(
obj
)
{
Toast
(
obj
)
if
(
typeof
WeixinJSBridge
===
'undefined'
)
{
if
(
typeof
WeixinJSBridge
===
'undefined'
)
{
obj
.
code
=
4001
obj
.
code
=
4001
obj
.
msg
=
'缺少微信api'
obj
.
msg
=
'缺少微信api'
...
...
src/modules/pay-module/src/PayWeChart.vue
0 → 100644
浏览文件 @
85cc985e
<
template
>
<!-- 暂时无用 -->
<div
class=
"pay-box"
></div>
</
template
>
<
script
>
import
Pay
from
'../action'
export
default
{
name
:
'PayWeChart'
,
data
()
{},
props
:
{
requestParam
:
{
type
:
Object
,
required
:
false
,
default
()
{
return
{
product_id
:
''
,
// 提前设定
open_id
:
''
,
// 通过微信授权获取
prepay_id
:
''
,
// 通过调用接口获取
app_id
:
''
,
// 提前设定
app_secret
:
''
,
// 提前设定
// 新增字段 接口返回
timeStamp
:
''
,
nonceStr
:
''
,
signType
:
''
,
paySign
:
''
}
}
}
},
beforeDestroy
()
{
},
mounted
()
{
this
.
onReady
()
},
methods
:
{
onReady
()
{
this
.
VueEvent
.
$off
(
'pay-wx-chart'
).
$on
(
'pay-wx-chart'
,
(
obj
)
=>
{
this
.
goToPay
()
})
},
goToPay
()
{
const
obj
=
{
code
:
0
,
msg
:
''
,
data
:
{}
}
if
(
!
this
.
requestParam
.
product_id
)
{
obj
.
code
=
3001
obj
.
msg
=
'没有商品ID'
this
.
VueEvent
.
$emit
(
'pay-wx-chart-callback'
,
obj
)
return
false
}
if
(
!
this
.
requestParam
.
open_id
)
{
obj
.
code
=
3002
obj
.
msg
=
'没有小程序用户openid'
this
.
VueEvent
.
$emit
(
'pay-wx-chart-callback'
,
obj
)
return
false
}
Pay
.
getOrderId
(
this
.
requestParam
).
then
(
res
=>
{
if
(
res
.
code
)
{
// this.requestParam.product_id
// this.requestParam.open_id
this
.
requestParam
.
prepay_id
=
res
.
data
.
prepay_id
this
.
requestParam
.
app_id
=
res
.
data
.
options
.
appId
// this.requestParam.app_secret
this
.
requestParam
.
timeStamp
=
res
.
data
.
options
.
timeStamp
this
.
requestParam
.
nonceStr
=
res
.
data
.
options
.
nonceStr
this
.
requestParam
.
signType
=
res
.
data
.
options
.
signType
this
.
requestParam
.
paySign
=
res
.
data
.
options
.
paySign
this
.
wxWakeUpToPay
(
obj
)
}
else
{
obj
.
code
=
3003
obj
.
msg
=
'获取订单ID失败'
this
.
VueEvent
.
$emit
(
'pay-wx-chart-callback'
,
obj
)
}
}).
catch
(
e
=>
{
obj
.
code
=
5001
obj
.
msg
=
e
.
message
this
.
VueEvent
.
$emit
(
'pay-wx-chart-callback'
,
obj
)
return
obj
})
},
wxWakeUpToPay
(
obj
)
{
obj
.
code
=
200
obj
.
data
=
this
.
requestParam
this
.
VueEvent
.
$emit
(
'pay-wx-chart-callback'
,
obj
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
src/pages/course/learn/courseTag.vue
deleted
100644 → 0
浏览文件 @
f67d5357
<
template
>
<div
class=
"messages"
></div>
</
template
>
<
script
>
import
MessageCard
from
'./messageCard.vue'
import
*
as
api
from
'@/api/course.js'
export
default
{
props
:
{},
components
:
{
MessageCard
},
data
()
{
return
{
messageList
:
[]
}
},
getCourseTag
()
{
api
.
getCourseTag
(
this
.
courseId
).
then
(
response
=>
{
console
.
log
(
response
)
})
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.messages
{
background
:
#eee
;
}
</
style
>
src/pages/course/learn/item.vue
浏览文件 @
85cc985e
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<course-chapter
:courseId=
"courseId"
:data=
"detail.chapters"
></course-chapter>
<course-chapter
:courseId=
"courseId"
:data=
"detail.chapters"
></course-chapter>
</van-tab>
</van-tab>
<van-tab
title=
"知识点速学"
name=
"1"
>
<van-tab
title=
"知识点速学"
name=
"1"
>
<course-tag></course-tag>
<course-tag
:courseId=
"courseId"
></course-tag>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
</div>
</div>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<
script
>
<
script
>
import
CourseChapter
from
'./courseChapter.vue'
import
CourseChapter
from
'./courseChapter.vue'
import
CourseTag
from
'.
/courseTag
.vue'
import
CourseTag
from
'.
./tag/index
.vue'
import
*
as
api
from
'@/api/course.js'
import
*
as
api
from
'@/api/course.js'
export
default
{
export
default
{
name
:
'CourseLearnItem'
,
name
:
'CourseLearnItem'
,
...
@@ -38,7 +38,7 @@ export default {
...
@@ -38,7 +38,7 @@ export default {
$route
:
{
$route
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
route
)
{
handler
(
route
)
{
this
.
tabActive
=
route
.
query
.
tab
||
'
0
'
this
.
tabActive
=
route
.
query
.
tab
||
'
1
'
}
}
}
}
},
},
...
@@ -60,17 +60,10 @@ export default {
...
@@ -60,17 +60,10 @@ export default {
})
})
this
.
detail
=
response
this
.
detail
=
response
})
})
},
// 知识点速学
getCourseTag
()
{
api
.
getCourseTag
(
this
.
courseId
).
then
(
response
=>
{
console
.
log
(
response
)
})
}
}
},
},
beforeMount
()
{
beforeMount
()
{
this
.
getCourse
()
this
.
getCourse
()
this
.
getCourseTag
()
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/course/learn/messageCard.vue
deleted
100644 → 0
浏览文件 @
f67d5357
<
template
>
<div
class=
"message-card"
>
<div
class=
"message-card-hd"
>
<div
class=
"message-card__title"
>
{{
data
.
name
}}
</div>
</div>
<div
class=
"message-card-bd"
>
<ul
v-if=
"data.tag && data.tag.length"
>
<li
v-for=
"item in data.tag"
:key=
"item.id"
>
{{
item
.
title
}}
</li>
</ul>
</div>
<div
class=
"message-card-ft"
>
更多
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'MessageCard'
,
props
:
{
data
:
{
type
:
Object
}
}
}
</
script
>
src/pages/course/tag/courseTagMessage.vue
0 → 100644
浏览文件 @
85cc985e
<
template
>
<div
class=
"course-tag-message"
>
<div
class=
"course-tag-message-hd"
>
<div
class=
"course-tag-message__title"
>
{{
data
.
name
}}
</div>
</div>
<div
class=
"course-tag-message-bd"
>
<template
v-if=
"data.children && data.children.length"
>
<ul
class=
"message-tag-list"
>
<template
v-for=
"item in data.children"
>
<li
class=
"course-tag-item"
:key=
"item.id"
@
click=
"$emit('search', item)"
>
{{
item
.
name
}}
</li>
</
template
>
</ul>
</template>
</div>
<div
class=
"course-tag-message-ft"
>
<div
class=
"more"
>
更多
<van-icon
name=
"arrow-down"
></van-icon>
</div>
</div>
</div>
</template>
<
script
>
export
default
{
name
:
'CourseTagMessage'
,
props
:
{
data
:
{
type
:
Object
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.course-tag-message
{
padding
:
10px
;
background-color
:
#fff
;
border-radius
:
6px
;
}
.course-tag-message-hd
{
padding
:
10px
0
;
font-size
:
15px
;
color
:
#222
;
}
.course-tag-item
{
display
:
inline-block
;
height
:
24px
;
margin
:
0
10px
10px
0
;
padding
:
0
15px
;
font-size
:
13px
;
color
:
#fff
;
line-height
:
24px
;
background
:
#67a8ff
;
border-radius
:
12px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
cursor
:
pointer
;
}
.course-tag-message-ft
{
padding-top
:
10px
;
border-top
:
1px
solid
#eee
;
}
.more
{
font-size
:
13px
;
color
:
#222
;
text-align
:
center
;
cursor
:
pointer
;
}
</
style
>
src/pages/course/tag/index.vue
0 → 100644
浏览文件 @
85cc985e
<
template
>
<div
class=
"messages"
>
<template
v-for=
"item in messageList"
>
<message-card
:data=
"item"
:key=
"item.id"
@
search=
"onSearchTag"
@
change=
"onChangeTag"
></message-card>
</
template
>
</div>
</template>
<
script
>
import
MessageCard
from
'./messageCard.vue'
import
*
as
api
from
'@/api/course.js'
export
default
{
props
:
{
courseId
:
{
type
:
String
,
required
:
true
}
},
components
:
{
MessageCard
},
data
()
{
return
{
messageList
:
[]
// {id:'', type: 1, payload: {}}
}
},
methods
:
{
// 获取知识点列表
getCourseTagList
()
{
api
.
getCourseTagList
(
this
.
courseId
).
then
(
response
=>
{
this
.
messageList
=
response
.
chapters
.
map
((
item
,
index
)
=>
{
return
{
id
:
this
.
genId
(
index
),
type
:
1
,
from
:
'system'
,
payload
:
item
}
})
})
},
// 点击标签
onSearchTag
(
data
)
{
this
.
messageList
.
push
({
id
:
this
.
genId
(),
type
:
0
,
from
:
'user'
,
payload
:
{
text
:
data
.
name
}
})
this
.
searchTag
(
data
.
name
)
},
searchTag
(
keywords
)
{
api
.
getSearchTagList
({
keywords
}).
then
(
response
=>
{
this
.
messageList
.
push
({
id
:
this
.
genId
(),
type
:
2
,
from
:
'system'
,
payload
:
response
})
})
},
onChangeTag
(
data
)
{
this
.
messageList
.
push
({
id
:
this
.
genId
(),
type
:
0
,
from
:
'user'
,
payload
:
{
text
:
data
.
title
}
})
this
.
getCourseTag
(
data
.
id
)
},
// 获取知识点详情
getCourseTag
(
tagId
)
{
api
.
getCourseTag
(
tagId
).
then
(
response
=>
{
this
.
messageList
.
push
({
id
:
this
.
genId
(),
type
:
3
,
from
:
'system'
,
payload
:
response
})
})
},
// 生成消息ID
genId
(
index
)
{
index
=
index
||
this
.
messageList
.
length
return
`message_
${
index
}
`
}
},
beforeMount
()
{
this
.
getCourseTagList
()
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.messages
{
background
:
#eee
;
overflow
:
hidden
;
}
</
style
>
src/pages/course/tag/messageCard.vue
0 → 100644
浏览文件 @
85cc985e
<
template
>
<div
class=
"message-card"
:class=
"classes"
>
<div
class=
"message-card-content"
>
<slot
:data=
"data.payload"
>
<div
class=
"message-card-text"
v-if=
"data.type === 0"
>
{{
data
.
payload
.
text
}}
</div>
<course-tag-message
:data=
"data.payload"
v-on=
"$listeners"
v-if=
"data.type === 1"
></course-tag-message>
<search-tag-message
:data=
"data.payload"
v-on=
"$listeners"
v-if=
"data.type === 2"
></search-tag-message>
<tag-message
:data=
"data.payload"
v-on=
"$listeners"
v-if=
"data.type === 3"
></tag-message>
</slot>
</div>
</div>
</
template
>
<
script
>
import
CourseTagMessage
from
'./coursetagMessage.vue'
import
SearchTagMessage
from
'./searchtagMessage.vue'
import
TagMessage
from
'./tagMessage.vue'
export
default
{
name
:
'MessageCard'
,
props
:
{
data
:
{
type
:
Object
}
},
components
:
{
CourseTagMessage
,
SearchTagMessage
,
TagMessage
},
computed
:
{
isMyPublish
()
{
return
this
.
data
.
from
===
'user'
},
classes
()
{
return
{
'is-my'
:
this
.
isMyPublish
,
'is-system'
:
!
this
.
isMyPublish
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.message-card
{
clear
:
both
;
margin
:
20px
;
}
.message-card-text
{
display
:
inline-block
;
padding
:
10px
;
background-color
:
#fff
;
border-radius
:
6px
;
}
.is-system
{
.message-card-content
{
text-align
:
left
;
}
}
.is-my
{
.message-card-content
{
text-align
:
right
;
}
.message-card-text
{
color
:
#fff
;
background-color
:
#67a8ff
;
}
}
</
style
>
src/pages/course/tag/searchTagMessage.vue
0 → 100644
浏览文件 @
85cc985e
<
template
>
<div
class=
"search-tag-message"
>
<p
class=
"tips"
>
交小通猜你想查:
</p>
<ul
class=
"search-tag-list"
>
<template
v-for=
"(item,index) in data"
>
<li
class=
"search-tag-item"
:key=
"item.id"
@
click=
"$emit('change', item)"
>
<span
class=
"num"
>
{{
index
+
1
}}
:
</span>
<span
class=
"text"
>
{{
item
.
title
}}
</span>
</li>
</
template
>
</ul>
</div>
</template>
<
script
>
export
default
{
name
:
'SearchTagMessage'
,
props
:
{
data
:
{
type
:
Array
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.search-tag-message
{
padding
:
10px
;
background-color
:
#fff
;
border-radius
:
6px
;
}
.search-tag-item
{
margin
:
10px
0
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
.num
{
display
:
inline-block
;
min-width
:
24px
;
}
.text
{
border-bottom
:
1px
solid
#2b7ce9
;
cursor
:
pointer
;
}
}
</
style
>
src/pages/course/tag/tagMessage.vue
0 → 100644
浏览文件 @
85cc985e
<
template
>
<div
class=
"tag-message"
v-html=
"html"
></div>
</
template
>
<
script
>
export
default
{
name
:
'TagMessage'
,
props
:
{
data
:
{
type
:
Object
}
},
computed
:
{
html
()
{
return
this
.
data
.
contents
.
replace
(
/
\n
/g
,
'<br/>'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.tag-message
{
padding
:
10px
;
background-color
:
#fff
;
border-radius
:
6px
;
font-size
:
13px
;
line-height
:
30px
;
}
</
style
>
src/pages/login/login.vue
浏览文件 @
85cc985e
...
@@ -120,7 +120,7 @@ export default {
...
@@ -120,7 +120,7 @@ export default {
}
}
},
},
wechatLogin
()
{
wechatLogin
()
{
const
appId
=
'wx
451c01d40d090d7
a'
const
appId
=
'wx
c6044475caf2805
a'
// 回调地址
// 回调地址
const
redirectURI
=
`https://passport.ezijing.com/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=
${
window
.
location
.
href
}
`
const
redirectURI
=
`https://passport.ezijing.com/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=
${
window
.
location
.
href
}
`
// 微信的地址
// 微信的地址
...
...
src/pages/pay/index.vue
浏览文件 @
85cc985e
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
<div
class=
"btn"
@
click=
"goPay"
>
立即购买
</div>
<div
class=
"btn"
@
click=
"goPay"
>
立即购买
</div>
</div>
</div>
<!--
<van-button
type=
"primary"
@
click=
"goPay"
class=
"pay-btn"
>
购买
</van-button>
-->
<!--
<van-button
type=
"primary"
@
click=
"goPay"
class=
"pay-btn"
>
购买
</van-button>
-->
<pay-h5
:requestParam=
"requestParam"
></pay-h5>
<!--
<pay-h5
:requestParam=
"requestParam"
></pay-h5>
-->
<pay-we-chart
:requestParam=
"requestParam"
></pay-we-chart>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -49,10 +50,35 @@ export default {
...
@@ -49,10 +50,35 @@ export default {
// })
// })
},
},
goPay
()
{
goPay
()
{
this
.
VueEvent
.
$emit
(
'pay-wx-h5'
,
{})
// this.VueEvent.$emit('pay-wx-h5', {})
this
.
VueEvent
.
$off
(
'pay-wx-h5-callback'
).
$on
(
'pay-wx-h5-callback'
,
obj
=>
{
// this.VueEvent.$off('pay-wx-h5-callback').$on('pay-wx-h5-callback', obj => {
// if (obj.code === 200) {
// this.$router.back()
// } else {
// // this.$router.go(-2)
// Toast(obj.msg)
// }
// console.log(obj, '======')
// })
this
.
VueEvent
.
$emit
(
'pay-wx-chart'
,
{})
this
.
VueEvent
.
$off
(
'pay-wx-chart-callback'
).
$on
(
'pay-wx-chart-callback'
,
obj
=>
{
if
(
obj
.
code
===
200
)
{
if
(
obj
.
code
===
200
)
{
this
.
$router
.
back
()
if
(
window
.
__wxjs_environment
===
'miniprogram'
)
{
wx
.
miniProgram
.
navigateTo
({
url
:
'/pages/pay/index?data='
+
JSON
.
stringify
(
obj
.
data
),
events
:
{
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptDataFromOpenedPage
:
function
(
data
)
{
console
.
log
(
data
)
}
},
success
:
function
(
res
)
{
console
.
log
(
'开始传数据'
,
res
,
res
.
eventChannel
)
// 通过eventChannel向被打开页面传送数据 - 验证 web-view 不可用
res
.
eventChannel
.
emit
(
'acceptDataFromOpenerPage'
,
{
data
:
obj
.
data
})
}
})
}
}
else
{
}
else
{
// this.$router.go(-2)
// this.$router.go(-2)
Toast
(
obj
.
msg
)
Toast
(
obj
.
msg
)
...
...
src/pages/search/courseList.vue
浏览文件 @
85cc985e
...
@@ -39,7 +39,7 @@ export default {
...
@@ -39,7 +39,7 @@ export default {
},
},
methods
:
{
methods
:
{
getList
()
{
getList
()
{
api
.
get
CourseSearch
List
(
this
.
requestParams
).
then
(
response
=>
{
api
.
get
SearchCourse
List
(
this
.
requestParams
).
then
(
response
=>
{
this
.
list
=
response
this
.
list
=
response
})
})
},
},
...
...
src/pages/search/tagList.vue
浏览文件 @
85cc985e
...
@@ -39,7 +39,7 @@ export default {
...
@@ -39,7 +39,7 @@ export default {
},
},
methods
:
{
methods
:
{
getList
()
{
getList
()
{
api
.
get
TagSearch
List
(
this
.
requestParams
).
then
(
response
=>
{
api
.
get
SearchTag
List
(
this
.
requestParams
).
then
(
response
=>
{
this
.
list
=
response
this
.
list
=
response
})
})
},
},
...
...
src/pages/search/videoList.vue
浏览文件 @
85cc985e
...
@@ -46,7 +46,7 @@ export default {
...
@@ -46,7 +46,7 @@ export default {
},
},
methods
:
{
methods
:
{
getList
()
{
getList
()
{
api
.
get
CourseVideoSearch
List
(
this
.
requestParams
).
then
(
response
=>
{
api
.
get
SearchCourseVideo
List
(
this
.
requestParams
).
then
(
response
=>
{
this
.
list
=
response
this
.
list
=
response
})
})
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论