diff --git a/packages/api-proxy/src/platform/api/request/index.web.js b/packages/api-proxy/src/platform/api/request/index.web.js index 789cdff22..b3c04364c 100644 --- a/packages/api-proxy/src/platform/api/request/index.web.js +++ b/packages/api-proxy/src/platform/api/request/index.web.js @@ -107,8 +107,7 @@ function request (options = { url: '' }) { errMsg: `request:fail ${err}`, statusCode: response.status, header: response.headers, - data: response.data, - stack: realError.stack + data: response.data } Object.assign(res, realError) failHandle(res, fail, complete) diff --git a/packages/api-proxy/src/platform/api/toast/rnToast.jsx b/packages/api-proxy/src/platform/api/toast/rnToast.jsx index fae97a2f6..e780ffb55 100644 --- a/packages/api-proxy/src/platform/api/toast/rnToast.jsx +++ b/packages/api-proxy/src/platform/api/toast/rnToast.jsx @@ -53,24 +53,9 @@ const styles = StyleSheet.create({ marginTop: 10 } }) -function cutStr(str) { // 如果有icon的话展示一行,超过14个字符不展示 - let count = 0 - let i = 0 - let cutString = '' - while(count <= 14 && str[i]) { - if (str.charCodeAt(i) > 0x7F) { - count = count + 2 - } else { - count++ - } - cutString += str[i++] - } - return cutString -} function showToast (options = {}) { - const { icon = 'success', image, duration = 1500, mask = false, success, fail, complete, isLoading } = options - let title = options.title + const { title, icon = 'success', image, duration = 1500, mask = false, success, fail, complete, isLoading } = options let ToastView const successPng = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcAgMAAACegTrLAAAADFBMVEUAAAD////R0dHj4+PcME2AAAAAAXRSTlMAQObYZgAAANNJREFUSMft1FEKwkAMBNBGyBFyH4/gR8f+ehSPLtiyQ+wM2C8Rmp+WQN90N8tOZ/1/4SbbYfpp+sBVMqafgGQKs+FvkjF8GR6aj4M8NB+GT8OX5i+GT8OX4aH5MHwZHpoPw+c3fA0xGl/zYBrP92o8vwVwF3NO8tySjXmINQLAs/WX9S8bP9UGJUZSi8MAuUqsj75payPxuWn1BmrjewCCfAvA4Fmjvx8HQL4HiJEHeRmg5k2+B8gTFeRFwL7NzREB/sCKwsG7KN2VSb7XMp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0Ns2949Dv4Oylm5F7LCwDnCF+hxP6rjLNdyqPOSaCEy2Tsp1/0m9+wWfUoLAzd+32B7ok8fIas1IngTPWOk116jBNqXMeWqnOszRizrUVXPQnmdvqZnlXqNVFaFKUf9iWQpK3uGD/HxOk4E+5BmoTFN/g/T33Q/5rVGC9NlkQKQ/30m11JdlAZuen+Nrcbm16spN+VY2oIA58jrd70xdLJ0RPkOdCnZzsd6eonWvN5O+fRlJn/3wjXKaczkWNhJZ8egM0UA3IXj99DqTgeBt5P407LCQeN3B9ttKMiJY3zO3JzlzQvA/n5mYZnXQYErEKAL9vuohWKZwMtigZbvNtoCbEEPZsEDNgFuIcLTwaLsdaS4g8c+oxvFHhz2DP/hX3KmL0cxH1iD+yimmHUL8uAZgS9F6TF6VR46gKcHRVYJvNMX4EeRHjvaNFNMo504r6stic36h/0GHxa6nCGA15eSHoGhcfRal30CtjmFL43ja3mcdS3AO/AAv5jXm5AelrAOLUEx7BJONWPUFH32PbD9/0QBrzH1KqS/XX8KafI0grx/c2UfmZZsJ5AmLZ+iIyj9SwIg9BjwtS6yDK1B96AWWoF0APRnJ3ON2Pz7I4R+iLiCBPgcaqNvkCYvF5iIxV5JpBt3q/WS4homB2EBbRci3V8o4Hov012rAq77swfi38oQZ7JEIBFIBBKBRCARSAQSgUQgEUgEEoFEICCBfwDKNlghU/F3VgAAAABJRU5ErkJggg==' @@ -83,9 +68,6 @@ function showToast (options = {}) { if (tId) { clearTimeout(tId) } - if (icon !== 'none') { - title = cutStr(title) - } tId = null if (image || icon === 'success' || icon === 'error') { ToastView =