Browse Source

access_token

lilei 4 năm trước cách đây
mục cha
commit
dc00e53c4b
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      libs/axios.js

+ 1 - 2
libs/axios.js

@@ -2,14 +2,13 @@ const baseUrl = getApp().globalData.baseUrl
 //带Token请求
 const request = (opts, hasToken) => {
 	const authorization = getApp().globalData.token
-	// console.log(authorization, 'authorization')
 	//  hasToken是否传入token,为true则不传token
 	const header = {
 			'USER-TERM-TYPE': 'ipad', // 支付时需要用到 与pad一致
 			'App-Type': 3
 		}
 	if(!hasToken){
-		header.authorization = authorization
+		header['access_token'] = authorization
 	}	
 	//此token是登录成功后后台返回保存在storage中的
 	let DefaultOpts = {