This commit is contained in:
2020-08-03 18:38:04 +08:00
parent 0bc6be9b9f
commit d54a378a9e
12 changed files with 193 additions and 82 deletions

View File

@@ -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);
}
})