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) {
|
if((header['content-type'] || header['Content-Type'])?.indexOf?.("image/") > -1) {
|
||||||
const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(data)
|
const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(data)
|
||||||
let tempFilePath = base64
|
resolve({ data: { fileUrl: base64 } })
|
||||||
try{
|
|
||||||
let dFile = await downloadFile(base64)
|
|
||||||
tempFilePath = dFile.tempFilePath
|
|
||||||
}catch(e){
|
|
||||||
}
|
|
||||||
resolve({ data: { fileUrl: tempFilePath } })
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data = data || {}
|
data = data || {}
|
||||||
|
|||||||
@ -90,7 +90,8 @@ const downloadFile = (url)=> {
|
|||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: url,
|
url: url,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.statusCode === 200) {
|
console.log("downloadFile:success:res======", res)
|
||||||
|
if (res.statusCode === 200 || res.statusCode === 400) {
|
||||||
console.log('下载成功');
|
console.log('下载成功');
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -150,12 +150,8 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData() {
|
||||||
// uni.showLoading({
|
|
||||||
// title: '加载中'
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
handleScanValChange: debounce(function(val){
|
handleScanValChange: debounce(function(val){
|
||||||
// val && ()
|
|
||||||
}),
|
}),
|
||||||
async handleSubmit() {
|
async handleSubmit() {
|
||||||
let res = await this.getRealGetWaybillPrintData()
|
let res = await this.getRealGetWaybillPrintData()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user