This commit is contained in:
2025-02-28 17:36:48 +08:00
parent 2314f863e1
commit cc744ec5fb
2 changed files with 43 additions and 21 deletions

View File

@@ -168,6 +168,12 @@
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="VIP优惠图书" prop="isFreeMail">
<el-radio-group v-model="dataForm.isVipPrice">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<el-form-item label="商品详情" prop="productDetails">
<el-upload
@@ -358,8 +364,8 @@ export default {
// ]
},
urlList: {
edit:'/master/shopProduct/editProductDetail',
add:'/master/shopProduct/addProduct',
edit: "/master/shopProduct/editProductDetail",
add: "/master/shopProduct/addProduct"
},
// 富文本编辑器配置
editorOption: {
@@ -406,7 +412,6 @@ add:'/master/shopProduct/addProduct',
if (op.insert && typeof op.insert !== "string") {
// 如果粘贴了图片,这里会是一个对象
if (op.insert.image) {
if (op.insert.image.includes(";base64")) {
let file = that.dataURLtoFile(
op.insert.image,
@@ -482,7 +487,7 @@ add:'/master/shopProduct/addProduct',
// console.log(err);
// });
} else {
console.log('op.insert.image at line 407:', op.insert.image)
console.log("op.insert.image at line 407:", op.insert.image);
// 获取光标所在位置
var quill = that.$refs.myQuillEditor.quill;
var length = this.quillEditorIndex;
@@ -705,7 +710,9 @@ add:'/master/shopProduct/addProduct',
this.$http
.request({
url: this.$http.adornUrl(this.dataForm.productId?this.urlList.edit:this.urlList.add),
url: this.$http.adornUrl(
this.dataForm.productId ? this.urlList.edit : this.urlList.add
),
method: "POST",
data: {
...this.dataForm,
@@ -718,8 +725,6 @@ add:'/master/shopProduct/addProduct',
}
})
.then(({ data }) => {
if (data && data.code === 0) {
this.$message({

View File

@@ -90,12 +90,22 @@
<img
v-if="scope.row.productImages != ''"
:src="scope.row.productImages"
width="70"
height="100"
width="40"
height="60"
class="tableImg"
/>
</template>
</el-table-column>
<el-table-column header-align="center" align="center" label="VIP优惠图书" width="120px">
<template slot-scope="scope">
{{ scope.row.isVipPrice == 1 ? '是' : '否' }}
<!-- <el-switch
v-model="scope.row.isVipPrice"
active-color="#13ce66"
inactive-color="#bbb">
</el-switch> -->
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
@@ -415,3 +425,10 @@ export default {
}
};
</script>
<style scoped>
::v-deep.el-table .el-table__cell{
padding: 4px 0 !important;
}
</style>