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