董国庆
3 天以前 06dded7ff247f64412b95f846b5012b886353e71
H5/utils/request.js
@@ -18,8 +18,10 @@
   }
   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,
@@ -136,15 +138,15 @@
         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'
               // })
            }
         }
      });