|
|
@@ -157,9 +157,9 @@
|
|
|
maxlength="200" />
|
|
|
</view>
|
|
|
<view class="upload-area">
|
|
|
- <u-upload ref="uUpload" :action="uploadAction" :max-count="5" :header="uploadHeader" name="file"
|
|
|
- :file-list="fileList" @on-list-change="handleUploadChange" width="160" height="160">
|
|
|
- </u-upload>
|
|
|
+ <common-image-upload v-model="fileList" :max-count="5" code="shopRefund" width="160"
|
|
|
+ height="160">
|
|
|
+ </common-image-upload>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="popup-footer safe-area-bottom">
|
|
|
@@ -213,7 +213,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import CommonImageUpload from "@/components/image-upload.vue";
|
|
|
+
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ CommonImageUpload
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
orderId: '',
|
|
|
@@ -259,10 +264,6 @@
|
|
|
{ value: '3', label: '自行寄回' }
|
|
|
],
|
|
|
|
|
|
- uploadAction: uni.$u.http.config.baseUrl + '/token/shop/feedback/fileUpload',
|
|
|
- uploadHeader: {
|
|
|
- 'Authorization': uni.getStorageSync('token') || ''
|
|
|
- },
|
|
|
submitBtnStyle: {
|
|
|
width: '100%',
|
|
|
height: '80rpx',
|
|
|
@@ -419,9 +420,6 @@
|
|
|
url: `/pages-mine/pages/address/list?id=${this.address.id || ''}&isSelect=1`
|
|
|
});
|
|
|
},
|
|
|
- handleUploadChange(lists) {
|
|
|
- this.fileList = lists;
|
|
|
- },
|
|
|
submit() {
|
|
|
if (this.selectedGoods.length === 0) {
|
|
|
this.$u.toast('请选择退款商品');
|
|
|
@@ -441,21 +439,7 @@
|
|
|
}
|
|
|
|
|
|
// 处理图片
|
|
|
- let files = [];
|
|
|
- // 优先使用 fileList (因为 handleUploadChange 已同步)
|
|
|
- // 或者直接从 ref 获取,双重保险
|
|
|
- let uploadFiles = this.fileList;
|
|
|
- if (this.$refs.uUpload && this.$refs.uUpload.lists) {
|
|
|
- uploadFiles = this.$refs.uUpload.lists;
|
|
|
- }
|
|
|
-
|
|
|
- uploadFiles.forEach(item => {
|
|
|
- if (item.response && item.response.code === 200) {
|
|
|
- files.push(item.response.data);
|
|
|
- } else if (item.url) {
|
|
|
- files.push(item.url);
|
|
|
- }
|
|
|
- });
|
|
|
+ let files = this.fileList;
|
|
|
|
|
|
const params = {
|
|
|
orderId: this.orderId,
|