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