code: function fetchAction(url, options, cacheKey) {
      let ok
      return new Promise((resolve, reject) => {
          return fetch(url, options)
              .then(
              (response) => {
                  L('response', JSON.stringify(response));
                  if (response.ok) {
                      isOK = true;
                  } else {
                      isOK = false;
                  }
                  return response.text();
              })
              .then((responseData) => {
                  L('responseData', responseData);
                  let jsonData = responseData;
                  try {
                      jsonData = JSON.parse(responseData);
                      if (cacheKey) {
                          setItem(cacheKey, responseData);
                          setItem(cacheKey + ':ts', Date.now() + '');
                      }
                      isOk = true;
                  } catch (e) {
                      isOk = false;
                  }
                  if (isOk) {
                      resolve(jsonData)
                  } else {
                      L('fetchAction', '服务器数据格式错误！');
                      reject('服务器数据格式错误！')
                  }
              }).catch(
              (error) => {
                  L('fetchAction', error);
                  return reject('网络错误！');
              });
      });
  }
docs: http 请求