|  | @@ -13,7 +13,15 @@
 | 
	
		
			
				|  |  |            <div class="preview-item-img" v-if="item.type == 'file'">
 | 
	
		
			
				|  |  |              <i class="el-icon-document van-uploader__file-icon"></i>
 | 
	
		
			
				|  |  |              <span
 | 
	
		
			
				|  |  | -              style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 64px; font-size: 13px; padding-top: 5px;line-height: 1.3 "
 | 
	
		
			
				|  |  | +              style="
 | 
	
		
			
				|  |  | +                white-space: nowrap;
 | 
	
		
			
				|  |  | +                overflow: hidden;
 | 
	
		
			
				|  |  | +                text-overflow: ellipsis;
 | 
	
		
			
				|  |  | +                width: 64px;
 | 
	
		
			
				|  |  | +                font-size: 13px;
 | 
	
		
			
				|  |  | +                padding-top: 5px;
 | 
	
		
			
				|  |  | +                line-height: 1.3;
 | 
	
		
			
				|  |  | +              "
 | 
	
		
			
				|  |  |                >{{ item.name }}</span
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  |            </div>
 | 
	
	
		
			
				|  | @@ -79,23 +87,23 @@ export default {
 | 
	
		
			
				|  |  |        type: "image",
 | 
	
		
			
				|  |  |        uploadLoading: false,
 | 
	
		
			
				|  |  |        uploadFileLoading: false,
 | 
	
		
			
				|  |  | -      ossUploadUrl: "https://ks3-cn-beijing.ksyuncs.com/daya",
 | 
	
		
			
				|  |  | -      preUploadUrl: "https://daya.ks3-cn-beijing.ksyuncs.com",
 | 
	
		
			
				|  |  | +      // ossUploadUrl: "https://ks3-cn-beijing.ksyuncs.com/daya",
 | 
	
		
			
				|  |  | +      ossUploadUrl: "https://daya.ks3-cn-beijing.ksyuncs.com",
 | 
	
		
			
				|  |  |        dataObj: {
 | 
	
		
			
				|  |  |          policy: "",
 | 
	
		
			
				|  |  |          signature: "",
 | 
	
		
			
				|  |  |          key: "",
 | 
	
		
			
				|  |  |          KSSAccessKeyId: "",
 | 
	
		
			
				|  |  |          acl: "public-read",
 | 
	
		
			
				|  |  | -        name: ""
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +        name: "",
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    watch: {
 | 
	
		
			
				|  |  |      fileUrl(val) {
 | 
	
		
			
				|  |  |        // console.log(val);
 | 
	
		
			
				|  |  |        this.tempFileUrl = val;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      onClear() {
 | 
	
	
		
			
				|  | @@ -125,8 +133,8 @@ export default {
 | 
	
		
			
				|  |  |              filename,
 | 
	
		
			
				|  |  |              acl: "public-read",
 | 
	
		
			
				|  |  |              key,
 | 
	
		
			
				|  |  | -            unknowValueField: []
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | +            unknowValueField: [],
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  |          };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          const res = await policy(obj);
 | 
	
	
		
			
				|  | @@ -136,7 +144,7 @@ export default {
 | 
	
		
			
				|  |  |            key,
 | 
	
		
			
				|  |  |            KSSAccessKeyId: res.data.kssAccessKeyId,
 | 
	
		
			
				|  |  |            acl: "public-read",
 | 
	
		
			
				|  |  | -          name: filename
 | 
	
		
			
				|  |  | +          name: filename,
 | 
	
		
			
				|  |  |          };
 | 
	
		
			
				|  |  |          // console.log(res, "policy", this.dataObj);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -167,8 +175,8 @@ export default {
 | 
	
		
			
				|  |  |              filename,
 | 
	
		
			
				|  |  |              acl: "public-read",
 | 
	
		
			
				|  |  |              key,
 | 
	
		
			
				|  |  | -            unknowValueField: []
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | +            unknowValueField: [],
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  |          };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          const res = await policy(obj);
 | 
	
	
		
			
				|  | @@ -178,7 +186,7 @@ export default {
 | 
	
		
			
				|  |  |            key,
 | 
	
		
			
				|  |  |            KSSAccessKeyId: res.data.kssAccessKeyId,
 | 
	
		
			
				|  |  |            acl: "public-read",
 | 
	
		
			
				|  |  | -          name: filename
 | 
	
		
			
				|  |  | +          name: filename,
 | 
	
		
			
				|  |  |          };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          return isLt2M;
 | 
	
	
		
			
				|  | @@ -202,19 +210,19 @@ export default {
 | 
	
		
			
				|  |  |        this.uploadLoading = false;
 | 
	
		
			
				|  |  |        this.uploadFileLoading = false;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      let url = this.preUploadUrl + "/" + this.dataObj.key;
 | 
	
		
			
				|  |  | +      let url = this.ossUploadUrl + "/" + this.dataObj.key;
 | 
	
		
			
				|  |  |        this.tempFileUrl.push({
 | 
	
		
			
				|  |  |          uid: file.uid,
 | 
	
		
			
				|  |  |          name: file.name,
 | 
	
		
			
				|  |  |          url,
 | 
	
		
			
				|  |  |          type: this.type,
 | 
	
		
			
				|  |  |          file: {
 | 
	
		
			
				|  |  | -          name: file.name
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +          name: file.name,
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |        this.$emit("update:fileList", this.tempFileUrl);
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  
 |