index.vue 497 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <view class="auth-wrap" v-if="show">
  3. <slot name="content"></slot>
  4. </view>
  5. </template>
  6. <script>
  7. import { authLogin } from '@/util';
  8. export default {
  9. name: 'auth-wrap',
  10. props: {},
  11. data() {
  12. return { show: false };
  13. },
  14. created() {
  15. authLogin(() => {
  16. this.show = true;
  17. });
  18. },
  19. mounted() {
  20. },
  21. methods: {
  22. reloadPage() {
  23. authLogin(() => {
  24. this.show = true;
  25. });
  26. }
  27. },
  28. };
  29. </script>
  30. <style lang="scss" src="./index.scss" />