nav.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <div class="nav-container">
  3. <div class="nav-main">
  4. <div style="background-color: #07c160;border-color: #07c160" @click="toWechatLogin">
  5. <img style="height:25px;width:25px" src="~@/assets/wechat.png" />
  6. <span style="font-weight: 600;">微信授权登录</span>
  7. </div>
  8. <div style="background-color: #087af5;;border-color:#087af5" @click="toPath">
  9. <img style="height:30px;width:30px;margin:0 2px 0 5px;" src="~@/assets/purch.png" />
  10. <span style="font-weight: 600;">采销平台登录</span>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. import { getParameterByName } from "@/utils/auth"
  17. export default {
  18. methods:{
  19. toWechatLogin(){
  20. const name = getParameterByName("name");
  21. const back = getParameterByName("back");
  22. this.$router.push('/login?name=' + name + "&" + "back=" + back)
  23. },
  24. toPath(){
  25. const back = getParameterByName("back")
  26. window.location.href = back + "/?from=authorization";
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .nav-container{
  33. background: url("~@/assets/bg-phone.jpg") no-repeat;
  34. background-size: cover;
  35. position: relative;
  36. height:100vh;
  37. .nav-main{
  38. position: fixed;
  39. width:100%;
  40. bottom: 120px;
  41. height: 60px;
  42. display: flex;
  43. flex-direction: column;
  44. padding: 10px;
  45. align-items:center;
  46. gap:20px;
  47. div{
  48. height: 40px;
  49. width:80%;
  50. display: flex;
  51. flex-direction: row;
  52. align-items:center;
  53. justify-content: center;
  54. line-height: 40px;
  55. color: #fff;
  56. border-radius: 80px;
  57. cursor: pointer;
  58. user-select: none;
  59. img {
  60. margin:0 5px 0 10px;
  61. }
  62. }
  63. }
  64. }
  65. </style>