Skip to content

Commit

Permalink
[后台] 版本号统一
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Lewis committed Sep 4, 2020
1 parent 2cce676 commit cf8883e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
28 changes: 22 additions & 6 deletions rasp-vue/src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,44 @@
<li class="list-inline-item"><a href="https://rasp.baidu.com/#section-books" target="_blank">最佳实践</a></li>
</ul>
</div>
<div class="col-auto">
<a href="/~https://github.com/baidu/openrasp" target="_blank" class="btn btn-outline-primary btn-sm">源代码</a>
</div>
</div>
</div>
<div class="col-12 col-lg-auto mt-3 mt-lg-0 text-center">
Copyright © 2017-2020 Baidu, Inc. 当前版本 {{rasp_version}}
Copyright © 2017-2020 Baidu, Inc. 企业版 {{ cloud.version }} ({{ cloud.commit_id.substr(0, 8) }}),编译时间 {{ cloud.build_time}}
</div>
</div>
</div>
</footer>
</template>

<script>
import { rasp_version } from '@/util'
import { rasp_version, rasp_commit_id, rasp_build_time } from '@/util/version'
export default {
name: 'Footer',
data: function() {
return {
rasp_version: rasp_version
cloud: {
version: '获取中',
commit_id: '',
build_time: ''
},
fe: {
version: rasp_version,
commit_id: rasp_commit_id,
build_time: rasp_build_time
}
}
},
methods: {
getVersion() {
this.request.post('v1/version', {}).then(res => {
this.cloud = res
})
}
},
mounted() {
this.getVersion()
}
}
</script>
3 changes: 3 additions & 0 deletions rasp-vue/src/util/version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export var rasp_version = '1.0.0'
export var rasp_commit_id = 'Unknown'
export var rasp_build_time = 'Unknown'

0 comments on commit cf8883e

Please sign in to comment.