code: function (func, refreshSts) {
    const refresh = typeof (refreshSts) !== 'undefined' ? refreshSts : true;
    if (refresh) {
      const url = appServer;
      return $.ajax({
        url
      }).then((result) => {
        const creds = result;
        const client = new OSS({
          region,
          accessKeyId: creds.AccessKeyId,
          accessKeySecret: creds.AccessKeySecret,
          stsToken: creds.SecurityToken,
          bucket
        });
  
        console.log(OSS.version);
        return func(client);
      });
    }
    return func();
  }
docs: var client = new OSS({ region: 'oss-cn-hangzhou', accessKeyId: '<access-key-id>', accessKeySecret: '<access-key-secret>', bucket: '<bucket-name>' });  var applyTokenDo = function (func) { return func(client); };