|  |  | 
 |  |  |                            code: 0, | 
 |  |  |                            msg: '' | 
 |  |  |                         }) | 
 |  |  |                      } else if (res.data.code === '3000') { | 
 |  |  |                      } else if (res.data.code === '3000'||res.data.code === '30000') { | 
 |  |  |                         if (Array.isArray(res.data.data)) { | 
 |  |  |                            if (res.data.data.length > 0 && res.data.data[0] | 
 |  |  |                               .errorMessage) { | 
 |  |  | 
 |  |  |                            code: parseInt(res.data.code), | 
 |  |  |                            msg: res.data.data | 
 |  |  |                         }) | 
 |  |  |                      } else if (res.data.code === '4000') { | 
 |  |  |                      } else if (res.data.code === '4000'||res.data.code === '40000') { | 
 |  |  |                            message.showToast('系统异常') | 
 |  |  |                      } else { | 
 |  |  |                         if (res.data.data && typeof res.data.data === 'string') { | 
 |  |  | 
 |  |  |       let header = { | 
 |  |  |          Authorization: token ? `Bearer ${token}` : null, | 
 |  |  |       } | 
 |  |  |       var url = environments.httpBaseUri + '/wxkj/upload/file' | 
 |  |  |       var url = environments.httpBaseUri + '/api/upload/file' | 
 |  |  |       if (environments.type == 'prod') { | 
 |  |  |          //需要拼接 | 
 |  |  |          var year = utils.toYear(new Date()) | 
 |  |  | 
 |  |  |             filePath: filePath, | 
 |  |  |             name: 'file', | 
 |  |  |             success: (res) => { | 
 |  |  |                console.log('res', res) | 
 |  |  |                console.log('res debug', res) | 
 |  |  |                message.hideLoading() | 
 |  |  |                if (res.statusCode === 200) { | 
 |  |  |                   const obj = JSON.parse(res.data) | 
 |  |  |                   if (obj.code.startsWith('200')) { | 
 |  |  |                   console.log('res debug2', obj) | 
 |  |  |                   if (obj.code.startsWith('200')||obj.code==='0') { | 
 |  |  |                      resolve({ | 
 |  |  |                         data: obj.data, | 
 |  |  |                         code: 0, | 
 |  |  | 
 |  |  |       try { | 
 |  |  |          return await http.uploadTemp(filePath, dto) | 
 |  |  |       } catch (e) { | 
 |  |  |          console.log('error',e) | 
 |  |  |          return e | 
 |  |  |       } | 
 |  |  |    }, |