From eadd2a83bee1386f677bc7ffc379a61032d2481d Mon Sep 17 00:00:00 2001
From: liuyuan <582976274@qq.com>
Date: Wed, 12 Mar 2025 16:44:12 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=95=BF=E5=9B=BE=EF=BC=8C?=
=?UTF-8?q?=E6=96=B9=E5=9B=BE=E5=88=86=E7=B1=BB=E4=B8=8A=E4=BC=A0=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/index.js | 2 +-
.../modules/course/course-add-or-update.vue | 86 ++++++++++++++++++-
src/views/modules/course/courseList.vue | 20 ++++-
.../shop/commonMedicineTags/shopproduct.vue | 2 +-
.../commonMedicineTags/shopproductTable.vue | 2 +-
static/config/index-prod.js | 2 +-
static/config/index.js | 7 +-
7 files changed, 105 insertions(+), 16 deletions(-)
diff --git a/config/index.js b/config/index.js
index 172ccbf..a8f8fa9 100644
--- a/config/index.js
+++ b/config/index.js
@@ -23,7 +23,7 @@ module.exports = {
},
// Various Dev Server settings
- host: 'localhost', // can be overwritten by process.env.HOST
+ host: '192.168.110.160', // can be overwritten by process.env.HOST
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/src/views/modules/course/course-add-or-update.vue b/src/views/modules/course/course-add-or-update.vue
index 9987558..8cd1e60 100644
--- a/src/views/modules/course/course-add-or-update.vue
+++ b/src/views/modules/course/course-add-or-update.vue
@@ -32,7 +32,7 @@
@@ -45,7 +45,6 @@
}"
:action="baseUrl + '/oss/fileoss'"
list-type="picture-card"
- :on-preview="handlePictureCardPreview"
:file-list="fileList"
:on-success="handlePicSuccess"
accept=".jpeg,.jpg,.gif,.png"
@@ -54,7 +53,32 @@
-
+
+
+
+
+
+
+
+
+
@@ -242,6 +266,7 @@ export default {
author: "",
publisherList: [],
fileList: [],
+ fileList2: [],
fileListNovel: [],
dialogImageUrl: "",
dialogVisible: false,
@@ -419,6 +444,7 @@ export default {
}else{
this.relationProducts = []
}
+ //长图
if (data.image != "" && data.image != null) {
var img = {
name: "",
@@ -428,6 +454,17 @@ export default {
attr.push(img);
this.fileList = attr;
}
+ //方图
+ if (data.squareImage != "" && data.squareImage != null) {
+ var img = {
+ name: "",
+ url: data.squareImage
+ };
+ var attr = [];
+ attr.push(img);
+ this.fileList2 = attr;
+ }
+
data.canzk = data.canzk == '1' ? true : false
this.dataForm = { ...data };
}
@@ -473,6 +510,7 @@ export default {
canzk: this.dataForm.canzk ? '1' : '0', // 是否可以自考 0/ 1 0 否 1 是
sort: this.dataForm.sort,
image: this.dataForm.image,
+ squareImage: this.dataForm.squareImage,
content: this.dataForm.content,
etitle: this.dataForm.etitle,
titleAbbr: this.dataForm.titleAbbr,
@@ -503,6 +541,7 @@ export default {
}
});
},
+ //长图
handlePicSuccess(res, file) {
// console.log(res,'res')
if (res.msg == "success") {
@@ -517,20 +556,46 @@ export default {
this.$message.error("上传失败");
}
},
+ //方图
+ handlePicSuccess2(res, file){
+ if (res.msg == "success") {
+ this.dataForm.squareImage = res.url;
+ this.fileList2.push({
+ name: file.name,
+ url: res.url
+ });
+ this.$message.success("上传成功");
+ } else {
+ this.$message.error("上传失败");
+ }
+ },
+ //删除长图
handleRemove(file, fileList) {
this.dataForm.image = "";
this.fileList = [];
this.dataForm.noneBtnImg = fileList.length >= this.dataForm.limitCountImg;
},
+ //删除方图
+ handleRemove2(file, fileList) {
+ this.dataForm.squareImage = "";
+ this.fileList2 = [];
+ this.dataForm.noneBtnImg2 = fileList.length >= this.dataForm.limitCountImg2;
+ },
+ //放大长图
handlePictureCardPreview(file) {
this.dataForm.image = file.url;
this.dialogVisible = true;
},
+ //放大方图
+ handlePictureCardPreview2(file) {
+ this.dataForm.squareImage = file.url;
+ this.dialogVisible = true;
+ },
handleDownload(file) {
console.log(file);
},
handlereset() {
- (this.fileList = []), (this.fileListNovel = []), (this.visible = false);
+ (this.fileList = []), (this.fileList2 = []), (this.fileListNovel = []), (this.visible = false);
this.$emit('pclose')
this.relationProducts = []
this.courseId = undefined
@@ -583,3 +648,16 @@ export default {
}
}
+
+
diff --git a/src/views/modules/course/courseList.vue b/src/views/modules/course/courseList.vue
index 2a8246a..426943f 100644
--- a/src/views/modules/course/courseList.vue
+++ b/src/views/modules/course/courseList.vue
@@ -80,7 +80,7 @@
-
+
+
+
+
+