| | |
| | | } |
| | | |
| | | return new Promise(function(resolve, reject) { |
| | | |
| | | let token = uni.getStorageSync('token') |
| | | token = |
| | | 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTU1MjI1Nzk1MDcwODEyMTgsInR5cGUiOjEsImV4cCI6MTc0Nzk4MzIyMiwiY3JlYXRlZCI6MTc0NjY4NzIyMjAxMX0.pmUfTkxkbBirDMbnMR1IaLsbSiiwHc366_yyAetCzTOWYxTNgmQlmvw26_W62NHLOebB_ZAEgZsPvkJcaLOoPg' |
| | | uni.setStorageSync('token', token) |
| | | let header = { |
| | | 'content-type': type ? 'application/x-www-form-urlencoded;charset=UTF-8' : 'application/json', |
| | | 'Authorization': token, |
| | |
| | | showCancel: false, |
| | | success: function(res) { |
| | | if (res.confirm) { |
| | | if (routeStr == 'pages/login/index') { |
| | | uni.reLaunch({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | return |
| | | } |
| | | uni.reLaunch({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | // if (routeStr == 'pages/login/index') { |
| | | // uni.reLaunch({ |
| | | // url: '/pages/login/index' |
| | | // }) |
| | | // return |
| | | // } |
| | | // uni.reLaunch({ |
| | | // url: '/pages/login/index' |
| | | // }) |
| | | } |
| | | } |
| | | }); |