| @@ -3,9 +3,9 @@ | |||||
| <div class="row git-user-content"> | <div class="row git-user-content"> | ||||
| <h3 class="ui header"> | <h3 class="ui header"> | ||||
| <div class="ui breadcrumb"> | <div class="ui breadcrumb"> | ||||
| <a class="section" href="/">代码</a> | |||||
| <a class="section" :href="url_code">代码</a> | |||||
| <div class="divider"> / </div> | <div class="divider"> / </div> | ||||
| <div class="active section" >贡献者({{totalNum}})</div> | |||||
| <div class="active section" >贡献者 ({{totalNum}})</div> | |||||
| </div> | </div> | ||||
| </h3> | </h3> | ||||
| <div class="ui horizontal relaxed list"> | <div class="ui horizontal relaxed list"> | ||||
| @@ -56,7 +56,7 @@ export default { | |||||
| methods: { | methods: { | ||||
| getContributorsList(){ | getContributorsList(){ | ||||
| this.$axios.get(this.url+'/contributors/list').then((res)=>{ | |||||
| this.$axios.get(this.url+'/list').then((res)=>{ | |||||
| this.contributors_list = res.data.contributor_info | this.contributors_list = res.data.contributor_info | ||||
| this.totalNum = this.contributors_list.length | this.totalNum = this.contributors_list.length | ||||
| this.contributors_list_page = this.contributors_list.slice(0,this.pageSize) | this.contributors_list_page = this.contributors_list.slice(0,this.pageSize) | ||||
| @@ -74,7 +74,10 @@ watch: { | |||||
| }, | }, | ||||
| created(){ | created(){ | ||||
| this.url=document.head.querySelector("[property~='og:url'][content]").content | |||||
| const url = window.location.pathname; | |||||
| this.url = url; | |||||
| let strIndex = this.url.indexOf("contributors") | |||||
| this.url_code = this.url.substr(0,strIndex) | |||||
| this.getContributorsList() | this.getContributorsList() | ||||
| }, | }, | ||||