<script>
	export default {
		globalData: {
			houseInfo: {},
			configData: {
				openid: '',
				sessionKey: '',
				unionid: null
			},
			user_phone: '',
			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: {
				// complaintTheme: '',
				// userName: '',
				// userPhone: '',
				// problemDesc: '',
				// complaintImg: []
				complaintImg: "http://192.168.0.118:9999/sys/common/static/scott/pic/DZaw29g8jc2g8517134094d63c4f033b196de2d131c5_1686290068976.jpg,http://192.168.0.118:9999/sys/common/static/scott/pic/Zagv670TpdYHaf63c87fc76c404e7e94bcb7470a353d_1686290068677.jpg,http://192.168.0.118:9999/sys/common/static/scott/pic/rYyK6iZ8EKNEdf951feec766be4346aed5987fee273b_1686290068684.png",
				complaintTheme: "邻居装修太吵",
				problemDesc: "邻居每天两三点装修，太不厚道",
				userId: "1666361228882726913",
				userName: "张三",
				userPhone: "13119098978"
			}
		},
		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>
