This commit is contained in:
姚宇浩 2024-02-02 14:00:07 +08:00
parent 71098dd6d6
commit aadddbb36a
2 changed files with 34 additions and 5 deletions

View File

@ -51,7 +51,8 @@
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80">
</el-table-column>
<el-table-column prop="goodsName" label="商品" show-overflow-tooltip> </el-table-column>
<el-table-column prop="goodsName" label="商品" show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column prop="introduce" label="简介"> </el-table-column> -->
<el-table-column prop="shopInfo.userName" label="发布者">
</el-table-column>
@ -363,10 +364,14 @@ export default {
this.imgList = [];
this.title = title;
this.opens = true;
this.detailForm.goodsName = value.goodsName;
// this.detailForm.goodsName = value.goodsName;
// this.detailForm.userName = value.shopInfo.userName;
// this.detailForm.wpPath = value.panUrl;
// this.detailForm.code = value.panCode;
this.detailForm.name = value.goodsName;
this.detailForm.wpPath = value.domainInfo.wpPath;
this.detailForm.code = value.domainInfo.code;
this.detailForm.userName = value.shopInfo.userName;
this.detailForm.wpPath = value.panUrl;
this.detailForm.code = value.panCode;
// this.detailForm.introduce = value.domainInfo.introduce;
let img1 = null;
if (value.domainInfo.file) {

View File

@ -324,6 +324,16 @@ export default {
},
del(id) {
console.log("删除", id);
http
.post(`/api/goods/delete/${id}`)
.then((res) => {
if (res.code == 200) {
console.log("删除成功");
}
})
.catch((err) => {
console.log(err);
});
},
getdetails(title, value) {
this.title = title;
@ -336,7 +346,21 @@ export default {
}
},
fix() {
console.log("修改");
let goods = this.detailForm;
http
.post("/api/goods/edit", goods)
.then((res) => {
if (res.code == 200) {
this.opens = false;
this.loading = true;
this.getData();
this.detailForm = {};
}
})
.catch((err) => {
console.log(err);
// this.loading = false;
});
},
handleCloses() {
this.opens = false;