z8.3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="write-complaints">
|
||||
<view class="main-container">
|
||||
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好." maxlength="200" v-model="text" />
|
||||
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好" maxlength="200" v-model="text" />
|
||||
<u-upload
|
||||
ref="uUpload"
|
||||
:custom-btn="true"
|
||||
@@ -12,6 +12,7 @@
|
||||
:form-data="formData"
|
||||
:name="name"
|
||||
@on-uploaded="setImageList"
|
||||
@on-error="uploadError"
|
||||
>
|
||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||
<image src="../static/mine/27.png"></image>
|
||||
@@ -37,12 +38,21 @@ export default {
|
||||
name: 'common', // 其他图片
|
||||
},
|
||||
imageList: [],
|
||||
debounce: true,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.debounce = true;
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
if(!this.debounce) return;
|
||||
this.debounce = false;
|
||||
this.$refs.uUpload.upload();
|
||||
},
|
||||
uploadError() {
|
||||
this.debounce = true;
|
||||
},
|
||||
setImageList(lists) {
|
||||
// console.log(lists);
|
||||
let imageList = [];
|
||||
@@ -78,6 +88,7 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.debounce = true;
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user