Commit c22fd96c authored by zhengke's avatar zhengke

修改

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