mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 03:16:42 +08:00
文章问答排行榜
This commit is contained in:
@@ -5,7 +5,11 @@
|
||||
display: block;
|
||||
word-break:break-all;
|
||||
}
|
||||
|
||||
.orinfo-text{
|
||||
font-size: 13px;
|
||||
color: #666666;
|
||||
font-weight: 400;
|
||||
}
|
||||
.previewStyle{
|
||||
color: #337ab7;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -60,19 +60,19 @@
|
||||
<ul class="ranking-data">
|
||||
<li v-for="(item, index) in ankingList" :key="index" style="margin-top:30px;line-height: 22px;cursor: pointer;">
|
||||
<router-link :to="'article/detail?id=' + item.id">
|
||||
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:25px">
|
||||
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-tow" v-if="index==1" style="margin-right:25px">
|
||||
<span class="portal-right-text orange-tow" v-if="index==1" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-three" v-if="index==2" style="margin-right:25px">
|
||||
<span class="portal-right-text orange-three" v-if="index==2" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index==3" style="margin-right:25px">
|
||||
<span class="portal-right-text" v-if="index==3" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index==4" style="margin-right:25px">
|
||||
<span class="portal-right-text" v-if="index==4" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-title-desc">{{ item.sysCreateUname }} <span class="orinfo-text">({{ item.orinfo }})</span> </span>
|
||||
|
||||
@@ -80,19 +80,19 @@
|
||||
<ul class="ranking-data">
|
||||
<li v-for="(item, index) in ankingList" :key="index" style="margin-top:30px;line-height: 22px;cursor: pointer;">
|
||||
<!-- <router-link :to="'article/detail?id=' + item.id"> -->
|
||||
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:25px">
|
||||
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-tow" v-if="index==1" style="margin-right:25px">
|
||||
<span class="portal-right-text orange-tow" v-if="index==1" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/listblue02.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-three" v-if="index==2" style="margin-right:25px">
|
||||
<span class="portal-right-text orange-three" v-if="index==2" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/listblue03.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index==3" style="margin-right:25px">
|
||||
<span class="portal-right-text" v-if="index==3" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index==4" style="margin-right:25px">
|
||||
<span class="portal-right-text" v-if="index==4" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-title-desc">{{ item.sysCreateUname }}<span class="orinfo-text">({{ item.orinfo }})</span> </span>
|
||||
|
||||
@@ -238,22 +238,22 @@
|
||||
<p class="ranking-title">贡献榜</p>
|
||||
<ul class="ranking-data">
|
||||
<li v-for="(item, index) in ankingList" :key="index" style="margin-top:30px;line-height: 22px;cursor: pointer;">
|
||||
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:94px">
|
||||
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-tow" v-if="index==1" style="margin-right:94px">
|
||||
<span class="portal-right-text orange-tow" v-if="index==1" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-three" v-if="index==2" style="margin-right:94px">
|
||||
<span class="portal-right-text orange-three" v-if="index==2" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index==3" style="margin-right:94px">
|
||||
<span class="portal-right-text" v-if="index==3" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index==4" style="margin-right:94px">
|
||||
<span class="portal-right-text" v-if="index==4" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-title-desc">{{ item.sysCreateUname }}</span>
|
||||
<span class="portal-title-desc">{{ item.sysCreateUname }} <span class="orinfo-text">({{ item.orinfo }})</span> </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -315,6 +315,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ankIds:[],
|
||||
resonimg:{},
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
noData: true,
|
||||
@@ -416,6 +417,19 @@ export default {
|
||||
apiQa.queryList(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.ankingList = res.result;
|
||||
let ids = [];
|
||||
this.ankingList.forEach(item =>{
|
||||
ids.push(item.sysCreateAid);
|
||||
})
|
||||
apiUser.getByIds(ids).then(res=>{
|
||||
res.result.forEach(item=>{
|
||||
this.ankIds.push(item.orgInfo);
|
||||
this.ankingList.forEach((value, index) => {
|
||||
value['orinfo'] = this.ankIds[index];
|
||||
})
|
||||
})
|
||||
// console.log(this.ankingList);
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -84,22 +84,22 @@
|
||||
<p class="ranking-title">贡献榜</p>
|
||||
<ul class="ranking-data">
|
||||
<li v-for="(item, index) in ankingList" :key="index" style="margin-top:30px;line-height: 22px;cursor: pointer;">
|
||||
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:94px">
|
||||
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-tow" v-if="index==1" style="margin-right:94px">
|
||||
<span class="portal-right-text orange-tow" v-if="index==1" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/listblue02.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-three" v-if="index==2" style="margin-right:94px">
|
||||
<span class="portal-right-text orange-three" v-if="index==2" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/listblue03.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index==3" style="margin-right:94px">
|
||||
<span class="portal-right-text" v-if="index==3" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index==4" style="margin-right:94px">
|
||||
<span class="portal-right-text" v-if="index==4" style="margin-right:20px">
|
||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-title-desc">{{ item.sysCreateUname }}</span>
|
||||
<span class="portal-title-desc">{{ item.sysCreateUname }}<span class="orinfo-text">({{ item.orinfo }})</span> </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -164,6 +164,7 @@ export default {
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
ankIds:[],
|
||||
resonimg:{},
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
loading: false,
|
||||
@@ -421,6 +422,20 @@ export default {
|
||||
apiQa.queryList(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.ankingList = res.result;
|
||||
this.ankingList = res.result;
|
||||
let ids = [];
|
||||
this.ankingList.forEach(item =>{
|
||||
ids.push(item.sysCreateAid);
|
||||
})
|
||||
apiUser.getByIds(ids).then(res=>{
|
||||
res.result.forEach(item=>{
|
||||
this.ankIds.push(item.orgInfo);
|
||||
this.ankingList.forEach((value, index) => {
|
||||
value['orinfo'] = this.ankIds[index];
|
||||
})
|
||||
})
|
||||
// console.log(this.ankingList);
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user