Commit 705a63c9 authored by 王建威's avatar 王建威

add loading

parent c23f242d
......@@ -62,7 +62,7 @@
"disableHostCheck": true,
"proxy": {
"/uni/api": {
"target": "http://192.168.50.133:6564/",
"target": "http://39.96.85.45:9093/",
"changeOrigin": true,
"secure": false,
"pathRewrite": {
......
......@@ -144,10 +144,8 @@
uploadImage(key) {
uni.chooseImage({
success: (res) => {
uni.showToast({
title: '上传中',
icon: 'none',
duration:90000
uni.showLoading({
title: '上传中'
})
const tempFilePaths = res.tempFilePaths;
uni.uploadFile({
......@@ -157,7 +155,7 @@
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
uni.hideToast();
uni.hideLoading();
}
});
}
......@@ -193,9 +191,8 @@
// mozilla(firefox)
url = window.URL.createObjectURL(file);
}
uni.showToast({
title: '上传中',
icon: 'none'
uni.showLoading({
title: '上传中'
})
uni.uploadFile({
url: '/uni/api/resources',
......@@ -208,7 +205,7 @@
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
this.compressName = fileName;
uni.hideToast();
uni.hideLoading();
}
});
}
......
......@@ -115,7 +115,7 @@
uploadImage(key) {
uni.chooseImage({
success: (res) => {
uni.showToast({
uni.showLoading({
title: '上传中',
icon: 'none',
duration:90000
......@@ -128,7 +128,7 @@
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
uni.hideToast();
uni.hideLoading();
}
});
}
......@@ -164,9 +164,8 @@
// mozilla(firefox)
url = window.URL.createObjectURL(file);
}
uni.showToast({
title: '上传中',
icon: 'none'
uni.showLoading({
title: '上传中'
})
uni.uploadFile({
url: '/uni/api/resources',
......@@ -179,7 +178,7 @@
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
this.compressName = fileName;
uni.hideToast();
uni.hideLoading();
}
});
}
......
......@@ -90,10 +90,8 @@
uploadImage(key) {
uni.chooseImage({
success: (res) => {
uni.showToast({
title: '上传中',
icon: 'none',
duration:90000
uni.showLoading({
title: '上传中'
})
const tempFilePaths = res.tempFilePaths
uni.uploadFile({
......@@ -103,7 +101,7 @@
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
uni.hideToast();
uni.hideLoading();
}
});
}
......
......@@ -99,10 +99,8 @@
uploadImage(key) {
uni.chooseImage({
success: (res) => {
uni.showToast({
title: '上传中',
icon: 'none',
duration:90000
uni.showLoading({
title: '上传中'
})
const tempFilePaths = res.tempFilePaths
uni.uploadFile({
......@@ -112,7 +110,7 @@
success: (uploadFileRes) => {
const data = JSON.parse(uploadFileRes.data)
this.params[key] = data.data;
uni.hideToast();
uni.hideLoading();
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment