Explorar o código

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-huozhuapp

gjy %!s(int64=2) %!d(string=hai) anos
pai
achega
ad34d6e675
Modificáronse 2 ficheiros con 4 adicións e 1 borrados
  1. 1 0
      pages/public/loginOther.vue
  2. 3 1
      util/request.js

+ 1 - 0
pages/public/loginOther.vue

@@ -111,6 +111,7 @@
 				})
 			},
 			gocode() {
+				let that = this
 				if (this.phone.length == 11 && /^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)) {
 					that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
 						phone: this.phone,

+ 3 - 1
util/request.js

@@ -6,6 +6,7 @@ const baseRequest = (method, url, data, header) => {
 	if (header) {
 		contentheader = header
 	}
+	let userInfo = uni.getStorageSync('userInfo');
 	let baseDefaultOpts = {
 		url: baseUrl + url,
 		// 请求接口地址
@@ -14,7 +15,8 @@ const baseRequest = (method, url, data, header) => {
 		method: method,
 		// 配置请求类型
 		header: {
-			'content-type': contentheader //'application/x-www-form-urlencoded; charset=UTF-8',
+			'content-type': contentheader, //'application/x-www-form-urlencoded; charset=UTF-8',
+			'accessToken':userInfo.accessToken
 		}
 	}
 	let promise = new Promise(function(resolve, reject) {