Merge pull request '版本更新跳转' (#297) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/297
This commit is contained in:
		
						commit
						81955085b5
					
				
							
								
								
									
										6
									
								
								App.vue
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								App.vue
									
									
									
									
									
								
							@ -29,6 +29,9 @@
 | 
			
		||||
		},
 | 
			
		||||
		onShow(){
 | 
			
		||||
			this.getVersion();
 | 
			
		||||
		},
 | 
			
		||||
		onLoad() {
 | 
			
		||||
			
 | 
			
		||||
		},
 | 
			
		||||
		onHide(){
 | 
			
		||||
 | 
			
		||||
@ -50,8 +53,7 @@
 | 
			
		||||
					// console.log(res);
 | 
			
		||||
					if(res.data.app_version != this.$app_version) {
 | 
			
		||||
						this.$u.route('/pageE/setting/updateVersion', {
 | 
			
		||||
							status: res.data.is_focus_upgrade,
 | 
			
		||||
							type: 'auto'
 | 
			
		||||
							status: res.data.is_focus_upgrade
 | 
			
		||||
						});
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
 | 
			
		||||
@ -23,8 +23,6 @@
 | 
			
		||||
		},
 | 
			
		||||
		onLoad(option) {
 | 
			
		||||
			this.is_focus_upgrade = option.status == 1 ? false : true;
 | 
			
		||||
			// type manual 从检查更新页面过来 auto 从app过来
 | 
			
		||||
			this.isAutoUpdate = option.type == 'manual' ? false : true;
 | 
			
		||||
		},
 | 
			
		||||
		onReady() {
 | 
			
		||||
			this.show = true;
 | 
			
		||||
@ -48,7 +46,9 @@
 | 
			
		||||
				// #endif
 | 
			
		||||
			},
 | 
			
		||||
			closeModal() {
 | 
			
		||||
				if(isAutoUpdate) {
 | 
			
		||||
				const pages = getCurrentPages();
 | 
			
		||||
				// console.log(pages);
 | 
			
		||||
				if(pages.length == 2) {
 | 
			
		||||
					this.$u.route('/pageA/login/login');
 | 
			
		||||
				} else {
 | 
			
		||||
					uni.navigateBack();
 | 
			
		||||
 | 
			
		||||
@ -50,7 +50,6 @@ export default {
 | 
			
		||||
		updateVersion() {
 | 
			
		||||
			this.$u.route('/pageE/setting/updateVersion', {
 | 
			
		||||
				status: this.status,
 | 
			
		||||
				type: 'manual',
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user