Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
alumni-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
alumni-show-h5
Commits
233715c0
提交
233715c0
authored
10月 27, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化
上级
db504aba
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
60 行增加
和
49 行删除
+60
-49
.env
.env
+2
-3
ActivityList.vue
src/components/ActivityList.vue
+2
-8
MemberItem.vue
src/components/MemberItem.vue
+1
-1
SearchBar.vue
src/components/SearchBar.vue
+3
-4
index.js
src/router/index.js
+5
-1
axios.js
src/utils/axios.js
+2
-4
Activity.vue
src/views/create/Activity.vue
+2
-1
Index.vue
src/views/home/Index.vue
+5
-2
Login.vue
src/views/login/Login.vue
+37
-24
Index.vue
src/views/my/Index.vue
+1
-1
没有找到文件。
.env
浏览文件 @
233715c0
VUE_APP_BASE_API=
VUE_APP_BASE_API=https://alumni.ezijing.com
VUE_APP_WECHAT_REDIRECT_URL=
VUE_APP_WECHAT_REDIRECT_URL=https://passport.ezijing.com/rest/wechat/oauth-callback
\ No newline at end of file
src/components/ActivityList.vue
浏览文件 @
233715c0
<
template
>
<
template
>
<div
class=
"list"
>
<div
class=
"list"
>
<van-list
<van-list
v-model=
"loading"
:finished=
"finished"
@
load=
"onLoad"
v-if=
"list.length"
>
v-model=
"loading"
:finished=
"finished"
@
load=
"onLoad"
v-if=
"list.length"
>
<activity-item
<activity-item
v-for=
"(item, index) in list"
v-for=
"(item, index) in list"
:data=
"item"
:data=
"item"
...
@@ -70,8 +65,7 @@ export default {
...
@@ -70,8 +65,7 @@ export default {
})
})
},
},
onLoad
()
{
onLoad
()
{
this
.
requestParams
.
offset
=
this
.
requestParams
.
offset
=
this
.
requestParams
.
offset
+
this
.
requestParams
.
limit
this
.
requestParams
.
offset
+
this
.
requestParams
.
limit
this
.
getList
()
this
.
getList
()
},
},
// 刷新
// 刷新
...
...
src/components/MemberItem.vue
浏览文件 @
233715c0
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
</div>
</div>
<slot
name=
"member-before"
:user=
"data"
></slot>
<slot
name=
"member-before"
:user=
"data"
></slot>
<div
class=
"member-item-content"
>
<div
class=
"member-item-content"
>
<h4>
{{
data
.
nickname
||
data
.
personal_name
}}
</h4>
<h4>
{{
data
.
personal_name
}}
</h4>
<p>
{{
data
.
class_name
}}
</p>
<p>
{{
data
.
class_name
}}
</p>
</div>
</div>
<slot
name=
"member-after"
:user=
"data"
></slot>
<slot
name=
"member-after"
:user=
"data"
></slot>
...
...
src/components/SearchBar.vue
浏览文件 @
233715c0
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
<input
<input
type=
"search"
type=
"search"
class=
"search-input"
class=
"search-input"
:class=
"classes"
:placeholder=
"placeholder"
:placeholder=
"placeholder"
v-model=
"currentValue"
v-model=
"currentValue"
v-bind=
"$attrs"
v-bind=
"$attrs"
...
@@ -20,7 +19,7 @@ export default {
...
@@ -20,7 +19,7 @@ export default {
props
:
{
props
:
{
value
:
String
,
value
:
String
,
focus
:
{
type
:
Boolean
,
default
:
false
},
focus
:
{
type
:
Boolean
,
default
:
false
},
placeholder
:
{
type
:
String
,
default
:
''
}
placeholder
:
{
type
:
String
,
default
:
'
搜索校友、活动、组织
'
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -70,9 +69,9 @@ export default {
...
@@ -70,9 +69,9 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
30px
;
height
:
30px
;
line-height
:
30px
;
line-height
:
30px
;
background
:
#f3f4f5
url('~@/assets/img/icon_search.png')
no-repeat
center
center
;
background
:
#f3f4f5
url('~@/assets/img/icon_search.png')
no-repeat
14px
center
;
background-size
:
15px
;
background-size
:
15px
;
padding
:
0
20px
;
padding
:
0
20px
0
40px
;
border-radius
:
15px
;
border-radius
:
15px
;
&
.is-focus
{
&
.is-focus
{
background
:
#f3f4f5
;
background
:
#f3f4f5
;
...
...
src/router/index.js
浏览文件 @
233715c0
...
@@ -161,9 +161,13 @@ const router = new VueRouter({
...
@@ -161,9 +161,13 @@ const router = new VueRouter({
mode
:
'history'
,
mode
:
'history'
,
base
:
process
.
env
.
BASE_URL
,
base
:
process
.
env
.
BASE_URL
,
routes
,
routes
,
scrollBehavior
()
{
scrollBehavior
(
to
,
from
,
savedPosition
)
{
if
(
savedPosition
)
{
return
savedPosition
}
else
{
return
{
x
:
0
,
y
:
0
}
return
{
x
:
0
,
y
:
0
}
}
}
}
})
})
export
default
router
export
default
router
src/utils/axios.js
浏览文件 @
233715c0
...
@@ -4,7 +4,7 @@ import { Notify } from 'vant'
...
@@ -4,7 +4,7 @@ import { Notify } from 'vant'
import
router
from
'@/router'
import
router
from
'@/router'
import
{
logout
}
from
'@/api/account'
import
{
logout
}
from
'@/api/account'
const
httpRequest
=
axios
.
create
({
const
httpRequest
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
//
baseURL: process.env.VUE_APP_BASE_API,
timeout
:
60000
,
timeout
:
60000
,
withCredentials
:
true
,
withCredentials
:
true
,
headers
:
{
headers
:
{
...
@@ -16,9 +16,7 @@ const httpRequest = axios.create({
...
@@ -16,9 +16,7 @@ const httpRequest = axios.create({
// 请求拦截
// 请求拦截
httpRequest
.
interceptors
.
request
.
use
(
httpRequest
.
interceptors
.
request
.
use
(
function
(
config
)
{
function
(
config
)
{
if
(
if
(
config
.
headers
[
'Content-Type'
]
===
'application/x-www-form-urlencoded'
)
{
config
.
headers
[
'Content-Type'
]
===
'application/x-www-form-urlencoded'
)
{
config
.
data
=
qs
.
stringify
(
config
.
data
)
config
.
data
=
qs
.
stringify
(
config
.
data
)
}
}
return
config
return
config
...
...
src/views/create/Activity.vue
浏览文件 @
233715c0
...
@@ -48,7 +48,8 @@ export default {
...
@@ -48,7 +48,8 @@ export default {
{
text
:
'去游学'
,
value
:
'2'
},
{
text
:
'去游学'
,
value
:
'2'
},
{
text
:
'直播课'
,
value
:
'3'
},
{
text
:
'直播课'
,
value
:
'3'
},
// { text: '找工作', value: '4' },
// { text: '找工作', value: '4' },
{
text
:
'运动家'
,
value
:
'5'
}
{
text
:
'运动家'
,
value
:
'5'
},
{
text
:
'其他'
,
value
:
'9'
}
]
]
},
},
{
{
...
...
src/views/home/Index.vue
浏览文件 @
233715c0
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
<search-bar
readonly
@
click
.
native=
"$router.push(
{ name: 'search' })">
</search-bar>
<search-bar
readonly
@
click
.
native=
"$router.push(
{ name: 'search' })">
</search-bar>
<!-- banner -->
<!-- banner -->
<div
class=
"banner"
>
<div
class=
"banner"
>
<img
src=
"img/home_banner.png"
/>
<van-swipe
:autoplay=
"3000"
indicator-color=
"white"
>
<van-swipe-item><img
src=
"img/home_banner.png"
/></van-swipe-item>
<van-swipe-item><img
src=
"img/home_banner.png"
/></van-swipe-item>
</van-swipe>
</div>
</div>
<!-- 导航 -->
<!-- 导航 -->
<div
class=
"nav"
>
<div
class=
"nav"
>
...
@@ -60,7 +63,7 @@ export default {
...
@@ -60,7 +63,7 @@ export default {
navList
:
[
navList
:
[
{
src
:
'img/home_nav_01.png'
,
title
:
'公益行'
,
type
:
1
},
{
src
:
'img/home_nav_01.png'
,
title
:
'公益行'
,
type
:
1
},
{
src
:
'img/home_nav_02.png'
,
title
:
'去游学'
,
type
:
2
},
{
src
:
'img/home_nav_02.png'
,
title
:
'去游学'
,
type
:
2
},
{
src
:
'img/home_nav_03.png'
,
title
:
'直播课'
,
type
:
3
},
//
{ src: 'img/home_nav_03.png', title: '直播课', type: 3 },
// { src: 'img/home_nav_04.png', title: '找工作', type: 4 },
// { src: 'img/home_nav_04.png', title: '找工作', type: 4 },
{
src
:
'img/home_nav_04.png'
,
title
:
'运动家'
,
type
:
5
}
{
src
:
'img/home_nav_04.png'
,
title
:
'运动家'
,
type
:
5
}
],
],
...
...
src/views/login/Login.vue
浏览文件 @
233715c0
...
@@ -7,12 +7,7 @@
...
@@ -7,12 +7,7 @@
<div
class=
"login-bd"
>
<div
class=
"login-bd"
>
<div
class=
"login-form"
>
<div
class=
"login-form"
>
<div
class=
"login-form__item"
>
<div
class=
"login-form__item"
>
<input
<input
type=
"text"
class=
"login-input"
placeholder=
"手机/邮箱/用户名"
v-model=
"ruleForm.account"
/>
type=
"text"
class=
"login-input"
placeholder=
"手机/邮箱/用户名"
v-model=
"ruleForm.account"
/>
</div>
</div>
<div
class=
"login-form__item"
>
<div
class=
"login-form__item"
>
<input
<input
...
@@ -24,9 +19,7 @@
...
@@ -24,9 +19,7 @@
/>
/>
</div>
</div>
<div
class=
"login-form__item"
>
<div
class=
"login-form__item"
>
<van-checkbox
v-model=
"ruleForm.RememberMe"
shape=
"square"
<van-checkbox
v-model=
"ruleForm.RememberMe"
shape=
"square"
>
下次自动登录
</van-checkbox>
>
下次自动登录
</van-checkbox
>
<!--
<div
class=
"login-type"
>
验证码登录
</div>
-->
<!--
<div
class=
"login-type"
>
验证码登录
</div>
-->
</div>
</div>
<div
class=
"login-form__item"
>
<div
class=
"login-form__item"
>
...
@@ -37,9 +30,7 @@
...
@@ -37,9 +30,7 @@
<div
class=
"login-ft"
>
<div
class=
"login-ft"
>
<p
class=
"login-tips"
>
<p
class=
"login-tips"
>
登录遇到困难?请点击
登录遇到困难?请点击
<span
class=
"forget-password"
@
click=
"passwordVisible = true"
<span
class=
"forget-password"
@
click=
"passwordVisible = true"
>
找回密码
</span>
>
找回密码
</span
>
</p>
</p>
</div>
</div>
<password
v-model=
"passwordVisible"
/>
<password
v-model=
"passwordVisible"
/>
...
@@ -125,7 +116,6 @@ export default {
...
@@ -125,7 +116,6 @@ export default {
}
else
{
}
else
{
this
.
$router
.
replace
(
'/'
)
this
.
$router
.
replace
(
'/'
)
}
}
// this.$router.replace('/')
}
else
{
}
else
{
this
.
$notify
(
response
.
msg
)
this
.
$notify
(
response
.
msg
)
}
}
...
@@ -133,10 +123,9 @@ export default {
...
@@ -133,10 +123,9 @@ export default {
wechatLogin
()
{
wechatLogin
()
{
const
appId
=
'wx451c01d40d090d7a'
const
appId
=
'wx451c01d40d090d7a'
// 回调地址
// 回调地址
const
redirectURI
=
`
${
const
redirectURI
=
`
${
process
.
env
.
VUE_APP_WECHAT_REDIRECT_URL
}
?needCheck=false&identity=friend&redirectUrl=
${
process
.
env
.
VUE_APP_WECHAT_REDIRECT_URL
this
.
redirectURI
||
location
.
origin
}
?needCheck=false&identity=friend&redirectUrl=
${
this
.
redirectURI
||
}
`
location
.
origin
}
`
// 微信的地址
// 微信的地址
const
wechatUrl
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=
${
appId
}
&redirect_uri=
${
encodeURIComponent
(
const
wechatUrl
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=
${
appId
}
&redirect_uri=
${
encodeURIComponent
(
redirectURI
redirectURI
...
@@ -145,17 +134,41 @@ export default {
...
@@ -145,17 +134,41 @@ export default {
location
.
href
=
wechatUrl
location
.
href
=
wechatUrl
},
},
checkWechatLogin
()
{
checkWechatLogin
()
{
return
!!
(
return
!!
(
Cookies
.
get
(
'wechat_login_error'
)
||
Cookies
.
get
(
'wechat_login_no_phone_error'
))
Cookies
.
get
(
'wechat_login_error'
)
||
Cookies
.
get
(
'wechat_login_no_phone_error'
)
)
}
},
},
created
()
{
// 显示登录提示框
if
(
this
.
isWechat
&&
!
this
.
checkWechatLogin
())
{
showLoginDialog
()
{
this
.
$dialog
.
confirm
({
title
:
'您还未登录'
,
message
:
'请先登录再进行操作'
,
cancelButtonText
:
'暂不登录'
,
confirmButtonText
:
'立即登录'
})
.
then
(()
=>
{
this
.
wechatLogin
()
this
.
wechatLogin
()
})
}
},
beforeMount
()
{
this
.
$store
.
dispatch
(
'checkLogin'
).
then
(
isLogin
=>
{
if
(
isLogin
)
{
this
.
loginSuccess
({
code
:
0
})
}
else
{
if
(
this
.
isWechat
)
{
if
(
!
this
.
checkWechatLogin
())
{
this
.
showLoginDialog
()
return
}
const
error
=
Cookies
.
get
(
'wechat_login_error'
)
if
(
error
)
{
this
.
$toast
(
error
)
Cookies
.
remove
(
'wechat_login_error'
,
{
domain
:
'.ezijing.com'
})
}
}
}
}
}
})
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
src/views/my/Index.vue
浏览文件 @
233715c0
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<img
:src=
"user.avatar | avatar"
/>
<img
:src=
"user.avatar | avatar"
/>
</div>
</div>
<div
class=
"user-content"
>
<div
class=
"user-content"
>
<div
class=
"user-content__name"
>
{{
user
.
nickname
||
user
.
personal_name
}}
</div>
<div
class=
"user-content__name"
>
{{
user
.
personal_name
}}
</div>
<div
class=
"user-content__info"
>
{{
user
.
class_name
}}
</div>
<div
class=
"user-content__info"
>
{{
user
.
class_name
}}
</div>
</div>
</div>
<!--
<div
class=
"user-aside"
>
<!--
<div
class=
"user-aside"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论