Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
beyond-clouds-front
Commits
3327f702
Commit
3327f702
authored
Feb 04, 2020
by
yanju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config
parent
74473d68
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
142 additions
and
27 deletions
+142
-27
action/config.js
+90
-3
components/pc/banner.vue
+5
-1
components/pc/pagination.vue
+23
-11
components/pc/socialContactCard.vue
+18
-11
pages/project/index.vue
+6
-1
No files found.
action/config.js
View file @
3327f702
export
default
{
ip
:
'http://localhost:8081
/
'
,
ip
:
'http://localhost:8081'
,
api
:{
get
:{
user
:{
getAllUsers
:
'users'
,
Content
:{
list
:
'/api/channel/'
,
//内容列表 + {channelId}/contents
detail
:
'/api/content/'
,
//内容详情 + {contentId}
},
Post
:{
myList
:
'/api/my/posts'
,
//我的动态列表
list
:
'/api/posts'
,
//动态列表
otherList
:
'/api/user/'
,
//别人的动态列表 +{userId}/posts
},
PostComment
:{
list
:
'/api/post/'
,
//获取动态评论 +{postId}/comments
},
Blog
:{
detail
:
'/api/blog/'
,
//获取博客详情 +{blogId}
list
:
'/api/blogs'
,
//获取博客列表
myList
:
'/api/my/blogs'
,
//获取我的博客列表
otherList
:
'/api/user/'
,
//获取别人的博客列表 + {userId}/blogs
},
BlogComment
:{
list
:
'/api/blog/'
,
//获取评论列表 +{blogId}/comments
},
Tag
:{
myList
:
'/api/my/tag/created'
,
//获取我创建的标签列表
search
:
'/api/tag/search'
,
//检索标签
},
User
:{
myInfo
:
'/api/my/baseinfo'
,
//获取我的信息
myFans
:
'/api/my/fans'
,
//获取我的粉丝(列表)
myFollowing
:
'/api/my/follower'
,
//获取我的关注(列表)
otherInfo
:
'/api/user/'
,
//获取ta的信息 +{userId}/baseinfo
otherFans
:
'/api/user/'
,
//获取ta的粉丝(列表) +{userId}/fans
otherFollowing
:
'/api/user/'
,
//获取ta的关注(列表) +{userId}/follower
},
Authentication
:{
qqAuth
:
'/api/auth/qq'
,
//qq认证
},
Sms
:{
send
:
'/api/sms/verifyCode'
,
//发送短信验证码
},
Topic
:{
myList
:
'/api/my/topic/created'
,
//我的话题列表
myfollowedList
:
'/api/my/topic/followed'
,
//我关注的话题
detail
:
'/api/topic/'
,
//话题详情 +{topicId}
topicFollowerList
:
'/api/topic/'
,
//话题关注者列表 + {topicId}/follower
search
:
'/api/topic/search'
,
//检索话题
list
:
'/api/topics'
,
//话题列表
},
Question
:{
myParticipated
:
'/api/my/question/participated'
,
//我参与的问答列表
myCreated
:
'/api/my/questions'
,
//我创建的问答列表
detail
:
'/api/question/'
,
//问答详情 +{questionId}
tags
:
'/api/question/'
,
//问题引用的标签 +{questionId}/tags
list
:
'/api/questions'
,
//问答列表
otherParticipated
:
'/api/user/'
,
//用户参与的问答列表 + {userId}/question/participated
otherCreated
:
'/api/user/'
,
//用户创建的问答列表 +{userId}/questions
},
QuestionReply
:{
list
:
'/api/question/'
,
//问题的回复列表 + {questionId}/replies
},
QuestionReplyComment
:{
list
:
'/api/question/reply/'
,
//评论列表 +{replyId}/comments
},
Project
:{
myList
:
'/api/my/projects'
,
//我的项目列表
otherList
:
'/api/user/'
,
//ta的项目列表 +{userId}/projects
list
:
'/api/projects'
,
//项目列表
detail
:
'/api/project/'
,
//项目详情 +{projectId}
},
ProjectComment
:{
list
:
'/api/project/'
,
//项目评论列表 +{projectId}/comments
},
},
post
:{
},
delete
:{},
put
:{},
},
event
:{
listenPageChange
:
'listenPageChange'
,
},
default_data
:
{
emojiArrs
:{
...
...
components/pc/banner.vue
View file @
3327f702
...
...
@@ -78,16 +78,20 @@
},
watch
:{
currentImg2
(){
currentImg2
(
pev
,
now
){
console
.
log
(
pev
,
now
);
this
.
currentImg
=
this
.
currentImg2
;
}
},
mounted
(){
this
.
currentImg
=
this
.
currentImg2
;
this
.
initBanner
();
this
.
stateChangeCard2ImgArr
();
},
methods
:{
//初始化轮播图
...
...
components/pc/pagination.vue
View file @
3327f702
...
...
@@ -6,7 +6,6 @@
</p>
<p
class=
"number-box"
v-if=
"centerFirstPage>=2"
@
click=
"clickToChangePage(1)"
>
1
</p>
<p
class=
"number-box"
v-if=
"centerFirstPage>2"
@
click=
"clickToGetPrevGroup"
>
...
</p>
<p
@
click=
"clickToChangePage(value)"
:class=
"(centerFirstPage+index)===currentPage?'number-box--active':'number-box'"
v-for=
"value,index in changeCenterPage"
>
{{
value
}}
</p>
<p
class=
"number-box"
v-if=
"centerFirstPage+6
<pages
"
@
click=
"clickToGetNextGroup"
>
...
</p>
...
...
@@ -20,16 +19,29 @@
<
script
>
import
config
from
'../../action/config'
;
export
default
{
name
:
'pagination'
,
props
:{
pages
:
Number
,
},
data
(){
return
{
pages
:
13
,
currentPage
:
2
,
//
pages:13,
currentPage
:
1
,
centerFirstPage
:
1
,
}
},
created
(){
this
.
$emit
(
config
.
event
.
listenPageChange
,
this
.
currentPage
)
},
watch
:{
currentPage
(
pre
,
now
){
this
.
$emit
(
config
.
event
.
listenPageChange
,
pre
)
}
},
computed
:{
changeCenterPage
(){
//正常6个
...
...
@@ -50,10 +62,9 @@
}
},
mounted
(){
},
methods
:{
// 跳到下一页
clickToGetNextPage
(){
let
{
pages
,
centerFirstPage
,
currentPage
}
=
this
;
...
...
@@ -74,33 +85,34 @@
}
else
if
(
currentPage
>
1
){
this
.
currentPage
=
currentPage
-
1
;
}
},
//点击前面的省略号
clickToGetPrevGroup
(){
let
{
centerFirstPage
,
currentPage
}
=
this
;
let
{
centerFirstPage
}
=
this
;
if
(
centerFirstPage
>
7
){
this
.
currentPage
=
c
urrentPage
-
6
;
this
.
currentPage
=
c
enterFirstPage
-
1
;
this
.
centerFirstPage
=
centerFirstPage
-
6
;
}
else
if
(
centerFirstPage
<=
7
){
this
.
currentPage
=
3
;
this
.
currentPage
=
6
;
this
.
centerFirstPage
=
1
;
}
},
//点击后面的省略号
clickToGetNextGroup
(){
let
{
centerFirstPage
,
currentPage
,
pages
}
=
this
;
let
{
centerFirstPage
,
pages
}
=
this
;
if
(
centerFirstPage
+
5
+
6
<
pages
){
this
.
currentPage
=
currentPage
+
6
;
console
.
log
(
1
);
this
.
currentPage
=
centerFirstPage
+
6
;
this
.
centerFirstPage
=
centerFirstPage
+
6
;
}
else
if
(
centerFirstPage
+
5
+
6
>=
pages
){
console
.
log
(
2
);
this
.
currentPage
=
pages
-
5
;
this
.
centerFirstPage
=
pages
-
5
;
}
...
...
components/pc/socialContactCard.vue
View file @
3327f702
...
...
@@ -110,13 +110,13 @@
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/161fecb3d8b441c5b340319c62508513-file'
,
'https://s2.ax1x.com/2020/01/13/lHpvY4.png'
,
'http://i1.sinaimg.cn/ent/d/2008-06-04/U105P28T3D2048907F326DT20080604225106.jpg'
,
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/22e2d91201a2478683044f116d1d8186-file'
,
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/161fecb3d8b441c5b340319c62508513-file'
,
'https://s2.ax1x.com/2020/01/13/lHpvY4.png'
,
'https://s2.ax1x.com/2020/01/13/lHpvY4.png'
,
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/161fecb3d8b441c5b340319c62508513-file'
,
'https://s2.ax1x.com/2020/01/13/lHpvY4.png'
,
'https://s2.ax1x.com/2020/01/13/lHpvY4.png'
,
//
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/22e2d91201a2478683044f116d1d8186-file',
//
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/161fecb3d8b441c5b340319c62508513-file',
//
'https://s2.ax1x.com/2020/01/13/lHpvY4.png',
//
'https://s2.ax1x.com/2020/01/13/lHpvY4.png',
//
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/161fecb3d8b441c5b340319c62508513-file',
//
'https://s2.ax1x.com/2020/01/13/lHpvY4.png',
//
'https://s2.ax1x.com/2020/01/13/lHpvY4.png',
],
showBanner
:
false
,
currentImg
:
0
,
...
...
@@ -239,9 +239,11 @@
margin-right
:
16
*$
length
;
border-radius
:
4
*$
length
;
@extend
%flex-column-center;
@extend
%cursorPointer;
img{
width
:
100%
;
height
:
auto
;
width
:
auto
;
height
:
100%
;
}
}
...
...
@@ -262,9 +264,10 @@
margin-right
:
16
*$
length
;
border-radius
:
4
*$
length
;
@extend
%flex-column-center;
@extend
%cursorPointer;
img{
width
:
100%
;
height
:
auto
;
width
:
auto
;
height
:
100%
;
}
.abs
{
position
:
absolute
;
...
...
@@ -291,6 +294,8 @@
width
:
360
*$
length
;
border-radius
:
4
*$
length
;
@extend
%flex-column-center;
@extend
%cursorPointer;
img{
width
:
100%
;
height
:
auto
;
...
...
@@ -309,6 +314,8 @@
height
:
360
*$
length
;
border-radius
:
4
*$
length
;
@extend
%flex-column-center;
@extend
%cursorPointer;
position
:
relative
;
img{
width
:
100%
;
...
...
pages/project/index.vue
View file @
3327f702
...
...
@@ -19,7 +19,7 @@
<project-card></project-card>
</card-container>
<div
class=
"pagination"
>
<pagination
style=
"margin: 0 auto;"
></pagination>
<pagination
style=
"margin: 0 auto;"
pages=
"13"
v-on:listenPageChange=
"changePage"
></pagination>
</div>
</div>
<div
class=
"project-container__right"
>
...
...
@@ -50,6 +50,8 @@ import NavWrap from "../../components/pc/nav/navWrap";
import
CardContainer
from
"../../components/pc/cardContainer"
;
import
ProjectCard
from
"../../components/pc/projectCard"
;
import
Pagination
from
"../../components/pc/pagination"
;
export
default
{
components
:
{
Pagination
,
ProjectCard
,
CardContainer
,
NavWrap
},
data
(){
...
...
@@ -139,6 +141,9 @@ export default {
methods
:
{
toRelease
(){
this
.
$router
.
push
(
'/project/release'
)
},
changePage
(
currentPage
){
//返回页数 请求新的数据
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment