wangbing 6 years ago
parent 971d644ccf
commit 9b40f9e907

@ -64,7 +64,7 @@ jsonRequest = function (config) {
params: { params: {
method: config.method method: config.method
}, },
url: "/ajax", url: "'${contextPath?default("")}'/ajax",
headers: {'Content-Type': 'text/plain'}, headers: {'Content-Type': 'text/plain'},
data: config.data data: config.data
}).then(function (response) { }).then(function (response) {
@ -75,7 +75,7 @@ jsonRequest = function (config) {
}; };
fileRequest = function (config) { fileRequest = function (config) {
return instance.request({ return instance.request({
url: "/upload", url: "'${contextPath?default("")}'/upload",
data: config.data, data: config.data,
headers: {'Content-Type': 'multipart/form-data'}, headers: {'Content-Type': 'multipart/form-data'},
onUploadProgress: function (progressEvent) { onUploadProgress: function (progressEvent) {

@ -4,6 +4,18 @@
activeIndex: 'home', activeIndex: 'home',
contextPath: '${contextPath?default("")}', contextPath: '${contextPath?default("")}',
homePath: '${homePath?default("")}', homePath: '${homePath?default("")}',
tip: {
show: function (msg) {
if(msg) {
this.$indicator.open(msg);
}else {
this.$indicator.open();
}
},
close: function () {
this.$indicator.close();
}
},
}, },
methods: { methods: {
i: function (message, callback) { i: function (message, callback) {
@ -14,16 +26,6 @@
}); });
setTimeout(callback, 3000) setTimeout(callback, 3000)
}, },
showLoad:function(message){
if(message) {
this.indicator.open(message);
}else {
this.indicator.open();
}
},
closeLoad:function(){
this.indicator.close();
},
alert: function (message, callback) { alert: function (message, callback) {
this.$messageBox.alert(message, "").then(callback); this.$messageBox.alert(message, "").then(callback);
}, },

Loading…
Cancel
Save

Powered by TurnKey Linux.