Merge pull request 'gdpao' (#71) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/71
This commit is contained in:
		
						commit
						022192c9d6
					
				
							
								
								
									
										9
									
								
								App.vue
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								App.vue
									
									
									
									
									
								
							@ -6,6 +6,15 @@ export default {
 | 
			
		||||
	onLaunch: function() {
 | 
			
		||||
		getApp().globalData.im = this.imService
 | 
			
		||||
		console.log('App Launch');
 | 
			
		||||
        // 缓存token
 | 
			
		||||
        uni.getStorage({
 | 
			
		||||
        	key: "token",
 | 
			
		||||
        	success: (res) => {
 | 
			
		||||
        		uni.switchTab({
 | 
			
		||||
        		    url: "/pages/index/index"
 | 
			
		||||
        		})
 | 
			
		||||
        	}
 | 
			
		||||
        })
 | 
			
		||||
	},
 | 
			
		||||
	onShow: function() {
 | 
			
		||||
		console.log('App Show');
 | 
			
		||||
 | 
			
		||||
@ -112,7 +112,6 @@ export default {
 | 
			
		||||
							type: 'error'
 | 
			
		||||
						});
 | 
			
		||||
					} else {
 | 
			
		||||
 | 
			
		||||
						uni.setStorageSync('token', res.data.token);
 | 
			
		||||
						uni.setStorageSync('userinfo', res.data);
 | 
			
		||||
						uni.setStorageSync('rongyun', res.data.rongcloud_token);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user