提交
This commit is contained in:
@@ -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
|
||||
@@ -357,9 +363,9 @@ export default {
|
||||
// { required: true, message: '排序不能为空', trigger: 'blur' }
|
||||
// ]
|
||||
},
|
||||
urlList:{
|
||||
edit:'/master/shopProduct/editProductDetail',
|
||||
add:'/master/shopProduct/addProduct',
|
||||
urlList: {
|
||||
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,
|
||||
@@ -481,24 +486,24 @@ add:'/master/shopProduct/addProduct',
|
||||
// .catch(err => {
|
||||
// console.log(err);
|
||||
// });
|
||||
}else{
|
||||
console.log('op.insert.image at line 407:', op.insert.image)
|
||||
// 获取光标所在位置
|
||||
var quill = that.$refs.myQuillEditor.quill;
|
||||
var length = this.quillEditorIndex;
|
||||
} else {
|
||||
console.log("op.insert.image at line 407:", op.insert.image);
|
||||
// 获取光标所在位置
|
||||
var quill = that.$refs.myQuillEditor.quill;
|
||||
var length = this.quillEditorIndex;
|
||||
|
||||
console.log("length at line 397:", length);
|
||||
console.log("length at line 397:", length);
|
||||
|
||||
// 插入图片,res为服务器返回的图片链接地址
|
||||
quill.insertEmbed(length, "image", op.insert.image);
|
||||
// 调整光标到最后
|
||||
quill.setSelection(length + 1);
|
||||
this.uploadLoading = false;
|
||||
// 插入图片,res为服务器返回的图片链接地址
|
||||
quill.insertEmbed(length, "image", op.insert.image);
|
||||
// 调整光标到最后
|
||||
quill.setSelection(length + 1);
|
||||
this.uploadLoading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
delta.ops = ops; // 不加会报错
|
||||
return delta;
|
||||
},
|
||||
@@ -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({
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user