mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
我的关注loading状态
This commit is contained in:
@@ -202,20 +202,15 @@
|
|||||||
}
|
}
|
||||||
if(this.activeName == '1') {
|
if(this.activeName == '1') {
|
||||||
this.loading1 = true;
|
this.loading1 = true;
|
||||||
} else
|
} else if(this.activeName == '2') {
|
||||||
if(this.activeName == '2') {
|
|
||||||
this.loading2 = true;
|
this.loading2 = true;
|
||||||
} else
|
} else if(this.activeName == '3') {
|
||||||
if(this.activeName == '3') {
|
|
||||||
this.loading3 = true;
|
this.loading3 = true;
|
||||||
} else
|
} else if(this.activeName == '4') {
|
||||||
if(this.activeName == '4') {
|
|
||||||
this.loading4 = true;
|
this.loading4 = true;
|
||||||
} else
|
} else if(this.activeName == '5') {
|
||||||
if(this.activeName == '5') {
|
|
||||||
this.loading5 = true;
|
this.loading5 = true;
|
||||||
} else
|
} else if(this.activeName == '6') {
|
||||||
if(this.activeName == '6') {
|
|
||||||
this.loading6 = true;
|
this.loading6 = true;
|
||||||
} else {
|
} else {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane name="" label="全部">
|
<el-tab-pane name="" label="全部" v-loading="loading">
|
||||||
<template v-for="item in allPageList">
|
<template v-for="item in allPageList">
|
||||||
<course-list v-if="item.contentType == 1" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></course-list>
|
<course-list v-if="item.contentType == 1" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></course-list>
|
||||||
<case-list v-if="item.contentType == 3" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></case-list>
|
<case-list v-if="item.contentType == 3" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></case-list>
|
||||||
@@ -22,27 +22,27 @@
|
|||||||
<answer-list v-if="item.contentType == 5" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></answer-list>
|
<answer-list v-if="item.contentType == 5" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></answer-list>
|
||||||
<article-list v-if="item.contentType == 2" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></article-list>
|
<article-list v-if="item.contentType == 2" :list="[item]" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></article-list>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="allPageList.length==0 && loading==1" class="home-no-list">
|
<div v-if="allPageList.length==0 && !loading" class="home-no-list">
|
||||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
|
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-course.png`" alt="" srcset="">
|
||||||
<p class="text">暂时没有动态</p>
|
<p class="text">暂时没有动态</p>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="1" label="课程">
|
<el-tab-pane name="1" label="课程" v-loading="loading1">
|
||||||
<course-list :list="cousrePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></course-list>
|
<course-list :list="cousrePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></course-list>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="6" label="笔记">
|
<el-tab-pane name="6" label="笔记" v-loading="loading6">
|
||||||
<note-list :list="notePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></note-list>
|
<note-list :list="notePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></note-list>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="3" label="案例">
|
<el-tab-pane name="3" label="案例" v-loading="loading3">
|
||||||
<case-list :list="casePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></case-list>
|
<case-list :list="casePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></case-list>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="2" label="文章">
|
<el-tab-pane name="2" label="文章" v-loading="loading2">
|
||||||
<article-list :list="articlePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></article-list>
|
<article-list :list="articlePageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></article-list>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="4" label="提问">
|
<el-tab-pane name="4" label="提问" v-loading="loading4">
|
||||||
<put-list :list="qaPageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></put-list>
|
<put-list :list="qaPageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></put-list>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="5" label="回答">
|
<el-tab-pane name="5" label="回答" v-loading="loading5">
|
||||||
<answer-list :list="answerPageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></answer-list>
|
<answer-list :list="answerPageList" :isDynamic="true" :personal="true" :isFollow="true" @hideIndex="dynamicHide"></answer-list>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
@@ -101,8 +101,15 @@
|
|||||||
components:{portalHeader,UcHeader,CaseList,CourseList,NoteList,PutList,AnswerList,ArticleList,FollowList,BookList},
|
components:{portalHeader,UcHeader,CaseList,CourseList,NoteList,PutList,AnswerList,ArticleList,FollowList,BookList},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
loading:false,
|
||||||
|
loading1:false,
|
||||||
|
loading2:false,
|
||||||
|
loading3:false,
|
||||||
|
loading4:false,
|
||||||
|
loading5:false,
|
||||||
|
loading6:false,
|
||||||
input:'',
|
input:'',
|
||||||
loading:0,//加载中
|
// loading:0,//加载中
|
||||||
activeName:'first',
|
activeName:'first',
|
||||||
page:{
|
page:{
|
||||||
pageIndex:1,
|
pageIndex:1,
|
||||||
@@ -174,8 +181,29 @@
|
|||||||
contentType:this.activeName == 0? '':this.activeName,//内容类型
|
contentType:this.activeName == 0? '':this.activeName,//内容类型
|
||||||
aids:this.followIds // 数组
|
aids:this.followIds // 数组
|
||||||
}
|
}
|
||||||
|
if(this.activeName == '1') {
|
||||||
|
this.loading1 = true;
|
||||||
|
} else if(this.activeName == '2') {
|
||||||
|
this.loading2 = true;
|
||||||
|
} else if(this.activeName == '3') {
|
||||||
|
this.loading3 = true;
|
||||||
|
} else if(this.activeName == '4') {
|
||||||
|
this.loading4 = true;
|
||||||
|
} else if(this.activeName == '5') {
|
||||||
|
this.loading5 = true;
|
||||||
|
} else if(this.activeName == '6') {
|
||||||
|
this.loading6 = true;
|
||||||
|
} else {
|
||||||
|
this.loading = true;
|
||||||
|
}
|
||||||
apiStat.userDynamicfollows(data).then(res=>{
|
apiStat.userDynamicfollows(data).then(res=>{
|
||||||
this.loading=1;
|
this.loading = false;
|
||||||
|
this.loading1 = false;
|
||||||
|
this.loading2 = false;
|
||||||
|
this.loading3 = false;
|
||||||
|
this.loading4 = false;
|
||||||
|
this.loading5 = false;
|
||||||
|
this.loading6 = false;
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
this.page.count = res.result.count;
|
this.page.count = res.result.count;
|
||||||
if(res.result.count==0){
|
if(res.result.count==0){
|
||||||
|
|||||||
Reference in New Issue
Block a user