index.vue 950 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view class="main">
  3. <view class="one">
  4. <image class="logo" :src="logoUrl"></image>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. logoUrl: ''
  13. };
  14. },
  15. onLoad: async function() {
  16. const that = this;
  17. await that.searchConfig();
  18. },
  19. methods: {
  20. // 查询基本设置
  21. async searchConfig() {
  22. const that = this;
  23. let res = await that.$api(`/config`, 'GET', {});
  24. if (res.errcode == '0') {
  25. that.$set(that, `logoUrl`, res.data.file[0].url || '../../static/login.jpg');
  26. let url = `/pages/home/index`;
  27. uni.reLaunch({
  28. url
  29. })
  30. }
  31. }
  32. },
  33. }
  34. </script>
  35. <style lang="scss">
  36. .main {
  37. display: flex;
  38. flex-direction: column;
  39. width: 100vw;
  40. height: 100vh;
  41. .one {
  42. text-align: center;
  43. margin: 40vw 0 0 0;
  44. .logo {
  45. width: 50vw;
  46. height: 50vw;
  47. border-radius: 90px;
  48. box-shadow: 0 0 5px var(--f1Color);
  49. }
  50. }
  51. }
  52. </style>