head_component.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <div class="contenter">
  3. <div class="head-left">
  4. <img class="head-icon" src="@/assets/images/login/login-return.png" @click="backTo" alt="404">
  5. </div>
  6. <!-- 等UI图更新继续画 <div>-->
  7. <div class="head-title">
  8. <div v-if="headinfo.title">{{headinfo.title}}</div>
  9. </div>
  10. <div class="head-right" v-if="!headinfo.isLogin">
  11. <div class="right-user">
  12. <img src="@/assets/images/wakeup/user.png" @click="backTo" alt="404">
  13. </div>
  14. <el-button class="head-right-btn1" >使用说明</el-button>
  15. <el-button class="head-right-btn2" @click="exit">退出登录</el-button>
  16. </div>
  17. <!-- </div>-->
  18. </div>
  19. </template>
  20. <script setup>
  21. const {proxy} = getCurrentInstance()
  22. const router = useRouter()
  23. const props = defineProps({
  24. headinfo: {}
  25. })
  26. function backTo() {
  27. if(props.headinfo.backUrlUse){
  28. router.push({
  29. path: props.headinfo.backUrl
  30. })
  31. }else {
  32. router.go(-1);
  33. }
  34. }
  35. function exit() {
  36. proxy.$modal.confirm('您确认退出吗').then(function () {
  37. router.push({
  38. path: '/xjc_login'
  39. })
  40. }).then(() => {
  41. }).catch(() => {
  42. })
  43. }
  44. </script>
  45. <style scoped lang='scss'>
  46. .contenter{
  47. position: absolute;
  48. top: 0;
  49. left: 0;
  50. width:100%;
  51. height: 100px;
  52. display: flex;
  53. align-items: center;
  54. background-color: rgba(251,252,253,0.5);
  55. justify-content: space-between;
  56. .head-left{
  57. width: 464px;
  58. }
  59. .head-icon{
  60. width: 74px;
  61. height: 74px;
  62. margin-left: 74px;
  63. }
  64. .head-title{
  65. width: 464px;
  66. //margin: ;
  67. text-align: center;
  68. font-weight: bold;
  69. font-size: 48px;
  70. color: #060606;
  71. }
  72. .head-right{
  73. display: flex;
  74. justify-content: space-around;
  75. align-items: center;
  76. width: 464px;
  77. .head-right-btn1{
  78. width: 136px;
  79. height: 74px;
  80. background: #2BC17B;
  81. border-radius: 10px 10px 10px 10px;
  82. font-weight: 400;
  83. font-size: 24px;
  84. color: #FFFFFF;
  85. }
  86. .head-right-btn2{
  87. width: 136px;
  88. height: 74px;
  89. background: #FB5451;
  90. border-radius: 10px 10px 10px 10px;
  91. font-weight: 400;
  92. font-size: 24px;
  93. color: #FFFFFF;
  94. margin-right: 48px;
  95. }
  96. .right-user{
  97. img{
  98. width: 85px;
  99. height: 85px;
  100. }
  101. }
  102. }
  103. }
  104. </style>