launch.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view>
  3. <view class="logoview">
  4. <image v-if="wxconfig && wxconfig.CONFIG_PROJECT_LOGO" :src="wxconfig.CONFIG_PROJECT_LOGO" mode="aspectFit"
  5. class="logo"></image>
  6. <image v-else :src="config.photo?config.photo:''" mode="aspectFit" class="logo"></image>
  7. </view>
  8. <view class="slogan dflex">
  9. ©绿萝云 2024
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. const req = require('../../utils/request.js');
  15. const api = require('../../utils/api.js');
  16. const app = getApp();
  17. export default {
  18. components: {},
  19. data() {
  20. return {
  21. config: '',
  22. typeRole: '',
  23. userInfo: {},
  24. wxconfig: {},
  25. };
  26. },
  27. onLoad(opt) {
  28. let url = uni.getStorageSync('window_location')
  29. uni.removeStorageSync('window_location')
  30. var tha = this;
  31. req.setStorage('appId', opt.appId);
  32. this.getwxConfig();
  33. setTimeout(function() {
  34. if(url){
  35. window.location.replace(url)
  36. }else{
  37. tha.jumpUrl('/pages/tabBar/index?appId=' + opt.appId);
  38. }
  39. }, 3000);
  40. },
  41. methods: {
  42. getwxConfig() {
  43. req.getwxConfig(data => {
  44. this.wxconfig = data;
  45. });
  46. },
  47. jumpUrl(url) {
  48. uni.reLaunch({
  49. url: url
  50. });
  51. }
  52. }
  53. };
  54. </script>
  55. <style>
  56. @import './launch.css';
  57. </style>