吉安感知网项目-前端
shuishen
2026-02-03 89380e6260a75d1d3b94de687ebcc2f50d50659d
applications/mobile-web-view/src/axios.js
@@ -56,10 +56,12 @@
      //安全请求header
      config.headers['Blade-Requested-With'] = 'BladeHttpRequest'
      //headers判断是否需要
      const authorization = config.authorization === false
      if (!authorization) {
         config.headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`
      }
      // const authorization = config.authorization === false
      // if (!authorization) {
      //    config.headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`
      // }
      let authorization = store.state.user.token
      config.headers['Authorization'] = authorization
      // 根据后端要求,post的data为空的话传{}
      if (config.method === 'post') {
         config.data = config.data || {}