Commit 3327f702 by yanju

config

parent 74473d68
export default { export default {
ip:'http://localhost:8081/', ip:'http://localhost:8081',
api:{ api:{
get:{ get:{
user:{ Content:{
getAllUsers:'users', 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: { default_data: {
......
...@@ -78,16 +78,20 @@ ...@@ -78,16 +78,20 @@
}, },
watch:{ watch:{
currentImg2(){ currentImg2(pev,now){
console.log(pev,now);
this.currentImg = this.currentImg2; this.currentImg = this.currentImg2;
} }
}, },
mounted(){ mounted(){
this.currentImg = this.currentImg2;
this.initBanner(); this.initBanner();
this.stateChangeCard2ImgArr(); this.stateChangeCard2ImgArr();
}, },
methods:{ methods:{
//初始化轮播图 //初始化轮播图
......
...@@ -6,30 +6,42 @@ ...@@ -6,30 +6,42 @@
</p> </p>
<p class="number-box" v-if="centerFirstPage>=2" @click="clickToChangePage(1)">1</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 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 @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> <p class="number-box" v-if="centerFirstPage+6<pages" @click="clickToGetNextGroup">...</p>
<p class="number-box" v-if="centerFirstPage+6<=pages" @click="clickToChangePage(pages)">{{pages}}</p> <p class="number-box" v-if="centerFirstPage+6<=pages" @click="clickToChangePage(pages)">{{pages}}</p>
<p class="right-arrow" @click="clickToGetNextPage" v-if="currentPage<pages"> <p class="right-arrow" @click="clickToGetNextPage" v-if="currentPage<pages">
<yun-icon name="left_arrow" size="12px"></yun-icon> <yun-icon name="left_arrow" size="12px"></yun-icon>
</p> </p>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import config from '../../action/config';
export default { export default {
name:'pagination', name:'pagination',
props:{
pages:Number,
},
data(){ data(){
return { return {
pages:13, // pages:13,
currentPage:2, currentPage:1,
centerFirstPage:1, centerFirstPage:1,
} }
}, },
created(){
this.$emit(config.event.listenPageChange,this.currentPage)
},
watch:{
currentPage(pre,now){
this.$emit(config.event.listenPageChange,pre)
}
},
computed:{ computed:{
changeCenterPage(){ changeCenterPage(){
//正常6个 //正常6个
...@@ -50,10 +62,9 @@ ...@@ -50,10 +62,9 @@
} }
}, },
mounted(){
},
methods:{ methods:{
// 跳到下一页 // 跳到下一页
clickToGetNextPage(){ clickToGetNextPage(){
let {pages,centerFirstPage,currentPage} = this; let {pages,centerFirstPage,currentPage} = this;
...@@ -74,33 +85,34 @@ ...@@ -74,33 +85,34 @@
} }
else if(currentPage>1){ else if(currentPage>1){
this.currentPage = currentPage - 1; this.currentPage = currentPage - 1;
} }
}, },
//点击前面的省略号 //点击前面的省略号
clickToGetPrevGroup(){ clickToGetPrevGroup(){
let {centerFirstPage,currentPage} = this; let {centerFirstPage} = this;
if(centerFirstPage>7){ if(centerFirstPage>7){
this.currentPage = currentPage - 6; this.currentPage = centerFirstPage - 1;
this.centerFirstPage = centerFirstPage -6; this.centerFirstPage = centerFirstPage -6;
} }
else if(centerFirstPage<=7){ else if(centerFirstPage<=7){
this.currentPage = 3; this.currentPage = 6;
this.centerFirstPage = 1; this.centerFirstPage = 1;
} }
}, },
//点击后面的省略号 //点击后面的省略号
clickToGetNextGroup(){ clickToGetNextGroup(){
let {centerFirstPage,currentPage,pages} = this; let {centerFirstPage,pages} = this;
if(centerFirstPage+5+6<pages){ if(centerFirstPage+5+6<pages){
this.currentPage = currentPage +6; console.log(1);
this.currentPage = centerFirstPage +6;
this.centerFirstPage = centerFirstPage +6; this.centerFirstPage = centerFirstPage +6;
} }
else if(centerFirstPage+5+6>=pages){ else if(centerFirstPage+5+6>=pages){
console.log(2);
this.currentPage = pages-5; this.currentPage = pages-5;
this.centerFirstPage = pages-5; this.centerFirstPage = pages-5;
} }
......
...@@ -110,13 +110,13 @@ ...@@ -110,13 +110,13 @@
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/161fecb3d8b441c5b340319c62508513-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',
'http://i1.sinaimg.cn/ent/d/2008-06-04/U105P28T3D2048907F326DT20080604225106.jpg', '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/22e2d91201a2478683044f116d1d8186-file',
'https://yundingweb.oss-cn-beijing.aliyuncs.com/yunding/20190828/161fecb3d8b441c5b340319c62508513-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://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://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://s2.ax1x.com/2020/01/13/lHpvY4.png', // 'https://s2.ax1x.com/2020/01/13/lHpvY4.png',
], ],
showBanner:false, showBanner:false,
currentImg:0, currentImg:0,
...@@ -239,9 +239,11 @@ ...@@ -239,9 +239,11 @@
margin-right:16*$length; margin-right:16*$length;
border-radius: 4*$length; border-radius: 4*$length;
@extend %flex-column-center; @extend %flex-column-center;
@extend %cursorPointer;
img{ img{
width:100%; width:auto;
height:auto; height:100%;
} }
} }
...@@ -262,9 +264,10 @@ ...@@ -262,9 +264,10 @@
margin-right:16*$length; margin-right:16*$length;
border-radius: 4*$length; border-radius: 4*$length;
@extend %flex-column-center; @extend %flex-column-center;
@extend %cursorPointer;
img{ img{
width:100%; width:auto;
height:auto; height:100%;
} }
.abs{ .abs{
position:absolute; position:absolute;
...@@ -291,6 +294,8 @@ ...@@ -291,6 +294,8 @@
width:360*$length; width:360*$length;
border-radius: 4*$length; border-radius: 4*$length;
@extend %flex-column-center; @extend %flex-column-center;
@extend %cursorPointer;
img{ img{
width:100%; width:100%;
height:auto; height:auto;
...@@ -309,6 +314,8 @@ ...@@ -309,6 +314,8 @@
height:360*$length; height:360*$length;
border-radius: 4*$length; border-radius: 4*$length;
@extend %flex-column-center; @extend %flex-column-center;
@extend %cursorPointer;
position:relative; position:relative;
img{ img{
width:100%; width:100%;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<project-card></project-card> <project-card></project-card>
</card-container> </card-container>
<div class="pagination"> <div class="pagination">
<pagination style="margin: 0 auto;"></pagination> <pagination style="margin: 0 auto;" pages="13" v-on:listenPageChange="changePage"></pagination>
</div> </div>
</div> </div>
<div class="project-container__right"> <div class="project-container__right">
...@@ -50,6 +50,8 @@ import NavWrap from "../../components/pc/nav/navWrap"; ...@@ -50,6 +50,8 @@ import NavWrap from "../../components/pc/nav/navWrap";
import CardContainer from "../../components/pc/cardContainer"; import CardContainer from "../../components/pc/cardContainer";
import ProjectCard from "../../components/pc/projectCard"; import ProjectCard from "../../components/pc/projectCard";
import Pagination from "../../components/pc/pagination"; import Pagination from "../../components/pc/pagination";
export default { export default {
components: {Pagination, ProjectCard, CardContainer, NavWrap}, components: {Pagination, ProjectCard, CardContainer, NavWrap},
data(){ data(){
...@@ -139,6 +141,9 @@ export default { ...@@ -139,6 +141,9 @@ export default {
methods: { methods: {
toRelease(){ toRelease(){
this.$router.push('/project/release') this.$router.push('/project/release')
},
changePage(currentPage){
//返回页数 请求新的数据
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment