Commit c22fd96c authored by zhengke's avatar zhengke

修改

parent 64ca2270
......@@ -286,12 +286,25 @@
created() {
this.GetMemberGradeList();
this.GetPageList();
localStorage.removeItem("uploadInfo");
//获取上传配置
this.getUpConfig();
},
mounted() {
},
methods: {
//登录后获取上传配置
getUpConfig(){
this.apipost("/api/MallBase/GetDefaultFileStore", {}, res => {
if(res.data.resultCode == 1){
var upData = res.data.data;
localStorage.uploadInfo = JSON.stringify(upData);
}else{
this.Error(res.data.message);
}
})
},
Time(value) {
var theTime = parseInt(value); // 秒
var middle = 0; // 分
......
......@@ -201,7 +201,7 @@ export default {
var newFile = new File([u8arr], fileObj.name, {
type: mime
});
if(upInfo.IsDefault==1){
if(upInfo&&upInfo.IsDefault==1){
if(upInfo.StoreType==1){
that.uploadStart(path, newFile, callback)
}
......@@ -212,7 +212,7 @@ export default {
this.Error('请先配置上传');
}
}).catch(function (error) {
if(upInfo.IsDefault==1){
if(upInfo&&upInfo.IsDefault==1){
if(upInfo.StoreType==1){
that.uploadStart(path, fileObj, callback)
}
......@@ -226,7 +226,7 @@ export default {
//不管成功或失败,都会执行
})
}else{
if(upInfo.IsDefault==1){
if(upInfo&&upInfo.IsDefault==1){
if(upInfo.StoreType==1){
this.uploadStart(path, fileObj, callback)
}
......
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