个人中心调整
This commit is contained in:
@@ -48,10 +48,6 @@ import {
|
||||
HardBreak,
|
||||
TrailingNode,
|
||||
History,
|
||||
Table,
|
||||
TableHeader,
|
||||
TableCell,
|
||||
TableRow,
|
||||
FormatClear,
|
||||
TextColor,
|
||||
TextHighlight,
|
||||
@@ -122,10 +118,10 @@ export default {
|
||||
new HardBreak,
|
||||
new TrailingNode,
|
||||
new History,
|
||||
new Table({resizable: true}),
|
||||
new TableHeader,
|
||||
new TableCell,
|
||||
new TableRow,
|
||||
// new Table({resizable: true}),
|
||||
// new TableHeader,
|
||||
// new TableCell,
|
||||
// new TableRow,
|
||||
new FormatClear,
|
||||
new TextColor({bubble: true}),
|
||||
new TextHighlight,
|
||||
|
@@ -19,7 +19,7 @@
|
||||
<span v-if="projectName" style="font-size: 30px;color: black;font-weight: bold;display: flex;justify-content: flex-start">
|
||||
{{ projectName }}
|
||||
</span>
|
||||
<span style="display: flex;flex-direction:row;justify-content: flex-start;font-size: 20px;color: rgb(107 114 128);">
|
||||
<span style="text-align: left;display: flex;flex-direction:row;justify-content: flex-start;font-size: 20px;color: rgb(107 114 128);">
|
||||
{{projectTitle}}
|
||||
</span>
|
||||
</div>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row;margin-top: 10px;justify-content: space-between">
|
||||
<div style="width: 250px;height: 60px;background-color: #59A3A4">
|
||||
<div style="width: 250px;height: 60px;">
|
||||
<img :src="'https://starchart.cc/'+projectName+'.svg'" style="width: 250px;height: 60px;">
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row;align-items: center;">
|
||||
|
15
src/components/User/UserArticles.vue
Normal file
15
src/components/User/UserArticles.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<div style="display: flex;flex-direction: row;flex-wrap: nowrap">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "UserArticles"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap" v-show="this.$cookie.get('username')!=null">
|
||||
<div @click="toUserPage" style="display: flex;flex-direction: row;align-items: center;width: 11vw;justify-content: space-between">
|
||||
<div style="display: flex;flex-direction: row;align-items: center">
|
||||
<div style="display: flex;flex-direction: row;align-items: center;width: 11vw;justify-content: space-between">
|
||||
<div @click="toUserPage" style="display: flex;flex-direction: row;align-items: center">
|
||||
<el-avatar shape="square" style=" cursor: pointer;background-color: #59A3A4;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)" size="large">{{this.$cookie.get('username')}}</el-avatar>
|
||||
<div style="margin-left: 5px;display: flex;flex-direction: column;justify-content: space-evenly">
|
||||
<span style="cursor: pointer;font-weight: bold">{{this.$cookie.get('username')}}</span>
|
||||
@@ -46,7 +46,6 @@ export default {
|
||||
signOut(){
|
||||
this.$cookie.delete('username');
|
||||
// deletecookie
|
||||
var that=this;
|
||||
axios({
|
||||
method: 'get',
|
||||
// 请求的地址
|
||||
@@ -62,9 +61,16 @@ export default {
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
setTimeout(()=>{
|
||||
if(this.$route.path!=='/home'){
|
||||
setTimeout(()=>{
|
||||
this.$router.push({
|
||||
path:'/home'
|
||||
})
|
||||
},800)
|
||||
}else {
|
||||
window.location.reload();
|
||||
},800)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
@@ -11,18 +11,18 @@
|
||||
</el-page-header>
|
||||
</div>
|
||||
<div class="PageContent">
|
||||
<el-card class="box-card" style="border: none">
|
||||
<el-card class="box-card" style="border: none;">
|
||||
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;justify-content: flex-start">
|
||||
<div style="display: flex;flex-direction: row;justify-content: flex-start">
|
||||
<div style="width: 100px;height: 100px">
|
||||
<el-avatar :size="90">{{username}}</el-avatar>
|
||||
<div style="display: flex;flex-direction: row;justify-content: space-between">
|
||||
<div style="width: 100px;height: 100px;display: flex;flex-direction: row;align-items: center">
|
||||
<el-avatar style="display: flex;align-items: center;justify-content: center" :size="90">{{username}}</el-avatar>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: column;margin-left: 15px;">
|
||||
<div style="display: flex;flex-direction: row;align-items: center;justify-content: flex-start;">
|
||||
<span style="font-size: 20px;font-weight: bold;">{{username}}</span>
|
||||
<span style="font-size: 15px;font-weight: bold;color: #3b82f6;margin-left: 10px">Lv.1</span>
|
||||
</div>
|
||||
<span style="margin-top: 10px;color: #6b7280;font-size: 15px">你是 HelloGitHub 社区的第<span style="font-size: 16px;color:#2b2e33;font-weight: bold "> {{userId}} </span>位用户,于 {{creatTime}} 加入。</span>
|
||||
<span style="display: flex;justify-content:flex-start;margin-top: 10px;color: #6b7280;font-size: 15px">你是 HelloGitHub 社区的第<span style="font-size: 16px;color:#2b2e33;font-weight: bold "> {{userId}} </span>位用户,于 {{creatTime}} 加入。</span>
|
||||
<span style="display: flex;justify-content: flex-start;margin-top: 10px;color: #6b7280;font-size: 15px">
|
||||
已分享
|
||||
<span v-if="projectNum!=null" style="font-size: 16px;color:#2b2e33;font-weight: bold ">{{projectNum}}</span>
|
||||
@@ -37,6 +37,13 @@
|
||||
点贡献值。
|
||||
</span>
|
||||
</div>
|
||||
<el-progress type="circle" :percentage="contributionValue" :width="100" :show-text="true"></el-progress>
|
||||
<div style="margin-left: 8px;display: flex;flex-direction: column;align-content: space-between;justify-content: space-between">
|
||||
<el-progress style="width: 90px" :show-text="false" :percentage="commentList.length"></el-progress>
|
||||
<el-progress style="width: 90px" :show-text="false" :percentage="projectList.length" status="success"></el-progress>
|
||||
<el-progress style="width: 90px" :show-text="false" :percentage="like.length" status="warning"></el-progress>
|
||||
<el-progress style="width: 90px" :show-text="false" :percentage="Object.keys(article).length" status="exception"></el-progress>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -71,6 +78,15 @@
|
||||
<UserProjects :project="item" :index="index"></UserProjects>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文章" name="four">
|
||||
<el-card style="border: none;display: flex;flex-direction: row;justify-content: flex-start;align-items: flex-start">
|
||||
<span style="font-size: 16px;font-weight: bold">总文章: {{Object.keys(article).length}} 篇</span>
|
||||
</el-card>
|
||||
<el-empty v-show="like.length===0" description="暂无点赞" :image-size="115"></el-empty>
|
||||
<!-- <div v-show="like.length!==0" v-for="(item,index) in like" :key="index">-->
|
||||
<!-- <UserProjects :project="item" :index="index"></UserProjects>-->
|
||||
<!-- </div>-->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -99,6 +115,7 @@ export default {
|
||||
projectList:[],
|
||||
commentList:[],
|
||||
like:[],
|
||||
article:[],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -147,9 +164,12 @@ export default {
|
||||
username:this.$route.query.name
|
||||
}
|
||||
}).then(function (res) {
|
||||
// console.log(res);
|
||||
that.projectList=JSON.parse(res.data.project);
|
||||
that.commentList=JSON.parse(res.data.comment);
|
||||
that.like=JSON.parse(res.data.like)
|
||||
that.article=JSON.parse(res.data.article);
|
||||
console.log(Object.keys(that.article).length);
|
||||
});
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user