修正了错误弹窗
This commit is contained in:
		
							parent
							
								
									7245d83dcd
								
							
						
					
					
						commit
						96adf9e6a9
					
				@ -4,17 +4,18 @@ const install = (Vue, vm) => {
 | 
			
		||||
        baseUrl: 'https://dmmall.sdbairui.com//storeapi',
 | 
			
		||||
		loadingText: '努力加载中~',
 | 
			
		||||
		loadingTime: 800,
 | 
			
		||||
		// 设置自定义头部content-type
 | 
			
		||||
		// header: {
 | 
			
		||||
        //     "Authorization" : "122"
 | 
			
		||||
		// }
 | 
			
		||||
		// ......
 | 
			
		||||
		originalData: true,
 | 
			
		||||
	
 | 
			
		||||
    });
 | 
			
		||||
    Vue.prototype.$u.http.interceptor.request = (config) => {
 | 
			
		||||
        const token = uni.getStorageSync('token');
 | 
			
		||||
		config.header.Authorization = 'Bearer' + " " + token;
 | 
			
		||||
		return config;
 | 
			
		||||
	}
 | 
			
		||||
	Vue.prototype.$u.http.interceptor.response = (res) => {
 | 
			
		||||
		// todo 判断状态码
 | 
			
		||||
		return res.data;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
 | 
			
		||||
@ -76,6 +76,8 @@
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
					
 | 
			
		||||
				}).catch((res)=>{
 | 
			
		||||
					console.log(res)
 | 
			
		||||
				})
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
@ -472,5 +472,6 @@
 | 
			
		||||
		left: 0;
 | 
			
		||||
		right: 0;
 | 
			
		||||
		margin: auto;
 | 
			
		||||
		z-index: 10;
 | 
			
		||||
	}
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user