feat: 上传图片调试
This commit is contained in:
parent
76d7f240eb
commit
20e132e646
|
@ -103,6 +103,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import BASE_URL from "@/api/env.js"; //引入接口共用地址
|
||||||
import { ReportingNFCDanger, GetPlanInfoAre, UploadFiles } from "@/api/apiList";
|
import { ReportingNFCDanger, GetPlanInfoAre, UploadFiles } from "@/api/apiList";
|
||||||
|
|
||||||
import { dateFormat } from "@/utils/utils";
|
import { dateFormat } from "@/utils/utils";
|
||||||
|
@ -239,7 +240,7 @@ export default {
|
||||||
success: function (res) {},
|
success: function (res) {},
|
||||||
});
|
});
|
||||||
|
|
||||||
this.form.url = "http://sl.vrgon.com:8005/uploads/" + data[0].path;
|
this.form.url = BASE_URL + "/uploads/" + data[0].path;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除图片
|
// 删除图片
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { UploadFiles, UploadArea } from "@/api/apiList";
|
import { UploadFiles, UploadArea } from "@/api/apiList";
|
||||||
|
import BASE_URL from "@/api/env.js"; //引入接口共用地址
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -193,7 +194,7 @@ export default {
|
||||||
|
|
||||||
this.imageList = [
|
this.imageList = [
|
||||||
...this.imageList,
|
...this.imageList,
|
||||||
"http://sl.vrgon.com:8005/uploads/" + data[0].path,
|
BASE_URL + "/uploads/" + data[0].path,
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -235,6 +236,13 @@ export default {
|
||||||
// if (!res.succeed) return;
|
// if (!res.succeed) return;
|
||||||
// params.picturesDto = res.data;
|
// params.picturesDto = res.data;
|
||||||
|
|
||||||
|
uni.showModal({
|
||||||
|
title: "查看imageList",
|
||||||
|
content: this.imageList,
|
||||||
|
showCancel: true,
|
||||||
|
success: function (res) {},
|
||||||
|
});
|
||||||
|
|
||||||
params.picturesDto = this.imageList;
|
params.picturesDto = this.imageList;
|
||||||
|
|
||||||
const res2 = await UploadArea(params);
|
const res2 = await UploadArea(params);
|
||||||
|
@ -315,7 +323,7 @@ page {
|
||||||
&-top {
|
&-top {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 32rpx;
|
// gap: 32rpx;
|
||||||
|
|
||||||
&-uploadBox {
|
&-uploadBox {
|
||||||
border: 1px dashed #526fa3;
|
border: 1px dashed #526fa3;
|
||||||
|
@ -327,10 +335,12 @@ page {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 20rpx;
|
// gap: 20rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-imgList {
|
&-imgList {
|
||||||
|
margin-right: 20rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
.delete-icon {
|
.delete-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
Loading…
Reference in New Issue