Browse Source

Merge pull request 'fix-1051 贡献者列表commit数更改' (#1157) from fix-1051 into V20211228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1157
Reviewed-by: zhoupzh <zhoupzh@pcl.ac.cn>
tags/v1.21.12.2^2
zhoupzh 3 years ago
parent
commit
b36bcb0aaa
2 changed files with 9 additions and 2 deletions
  1. +2
    -1
      templates/repo/home.tmpl
  2. +7
    -1
      web_src/js/components/Contributors.vue

+ 2
- 1
templates/repo/home.tmpl View File

@@ -337,7 +337,8 @@
{{end}}
<div class="ui right">
<a class="membersmore text grey" href="{{.RepoLink}}/contributors">全部 {{svg "octicon-chevron-right" 16}}</a>
<!-- <a class="membersmore text grey" href="{{.RepoLink}}/contributors">全部 {{svg "octicon-chevron-right" 16}}</a> -->
<a class="membersmore text grey" href="{{.RepoLink}}/contributors?type={{if .IsViewBranch}}branch{{else}}tag{{end}}&name={{.BranchName}}">全部 {{svg "octicon-chevron-right" 16}}</a>
</div>
</h4>
<div class="ui members" id="contributorInfo">


+ 7
- 1
web_src/js/components/Contributors.vue View File

@@ -45,6 +45,8 @@ export default {
data() {
return {
url:'',
url_infor:'',
href_:'',
contributors_list:[],
contributors_list_page:[],
currentPage:1,
@@ -56,7 +58,7 @@ export default {
methods: {

getContributorsList(){
this.$axios.get(this.url+'/list').then((res)=>{
this.$axios.get(this.url+'/list?'+this.url_infor).then((res)=>{
this.contributors_list = res.data.contributor_info
this.totalNum = this.contributors_list.length
this.contributors_list_page = this.contributors_list.slice(0,this.pageSize)
@@ -78,6 +80,10 @@ created(){
this.url = url;
let strIndex = this.url.indexOf("contributors")
this.url_code = this.url.substr(0,strIndex)
this.href_ = window.location.href;
let index = this.href_.indexOf("?")
this.url_infor = this.href_.substring(index+1,this.href_.length)
this.getContributorsList()
},


Loading…
Cancel
Save