Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
9b007cfe
提交
9b007cfe
authored
7月 03, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
65a2fbaa
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
82 行增加
和
49 行删除
+82
-49
.config.dev.js
.config.dev.js
+19
-23
CourseItem.vue
src/components/CourseItem.vue
+2
-0
FreeCourseItem.vue
src/components/FreeCourseItem.vue
+1
-0
courseTag.vue
src/pages/course/learn/courseTag.vue
+15
-2
messageCard.vue
src/pages/course/learn/messageCard.vue
+22
-0
index.vue
src/pages/home/index.vue
+4
-1
codeLogin.vue
src/pages/login/codeLogin.vue
+3
-3
login.vue
src/pages/login/login.vue
+16
-20
没有找到文件。
.config.dev.js
浏览文件 @
9b007cfe
...
...
@@ -4,26 +4,26 @@ module.exports = {
// apiBaseURL: 'https://zy2.ezijing.com/',
webpack
:
{
externals
:
{
'CKEDITOR'
:
'window.CKEDITOR'
,
'Base64'
:
'window.Base64'
,
'md5'
:
'window.md5'
,
'regeneratorRuntime'
:
'window.regeneratorRuntime'
,
'wx'
:
'window.wx'
,
CKEDITOR
:
'window.CKEDITOR'
,
Base64
:
'window.Base64'
,
md5
:
'window.md5'
,
regeneratorRuntime
:
'window.regeneratorRuntime'
,
wx
:
'window.wx'
},
devServer
:
{
proxy
:
{
'/api/passport'
:
{
target
:
'https://passport.ezijing.com'
,
pathRewrite
:
{
'^/api/passport'
:
'/'
// 需要rewrite重写的
}
},
'
/usercenter'
:
{
target
:
'https://api-usercenter.ezijing.com'
,
pathRewrite
:
{
'^
/usercenter'
:
'/'
// 需要rewrite重写的
}
}
//
'/api/passport': {
//
target: 'https://passport.ezijing.com',
//
pathRewrite: {
//
'^/api/passport': '/' // 需要rewrite重写的
//
}
//
},
// '/api
/usercenter': {
//
target: 'https://api-usercenter.ezijing.com',
//
pathRewrite: {
// '^/api
/usercenter': '/' // 需要rewrite重写的
//
}
//
}
/* 多个代理 */
// '/api': {
// target: $GLOBAL.webConf.url,
...
...
@@ -43,10 +43,6 @@ module.exports = {
}
}
},
ProvidePlugin
:
{
},
others
:
{
}
ProvidePlugin
:
{},
others
:
{}
}
src/components/CourseItem.vue
浏览文件 @
9b007cfe
...
...
@@ -47,6 +47,7 @@ export default {
.course-item-pic
{
width
:
2
.4rem
;
height
:
1
.35rem
;
margin-right
:
10px
;
border-radius
:
6px
;
overflow
:
hidden
;
margin-right
:
0
.2rem
;
...
...
@@ -66,6 +67,7 @@ export default {
overflow
:
hidden
;
}
.course-item__text
{
max-height
:
0
.68rem
;
font-size
:
0
.26rem
;
color
:
#999
;
display
:
-
webkit-box
;
...
...
src/components/FreeCourseItem.vue
浏览文件 @
9b007cfe
...
...
@@ -50,6 +50,7 @@ export default {
.course-item-pic
{
width
:
2
.4rem
;
height
:
1
.35rem
;
margin-left
:
10px
;
border-radius
:
6px
;
overflow
:
hidden
;
img
{
...
...
src/pages/course/learn/courseTag.vue
浏览文件 @
9b007cfe
<
template
>
<div></div>
<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
{}
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/messageCard.vue
0 → 100644
浏览文件 @
9b007cfe
<
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/home/index.vue
浏览文件 @
9b007cfe
...
...
@@ -6,6 +6,9 @@
<van-swipe-item>
<img
src=
"../../assets/images/banner.png"
/>
</van-swipe-item>
<van-swipe-item>
<img
src=
"../../assets/images/banner.png"
/>
</van-swipe-item>
</van-swipe>
</div>
<div
class=
"nav"
>
...
...
@@ -21,7 +24,7 @@
</li>
</ul>
</div>
<card
title=
"课程试听"
style=
"padding-bottom:
5
0px;"
>
<card
title=
"课程试听"
style=
"padding-bottom:
6
0px;"
>
<free-course-item
v-for=
"item in courseList"
:data=
"item"
:key=
"item.course_id"
></free-course-item>
</card>
</div>
...
...
src/pages/login/codeLogin.vue
浏览文件 @
9b007cfe
...
...
@@ -2,7 +2,7 @@
<div
class=
"code-login"
>
<van-form
class=
"login-form"
ref=
"form"
v-on=
"$listeners"
>
<van-field
v-model=
"ruleForm.account"
name=
"account"
label=
"手机号"
placeholder=
"请输入手机号"
/>
<van-field
v-model=
"ruleForm.
code"
name=
"code
"
label=
"验证码"
placeholder=
"请输入验证码"
>
<van-field
v-model=
"ruleForm.
password"
name=
"password
"
label=
"验证码"
placeholder=
"请输入验证码"
>
<template
slot=
"button"
>
<countdown-button
@
click
.
native=
"onSendCode"
ref=
"countdown"
></countdown-button>
</
template
>
...
...
@@ -20,7 +20,7 @@ export default {
components
:
{
CountdownButton
},
data
()
{
return
{
ruleForm
:
{
account
:
''
,
code
:
''
}
ruleForm
:
{
account
:
''
,
password
:
''
}
}
},
methods
:
{
...
...
@@ -28,7 +28,7 @@ export default {
if
(
!
this
.
ruleForm
.
account
)
{
this
.
$notify
(
'请输手机号'
)
return
false
}
else
if
(
!
this
.
ruleForm
.
code
)
{
}
else
if
(
!
this
.
ruleForm
.
password
)
{
this
.
$notify
(
'请输入验证码'
)
return
false
}
...
...
src/pages/login/login.vue
浏览文件 @
9b007cfe
...
...
@@ -11,9 +11,9 @@
<div
class=
"login-bd"
>
<div
class=
"login-form"
>
<!-- 账号登录 -->
<
account-login
ref=
"form"
@
submit=
"onSubmit"
v-if=
"!this.isWechat"
></account-login
>
<
!--
<account-login
ref=
"form"
@
submit=
"onSubmit"
v-if=
"!this.isWechat"
></account-login>
--
>
<!-- 验证码登录 -->
<code-login
ref=
"form"
@
submit=
"onSubmit"
v-if=
"this.isWechat"
></code-login>
<code-login
ref=
"form"
@
submit=
"onSubmit"
></code-login>
<div
class=
"login-button"
@
click=
"handleSubmit"
>
立即绑定
</div>
</div>
</div>
...
...
@@ -23,7 +23,7 @@
<img
src=
"../../assets/images/login_wechat.png"
alt=
"微信登录"
/>
微信登录
</li>
</ul>
</div>
-->
</div>
-->
</div>
</div>
</
template
>
...
...
@@ -49,8 +49,7 @@ export default {
},
passwordVisible
:
false
,
isWechat
:
/micromessenger/
.
test
(
UA
),
unionid
:
Cookies
.
get
(
'wechat_login_no_phone_error'
),
redirectUrl
:
''
unionid
:
Cookies
.
get
(
'wechat_login_no_phone_error'
)
}
},
computed
:
{
...
...
@@ -69,14 +68,7 @@ export default {
},
// 提交
onSubmit
(
data
)
{
if
(
this
.
isWechat
)
{
this
.
ruleForm
.
type
=
2
this
.
bindWechat
(
data
)
}
else
{
this
.
ruleForm
.
type
=
1
this
.
loginRequest
(
data
)
}
// !this.isWechat ? this.bindWechat(data) : this.loginRequest(data)
this
.
unionid
?
this
.
bindWechat
(
data
)
:
this
.
loginRequest
(
data
)
},
// 登录
loginRequest
(
data
)
{
...
...
@@ -92,8 +84,10 @@ export default {
},
// 绑定微信并登录
bindWechat
(
data
)
{
const
params
=
Object
.
assign
({},
this
.
ruleForm
,
data
,
{
unionid
:
this
.
unionid
})
console
.
log
(
params
)
const
params
=
Object
.
assign
({},
this
.
ruleForm
,
data
,
{
unionid
:
this
.
unionid
,
code
:
data
.
password
})
api
.
bindWechat
(
params
)
.
then
(
response
=>
{
...
...
@@ -126,10 +120,9 @@ export default {
}
},
wechatLogin
()
{
if
(
this
.
$route
.
query
.
type
)
{
return
false
}
const
appId
=
'wx451c01d40d090d7a'
// 回调地址
const
redirectURI
=
`https://passport.ezijing.com/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=
${
this
.
redirectUrl
}
`
const
redirectURI
=
`https://passport.ezijing.com/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=
${
window
.
location
.
href
}
`
// 微信的地址
const
wechatUrl
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=
${
appId
}
&redirect_uri=
${
encodeURIComponent
(
redirectURI
...
...
@@ -145,12 +138,15 @@ export default {
}
},
created
()
{
if
(
this
.
isWechat
)
{
this
.
redirectUrl
=
`
${
window
.
location
.
origin
}
/login?type=1`
if
(
!
this
.
$route
.
query
.
type
)
{
this
.
$store
.
dispatch
(
'checkLogin'
).
then
(
isLogin
=>
{
if
(
isLogin
)
{
this
.
loginSuccess
({
code
:
1
,
data
:
{
TGC
:
Cookies
.
get
(
'TGC'
)
}
})
}
else
{
if
(
this
.
isWechat
&&
!
this
.
checkWechatLogin
())
{
this
.
wechatLogin
()
}
}
})
}
}
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论