Showing
1 changed file
with
15 additions
and
16 deletions
1 | <template> | 1 | <template> |
2 | <view class="container"> | 2 | <view class="container"> |
3 | <view class="container-box"> | 3 | <view class="container-box"> |
4 | - <image :src="mpOwnConfig.logo ? mpOwnConfig.logo : staticLogo"></image> | 4 | + <image :src="mpOwnConfig.logo"></image> |
5 | <text class="splash-text-muted">连接世界 创造价值</text> | 5 | <text class="splash-text-muted">连接世界 创造价值</text> |
6 | </view> | 6 | </view> |
7 | </view> | 7 | </view> |
@@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
11 | import { | 11 | import { |
12 | mapState | 12 | mapState |
13 | } from 'vuex'; | 13 | } from 'vuex'; |
14 | + import api from '@/api/index.js' | ||
15 | + | ||
14 | export default { | 16 | export default { |
15 | data() { | 17 | data() { |
16 | return { | 18 | return { |
@@ -20,34 +22,33 @@ | @@ -20,34 +22,33 @@ | ||
20 | }, | 22 | }, |
21 | onLoad() { | 23 | onLoad() { |
22 | this.getPlateForm(); | 24 | this.getPlateForm(); |
25 | + }, | ||
26 | + created() { | ||
23 | if (!this.userInfo.isToken) { | 27 | if (!this.userInfo.isToken) { |
24 | setTimeout(() => { | 28 | setTimeout(() => { |
25 | uni.reLaunch({ | 29 | uni.reLaunch({ |
26 | url: '/publicLoginSubPage/public/login' | 30 | url: '/publicLoginSubPage/public/login' |
27 | }); | 31 | }); |
28 | - }, 2500); | 32 | + }, 1500); |
29 | } else { | 33 | } else { |
30 | setTimeout(() => { | 34 | setTimeout(() => { |
31 | uni.reLaunch({ | 35 | uni.reLaunch({ |
32 | url: '/pages/index/index' | 36 | url: '/pages/index/index' |
33 | }); | 37 | }); |
34 | - }, 2500); | 38 | + }, 1500); |
35 | } | 39 | } |
36 | }, | 40 | }, |
37 | computed: { | 41 | computed: { |
38 | - ...mapState(['userInfo']) | 42 | + ...mapState(['userInfo']), |
39 | }, | 43 | }, |
40 | methods: { | 44 | methods: { |
41 | - getPlateForm() { | ||
42 | - uni.$u.http.get('/yt/app_design/get').then(res => { | ||
43 | - if (res) { | ||
44 | - this.mpOwnConfig = { | ||
45 | - bg: res.background, | ||
46 | - logo: res.logo, | ||
47 | - name: res.name | ||
48 | - }; | ||
49 | - } | ||
50 | - }); | 45 | + async getPlateForm() { |
46 | + const res = await api.loginApi.getPlateCustomApi() | ||
47 | + this.mpOwnConfig = { | ||
48 | + bg: res.background, | ||
49 | + logo: res.logo ? res.logo : this.staticLogo, | ||
50 | + name: res.name | ||
51 | + }; | ||
51 | } | 52 | } |
52 | } | 53 | } |
53 | }; | 54 | }; |
@@ -69,8 +70,6 @@ | @@ -69,8 +70,6 @@ | ||
69 | width: 100rpx; | 70 | width: 100rpx; |
70 | height: 100rpx; | 71 | height: 100rpx; |
71 | } | 72 | } |
72 | - | ||
73 | - text {} | ||
74 | } | 73 | } |
75 | } | 74 | } |
76 | </style> | 75 | </style> |