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 @@ - + +
+ + + + diff --git a/src/views/modules/shop/commonMedicineTags/shopproduct.vue b/src/views/modules/shop/commonMedicineTags/shopproduct.vue index 651899d..8dfa470 100644 --- a/src/views/modules/shop/commonMedicineTags/shopproduct.vue +++ b/src/views/modules/shop/commonMedicineTags/shopproduct.vue @@ -457,7 +457,7 @@ this.$emit('delete',[row]) console.log("🚀 ~ getAssociatedGoodsList ~ form:", form) } else if (this.currentType == "bookMarketId") { - form.medicineMarketId = this.currentId; + form.psycheMarketId = this.currentId; console.log("🚀 ~ getAssociatedGoodsList ~ form:", form) } diff --git a/src/views/modules/shop/commonMedicineTags/shopproductTable.vue b/src/views/modules/shop/commonMedicineTags/shopproductTable.vue index ddff1ac..84e64d8 100644 --- a/src/views/modules/shop/commonMedicineTags/shopproductTable.vue +++ b/src/views/modules/shop/commonMedicineTags/shopproductTable.vue @@ -188,7 +188,7 @@ export default { form.medicineLabelId = this.currentId; console.log("🚀 ~ getAssociatedGoodsList ~ form:", form); } else if (this.currentType == "bookMarketId") { - form.medicineMarketId = this.currentId; + form.psycheMarketId = this.currentId; console.log("🚀 ~ getAssociatedGoodsList ~ form:", form); } this.dataListLoading = true; diff --git a/static/config/index-prod.js b/static/config/index-prod.js index 29fccec..f03d811 100644 --- a/static/config/index-prod.js +++ b/static/config/index-prod.js @@ -5,8 +5,8 @@ window.SITE_CONFIG = {}; // api接口请求地址 - // window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9100/pb'; window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; + //window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; // cdn地址 = 域名 + 版本号 window.SITE_CONFIG['domain'] = './'; // 域名 diff --git a/static/config/index.js b/static/config/index.js index 9e62848..aba39c5 100644 --- a/static/config/index.js +++ b/static/config/index.js @@ -5,13 +5,8 @@ window.SITE_CONFIG = {}; // api接口请求地址 - // window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';//张川川 - // window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb'; - // window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境11 window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境 - // window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';//磊哥 - // window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb'; - // window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; + //window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //本地 // cdn地址 = 域名 + 版本号 window.SITE_CONFIG['domain'] = './'; // 域名