Showing
4 changed files
with
96 additions
and
2 deletions
... | ... | @@ -9,9 +9,14 @@ export default { |
9 | 9 | }, |
10 | 10 | onLaunch(e) { |
11 | 11 | //取出缓存数据 |
12 | - store.commit('setCacheData'); | |
12 | + // store.commit('setCacheData'); | |
13 | 13 | //获取二维码信息 |
14 | - scene(e); | |
14 | + // scene(e); | |
15 | + // #ifdef APP-PLUS | |
16 | + uni.reLaunch({ | |
17 | + url:'/pages/index/splash' | |
18 | + }) | |
19 | + // #endif | |
15 | 20 | }, |
16 | 21 | onShow(e) { |
17 | 22 | // #ifdef MP | ... | ... |
... | ... | @@ -10,6 +10,17 @@ |
10 | 10 | } |
11 | 11 | }, |
12 | 12 | { |
13 | + "path": "pages/index/splash", | |
14 | + "style": { | |
15 | + "navigationBarTitleText": "", | |
16 | + "disableScroll": true, | |
17 | + "app-plus": { | |
18 | + "titleNView": false | |
19 | + } | |
20 | + | |
21 | + } | |
22 | + }, | |
23 | + { | |
13 | 24 | "path": "pages/device/device", |
14 | 25 | "style": { |
15 | 26 | "navigationBarTitleText": "设备" | ... | ... |
pages/index/splash.vue
0 → 100644
1 | +<template> | |
2 | + <view class="container"> | |
3 | + <view class="container-box"> | |
4 | + <image :src="mpOwnConfig.logo ? mpOwnConfig.logo : staticLogo"></image> | |
5 | + <text class="splash-text-muted">连接世界 创造价值</text> | |
6 | + </view> | |
7 | + </view> | |
8 | +</template> | |
9 | + | |
10 | +<script> | |
11 | +import { mapState } from 'vuex'; | |
12 | +export default { | |
13 | + data() { | |
14 | + return { | |
15 | + staticLogo: '../../static/logo.png', | |
16 | + mpOwnConfig: {} | |
17 | + }; | |
18 | + }, | |
19 | + onLoad() { | |
20 | + this.getPlateForm(); | |
21 | + if (!this.userInfo.isToken) { | |
22 | + setTimeout(() => { | |
23 | + uni.reLaunch({ | |
24 | + url: '/publicLoginSubPage/public/login' | |
25 | + }); | |
26 | + }, 2500); | |
27 | + } else { | |
28 | + setTimeout(() => { | |
29 | + uni.reLaunch({ | |
30 | + url: '/pages/index/index' | |
31 | + }); | |
32 | + }, 2500); | |
33 | + } | |
34 | + }, | |
35 | + computed: { | |
36 | + ...mapState(['userInfo']) | |
37 | + }, | |
38 | + methods: { | |
39 | + getPlateForm() { | |
40 | + uni.$u.http.get('/yt/app_design/get').then(res => { | |
41 | + if (res) { | |
42 | + this.mpOwnConfig = { | |
43 | + bg: res.background, | |
44 | + logo: res.logo, | |
45 | + name: res.name | |
46 | + }; | |
47 | + } | |
48 | + }); | |
49 | + } | |
50 | + } | |
51 | +}; | |
52 | +</script> | |
53 | + | |
54 | +<style lang="less"> | |
55 | +.container { | |
56 | + width: 100%; | |
57 | + height: 100%; | |
58 | + margin-top: 300rpx; | |
59 | + .container-box { | |
60 | + display: flex; | |
61 | + align-items: center; | |
62 | + justify-content: space-between; | |
63 | + flex-direction: column; | |
64 | + image { | |
65 | + width: 100rpx; | |
66 | + height: 100rpx; | |
67 | + } | |
68 | + text { | |
69 | + } | |
70 | + } | |
71 | +} | |
72 | +</style> | ... | ... |
... | ... | @@ -151,6 +151,12 @@ button { |
151 | 151 | font-weight: 600; |
152 | 152 | color: #3a4759; |
153 | 153 | } |
154 | +.splash-text-muted { | |
155 | + font-size: 22px; | |
156 | + font-family: PingFangSC-Regular, PingFang SC; | |
157 | + font-weight: 600; | |
158 | + color: #3a4759; | |
159 | +} | |
154 | 160 | .login-text-gray { |
155 | 161 | font-size: 13px; |
156 | 162 | font-family: PingFangSC-Regular, PingFang SC; | ... | ... |