Index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <div class="hello">
  3. <div class="block">
  4. <div class="row header ">
  5. <div class="right pull-right">
  6. <ul class="inline pull-right">
  7. <li ><router-link :to="link">{{link_text}}</router-link></li>
  8. </ul>
  9. </div>
  10. </div>
  11. </div>
  12. <div style="background: #6ebdc2;position: absolute;left: 0;top: 0;right: 0;bottom: 0;color: #fff;text-align: center;">
  13. <img src="../../static/logo/logo.png" alt="" style="margin-top: 12%;width: 200px;">
  14. <p style="font-size: 45px;font-weight: normal;letter-spacing: 2px;margin-top: 30px;">文档管理分享平台</p>
  15. <p style="font-size: 22px;font-weight: 300;letter-spacing: 1px;margin-top: -20px;">
  16. Api接口文档&nbsp;&nbsp;&nbsp;数据库文档&nbsp;&nbsp;&nbsp;技术文档&nbsp;&nbsp;&nbsp;说明文档
  17. </p>
  18. <p style="font-size: 20px;letter-spacing: 1px;"><a href="https://doc.xmzhuliang.com/web/?#/5"> - 观看示例 - </a></p>
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. export default {
  24. name: 'Index',
  25. data () {
  26. return {
  27. height: '',
  28. link:'',
  29. link_text:''
  30. }
  31. },
  32. methods:{
  33. getHeight(){
  34. if (window.innerHeight){
  35. var winHeight = window.innerHeight;
  36. }
  37. else if ((document.body) && (document.body.clientHeight)){
  38. var winHeight = document.body.clientHeight;
  39. }
  40. this.height = winHeight+'px' ;
  41. }
  42. },
  43. mounted () {
  44. var that = this ;
  45. this.getHeight();
  46. that.link = '/user/login';
  47. that.link_text = that.$t("index_login_or_register");
  48. this.get_user_info(function(response){
  49. if (response.data.error_code === 0 ) {
  50. that.link = '/item/index';
  51. that.link_text = that.$t("my_item");
  52. }
  53. });
  54. }
  55. }
  56. </script>
  57. <!-- Add "scoped" attribute to limit CSS to this component only -->
  58. <style scoped>
  59. .el-carousel__item {
  60. text-align: center;
  61. font: 25px "Microsoft Yahei";
  62. color: #fff;
  63. }
  64. .header{
  65. padding-right: 100px;
  66. padding-top: 30px;
  67. font-size: 18px;
  68. position: fixed;
  69. right: 0;
  70. left: 0;
  71. z-index: 1030;
  72. margin-bottom: 0;
  73. }
  74. .header a {
  75. color: white;
  76. font-size: 12px;
  77. font-weight: bold;
  78. }
  79. .slide{
  80. width: 700px;
  81. position : absolute;
  82. top : 50%;
  83. left : 50%;
  84. transform : translate(-50%,-50%);
  85. padding-top: 0px;
  86. padding-left: 15px;
  87. padding-right: 15px;
  88. padding-bottom: 0px;
  89. box-sizing: border-box;
  90. }
  91. .inline>li>a {
  92. font-size: 15px;
  93. font-weight: normal;
  94. }
  95. </style>