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