Showing
7 changed files
with
97 additions
and
41 deletions
1 | -<script> | ||
2 | - import store from '@/store'; | ||
3 | - | ||
4 | - export default { | ||
5 | - //设置全局变量,解绑时从这里取 | ||
6 | - globalData: { | ||
7 | - openId: '' | ||
8 | - }, | ||
9 | - onLaunch(e) { | ||
10 | - // #ifdef APP-PLUS | ||
11 | - uni.reLaunch({ | ||
12 | - url: '/pages/index/splash' | ||
13 | - }) | ||
14 | - // #endif | ||
15 | - }, | ||
16 | - onShow() {}, | ||
17 | - onHide() {} | ||
18 | - }; | ||
19 | -</script> | ||
20 | - | ||
21 | -<style lang="scss"> | ||
22 | - @import '@/uni_modules/uview-ui/index.scss'; | ||
23 | - @import './style/iconfont.scss'; | ||
24 | - @import './style/common.scss'; | ||
25 | - | ||
26 | - page { | ||
27 | - background: #ffffff; | ||
28 | - } | ||
29 | - | ||
30 | - ::-webkit-scrollbar { | ||
31 | - display: none; | ||
32 | - width: 0 !important; | ||
33 | - height: 0 !important; | ||
34 | - -webkit-appearance: none; | ||
35 | - background: transparent; | ||
36 | - } | ||
37 | -</style> | 1 | +<script> |
2 | + import store from '@/store'; | ||
3 | + // import { | ||
4 | + // scene | ||
5 | + // } from '@/config/common'; | ||
6 | + | ||
7 | + export default { | ||
8 | + //设置全局变量,解绑时从这里取 | ||
9 | + globalData: { | ||
10 | + openId: '' | ||
11 | + }, | ||
12 | + onLaunch(e) { | ||
13 | + //取出缓存数据 | ||
14 | + // store.commit('setCacheData'); | ||
15 | + //获取二维码信息 | ||
16 | + // scene(e); | ||
17 | + // #ifdef APP-PLUS | ||
18 | + uni.reLaunch({ | ||
19 | + url: '/pages/index/splash' | ||
20 | + }) | ||
21 | + // #endif | ||
22 | + }, | ||
23 | + onShow(e) { | ||
24 | + // #ifdef MP | ||
25 | + // mpUpData(); //检测小程序更新 | ||
26 | + // #endif | ||
27 | + // #ifdef APP-PLUS | ||
28 | + // uni.reLaunch({ | ||
29 | + // url: '/pages/index/splash' | ||
30 | + // }) | ||
31 | + // #endif | ||
32 | + }, | ||
33 | + onHide() {}, | ||
34 | + onUnload(){ | ||
35 | + uni.setStorageSync('getConfiguration', { | ||
36 | + isConfiguration: false | ||
37 | + }); | ||
38 | + }, | ||
39 | + methods:{ | ||
40 | + // 判断是否是第三方登录没有绑定账号不请求数据 | ||
41 | + getBindNot(){ | ||
42 | + // #ifndef H5 | ||
43 | + const userInfo = uni.getStorageSync('userInfo'); | ||
44 | + // #endif | ||
45 | + // #ifdef H5 | ||
46 | + const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || localStorage.getItem('userInfo')); | ||
47 | + // #endif | ||
48 | + return userInfo.isThirdLogin | ||
49 | + } | ||
50 | + } | ||
51 | + }; | ||
52 | +</script> | ||
53 | + | ||
54 | +<style lang="scss"> | ||
55 | + @import '@/uni_modules/uview-ui/index.scss'; | ||
56 | + @import './style/iconfont.scss'; | ||
57 | + @import './style/common.scss'; | ||
58 | + | ||
59 | + page { | ||
60 | + background: #ffffff; | ||
61 | + } | ||
62 | + | ||
63 | + ::-webkit-scrollbar { | ||
64 | + display: none; | ||
65 | + width: 0 !important; | ||
66 | + height: 0 !important; | ||
67 | + -webkit-appearance: none; | ||
68 | + background: transparent; | ||
69 | + } | ||
70 | +</style> |
@@ -125,7 +125,9 @@ uni.$u.http.interceptors.response.use( | @@ -125,7 +125,9 @@ uni.$u.http.interceptors.response.use( | ||
125 | errorData = message || ""; | 125 | errorData = message || ""; |
126 | } | 126 | } |
127 | // console.log('errorData', errorData); | 127 | // console.log('errorData', errorData); |
128 | - uni.$u.toast(message); | 128 | + if(message != "request:ok"){ |
129 | + uni.$u.toast(message); | ||
130 | + } | ||
129 | // if (show) uni.$u.toast(errorData); | 131 | // if (show) uni.$u.toast(errorData); |
130 | return Promise.reject(response); | 132 | return Promise.reject(response); |
131 | } | 133 | } |
@@ -241,6 +241,9 @@ | @@ -241,6 +241,9 @@ | ||
241 | }, | 241 | }, |
242 | onShow() { | 242 | onShow() { |
243 | this.page.num = 1; | 243 | this.page.num = 1; |
244 | + if(getApp().getBindNot()){ | ||
245 | + return | ||
246 | + } | ||
244 | if (this.detailStatus) { | 247 | if (this.detailStatus) { |
245 | this.loadData(1, null, null, null, null, null, null); | 248 | this.loadData(1, null, null, null, null, null, null); |
246 | } | 249 | } |
@@ -256,6 +259,9 @@ | @@ -256,6 +259,9 @@ | ||
256 | onLoad(e) { | 259 | onLoad(e) { |
257 | // 隐藏原生的tabbar | 260 | // 隐藏原生的tabbar |
258 | uni.hideTabBar(); | 261 | uni.hideTabBar(); |
262 | + if(getApp().getBindNot()){ | ||
263 | + return | ||
264 | + } | ||
259 | if (e.type == undefined) { | 265 | if (e.type == undefined) { |
260 | this.loadData(1, null, null, null, null, null, null); | 266 | this.loadData(1, null, null, null, null, null, null); |
261 | } else { | 267 | } else { |
@@ -211,6 +211,9 @@ | @@ -211,6 +211,9 @@ | ||
211 | async onLoad(options) { | 211 | async onLoad(options) { |
212 | // 隐藏原生的tabbar | 212 | // 隐藏原生的tabbar |
213 | uni.hideTabBar(); | 213 | uni.hideTabBar(); |
214 | + if(getApp().getBindNot()){ | ||
215 | + return | ||
216 | + } | ||
214 | this.page.num = 1; | 217 | this.page.num = 1; |
215 | const { | 218 | const { |
216 | deviceState | 219 | deviceState |
@@ -231,6 +234,9 @@ | @@ -231,6 +234,9 @@ | ||
231 | } | 234 | } |
232 | }, | 235 | }, |
233 | onShow() { | 236 | onShow() { |
237 | + if(getApp().getBindNot()){ | ||
238 | + return | ||
239 | + } | ||
234 | if (this.orgId) { | 240 | if (this.orgId) { |
235 | this.loadData(1, { | 241 | this.loadData(1, { |
236 | organizationId: this.orgId | 242 | organizationId: this.orgId |
@@ -129,6 +129,9 @@ | @@ -129,6 +129,9 @@ | ||
129 | onLoad() { | 129 | onLoad() { |
130 | // 隐藏原生的tabbar | 130 | // 隐藏原生的tabbar |
131 | uni.hideTabBar(); | 131 | uni.hideTabBar(); |
132 | + if(getApp().getBindNot()){ | ||
133 | + return | ||
134 | + } | ||
132 | this.getDeviceTotalData(); | 135 | this.getDeviceTotalData(); |
133 | uni.setStorageSync('getConfiguration', { | 136 | uni.setStorageSync('getConfiguration', { |
134 | isConfiguration: false | 137 | isConfiguration: false |
@@ -98,14 +98,17 @@ | @@ -98,14 +98,17 @@ | ||
98 | }, | 98 | }, |
99 | }); | 99 | }); |
100 | //#endif | 100 | //#endif |
101 | + uni.setStorageSync('getConfiguration', { | ||
102 | + isConfiguration: false | ||
103 | + }); | ||
101 | }, | 104 | }, |
102 | computed: { | 105 | computed: { |
103 | ...mapState(["plateInfo"]), | 106 | ...mapState(["plateInfo"]), |
104 | }, | 107 | }, |
105 | - mounted() { | ||
106 | - this.getPlateForm(); | ||
107 | - }, | ||
108 | onShow() { | 108 | onShow() { |
109 | + uni.setStorageSync('getConfiguration', { | ||
110 | + isConfiguration: false | ||
111 | + }); | ||
109 | this.getPlateForm(); | 112 | this.getPlateForm(); |
110 | }, | 113 | }, |
111 | methods: { | 114 | methods: { |