uu
This commit is contained in:
parent
de716c4acf
commit
24ace56576
@ -77,13 +77,7 @@ async function handleResponse({
|
||||
// 图片类型数据特殊处理
|
||||
if((header['content-type'] || header['Content-Type'])?.indexOf?.("image/") > -1) {
|
||||
const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(data)
|
||||
let tempFilePath = base64
|
||||
try{
|
||||
let dFile = await downloadFile(base64)
|
||||
tempFilePath = dFile.tempFilePath
|
||||
}catch(e){
|
||||
}
|
||||
resolve({ data: { fileUrl: tempFilePath } })
|
||||
resolve({ data: { fileUrl: base64 } })
|
||||
return
|
||||
}
|
||||
data = data || {}
|
||||
|
||||
@ -90,7 +90,8 @@ const downloadFile = (url)=> {
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
console.log("downloadFile:success:res======", res)
|
||||
if (res.statusCode === 200 || res.statusCode === 400) {
|
||||
console.log('下载成功');
|
||||
resolve(res)
|
||||
}
|
||||
|
||||
@ -150,12 +150,8 @@
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
// uni.showLoading({
|
||||
// title: '加载中'
|
||||
// });
|
||||
},
|
||||
handleScanValChange: debounce(function(val){
|
||||
// val && ()
|
||||
}),
|
||||
async handleSubmit() {
|
||||
let res = await this.getRealGetWaybillPrintData()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user