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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<script>
export default {
globalData: {
currentHouseVerify: false, // 当前小区是否认证
registerInfo: {
propertyName: '',
propertyCode: '',
platformName: '',
platformCode: '',
buildingId: '',
buildingName: '',
unitId: '',
unitName: '',
roomId: '',
roomName: '',
buildingStatus: '',
buildingType: '',
isDefault: 0,
relationShip: '',
residentName: '',
residentPhone: '',
sex: '',
certificateType: '',
certificateNo: ''
},
maintenanceInfo: {
repairAddress: '',
repairArticle: '',
repairTitle: '',
ownerPhone: '',
reservationTime: '',
repairDesc: '',
repairPhoto: ''
},
complaintInfo: {
complaintImg: "",
complaintTheme: "",
problemDesc: "",
userId: "",
userName: "",
userPhone: ""
}
},
onLaunch: function() {
//小程序自动更新
if (uni.canIUse('getUpdateManager')) {
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(res => {
// 请求完新版本信息的回调
if (res.hasUpdate) {
updateManager.onUpdateReady(() => {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: res => {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate();
}
}
});
});
updateManager.onUpdateFailed(() => {
// 新的版本下载失败
uni.showModal({
title: '已经有新版本了哟~',
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
});
});
}
});
}
// let _this = this;
// wx.getSystemInfo({
// success: function(res) {
// let platform = res.platform
// _this.globalData.isMobieDevice = platform == "ios" || platform == "android" || platform == "devtools"
// }
// })
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uni-scss/index.scss';
/* #ifndef APP-NVUE */
@import '@/static/customicons.css';
// 设置整个项目的背景色
page {
background-color: #ffffff;
}
/* #endif */
</style>