configuration-detail.vue
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<view class="configuation-detail-page">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<web-view :src="showConfiguration"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
showConfiguration: '',
defauleConfigImage: 'https://dev.thingskit.com',
params: ''
};
},
onLoad(e) {
uni.setStorageSync('getConfiguration', {
isConfiguration: true
});
if (e.configId !== null) {
this.params = e.configurationHref;
this.requestUrl(this.params);
}
// 隐藏原生的tabbar
uni.hideTabBar();
},
onShow() {
this.$nextTick(()=>{
uni.setNavigationBarTitle({
title:this.$t('menu.configurationDetail')
})
})
uni.setStorageSync('getConfiguration', {
isConfiguration: true
});
},
onUnload() {
uni.setStorageSync('getConfiguration', {
isConfiguration: false
});
uni.removeStorageSync('config');
},
methods: {
async requestUrl(e) {
const httpData = {
configurationId: e,
lightbox: 1
};
const getUrl = await uni.$u.http.get('/', {
params: httpData,
custom: {
load: false
}
});
const pathUrl = uni.getStorageSync('config');
const userInfo = uni.getStorageSync('userInfo')
this.showConfiguration = this.params
}
}
};
</script>
<style lang="scss" scoped>
@import '../../static/configuration.scss';
</style>