提交
This commit is contained in:
@@ -168,6 +168,12 @@
|
|||||||
<el-radio :label="1">否</el-radio>
|
<el-radio :label="1">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</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>
|
</div>
|
||||||
<el-form-item label="商品详情" prop="productDetails">
|
<el-form-item label="商品详情" prop="productDetails">
|
||||||
<el-upload
|
<el-upload
|
||||||
@@ -357,9 +363,9 @@ export default {
|
|||||||
// { required: true, message: '排序不能为空', trigger: 'blur' }
|
// { required: true, message: '排序不能为空', trigger: 'blur' }
|
||||||
// ]
|
// ]
|
||||||
},
|
},
|
||||||
urlList:{
|
urlList: {
|
||||||
edit:'/master/shopProduct/editProductDetail',
|
edit: "/master/shopProduct/editProductDetail",
|
||||||
add:'/master/shopProduct/addProduct',
|
add: "/master/shopProduct/addProduct"
|
||||||
},
|
},
|
||||||
// 富文本编辑器配置
|
// 富文本编辑器配置
|
||||||
editorOption: {
|
editorOption: {
|
||||||
@@ -406,7 +412,6 @@ add:'/master/shopProduct/addProduct',
|
|||||||
if (op.insert && typeof op.insert !== "string") {
|
if (op.insert && typeof op.insert !== "string") {
|
||||||
// 如果粘贴了图片,这里会是一个对象
|
// 如果粘贴了图片,这里会是一个对象
|
||||||
if (op.insert.image) {
|
if (op.insert.image) {
|
||||||
|
|
||||||
if (op.insert.image.includes(";base64")) {
|
if (op.insert.image.includes(";base64")) {
|
||||||
let file = that.dataURLtoFile(
|
let file = that.dataURLtoFile(
|
||||||
op.insert.image,
|
op.insert.image,
|
||||||
@@ -481,24 +486,24 @@ add:'/master/shopProduct/addProduct',
|
|||||||
// .catch(err => {
|
// .catch(err => {
|
||||||
// console.log(err);
|
// console.log(err);
|
||||||
// });
|
// });
|
||||||
}else{
|
} 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 quill = that.$refs.myQuillEditor.quill;
|
||||||
var length = this.quillEditorIndex;
|
var length = this.quillEditorIndex;
|
||||||
|
|
||||||
console.log("length at line 397:", length);
|
console.log("length at line 397:", length);
|
||||||
|
|
||||||
// 插入图片,res为服务器返回的图片链接地址
|
// 插入图片,res为服务器返回的图片链接地址
|
||||||
quill.insertEmbed(length, "image", op.insert.image);
|
quill.insertEmbed(length, "image", op.insert.image);
|
||||||
// 调整光标到最后
|
// 调整光标到最后
|
||||||
quill.setSelection(length + 1);
|
quill.setSelection(length + 1);
|
||||||
this.uploadLoading = false;
|
this.uploadLoading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
delta.ops = ops; // 不加会报错
|
delta.ops = ops; // 不加会报错
|
||||||
return delta;
|
return delta;
|
||||||
},
|
},
|
||||||
@@ -705,7 +710,9 @@ add:'/master/shopProduct/addProduct',
|
|||||||
|
|
||||||
this.$http
|
this.$http
|
||||||
.request({
|
.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",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
@@ -718,8 +725,6 @@ add:'/master/shopProduct/addProduct',
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|||||||
@@ -90,12 +90,22 @@
|
|||||||
<img
|
<img
|
||||||
v-if="scope.row.productImages != ''"
|
v-if="scope.row.productImages != ''"
|
||||||
:src="scope.row.productImages"
|
:src="scope.row.productImages"
|
||||||
width="70"
|
width="40"
|
||||||
height="100"
|
height="60"
|
||||||
class="tableImg"
|
class="tableImg"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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
|
<el-table-column
|
||||||
fixed="right"
|
fixed="right"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
@@ -415,3 +425,10 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
::v-deep.el-table .el-table__cell{
|
||||||
|
padding: 4px 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user