图片上传

master
lion 3 years ago
parent e1ae9d0016
commit 35b69c8319

@ -60,8 +60,6 @@ export default {
},
handleSubmit() {
const arr = Object.keys(this.listObj).map(v => this.listObj[v])
console.log("listObj",this.listObj)
console.log("arr1",arr)
if (!this.checkAllSuccess()) {
this.$message('请等待所有图片上传成功。如有网络问题,请刷新页面重新上传!')
return
@ -78,9 +76,12 @@ export default {
this.$emit('updateshow',this.dialogVisible)
},
handleSuccess(response, file) {
console.log("response",response)
const uid = file.uid
const objKeyArr = Object.keys(this.listObj)
console.log("response",response)
if(response.url.indexOf("../storage/files") != -1){
response.url = response.url.replace('../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}
for (let i = 0, len = objKeyArr.length; i < len; i++) {
if (this.listObj[objKeyArr[i]].uid === uid) {
this.listObj[objKeyArr[i]].url = response.url

@ -381,7 +381,7 @@
},
{
prop: "order_state_name",
prop: "state_name",
label: "状态",
width: 120
}
@ -470,7 +470,7 @@
const res = await getTypes()
this.merchants = res.merchants
this.orderItemStates = res.order_item_states
this.orderStates = res.order_states
this.orderStates = res.order_item_states
this.productTypes = res.product_types
},

Loading…
Cancel
Save