From 7152e339e5041bd8945d5215f706e489bdd64465 Mon Sep 17 00:00:00 2001 From: Chopper711 Date: Wed, 27 Sep 2023 07:07:22 +0800 Subject: [PATCH 01/36] =?UTF-8?q?fix:=20=E5=89=8D=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E6=95=B0=E6=8D=AE=E5=87=BA=E7=8E=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/pages/home/userCenter/MoneyManagement.vue | 2 ++ manager/src/views/member/advance/withdrawApply.vue | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/buyer/src/pages/home/userCenter/MoneyManagement.vue b/buyer/src/pages/home/userCenter/MoneyManagement.vue index 2d5ee116..647b44cc 100644 --- a/buyer/src/pages/home/userCenter/MoneyManagement.vue +++ b/buyer/src/pages/home/userCenter/MoneyManagement.vue @@ -368,6 +368,8 @@ export default { if (params.row.applyStatus === 'APPLY') { return h('div', [h('span', {}, '申请中')]); } else if (params.row.applyStatus === 'VIA_AUDITING') { + return h('div', [h('span', {}, '审核通过')]); + } else if (params.row.applyStatus === 'SUCCESS') { return h('div', [h('span', {}, '提现成功')]); } else if (params.row.applyStatus === 'ERROR') { return h('div', [h('span', {}, '提现失败')]); diff --git a/manager/src/views/member/advance/withdrawApply.vue b/manager/src/views/member/advance/withdrawApply.vue index 0e6dd35a..194362d4 100644 --- a/manager/src/views/member/advance/withdrawApply.vue +++ b/manager/src/views/member/advance/withdrawApply.vue @@ -9,8 +9,10 @@ From 3ec0e9d997b92602da071b25bb5bb2d173110dcc Mon Sep 17 00:00:00 2001 From: Yer <17633066053@163.com> Date: Fri, 1 Dec 2023 10:47:33 +0800 Subject: [PATCH 02/36] =?UTF-8?q?feat:=20:sparkles:=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E6=9C=AC=E5=9C=B0=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/package.json | 1 - manager/public/index.html | 4 + manager/public/tinymce/CHANGELOG.md | 3163 ++ manager/public/tinymce/README.md | 71 + manager/public/tinymce/bower.json | 27 + manager/public/tinymce/composer.json | 52 + manager/public/tinymce/icons/default/icons.js | 189 + .../public/tinymce/icons/default/icons.min.js | 1 + manager/public/tinymce/icons/default/index.js | 7 + manager/public/tinymce/langs/zh-Hans.js | 1 + manager/public/tinymce/license.txt | 21 + manager/public/tinymce/models/dom/index.js | 7 + manager/public/tinymce/models/dom/model.js | 8035 ++++ .../public/tinymce/models/dom/model.min.js | 4 + manager/public/tinymce/package.json | 35 + .../public/tinymce/plugins/advlist/index.js | 7 + .../public/tinymce/plugins/advlist/plugin.js | 259 + .../tinymce/plugins/advlist/plugin.min.js | 4 + .../public/tinymce/plugins/anchor/index.js | 7 + .../public/tinymce/plugins/anchor/plugin.js | 196 + .../tinymce/plugins/anchor/plugin.min.js | 4 + .../public/tinymce/plugins/autolink/index.js | 7 + .../public/tinymce/plugins/autolink/plugin.js | 228 + .../tinymce/plugins/autolink/plugin.min.js | 4 + .../tinymce/plugins/autoresize/index.js | 7 + .../tinymce/plugins/autoresize/plugin.js | 192 + .../tinymce/plugins/autoresize/plugin.min.js | 4 + .../public/tinymce/plugins/autosave/index.js | 7 + .../public/tinymce/plugins/autosave/plugin.js | 233 + .../tinymce/plugins/autosave/plugin.min.js | 4 + .../public/tinymce/plugins/charmap/index.js | 7 + .../public/tinymce/plugins/charmap/plugin.js | 1646 + .../tinymce/plugins/charmap/plugin.min.js | 4 + manager/public/tinymce/plugins/code/index.js | 7 + manager/public/tinymce/plugins/code/plugin.js | 85 + .../public/tinymce/plugins/code/plugin.min.js | 4 + .../tinymce/plugins/codesample/index.js | 7 + .../tinymce/plugins/codesample/plugin.js | 2449 ++ .../tinymce/plugins/codesample/plugin.min.js | 4 + .../tinymce/plugins/directionality/index.js | 7 + .../tinymce/plugins/directionality/plugin.js | 384 + .../plugins/directionality/plugin.min.js | 4 + .../public/tinymce/plugins/emoticons/index.js | 7 + .../plugins/emoticons/js/emojiimages.js | 1 + .../plugins/emoticons/js/emojiimages.min.js | 3 + .../tinymce/plugins/emoticons/js/emojis.js | 1 + .../plugins/emoticons/js/emojis.min.js | 2 + .../tinymce/plugins/emoticons/plugin.js | 583 + .../tinymce/plugins/emoticons/plugin.min.js | 4 + .../tinymce/plugins/fullscreen/index.js | 7 + .../tinymce/plugins/fullscreen/plugin.js | 1196 + .../tinymce/plugins/fullscreen/plugin.min.js | 4 + manager/public/tinymce/plugins/help/index.js | 7 + manager/public/tinymce/plugins/help/plugin.js | 939 + .../public/tinymce/plugins/help/plugin.min.js | 4 + manager/public/tinymce/plugins/image/index.js | 7 + .../public/tinymce/plugins/image/plugin.js | 1488 + .../tinymce/plugins/image/plugin.min.js | 4 + .../public/tinymce/plugins/importcss/index.js | 7 + .../tinymce/plugins/importcss/plugin.js | 344 + .../tinymce/plugins/importcss/plugin.min.js | 4 + .../tinymce/plugins/insertdatetime/index.js | 7 + .../tinymce/plugins/insertdatetime/plugin.js | 175 + .../plugins/insertdatetime/plugin.min.js | 4 + manager/public/tinymce/plugins/link/index.js | 7 + manager/public/tinymce/plugins/link/plugin.js | 1227 + .../public/tinymce/plugins/link/plugin.min.js | 4 + manager/public/tinymce/plugins/lists/index.js | 7 + .../public/tinymce/plugins/lists/plugin.js | 1948 + .../tinymce/plugins/lists/plugin.min.js | 4 + manager/public/tinymce/plugins/media/index.js | 7 + .../public/tinymce/plugins/media/plugin.js | 1177 + .../tinymce/plugins/media/plugin.min.js | 4 + .../tinymce/plugins/nonbreaking/index.js | 7 + .../tinymce/plugins/nonbreaking/plugin.js | 111 + .../tinymce/plugins/nonbreaking/plugin.min.js | 4 + .../public/tinymce/plugins/pagebreak/index.js | 7 + .../tinymce/plugins/pagebreak/plugin.js | 105 + .../tinymce/plugins/pagebreak/plugin.min.js | 4 + .../public/tinymce/plugins/preview/index.js | 7 + .../public/tinymce/plugins/preview/plugin.js | 97 + .../tinymce/plugins/preview/plugin.min.js | 4 + .../public/tinymce/plugins/quickbars/index.js | 7 + .../tinymce/plugins/quickbars/plugin.js | 437 + .../tinymce/plugins/quickbars/plugin.min.js | 4 + manager/public/tinymce/plugins/save/index.js | 7 + manager/public/tinymce/plugins/save/plugin.js | 118 + .../public/tinymce/plugins/save/plugin.min.js | 4 + .../tinymce/plugins/searchreplace/index.js | 7 + .../tinymce/plugins/searchreplace/plugin.js | 1092 + .../plugins/searchreplace/plugin.min.js | 4 + manager/public/tinymce/plugins/table/index.js | 7 + .../public/tinymce/plugins/table/plugin.js | 3416 ++ .../tinymce/plugins/table/plugin.min.js | 4 + .../public/tinymce/plugins/template/index.js | 7 + .../public/tinymce/plugins/template/plugin.js | 554 + .../tinymce/plugins/template/plugin.min.js | 4 + .../tinymce/plugins/visualblocks/index.js | 7 + .../tinymce/plugins/visualblocks/plugin.js | 98 + .../plugins/visualblocks/plugin.min.js | 4 + .../tinymce/plugins/visualchars/index.js | 7 + .../tinymce/plugins/visualchars/plugin.js | 560 + .../tinymce/plugins/visualchars/plugin.min.js | 4 + .../public/tinymce/plugins/wordcount/index.js | 7 + .../tinymce/plugins/wordcount/plugin.js | 405 + .../tinymce/plugins/wordcount/plugin.min.js | 4 + .../tinymce/skins/content/dark/content.css | 66 + .../skins/content/dark/content.min.css | 1 + .../tinymce/skins/content/default/content.css | 61 + .../skins/content/default/content.min.css | 1 + .../skins/content/document/content.css | 66 + .../skins/content/document/content.min.css | 1 + .../skins/content/tinymce-5-dark/content.css | 66 + .../content/tinymce-5-dark/content.min.css | 1 + .../skins/content/tinymce-5/content.css | 61 + .../skins/content/tinymce-5/content.min.css | 1 + .../tinymce/skins/content/writer/content.css | 62 + .../skins/content/writer/content.min.css | 1 + .../tinymce/skins/ui/oxide-dark/content.css | 759 + .../skins/ui/oxide-dark/content.inline.css | 772 + .../ui/oxide-dark/content.inline.min.css | 1 + .../skins/ui/oxide-dark/content.min.css | 1 + .../tinymce/skins/ui/oxide-dark/skin.css | 3634 ++ .../tinymce/skins/ui/oxide-dark/skin.min.css | 1 + .../skins/ui/oxide-dark/skin.shadowdom.css | 30 + .../ui/oxide-dark/skin.shadowdom.min.css | 1 + .../public/tinymce/skins/ui/oxide/content.css | 778 + .../tinymce/skins/ui/oxide/content.inline.css | 772 + .../skins/ui/oxide/content.inline.min.css | 1 + .../tinymce/skins/ui/oxide/content.min.css | 1 + .../public/tinymce/skins/ui/oxide/skin.css | 3631 ++ .../tinymce/skins/ui/oxide/skin.min.css | 1 + .../tinymce/skins/ui/oxide/skin.shadowdom.css | 30 + .../skins/ui/oxide/skin.shadowdom.min.css | 1 + .../skins/ui/tinymce-5-dark/content.css | 759 + .../ui/tinymce-5-dark/content.inline.css | 772 + .../ui/tinymce-5-dark/content.inline.min.css | 1 + .../skins/ui/tinymce-5-dark/content.min.css | 1 + .../tinymce/skins/ui/tinymce-5-dark/skin.css | 3725 ++ .../skins/ui/tinymce-5-dark/skin.min.css | 1 + .../ui/tinymce-5-dark/skin.shadowdom.css | 30 + .../ui/tinymce-5-dark/skin.shadowdom.min.css | 1 + .../tinymce/skins/ui/tinymce-5/content.css | 778 + .../skins/ui/tinymce-5/content.inline.css | 772 + .../skins/ui/tinymce-5/content.inline.min.css | 1 + .../skins/ui/tinymce-5/content.min.css | 1 + .../tinymce/skins/ui/tinymce-5/skin.css | 3725 ++ .../tinymce/skins/ui/tinymce-5/skin.min.css | 1 + .../skins/ui/tinymce-5/skin.shadowdom.css | 30 + .../skins/ui/tinymce-5/skin.shadowdom.min.css | 1 + manager/public/tinymce/themes/silver/index.js | 7 + manager/public/tinymce/themes/silver/theme.js | 29996 +++++++++++++++ .../public/tinymce/themes/silver/theme.min.js | 4 + manager/public/tinymce/tinymce.d.ts | 3185 ++ manager/public/tinymce/tinymce.js | 30598 ++++++++++++++++ manager/public/tinymce/tinymce.min.js | 4 + manager/src/components/editor/config.js | 29 +- manager/src/components/editor/index.vue | 129 + manager/src/components/editor/plugins.js | 2 +- .../src/components/editor/upload-image.vue | 211 + .../views/page/article-manage/articleList.vue | 19 +- manager/src/views/privacy-content/index.vue | 19 +- .../src/views/sys/oss-manage/ossManage.vue | 1 + 163 files changed, 119248 insertions(+), 43 deletions(-) create mode 100644 manager/public/tinymce/CHANGELOG.md create mode 100644 manager/public/tinymce/README.md create mode 100644 manager/public/tinymce/bower.json create mode 100644 manager/public/tinymce/composer.json create mode 100644 manager/public/tinymce/icons/default/icons.js create mode 100644 manager/public/tinymce/icons/default/icons.min.js create mode 100644 manager/public/tinymce/icons/default/index.js create mode 100644 manager/public/tinymce/langs/zh-Hans.js create mode 100644 manager/public/tinymce/license.txt create mode 100644 manager/public/tinymce/models/dom/index.js create mode 100644 manager/public/tinymce/models/dom/model.js create mode 100644 manager/public/tinymce/models/dom/model.min.js create mode 100644 manager/public/tinymce/package.json create mode 100644 manager/public/tinymce/plugins/advlist/index.js create mode 100644 manager/public/tinymce/plugins/advlist/plugin.js create mode 100644 manager/public/tinymce/plugins/advlist/plugin.min.js create mode 100644 manager/public/tinymce/plugins/anchor/index.js create mode 100644 manager/public/tinymce/plugins/anchor/plugin.js create mode 100644 manager/public/tinymce/plugins/anchor/plugin.min.js create mode 100644 manager/public/tinymce/plugins/autolink/index.js create mode 100644 manager/public/tinymce/plugins/autolink/plugin.js create mode 100644 manager/public/tinymce/plugins/autolink/plugin.min.js create mode 100644 manager/public/tinymce/plugins/autoresize/index.js create mode 100644 manager/public/tinymce/plugins/autoresize/plugin.js create mode 100644 manager/public/tinymce/plugins/autoresize/plugin.min.js create mode 100644 manager/public/tinymce/plugins/autosave/index.js create mode 100644 manager/public/tinymce/plugins/autosave/plugin.js create mode 100644 manager/public/tinymce/plugins/autosave/plugin.min.js create mode 100644 manager/public/tinymce/plugins/charmap/index.js create mode 100644 manager/public/tinymce/plugins/charmap/plugin.js create mode 100644 manager/public/tinymce/plugins/charmap/plugin.min.js create mode 100644 manager/public/tinymce/plugins/code/index.js create mode 100644 manager/public/tinymce/plugins/code/plugin.js create mode 100644 manager/public/tinymce/plugins/code/plugin.min.js create mode 100644 manager/public/tinymce/plugins/codesample/index.js create mode 100644 manager/public/tinymce/plugins/codesample/plugin.js create mode 100644 manager/public/tinymce/plugins/codesample/plugin.min.js create mode 100644 manager/public/tinymce/plugins/directionality/index.js create mode 100644 manager/public/tinymce/plugins/directionality/plugin.js create mode 100644 manager/public/tinymce/plugins/directionality/plugin.min.js create mode 100644 manager/public/tinymce/plugins/emoticons/index.js create mode 100644 manager/public/tinymce/plugins/emoticons/js/emojiimages.js create mode 100644 manager/public/tinymce/plugins/emoticons/js/emojiimages.min.js create mode 100644 manager/public/tinymce/plugins/emoticons/js/emojis.js create mode 100644 manager/public/tinymce/plugins/emoticons/js/emojis.min.js create mode 100644 manager/public/tinymce/plugins/emoticons/plugin.js create mode 100644 manager/public/tinymce/plugins/emoticons/plugin.min.js create mode 100644 manager/public/tinymce/plugins/fullscreen/index.js create mode 100644 manager/public/tinymce/plugins/fullscreen/plugin.js create mode 100644 manager/public/tinymce/plugins/fullscreen/plugin.min.js create mode 100644 manager/public/tinymce/plugins/help/index.js create mode 100644 manager/public/tinymce/plugins/help/plugin.js create mode 100644 manager/public/tinymce/plugins/help/plugin.min.js create mode 100644 manager/public/tinymce/plugins/image/index.js create mode 100644 manager/public/tinymce/plugins/image/plugin.js create mode 100644 manager/public/tinymce/plugins/image/plugin.min.js create mode 100644 manager/public/tinymce/plugins/importcss/index.js create mode 100644 manager/public/tinymce/plugins/importcss/plugin.js create mode 100644 manager/public/tinymce/plugins/importcss/plugin.min.js create mode 100644 manager/public/tinymce/plugins/insertdatetime/index.js create mode 100644 manager/public/tinymce/plugins/insertdatetime/plugin.js create mode 100644 manager/public/tinymce/plugins/insertdatetime/plugin.min.js create mode 100644 manager/public/tinymce/plugins/link/index.js create mode 100644 manager/public/tinymce/plugins/link/plugin.js create mode 100644 manager/public/tinymce/plugins/link/plugin.min.js create mode 100644 manager/public/tinymce/plugins/lists/index.js create mode 100644 manager/public/tinymce/plugins/lists/plugin.js create mode 100644 manager/public/tinymce/plugins/lists/plugin.min.js create mode 100644 manager/public/tinymce/plugins/media/index.js create mode 100644 manager/public/tinymce/plugins/media/plugin.js create mode 100644 manager/public/tinymce/plugins/media/plugin.min.js create mode 100644 manager/public/tinymce/plugins/nonbreaking/index.js create mode 100644 manager/public/tinymce/plugins/nonbreaking/plugin.js create mode 100644 manager/public/tinymce/plugins/nonbreaking/plugin.min.js create mode 100644 manager/public/tinymce/plugins/pagebreak/index.js create mode 100644 manager/public/tinymce/plugins/pagebreak/plugin.js create mode 100644 manager/public/tinymce/plugins/pagebreak/plugin.min.js create mode 100644 manager/public/tinymce/plugins/preview/index.js create mode 100644 manager/public/tinymce/plugins/preview/plugin.js create mode 100644 manager/public/tinymce/plugins/preview/plugin.min.js create mode 100644 manager/public/tinymce/plugins/quickbars/index.js create mode 100644 manager/public/tinymce/plugins/quickbars/plugin.js create mode 100644 manager/public/tinymce/plugins/quickbars/plugin.min.js create mode 100644 manager/public/tinymce/plugins/save/index.js create mode 100644 manager/public/tinymce/plugins/save/plugin.js create mode 100644 manager/public/tinymce/plugins/save/plugin.min.js create mode 100644 manager/public/tinymce/plugins/searchreplace/index.js create mode 100644 manager/public/tinymce/plugins/searchreplace/plugin.js create mode 100644 manager/public/tinymce/plugins/searchreplace/plugin.min.js create mode 100644 manager/public/tinymce/plugins/table/index.js create mode 100644 manager/public/tinymce/plugins/table/plugin.js create mode 100644 manager/public/tinymce/plugins/table/plugin.min.js create mode 100644 manager/public/tinymce/plugins/template/index.js create mode 100644 manager/public/tinymce/plugins/template/plugin.js create mode 100644 manager/public/tinymce/plugins/template/plugin.min.js create mode 100644 manager/public/tinymce/plugins/visualblocks/index.js create mode 100644 manager/public/tinymce/plugins/visualblocks/plugin.js create mode 100644 manager/public/tinymce/plugins/visualblocks/plugin.min.js create mode 100644 manager/public/tinymce/plugins/visualchars/index.js create mode 100644 manager/public/tinymce/plugins/visualchars/plugin.js create mode 100644 manager/public/tinymce/plugins/visualchars/plugin.min.js create mode 100644 manager/public/tinymce/plugins/wordcount/index.js create mode 100644 manager/public/tinymce/plugins/wordcount/plugin.js create mode 100644 manager/public/tinymce/plugins/wordcount/plugin.min.js create mode 100644 manager/public/tinymce/skins/content/dark/content.css create mode 100644 manager/public/tinymce/skins/content/dark/content.min.css create mode 100644 manager/public/tinymce/skins/content/default/content.css create mode 100644 manager/public/tinymce/skins/content/default/content.min.css create mode 100644 manager/public/tinymce/skins/content/document/content.css create mode 100644 manager/public/tinymce/skins/content/document/content.min.css create mode 100644 manager/public/tinymce/skins/content/tinymce-5-dark/content.css create mode 100644 manager/public/tinymce/skins/content/tinymce-5-dark/content.min.css create mode 100644 manager/public/tinymce/skins/content/tinymce-5/content.css create mode 100644 manager/public/tinymce/skins/content/tinymce-5/content.min.css create mode 100644 manager/public/tinymce/skins/content/writer/content.css create mode 100644 manager/public/tinymce/skins/content/writer/content.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/content.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/content.inline.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/content.inline.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/content.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/skin.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/skin.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide/content.css create mode 100644 manager/public/tinymce/skins/ui/oxide/content.inline.css create mode 100644 manager/public/tinymce/skins/ui/oxide/content.inline.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide/content.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide/skin.css create mode 100644 manager/public/tinymce/skins/ui/oxide/skin.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide/skin.shadowdom.css create mode 100644 manager/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/content.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/content.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/skin.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/content.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/content.inline.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/content.inline.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/content.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/skin.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/skin.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css create mode 100644 manager/public/tinymce/themes/silver/index.js create mode 100644 manager/public/tinymce/themes/silver/theme.js create mode 100644 manager/public/tinymce/themes/silver/theme.min.js create mode 100644 manager/public/tinymce/tinymce.d.ts create mode 100644 manager/public/tinymce/tinymce.js create mode 100644 manager/public/tinymce/tinymce.min.js create mode 100644 manager/src/components/editor/index.vue create mode 100644 manager/src/components/editor/upload-image.vue diff --git a/manager/package.json b/manager/package.json index e7cc6f19..0289587f 100644 --- a/manager/package.json +++ b/manager/package.json @@ -12,7 +12,6 @@ "dependencies": { "@amap/amap-jsapi-loader": "0.0.7", "@antv/g2": "^4.1.12", - "@tinymce/tinymce-vue": "^3.2.0", "axios": "^0.21.1", "core-js": "^3.6.5", "dplayer": "^1.26.0", diff --git a/manager/public/index.html b/manager/public/index.html index f88bd079..8841b671 100644 --- a/manager/public/index.html +++ b/manager/public/index.html @@ -13,6 +13,9 @@ <% } %> '; + } + const bodyId = getBodyId(editor); + const bodyClass = getBodyClass(editor); + const isMetaKeyPressed = global$1.os.isMacOS() || global$1.os.isiOS() ? 'e.metaKey' : 'e.ctrlKey && !e.altKey'; + const preventClicksOnLinksScript = ' '; + const directionality = editor.getBody().dir; + const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : ''; + const previewHtml = '' + '' + '' + headHtml + '' + '' + editor.getContent() + preventClicksOnLinksScript + '' + ''; + return previewHtml; + }; + + const open = editor => { + const content = getPreviewHtml(editor); + const dataApi = editor.windowManager.open({ + title: 'Preview', + size: 'large', + body: { + type: 'panel', + items: [{ + name: 'preview', + type: 'iframe', + sandboxed: true, + transparent: false + }] + }, + buttons: [{ + type: 'cancel', + name: 'close', + text: 'Close', + primary: true + }], + initialData: { preview: content } + }); + dataApi.focus('close'); + }; + + const register$1 = editor => { + editor.addCommand('mcePreview', () => { + open(editor); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mcePreview'); + editor.ui.registry.addButton('preview', { + icon: 'preview', + tooltip: 'Preview', + onAction + }); + editor.ui.registry.addMenuItem('preview', { + icon: 'preview', + text: 'Preview', + onAction + }); + }; + + var Plugin = () => { + global$2.add('preview', editor => { + register$1(editor); + register(editor); + }); + }; + + Plugin(); + +})(); diff --git a/manager/public/tinymce/plugins/preview/plugin.min.js b/manager/public/tinymce/plugins/preview/plugin.min.js new file mode 100644 index 00000000..0a99cf37 --- /dev/null +++ b/manager/public/tinymce/plugins/preview/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.4.2 (2023-04-26) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>t=>t.options.get(e),i=n("content_style"),s=n("content_css_cors"),c=n("body_class"),r=n("body_id");e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{(e=>{const n=(e=>{var n;let l="";const a=e.dom.encode,d=null!==(n=i(e))&&void 0!==n?n:"";l+='';const m=s(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{l+='"})),d&&(l+='");const y=r(e),u=c(e),v=' '; + const directionality = editor.getBody().dir; + const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : ''; + html = '' + '' + '' + '' + contentCssEntries + preventClicksOnLinksScript + '' + '' + parseAndSerialize(editor, html) + '' + ''; + } + return replaceTemplateValues(html, getPreviewReplaceValues(editor)); + }; + const open = (editor, templateList) => { + const createTemplates = () => { + if (!templateList || templateList.length === 0) { + const message = editor.translate('No templates defined.'); + editor.notificationManager.open({ + text: message, + type: 'info' + }); + return Optional.none(); + } + return Optional.from(global$2.map(templateList, (template, index) => { + const isUrlTemplate = t => t.url !== undefined; + return { + selected: index === 0, + text: template.title, + value: { + url: isUrlTemplate(template) ? Optional.from(template.url) : Optional.none(), + content: !isUrlTemplate(template) ? Optional.from(template.content) : Optional.none(), + description: template.description + } + }; + })); + }; + const createSelectBoxItems = templates => map(templates, t => ({ + text: t.text, + value: t.text + })); + const findTemplate = (templates, templateTitle) => find(templates, t => t.text === templateTitle); + const loadFailedAlert = api => { + editor.windowManager.alert('Could not load the specified template.', () => api.focus('template')); + }; + const getTemplateContent = t => t.value.url.fold(() => Promise.resolve(t.value.content.getOr('')), url => fetch(url).then(res => res.ok ? res.text() : Promise.reject())); + const onChange = (templates, updateDialog) => (api, change) => { + if (change.name === 'template') { + const newTemplateTitle = api.getData().template; + findTemplate(templates, newTemplateTitle).each(t => { + api.block('Loading...'); + getTemplateContent(t).then(previewHtml => { + updateDialog(api, t, previewHtml); + }).catch(() => { + updateDialog(api, t, ''); + api.setEnabled('save', false); + loadFailedAlert(api); + }); + }); + } + }; + const onSubmit = templates => api => { + const data = api.getData(); + findTemplate(templates, data.template).each(t => { + getTemplateContent(t).then(previewHtml => { + editor.execCommand('mceInsertTemplate', false, previewHtml); + api.close(); + }).catch(() => { + api.setEnabled('save', false); + loadFailedAlert(api); + }); + }); + }; + const openDialog = templates => { + const selectBoxItems = createSelectBoxItems(templates); + const buildDialogSpec = (bodyItems, initialData) => ({ + title: 'Insert Template', + size: 'large', + body: { + type: 'panel', + items: bodyItems + }, + initialData, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + onSubmit: onSubmit(templates), + onChange: onChange(templates, updateDialog) + }); + const updateDialog = (dialogApi, template, previewHtml) => { + const content = getPreviewContent(editor, previewHtml); + const bodyItems = [ + { + type: 'selectbox', + name: 'template', + label: 'Templates', + items: selectBoxItems + }, + { + type: 'htmlpanel', + html: `

${ htmlEscape(template.value.description) }

` + }, + { + label: 'Preview', + type: 'iframe', + name: 'preview', + sandboxed: false, + transparent: false + } + ]; + const initialData = { + template: template.text, + preview: content + }; + dialogApi.unblock(); + dialogApi.redial(buildDialogSpec(bodyItems, initialData)); + dialogApi.focus('template'); + }; + const dialogApi = editor.windowManager.open(buildDialogSpec([], { + template: '', + preview: '' + })); + dialogApi.block('Loading...'); + getTemplateContent(templates[0]).then(previewHtml => { + updateDialog(dialogApi, templates[0], previewHtml); + }).catch(() => { + updateDialog(dialogApi, templates[0], ''); + dialogApi.setEnabled('save', false); + loadFailedAlert(dialogApi); + }); + }; + const optTemplates = createTemplates(); + optTemplates.each(openDialog); + }; + + const showDialog = editor => templates => { + open(editor, templates); + }; + const register$1 = editor => { + editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor)); + editor.addCommand('mceTemplate', createTemplateList(editor, showDialog(editor))); + }; + + const setup = editor => { + editor.on('PreProcess', o => { + const dom = editor.dom, dateFormat = getMdateFormat(editor); + global$2.each(dom.select('div', o.node), e => { + if (dom.hasClass(e, 'mceTmpl')) { + global$2.each(dom.select('*', e), e => { + if (hasAnyClasses(dom, e, getModificationDateClasses(editor))) { + e.innerHTML = getDateTime(editor, dateFormat); + } + }); + replaceVals(editor, e); + } + }); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mceTemplate'); + editor.ui.registry.addButton('template', { + icon: 'template', + tooltip: 'Insert template', + onAction + }); + editor.ui.registry.addMenuItem('template', { + icon: 'template', + text: 'Insert template...', + onAction + }); + }; + + var Plugin = () => { + global$3.add('template', editor => { + register$2(editor); + register(editor); + register$1(editor); + setup(editor); + }); + }; + + Plugin(); + +})(); diff --git a/manager/public/tinymce/plugins/template/plugin.min.js b/manager/public/tinymce/plugins/template/plugin.min.js new file mode 100644 index 00000000..343aa7f7 --- /dev/null +++ b/manager/public/tinymce/plugins/template/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.4.2 (2023-04-26) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(a=n=e,(r=String).prototype.isPrototypeOf(a)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var a,n,r,s})(t)===e,a=t("string"),n=t("object"),r=t("array"),s=("function",e=>"function"==typeof e);const l=(!1,()=>false);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");const c=e=>t=>t.options.get(e),i=c("template_cdate_classes"),u=c("template_mdate_classes"),m=c("template_selected_content_classes"),p=c("template_preview_replace_values"),d=c("template_replace_values"),h=c("templates"),g=c("template_cdate_format"),v=c("template_mdate_format"),y=c("content_style"),f=c("content_css_cors"),_=c("body_class"),b=(e,t)=>{if((e=""+e).length{const n="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" ");return(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",b(a.getMonth()+1,2))).replace("%d",b(a.getDate(),2))).replace("%H",""+b(a.getHours(),2))).replace("%M",""+b(a.getMinutes(),2))).replace("%S",""+b(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(l[a.getMonth()]))).replace("%b",""+e.translate(s[a.getMonth()]))).replace("%A",""+e.translate(r[a.getDay()]))).replace("%a",""+e.translate(n[a.getDay()]))).replace("%%","%")};class T{constructor(e,t){this.tag=e,this.value=t}static some(e){return new T(!0,e)}static none(){return T.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?T.some(e(this.value)):T.none()}bind(e){return this.tag?e(this.value):T.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:T.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?T.none():T.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}T.singletonNone=new T(!1);const x=Object.hasOwnProperty;var S=tinymce.util.Tools.resolve("tinymce.html.Serializer");const w={'"':""","<":"<",">":">","&":"&","'":"'"},C=e=>e.replace(/["'<>&]/g,(e=>{return(t=w,a=e,((e,t)=>x.call(e,t))(t,a)?T.from(t[a]):T.none()).getOr(e);var t,a})),O=(e,t,a)=>((a,n)=>{for(let n=0,s=a.length;nS({validate:!0},e.schema).serialize(e.parser.parse(t,{insert:!0})),D=(e,t)=>(o.each(t,((t,a)=>{s(t)&&(t=t(a)),e=e.replace(new RegExp("\\{\\$"+a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\}","g"),t)})),e),I=(e,t)=>{const a=e.dom,n=d(e);o.each(a.select("*",t),(e=>{o.each(n,((t,n)=>{a.hasClass(e,n)&&s(t)&&t(e)}))}))},N=(e,t,a)=>{const n=e.dom,r=e.selection.getContent();a=D(a,d(e));let s=n.create("div",{},A(e,a));const l=n.select(".mceTmpl",s);l&&l.length>0&&(s=n.create("div"),s.appendChild(l[0].cloneNode(!0))),o.each(n.select("*",s),(t=>{O(n,t,i(e))&&(t.innerHTML=M(e,g(e))),O(n,t,u(e))&&(t.innerHTML=M(e,v(e))),O(n,t,m(e))&&(t.innerHTML=r)})),I(e,s),e.execCommand("mceInsertContent",!1,s.innerHTML),e.addVisual()};var k=tinymce.util.Tools.resolve("tinymce.Env");const P=(e,t)=>{const a=(e,t)=>((e,t,a)=>{for(let n=0,r=e.length;ne.text===t),l),n=t=>{e.windowManager.alert("Could not load the specified template.",(()=>t.focus("template")))},r=e=>e.value.url.fold((()=>Promise.resolve(e.value.content.getOr(""))),(e=>fetch(e).then((e=>e.ok?e.text():Promise.reject())))),s=(e,t)=>(s,l)=>{if("template"===l.name){const l=s.getData().template;a(e,l).each((e=>{s.block("Loading..."),r(e).then((a=>{t(s,e,a)})).catch((()=>{t(s,e,""),s.setEnabled("save",!1),n(s)}))}))}},c=t=>s=>{const l=s.getData();a(t,l.template).each((t=>{r(t).then((t=>{e.execCommand("mceInsertTemplate",!1,t),s.close()})).catch((()=>{s.setEnabled("save",!1),n(s)}))}))};(()=>{if(!t||0===t.length){const t=e.translate("No templates defined.");return e.notificationManager.open({text:t,type:"info"}),T.none()}return T.from(o.map(t,((e,t)=>{const a=e=>void 0!==e.url;return{selected:0===t,text:e.title,value:{url:a(e)?T.from(e.url):T.none(),content:a(e)?T.none():T.from(e.content),description:e.description}}})))})().each((t=>{const a=(e=>((e,t)=>{const a=e.length,n=new Array(a);for(let t=0;t({title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:c(t),onChange:s(t,i)}),i=(t,n,r)=>{const s=((e,t)=>{var a;if(-1===t.indexOf("")){let n="";const r=null!==(a=y(e))&&void 0!==a?a:"",s=f(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{n+='"})),r&&(n+='");const l=_(e),c=e.dom.encode,i=' diff --git a/manager/src/components/editor/plugins.js b/manager/src/components/editor/plugins.js index c78e47ea..d3b259ad 100644 --- a/manager/src/components/editor/plugins.js +++ b/manager/src/components/editor/plugins.js @@ -1,4 +1,4 @@ const plugins = [ - 'advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools importcss insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount' + 'advlist', 'anchor', 'autolink', 'autosave', 'code', 'codesample', 'directionality', 'emoticons', 'fullscreen', 'image', 'importcss', 'insertdatetime', 'link', 'lists', 'media', 'nonbreaking', 'pagebreak', 'preview', 'save', 'searchreplace', 'table', 'template', 'visualblocks', 'visualchars', 'wordcount' ] export default plugins diff --git a/manager/src/components/editor/upload-image.vue b/manager/src/components/editor/upload-image.vue new file mode 100644 index 00000000..f2c7218e --- /dev/null +++ b/manager/src/components/editor/upload-image.vue @@ -0,0 +1,211 @@ + + + + diff --git a/manager/src/views/page/article-manage/articleList.vue b/manager/src/views/page/article-manage/articleList.vue index 1987170c..269d723e 100644 --- a/manager/src/views/page/article-manage/articleList.vue +++ b/manager/src/views/page/article-manage/articleList.vue @@ -111,12 +111,12 @@ /> - + @@ -146,12 +146,10 @@ import { seeArticle, updateArticleStatus, } from "@/api/pages"; -import Editor from "@tinymce/tinymce-vue"; -import { initEditor } from "@/components/editor/config"; +import tinymec from "@/components/editor/index.vue"; export default { - components: { - editor: Editor, + tinymec: tinymec, }, props: { selected: { @@ -161,7 +159,6 @@ export default { }, data() { return { - initEditor: initEditor, selectedIndex: 99999, // 已选下标 loading: true, // 表单加载状态 modalType: 0, // 添加或编辑标识 diff --git a/manager/src/views/privacy-content/index.vue b/manager/src/views/privacy-content/index.vue index a3256228..9d668d21 100644 --- a/manager/src/views/privacy-content/index.vue +++ b/manager/src/views/privacy-content/index.vue @@ -17,12 +17,12 @@ - +
@@ -40,12 +40,12 @@ import { updatePrivacy, getPrivacy, } from "@/api/pages"; -import Editor from "@tinymce/tinymce-vue"; -import { initEditor } from "@/components/editor/config"; +import tinymec from "@/components/editor/index.vue"; + export default { name: "privacy", components: { - editor: Editor, + editor: tinymec, }, props: { selected: { @@ -55,7 +55,6 @@ export default { }, data() { return { - initEditor, loading: false, // 表单加载状态 modalVisible: false, // 添加或编辑显示 treeDataDefault: [], diff --git a/manager/src/views/sys/oss-manage/ossManage.vue b/manager/src/views/sys/oss-manage/ossManage.vue index 3db93fc9..7a229f50 100644 --- a/manager/src/views/sys/oss-manage/ossManage.vue +++ b/manager/src/views/sys/oss-manage/ossManage.vue @@ -1144,6 +1144,7 @@ export default { size += item.fileSize * 1.0; }); this.totalSize = ((size * 1.0) / (1024 * 1024)).toFixed(2) + " MB"; + this.$emit("selected", e) }, }, mounted() { From 4429227665bd3cfca9e785fa84207f7cc8035358 Mon Sep 17 00:00:00 2001 From: Yer <17633066053@163.com> Date: Fri, 1 Dec 2023 11:38:01 +0800 Subject: [PATCH 03/36] =?UTF-8?q?feat:=20:sparkles:=20=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E7=AB=AF=E5=AF=8C=E6=96=87=E6=9C=AC=E6=94=B9=E4=B8=BA=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/editor/upload-image.vue | 4 ++- seller/package.json | 1 - seller/public/index.html | 4 +++ .../goods/goods-seller/goodsOperationSec.vue | 31 +++++++++++++------ .../views/lili-components/editor/config.js | 30 ++++++------------ .../views/lili-components/editor/plugins.js | 2 +- seller/src/views/sys/oss-manage/ossManage.vue | 1 + 7 files changed, 40 insertions(+), 33 deletions(-) diff --git a/manager/src/components/editor/upload-image.vue b/manager/src/components/editor/upload-image.vue index f2c7218e..fdfd5182 100644 --- a/manager/src/components/editor/upload-image.vue +++ b/manager/src/components/editor/upload-image.vue @@ -88,6 +88,9 @@ export default { }; }, methods: { + confirmUrl(){ + + }, handleClickUploadImage(){ this.show = true }, @@ -100,7 +103,6 @@ export default { // 移除商品图片 handleRemoveGoodsPicture(__index) { this.images.splice(__index, 1); - // this.images = this.images.filter((i) => i.url !== file.url); }, // 图片大小不正确 handleMaxSize(file) { diff --git a/seller/package.json b/seller/package.json index 0ccadd37..944d0f7a 100644 --- a/seller/package.json +++ b/seller/package.json @@ -13,7 +13,6 @@ "-": "0.0.1", "@amap/amap-jsapi-loader": "0.0.7", "@antv/g2": "^4.1.14", - "@tinymce/tinymce-vue": "^3.2.0", "axios": "^0.21.1", "dplayer": "^1.27.1", "js-cookie": "^2.2.1", diff --git a/seller/public/index.html b/seller/public/index.html index 882e5c9a..270037ee 100644 --- a/seller/public/index.html +++ b/seller/public/index.html @@ -14,6 +14,9 @@ <% } %> '; + } + const bodyId = getBodyId(editor); + const bodyClass = getBodyClass(editor); + const isMetaKeyPressed = global$1.os.isMacOS() || global$1.os.isiOS() ? 'e.metaKey' : 'e.ctrlKey && !e.altKey'; + const preventClicksOnLinksScript = ' '; + const directionality = editor.getBody().dir; + const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : ''; + const previewHtml = '' + '' + '' + headHtml + '' + '' + editor.getContent() + preventClicksOnLinksScript + '' + ''; + return previewHtml; + }; + + const open = editor => { + const content = getPreviewHtml(editor); + const dataApi = editor.windowManager.open({ + title: 'Preview', + size: 'large', + body: { + type: 'panel', + items: [{ + name: 'preview', + type: 'iframe', + sandboxed: true, + transparent: false + }] + }, + buttons: [{ + type: 'cancel', + name: 'close', + text: 'Close', + primary: true + }], + initialData: { preview: content } + }); + dataApi.focus('close'); + }; + + const register$1 = editor => { + editor.addCommand('mcePreview', () => { + open(editor); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mcePreview'); + editor.ui.registry.addButton('preview', { + icon: 'preview', + tooltip: 'Preview', + onAction + }); + editor.ui.registry.addMenuItem('preview', { + icon: 'preview', + text: 'Preview', + onAction + }); + }; + + var Plugin = () => { + global$2.add('preview', editor => { + register$1(editor); + register(editor); + }); + }; + + Plugin(); + +})(); diff --git a/seller/public/tinymce/plugins/preview/plugin.min.js b/seller/public/tinymce/plugins/preview/plugin.min.js new file mode 100644 index 00000000..0a99cf37 --- /dev/null +++ b/seller/public/tinymce/plugins/preview/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.4.2 (2023-04-26) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>t=>t.options.get(e),i=n("content_style"),s=n("content_css_cors"),c=n("body_class"),r=n("body_id");e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{(e=>{const n=(e=>{var n;let l="";const a=e.dom.encode,d=null!==(n=i(e))&&void 0!==n?n:"";l+='';const m=s(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{l+='"})),d&&(l+='");const y=r(e),u=c(e),v=' '; + const directionality = editor.getBody().dir; + const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : ''; + html = '' + '' + '' + '' + contentCssEntries + preventClicksOnLinksScript + '' + '' + parseAndSerialize(editor, html) + '' + ''; + } + return replaceTemplateValues(html, getPreviewReplaceValues(editor)); + }; + const open = (editor, templateList) => { + const createTemplates = () => { + if (!templateList || templateList.length === 0) { + const message = editor.translate('No templates defined.'); + editor.notificationManager.open({ + text: message, + type: 'info' + }); + return Optional.none(); + } + return Optional.from(global$2.map(templateList, (template, index) => { + const isUrlTemplate = t => t.url !== undefined; + return { + selected: index === 0, + text: template.title, + value: { + url: isUrlTemplate(template) ? Optional.from(template.url) : Optional.none(), + content: !isUrlTemplate(template) ? Optional.from(template.content) : Optional.none(), + description: template.description + } + }; + })); + }; + const createSelectBoxItems = templates => map(templates, t => ({ + text: t.text, + value: t.text + })); + const findTemplate = (templates, templateTitle) => find(templates, t => t.text === templateTitle); + const loadFailedAlert = api => { + editor.windowManager.alert('Could not load the specified template.', () => api.focus('template')); + }; + const getTemplateContent = t => t.value.url.fold(() => Promise.resolve(t.value.content.getOr('')), url => fetch(url).then(res => res.ok ? res.text() : Promise.reject())); + const onChange = (templates, updateDialog) => (api, change) => { + if (change.name === 'template') { + const newTemplateTitle = api.getData().template; + findTemplate(templates, newTemplateTitle).each(t => { + api.block('Loading...'); + getTemplateContent(t).then(previewHtml => { + updateDialog(api, t, previewHtml); + }).catch(() => { + updateDialog(api, t, ''); + api.setEnabled('save', false); + loadFailedAlert(api); + }); + }); + } + }; + const onSubmit = templates => api => { + const data = api.getData(); + findTemplate(templates, data.template).each(t => { + getTemplateContent(t).then(previewHtml => { + editor.execCommand('mceInsertTemplate', false, previewHtml); + api.close(); + }).catch(() => { + api.setEnabled('save', false); + loadFailedAlert(api); + }); + }); + }; + const openDialog = templates => { + const selectBoxItems = createSelectBoxItems(templates); + const buildDialogSpec = (bodyItems, initialData) => ({ + title: 'Insert Template', + size: 'large', + body: { + type: 'panel', + items: bodyItems + }, + initialData, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + onSubmit: onSubmit(templates), + onChange: onChange(templates, updateDialog) + }); + const updateDialog = (dialogApi, template, previewHtml) => { + const content = getPreviewContent(editor, previewHtml); + const bodyItems = [ + { + type: 'selectbox', + name: 'template', + label: 'Templates', + items: selectBoxItems + }, + { + type: 'htmlpanel', + html: `

${ htmlEscape(template.value.description) }

` + }, + { + label: 'Preview', + type: 'iframe', + name: 'preview', + sandboxed: false, + transparent: false + } + ]; + const initialData = { + template: template.text, + preview: content + }; + dialogApi.unblock(); + dialogApi.redial(buildDialogSpec(bodyItems, initialData)); + dialogApi.focus('template'); + }; + const dialogApi = editor.windowManager.open(buildDialogSpec([], { + template: '', + preview: '' + })); + dialogApi.block('Loading...'); + getTemplateContent(templates[0]).then(previewHtml => { + updateDialog(dialogApi, templates[0], previewHtml); + }).catch(() => { + updateDialog(dialogApi, templates[0], ''); + dialogApi.setEnabled('save', false); + loadFailedAlert(dialogApi); + }); + }; + const optTemplates = createTemplates(); + optTemplates.each(openDialog); + }; + + const showDialog = editor => templates => { + open(editor, templates); + }; + const register$1 = editor => { + editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor)); + editor.addCommand('mceTemplate', createTemplateList(editor, showDialog(editor))); + }; + + const setup = editor => { + editor.on('PreProcess', o => { + const dom = editor.dom, dateFormat = getMdateFormat(editor); + global$2.each(dom.select('div', o.node), e => { + if (dom.hasClass(e, 'mceTmpl')) { + global$2.each(dom.select('*', e), e => { + if (hasAnyClasses(dom, e, getModificationDateClasses(editor))) { + e.innerHTML = getDateTime(editor, dateFormat); + } + }); + replaceVals(editor, e); + } + }); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mceTemplate'); + editor.ui.registry.addButton('template', { + icon: 'template', + tooltip: 'Insert template', + onAction + }); + editor.ui.registry.addMenuItem('template', { + icon: 'template', + text: 'Insert template...', + onAction + }); + }; + + var Plugin = () => { + global$3.add('template', editor => { + register$2(editor); + register(editor); + register$1(editor); + setup(editor); + }); + }; + + Plugin(); + +})(); diff --git a/seller/public/tinymce/plugins/template/plugin.min.js b/seller/public/tinymce/plugins/template/plugin.min.js new file mode 100644 index 00000000..343aa7f7 --- /dev/null +++ b/seller/public/tinymce/plugins/template/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.4.2 (2023-04-26) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(a=n=e,(r=String).prototype.isPrototypeOf(a)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var a,n,r,s})(t)===e,a=t("string"),n=t("object"),r=t("array"),s=("function",e=>"function"==typeof e);const l=(!1,()=>false);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");const c=e=>t=>t.options.get(e),i=c("template_cdate_classes"),u=c("template_mdate_classes"),m=c("template_selected_content_classes"),p=c("template_preview_replace_values"),d=c("template_replace_values"),h=c("templates"),g=c("template_cdate_format"),v=c("template_mdate_format"),y=c("content_style"),f=c("content_css_cors"),_=c("body_class"),b=(e,t)=>{if((e=""+e).length{const n="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" ");return(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",b(a.getMonth()+1,2))).replace("%d",b(a.getDate(),2))).replace("%H",""+b(a.getHours(),2))).replace("%M",""+b(a.getMinutes(),2))).replace("%S",""+b(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(l[a.getMonth()]))).replace("%b",""+e.translate(s[a.getMonth()]))).replace("%A",""+e.translate(r[a.getDay()]))).replace("%a",""+e.translate(n[a.getDay()]))).replace("%%","%")};class T{constructor(e,t){this.tag=e,this.value=t}static some(e){return new T(!0,e)}static none(){return T.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?T.some(e(this.value)):T.none()}bind(e){return this.tag?e(this.value):T.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:T.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?T.none():T.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}T.singletonNone=new T(!1);const x=Object.hasOwnProperty;var S=tinymce.util.Tools.resolve("tinymce.html.Serializer");const w={'"':""","<":"<",">":">","&":"&","'":"'"},C=e=>e.replace(/["'<>&]/g,(e=>{return(t=w,a=e,((e,t)=>x.call(e,t))(t,a)?T.from(t[a]):T.none()).getOr(e);var t,a})),O=(e,t,a)=>((a,n)=>{for(let n=0,s=a.length;nS({validate:!0},e.schema).serialize(e.parser.parse(t,{insert:!0})),D=(e,t)=>(o.each(t,((t,a)=>{s(t)&&(t=t(a)),e=e.replace(new RegExp("\\{\\$"+a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\}","g"),t)})),e),I=(e,t)=>{const a=e.dom,n=d(e);o.each(a.select("*",t),(e=>{o.each(n,((t,n)=>{a.hasClass(e,n)&&s(t)&&t(e)}))}))},N=(e,t,a)=>{const n=e.dom,r=e.selection.getContent();a=D(a,d(e));let s=n.create("div",{},A(e,a));const l=n.select(".mceTmpl",s);l&&l.length>0&&(s=n.create("div"),s.appendChild(l[0].cloneNode(!0))),o.each(n.select("*",s),(t=>{O(n,t,i(e))&&(t.innerHTML=M(e,g(e))),O(n,t,u(e))&&(t.innerHTML=M(e,v(e))),O(n,t,m(e))&&(t.innerHTML=r)})),I(e,s),e.execCommand("mceInsertContent",!1,s.innerHTML),e.addVisual()};var k=tinymce.util.Tools.resolve("tinymce.Env");const P=(e,t)=>{const a=(e,t)=>((e,t,a)=>{for(let n=0,r=e.length;ne.text===t),l),n=t=>{e.windowManager.alert("Could not load the specified template.",(()=>t.focus("template")))},r=e=>e.value.url.fold((()=>Promise.resolve(e.value.content.getOr(""))),(e=>fetch(e).then((e=>e.ok?e.text():Promise.reject())))),s=(e,t)=>(s,l)=>{if("template"===l.name){const l=s.getData().template;a(e,l).each((e=>{s.block("Loading..."),r(e).then((a=>{t(s,e,a)})).catch((()=>{t(s,e,""),s.setEnabled("save",!1),n(s)}))}))}},c=t=>s=>{const l=s.getData();a(t,l.template).each((t=>{r(t).then((t=>{e.execCommand("mceInsertTemplate",!1,t),s.close()})).catch((()=>{s.setEnabled("save",!1),n(s)}))}))};(()=>{if(!t||0===t.length){const t=e.translate("No templates defined.");return e.notificationManager.open({text:t,type:"info"}),T.none()}return T.from(o.map(t,((e,t)=>{const a=e=>void 0!==e.url;return{selected:0===t,text:e.title,value:{url:a(e)?T.from(e.url):T.none(),content:a(e)?T.none():T.from(e.content),description:e.description}}})))})().each((t=>{const a=(e=>((e,t)=>{const a=e.length,n=new Array(a);for(let t=0;t({title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:c(t),onChange:s(t,i)}),i=(t,n,r)=>{const s=((e,t)=>{var a;if(-1===t.indexOf("")){let n="";const r=null!==(a=y(e))&&void 0!==a?a:"",s=f(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{n+='"})),r&&(n+='");const l=_(e),c=e.dom.encode,i=' diff --git a/seller/src/views/lili-components/editor/upload-image.vue b/seller/src/views/lili-components/editor/upload-image.vue new file mode 100644 index 00000000..7b82f247 --- /dev/null +++ b/seller/src/views/lili-components/editor/upload-image.vue @@ -0,0 +1,211 @@ + + + + From c82f8a6de3360777d737d48ceac9429da79c2264 Mon Sep 17 00:00:00 2001 From: Chopper711 Date: Mon, 11 Dec 2023 07:58:22 +0800 Subject: [PATCH 05/36] =?UTF-8?q?fix:=20=E9=83=A8=E9=97=A8=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BDbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lili/department-tree-choose.vue | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/manager/src/components/lili/department-tree-choose.vue b/manager/src/components/lili/department-tree-choose.vue index 34200c70..c7c229ca 100644 --- a/manager/src/components/lili/department-tree-choose.vue +++ b/manager/src/components/lili/department-tree-choose.vue @@ -57,6 +57,7 @@ export default { departmentTitle: "", // modal标题 searchKey: "", // 搜索关键词 dataDep: [], // 部门列表 + cloneDep: [], // 克隆部门列表 selectDep: [], // 已选部门 departmentId: [] // 部门id }; @@ -67,27 +68,20 @@ export default { initDepartment().then(res => { if (res.success) { this.dataDep = res.result; + + this.cloneDep = JSON.parse(JSON.stringify(this.dataDep)); } }); }, searchDep() { // 搜索部门 if (this.searchKey) { - this.depLoading = true; - searchDepartment({title: this.searchKey}).then(res => { - this.depLoading = false; - if (res.success) { - res.result.forEach(function (e) { - if (e.status == -1) { - e.title = "[已禁用] " + e.title; - e.disabled = true; - } - }); - this.dataDep = res.result; - } + this.dataDep = this.cloneDep.filter(item => { + return item.title.indexOf(this.searchKey) > -1; }); + } else { - this.initDepartmentData(); + this.dataDep = JSON.parse(JSON.stringify(this.cloneDep)); } }, // 选择回调 From 053279f60ded01be84ea79eef610de1ffd8e3415 Mon Sep 17 00:00:00 2001 From: mahe Date: Mon, 18 Dec 2023 14:43:58 +0800 Subject: [PATCH 06/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=9C=AA=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/pages/Merchant.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buyer/src/pages/Merchant.vue b/buyer/src/pages/Merchant.vue index 714a4bc9..1a676d82 100644 --- a/buyer/src/pages/Merchant.vue +++ b/buyer/src/pages/Merchant.vue @@ -227,6 +227,7 @@ export default { this.getIndexData(); } else { this.getGoodsList(); + this.getCateList(); } let that = this; window.onscroll = function () { @@ -246,6 +247,7 @@ export default { getCateById(this.$route.query.id).then((res) => { if (res.success) { this.cateList = res.result; + console.log(this.cateList,'cateList') } }); }, From 195ea35798527560962524810f9617f38d3698a8 Mon Sep 17 00:00:00 2001 From: mahe Date: Mon, 18 Dec 2023 15:35:20 +0800 Subject: [PATCH 07/36] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E8=B6=85=E5=87=BA=E5=86=85=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/pages/shopEntry/ShopEntry.vue | 13 +++++++++++-- seller/src/views/home/home.vue | 8 +++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/buyer/src/pages/shopEntry/ShopEntry.vue b/buyer/src/pages/shopEntry/ShopEntry.vue index a55cc7ed..78a7ce54 100644 --- a/buyer/src/pages/shopEntry/ShopEntry.vue +++ b/buyer/src/pages/shopEntry/ShopEntry.vue @@ -26,9 +26,11 @@
- + -
+ +
+

@@ -69,6 +71,9 @@ export default { agreement().then((res) => { this.agreementCon = res.result.content; }); + }, + handleReachBottom(){ + }, getData(status) { // 获取已填写店铺信息 @@ -173,6 +178,10 @@ export default { } .agreeent-con { max-height: 500px; + ::v-deep img{ + max-width: 100%; + max-height: 200px; + } } .success-page { height: 500px; diff --git a/seller/src/views/home/home.vue b/seller/src/views/home/home.vue index 639fbe3f..e4a55035 100644 --- a/seller/src/views/home/home.vue +++ b/seller/src/views/home/home.vue @@ -2,7 +2,7 @@

-
+
@@ -294,4 +294,10 @@ export default { From 286295393d8154f84bca287a4fea91db248f8f0f Mon Sep 17 00:00:00 2001 From: mahe Date: Mon, 18 Dec 2023 18:04:44 +0800 Subject: [PATCH 08/36] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B1=80=E9=83=A8=E5=88=B7=E6=96=B0=E4=B8=8E?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=88=90=E6=9C=AC=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/goods/goods-info/goodsDetail.vue | 16 ++-- .../goods/goods-seller/goodsOperationSec.vue | 83 ++++++++++++------- 2 files changed, 60 insertions(+), 39 deletions(-) diff --git a/manager/src/views/goods/goods-info/goodsDetail.vue b/manager/src/views/goods/goods-info/goodsDetail.vue index d738a0cd..5d723674 100644 --- a/manager/src/views/goods/goods-info/goodsDetail.vue +++ b/manager/src/views/goods/goods-info/goodsDetail.vue @@ -214,14 +214,14 @@ export default { }); } else { this.skuColumn.push( - { - title: "成本", - key: "cost", - render: (h, params) => { - console.log(params) - return h("priceColorScheme", {props:{value:params.row.cost,color:this.$mainColor}} ); - }, - }, + // { + // title: "成本", + // key: "cost", + // render: (h, params) => { + // console.log(params) + // return h("priceColorScheme", {props:{value:params.row.cost,color:this.$mainColor}} ); + // }, + // }, { title: "价格", key: "price", diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 4a9ff626..12ed8d09 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -29,6 +29,7 @@ +

商品交易信息

@@ -38,6 +39,7 @@ + {{ - baseInfoForm.goodsUnit || "" + baseInfoForm.goodsUnit || "" }}
@@ -226,12 +228,12 @@ }} - @@ -419,6 +428,14 @@
+ + + + + + + + diff --git a/seller/src/views/shop/wap/decorate.vue b/seller/src/views/shop/wap/decorate.vue index 919d0d5d..b53e89c7 100644 --- a/seller/src/views/shop/wap/decorate.vue +++ b/seller/src/views/shop/wap/decorate.vue @@ -226,7 +226,8 @@ + + \ No newline at end of file diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index db53655b..d0ddcf46 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -1459,10 +1459,6 @@ export default { title: "库存", slot: "quantity", }, - { - title: "库存预警", - slot: "alertQuantity", - }, { title: "货号", slot: "sn", diff --git a/seller/src/views/home/home.vue b/seller/src/views/home/home.vue index e4a55035..ea41bbde 100644 --- a/seller/src/views/home/home.vue +++ b/seller/src/views/home/home.vue @@ -111,12 +111,12 @@ 投诉 -
-
- {{ homeData.waitUpper || 0 }} -
待上架
+
+
+ {{ homeData.alertQuantityNum || 0 }} +
库存预警
-
+
{{ homeData.waitAuth || 0 }}
审核中
diff --git a/seller/src/views/lili-dialog/goods-dialog.vue b/seller/src/views/lili-dialog/goods-dialog.vue index 0af5071e..e7c27f0c 100755 --- a/seller/src/views/lili-dialog/goods-dialog.vue +++ b/seller/src/views/lili-dialog/goods-dialog.vue @@ -4,14 +4,14 @@
搜索范围
-
- +
From 6e626f6e11b8bc770fb43625a7de94daf11d07aa Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 17:27:05 +0800 Subject: [PATCH 29/36] =?UTF-8?q?=E4=B9=B0=E5=AE=B6=E7=AB=AF=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E9=80=80=E6=AC=BE=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/pages/home/orderCenter/MyOrder.vue | 6 +++--- buyer/src/pages/home/orderCenter/OrderDetail.vue | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/buyer/src/pages/home/orderCenter/MyOrder.vue b/buyer/src/pages/home/orderCenter/MyOrder.vue index 9fa6b5ff..63849d40 100644 --- a/buyer/src/pages/home/orderCenter/MyOrder.vue +++ b/buyer/src/pages/home/orderCenter/MyOrder.vue @@ -52,7 +52,7 @@
{{ goods.name }}
{{ goods.goodsPrice | unitPrice("¥") }} x {{ goods.num }} - {{refundPriceList(goods.isRefund)}} {{ goods.refundPrice | unitPrice("¥") }} + {{refundPriceList(goods.isRefund)}}
@@ -162,11 +162,11 @@ export default { case 'PART_REFUND': return "部分退款"; case 'NO_REFUND': - return "未退款"; + return ""; case 'REFUNDING': return "退款中"; default: - return "未退款"; + return ""; } }, goodsDetail (skuId, goodsId) { diff --git a/buyer/src/pages/home/orderCenter/OrderDetail.vue b/buyer/src/pages/home/orderCenter/OrderDetail.vue index 0a14fb6f..39d75a59 100644 --- a/buyer/src/pages/home/orderCenter/OrderDetail.vue +++ b/buyer/src/pages/home/orderCenter/OrderDetail.vue @@ -30,6 +30,7 @@ size="small" >取消订单 +

核验码:{{ order.order.verificationCode }} @@ -72,9 +73,6 @@

支付方式:{{ order.paymentMethodValue }}

付款状态:{{ order.payStatusValue }}

-
- -

配送信息

配送方式:{{ order.deliveryMethodValue }}

From bf8afdc0f4e25a074301095faa65041b007a69fc Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 17:29:19 +0800 Subject: [PATCH 30/36] =?UTF-8?q?=E4=B9=B0=E5=AE=B6=E7=AB=AF=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/public/config.js | 12 ++-- buyer/src/pages/home/enumeration.js | 2 +- manager/public/config.js | 58 ++++++++++--------- seller/public/config.js | 12 ++-- .../goods/goods-seller/goodsOperationSec.vue | 46 ++++++++++++--- 5 files changed, 86 insertions(+), 44 deletions(-) diff --git a/buyer/public/config.js b/buyer/public/config.js index 2272ff76..f1061804 100644 --- a/buyer/public/config.js +++ b/buyer/public/config.js @@ -3,10 +3,14 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn" + // common: "https://common-api.pickmall.cn", + // buyer: "https://buyer-api.pickmall.cn", + // seller: "https://store-api.pickmall.cn", + // manager: "https://admin-api.pickmall.cn" + common: "http://192.168.31.225:8890", + buyer: "http://192.168.31.225:8888", + seller: "http://192.168.31.225:8889", + manager: "http://192.168.31.225:8887" }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/buyer/src/pages/home/enumeration.js b/buyer/src/pages/home/enumeration.js index 60a6f82f..60caf556 100644 --- a/buyer/src/pages/home/enumeration.js +++ b/buyer/src/pages/home/enumeration.js @@ -30,7 +30,7 @@ export const orderStatusList = [ status: 'TAKE' }, { - name: '已取消', + name: '已关闭', status: 'CANCELLED' }, { diff --git a/manager/public/config.js b/manager/public/config.js index ada826fc..5be44003 100644 --- a/manager/public/config.js +++ b/manager/public/config.js @@ -1,29 +1,33 @@ var BASE = { - /** - * @description api请求基础路径 - */ - API_DEV: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn" - }, - API_PROD: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn" - }, - /** - * @description // 跳转买家端地址 pc端 - */ - PC_URL: "https://pc-b2b2c.pickmall.cn", - /** - * @description // 跳转买家端地址 wap端 - */ - WAP_URL: "https://m-b2b2c.pickmall.cn", - /** - * @description api请求基础路径前缀 - */ - PREFIX: "/manager" + /** + * @description api请求基础路径 + */ + API_DEV: { + // common: "https://common-api.pickmall.cn", + // buyer: "https://buyer-api.pickmall.cn", + // seller: "https://store-api.pickmall.cn", + // manager: "https://admin-api.pickmall.cn", + common: "http://192.168.31.225:8890", + buyer: "http://192.168.31.225:8888", + seller: "http://192.168.31.225:8889", + manager: "http://192.168.31.225:8887" + }, + API_PROD: { + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn" + }, + /** + * @description // 跳转买家端地址 pc端 + */ + PC_URL: "https://pc-b2b2c.pickmall.cn", + /** + * @description // 跳转买家端地址 wap端 + */ + WAP_URL: "https://m-b2b2c.pickmall.cn", + /** + * @description api请求基础路径前缀 + */ + PREFIX: "/manager" }; diff --git a/seller/public/config.js b/seller/public/config.js index 87161bcb..939235af 100644 --- a/seller/public/config.js +++ b/seller/public/config.js @@ -3,10 +3,14 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn", + // common: "https://common-api.pickmall.cn", + // buyer: "https://buyer-api.pickmall.cn", + // seller: "https://store-api.pickmall.cn", + // manager: "https://admin-api.pickmall.cn", + common: "http://192.168.31.225:8890", + buyer: "http://192.168.31.225:8888", + seller: "http://192.168.31.225:8889", + manager: "http://192.168.31.225:8887" }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 3c5f1323..b526b55d 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -178,9 +178,9 @@ + @on-change="skuValueChange(val, index, item, $index)">
+ {{skuInfo}}   @@ -1220,8 +1221,41 @@ export default { } return len; }, + truncateString(str) { + let len = str.length; // 获取原始字符串的长度 + if (len <= 10 && /^[\u4e00-\u9fa5]+$/.test(str)) { // 判断字符串长度小于等于10且只包含中文时直接返回原字符串 + return str; + } else { + let count = 0; // 记录已经统计的字节数(UTF-8编码) + for (let i = 0; i < len; i++) { + let charCode = str.charCodeAt(i); + if ((charCode >= 0x0001 && charCode <= 0x007F) || (charCode >= 0xFF60 && charCode <= 0xFF9F)) { // ASCII字符或全角字符 + count += 1; + } else { + count += 2; // UTF-8编码中非ASCII字符占两个字节 + } + if (count > 10 * 2) { // 当已经统计的字节数大于10*2时,说明已经达到了限制条件 + break; + } + } + console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); + return str.substr(0, Math.floor((count - 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 + } + }, // 编辑规格值 - skuValueChange(val, index, item) { + skuValueChange(val, index, item, $index) { + if (this.zz(0, val.value) > 20) { + this.$Message.error("规格值最多十个字符长度!"); + // val.value = val.value.toString().slice(0, 4); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // val.value = this.truncateString(val.value); + this.skuInfo[$index].spec_values[index].value = this.truncateString(val.value); + // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val.value)); + // this.$set(item, 'value', this.truncateString(val.value)); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + return; + } + console.log('编辑规格值改变', item); if (this.skuTableData.find((i) => i[val.name] === val.value)) { this.$Message.error("已存在相同规格值!"); return; @@ -1230,10 +1264,6 @@ export default { this.$Message.error("规格值不能为空!"); return; } - if (this.zz(0, val.value) > 20) { - this.$Message.error("规格值最多十个字符长度!"); - return; - } let curVal = this.currentSkuVal; this.skuTableData = this.skuTableData.map((e) => { if (e[val.name] === curVal) { @@ -1437,7 +1467,7 @@ export default { key: columnName, }); }); - + console.log('渲染头部', this.skuInfo); // 有成本价和价格的情况 if (this.baseInfoForm.salesModel !== "WHOLESALE") { pushData.push( From 7ba94c7fe113f1633af72c4db382618512780615 Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 17:54:28 +0800 Subject: [PATCH 31/36] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/public/config.js | 12 ++--- manager/public/config.js | 12 ++--- seller/public/config.js | 12 ++--- .../goods/goods-seller/goodsOperationSec.vue | 45 ++++++++++++------- 4 files changed, 41 insertions(+), 40 deletions(-) diff --git a/buyer/public/config.js b/buyer/public/config.js index f1061804..2272ff76 100644 --- a/buyer/public/config.js +++ b/buyer/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn" - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn" }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/manager/public/config.js b/manager/public/config.js index 5be44003..9f51858a 100644 --- a/manager/public/config.js +++ b/manager/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn", - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn", }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/public/config.js b/seller/public/config.js index 939235af..87161bcb 100644 --- a/seller/public/config.js +++ b/seller/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn", - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn", }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index b526b55d..623da940 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -196,7 +196,7 @@
- {{skuInfo}} +   @@ -1197,9 +1197,20 @@ export default { this.$Message.error("已存在相同规格项!"); return; } + // if (this.zz(0, val) > 20) { + // this.$Message.error("规格项最多十个字符长度!"); + // return; + // } if (this.zz(0, val) > 20) { - this.$Message.error("规格项最多十个字符长度!"); - return; + this.$Message.error("规格值最多十个字符长度!"); + // val = val.toString().slice(0, 4); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // val = this.truncateString(val); + this.skuInfo[index].name = this.truncateString(val); + // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val)); + // this.$set(item, 'value', this.truncateString(val)); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // return; } this.skuTableData = this.skuTableData.map((e) => { e[val] = e[this.currentSkuItem]; @@ -1238,12 +1249,20 @@ export default { break; } } - console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); - return str.substr(0, Math.floor((count - 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 + // console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); + return str.substr(0, Math.floor((count + 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 } }, // 编辑规格值 skuValueChange(val, index, item, $index) { + if (this.skuTableData.find((i) => i[val.name] === val.value)) { + this.$Message.error("已存在相同规格值!"); + return; + } + if (val.value === '') { + this.$Message.error("规格值不能为空!"); + return; + } if (this.zz(0, val.value) > 20) { this.$Message.error("规格值最多十个字符长度!"); // val.value = val.value.toString().slice(0, 4); @@ -1253,17 +1272,12 @@ export default { // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val.value)); // this.$set(item, 'value', this.truncateString(val.value)); this.$forceUpdate();// 调用该方法会触发组件的重新渲染 - return; - } - console.log('编辑规格值改变', item); - if (this.skuTableData.find((i) => i[val.name] === val.value)) { - this.$Message.error("已存在相同规格值!"); - return; - } - if (val.value === '') { - this.$Message.error("规格值不能为空!"); - return; + // return; } + // console.log('编辑规格值改变', item); + + + let curVal = this.currentSkuVal; this.skuTableData = this.skuTableData.map((e) => { if (e[val.name] === curVal) { @@ -1467,7 +1481,6 @@ export default { key: columnName, }); }); - console.log('渲染头部', this.skuInfo); // 有成本价和价格的情况 if (this.baseInfoForm.salesModel !== "WHOLESALE") { pushData.push( From 94e389ab23e32f7e0bfa9d648fc4adc095cd52af Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 18:09:11 +0800 Subject: [PATCH 32/36] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/goods-seller/goodsOperationSec.vue | 55 +++++++------------ 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 623da940..bc78f691 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -1197,18 +1197,10 @@ export default { this.$Message.error("已存在相同规格项!"); return; } - // if (this.zz(0, val) > 20) { - // this.$Message.error("规格项最多十个字符长度!"); - // return; - // } if (this.zz(0, val) > 20) { this.$Message.error("规格值最多十个字符长度!"); // val = val.toString().slice(0, 4); - this.$forceUpdate();// 调用该方法会触发组件的重新渲染 - // val = this.truncateString(val); - this.skuInfo[index].name = this.truncateString(val); - // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val)); - // this.$set(item, 'value', this.truncateString(val)); + this.skuInfo[index].name = this.countCharacters(val, 10); this.$forceUpdate();// 调用该方法会触发组件的重新渲染 // return; } @@ -1232,26 +1224,25 @@ export default { } return len; }, - truncateString(str) { - let len = str.length; // 获取原始字符串的长度 - if (len <= 10 && /^[\u4e00-\u9fa5]+$/.test(str)) { // 判断字符串长度小于等于10且只包含中文时直接返回原字符串 + countCharacters (defaultStr, defaultNum) { + let str = '' + defaultStr || '', + num = + defaultNum || 0, + res = '', + length = 0; + if (!str || !num) { return str; - } else { - let count = 0; // 记录已经统计的字节数(UTF-8编码) - for (let i = 0; i < len; i++) { - let charCode = str.charCodeAt(i); - if ((charCode >= 0x0001 && charCode <= 0x007F) || (charCode >= 0xFF60 && charCode <= 0xFF9F)) { // ASCII字符或全角字符 - count += 1; - } else { - count += 2; // UTF-8编码中非ASCII字符占两个字节 - } - if (count > 10 * 2) { // 当已经统计的字节数大于10*2时,说明已经达到了限制条件 - break; - } - } - // console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); - return str.substr(0, Math.floor((count + 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 } + // 循环字符串,判断长度 最少也会返回一个字 + for (const i in str) { + res += str[i]; + // 测试长度 + length += /[\u4e00-\u9fa5]/.test(str[i]) ? 2 : 1; + // 如果长度大于设置长度 或者 循环到最后则终止循环 + if (length >= num || +i == str.length - 1) { + break; + } + } + return res; }, // 编辑规格值 skuValueChange(val, index, item, $index) { @@ -1266,18 +1257,10 @@ export default { if (this.zz(0, val.value) > 20) { this.$Message.error("规格值最多十个字符长度!"); // val.value = val.value.toString().slice(0, 4); - this.$forceUpdate();// 调用该方法会触发组件的重新渲染 - // val.value = this.truncateString(val.value); - this.skuInfo[$index].spec_values[index].value = this.truncateString(val.value); - // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val.value)); - // this.$set(item, 'value', this.truncateString(val.value)); + this.skuInfo[$index].spec_values[index].value = this.countCharacters(val.value, 10); this.$forceUpdate();// 调用该方法会触发组件的重新渲染 // return; } - // console.log('编辑规格值改变', item); - - - let curVal = this.currentSkuVal; this.skuTableData = this.skuTableData.map((e) => { if (e[val.name] === curVal) { From ebaf5e34d82c7b0e8e1cc344e0ff71f08516555d Mon Sep 17 00:00:00 2001 From: Yer <17633066053@163.com> Date: Wed, 17 Jan 2024 18:35:11 +0800 Subject: [PATCH 33/36] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=95=86=E5=AE=B6=E7=AB=AF=E8=AE=A2=E5=8D=95=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E7=9A=84bug=20=E5=92=8C=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=8D=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seller/src/views/member/memberComment.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/seller/src/views/member/memberComment.vue b/seller/src/views/member/memberComment.vue index 604644ec..191922bd 100644 --- a/seller/src/views/member/memberComment.vue +++ b/seller/src/views/member/memberComment.vue @@ -84,8 +84,8 @@ export default { pageSize: 10, // 页面大小 sort: "createTime", // 默认排序字段 order: "desc", // 默认排序方式 - startDate: "", // 起始时间 - endDate: "", // 终止时间 + startTime: "", // 起始时间 + endTime: "", // 终止时间 }, selectDate: null, form: { @@ -232,8 +232,8 @@ export default { // 选择日期回调 selectDateRange(v) { if (v) { - this.searchForm.startDate = v[0]; - this.searchForm.endDate = v[1]; + this.searchForm.startTime = v[0]; + this.searchForm.endTime = v[1]; } }, // 获取列表数据 From 21c91cfcf1d80910eb2aa5b216b450a12cbcc672 Mon Sep 17 00:00:00 2001 From: chc <1501738723@qq.com> Date: Thu, 18 Jan 2024 11:46:11 +0800 Subject: [PATCH 34/36] =?UTF-8?q?=E5=BA=93=E5=AD=98=E9=A2=84=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seller/src/views/goods/goods-seller/alertQuantity.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/seller/src/views/goods/goods-seller/alertQuantity.vue b/seller/src/views/goods/goods-seller/alertQuantity.vue index b3961449..54ac51e4 100644 --- a/seller/src/views/goods/goods-seller/alertQuantity.vue +++ b/seller/src/views/goods/goods-seller/alertQuantity.vue @@ -308,6 +308,7 @@ ) { // 校验未通过 进行提示 this.$Message.error("请输入0~99999999之间的数字值") + row.alertQuantity = 0 this.checkFlag = false; return; } From de89249d3e41455cf2e00455467113e625d5ce6a Mon Sep 17 00:00:00 2001 From: misworga831 Date: Mon, 22 Jan 2024 14:09:00 +0800 Subject: [PATCH 35/36] =?UTF-8?q?improved:=20=E4=BC=98=E5=8C=96sku?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/goodsDetail/ShowGoods.vue | 12 +- buyer/src/pages/GoodsDetail.vue | 3 + .../views/goods/goods-seller/addGoods.scss | 6 +- .../goods/goods-seller/goodsOperationSec.vue | 539 ++++++++++-------- 4 files changed, 326 insertions(+), 234 deletions(-) diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 089266aa..fe8d6d15 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -5,9 +5,8 @@
-
- - +
+
@@ -19,7 +18,7 @@ v-for="(item, index) in imgList" :key="index" > - +
@@ -581,9 +580,12 @@ export default { swiperGoodsImg() { this.skuDetail.specList.forEach((e) => { if (e.specName === "images") { - this.imgList = e.specImage; + this.imgList = this.skuDetail.goodsGalleryList; } }); + if (!this.imgList) { + this.imgList = [this.skuDetail.original]; + } }, }, diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue index 218b1cd7..17d70b3e 100644 --- a/buyer/src/pages/GoodsDetail.vue +++ b/buyer/src/pages/GoodsDetail.vue @@ -130,6 +130,9 @@ export default { }); this.categoryBar = cateArr; this.$set(this, "goodsMsg", res.result); + if (!this.goodsMsg.data.intro) { + this.goodsMsg.data.intro = '' + } // 判断是否收藏 if (this.Cookies.getItem("userInfo")) { isStoreCollection("STORE", this.goodsMsg.data.storeId).then((res) => { diff --git a/seller/src/views/goods/goods-seller/addGoods.scss b/seller/src/views/goods/goods-seller/addGoods.scss index 849e8273..499380ab 100644 --- a/seller/src/views/goods/goods-seller/addGoods.scss +++ b/seller/src/views/goods/goods-seller/addGoods.scss @@ -342,18 +342,14 @@ div.base-info-item { } .sku-upload-list { - display: inline-block; - width: 60px; - height: 60px; text-align: center; - line-height: 60px; border: 1px solid transparent; border-radius: 4px; overflow: hidden; background: #fff; position: relative; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); - margin-right: 4px; + margin-right: 8px; } .preview-picture { diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index bc78f691..de5901ce 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -1,7 +1,7 @@
@@ -98,12 +101,13 @@

商品规格及图片

- +
-
+
-
- -
- - - - - - - - + + +
+ +
+
- + -
-
- 上传视频 -
-
-
- -
- -
-
- 已成功上传视频 + +
主图仅支持png,jpg,jpeg格式,宽高至少600*600px,大小2M内,可拖拽调整主图顺序
+
+ +
+
+
+
- - - + + +
-
- +
@@ -159,148 +173,167 @@
- + + +
- - 规格项
+ + +
+ - + + + 添加规格图片 +
+
-
+
+
规格值
- + class="sku-item-content-val flex" label="" style="line-height: 32px;"> +
+ + + + + + + +
+
+ +
+ +
+
+ +
+ +
+
+
+
+ + + -
-
- -
- - +
+ +
  - + +
规格详细
-
+
点击加载sku数据
+
- - - - - + " + @mouseenter="handleMouseEnter">
- kg + @on-change="updateSkuTable(row, 'weight')"> + kg
- + -
@@ -311,11 +344,11 @@

规格描述内容

- + -
- +
+
@@ -325,7 +358,7 @@
+ @on-select-change="selectTree" @on-check-change="changeSelect">
@@ -358,12 +391,13 @@ - + + prop="weight"> - kg + kg

其他信息

@@ -391,13 +425,14 @@
+ v-model="params_panel" :title="paramsGroup.groupName" class="mb_10" style="text-align: left"> {{ paramsGroup.groupName }}

- - @@ -421,7 +457,7 @@

@@ -451,8 +487,8 @@ import cloneObj from "@/utils/index"; import vuedraggable from "vuedraggable"; import tinymec from "@/views/lili-components/editor/index.vue"; -import { uploadFile } from "@/libs/axios"; -import { regular } from "@/utils"; +import {uploadFile} from "@/libs/axios"; +import {regular} from "@/utils"; import DPlayer from 'dplayer'; // import ossManage from "@/views/sys/oss-manage/ossManage"; import ossManage from "@/views/shop/ossManage"; @@ -489,13 +525,14 @@ export default { }; return { regular, - + openImage: false, + needToloadSku: false, total: 0, goodsVideo: "", showContent: false, listImages: [], + newSkuValues: [], contentImage: "", - visible: false, // 图片预览 previewImage: '', // 预览图片地址 global: 0, accessToken: "", //令牌token @@ -614,9 +651,9 @@ export default { validateError: [], baseInfoFormRule: { goodsName: [regular.REQUIRED, regular.WHITE_SPACE, regular.VARCHAR60], - price: [regular.REQUIRED, { validator: checkPrice }], + price: [regular.REQUIRED, {validator: checkPrice}], sellingPoint: [regular.REQUIRED, regular.VARCHAR60], - goodsUnit: [{ required: true, message: "请选择计量单位" }], + goodsUnit: [{required: true, message: "请选择计量单位"}], name: [regular.REQUIRED, regular.VARCHAR5], value: [regular.REQUIRED, regular.VARCHAR60], templateId: [regular.REQUIRED], @@ -670,6 +707,31 @@ export default { this.selectedFormBtnName = val; // this.picIndex = index; }, + handleLoadingSkuData() { + this.needToloadSku = false + this.renderTableData(this.skuTableData) + }, + changeSkuOpenImage() { + this.skuTableData.forEach(item => { + item.images = [] + }) + if (this.skuInfo.length > 0 && this.skuInfo[0].spec_values.length > 0) { + this.skuInfo[0].spec_values.forEach(item => { + item.images = [] + }) + } + }, + onAddSku(index) { + if (!this.newSkuValues[index]) { + this.$Message.error('请输入规格值') + return + } + this.skuInfo[index].spec_values.push({ + name: this.newSkuValues[index].name, + value: this.newSkuValues[index], + images: this.openImage ? [] : this.baseInfoForm.goodsGalleryFiles + }) + }, // 图片选择后回调 callbackSelected(val) { this.picModalFlag = false; @@ -679,7 +741,7 @@ export default { this.baseInfoForm[this.selectedFormBtnName].push(val); } }, - confirmUrls(){ + confirmUrls() { if (this.selectedImage && this.selectedFormBtnName == 'selectedSkuImages') { this.selectedSku.images = [...this.selectedSku.images, ...this.selectedImage]; } else { @@ -687,13 +749,13 @@ export default { } }, // 局部刷新 - refresh(v){ - if( v == 'template'){ + refresh(v) { + if (v == 'template') { this.GET_ShipTemplate('localRefresh'); - }else if( v == 'goodsUnit'){ + } else if (v == 'goodsUnit') { this.goodsUnitList = [] this.GET_GoodsUnit('localRefresh'); - }else{ + } else { this.getGoodsBrandList('localRefresh'); } }, @@ -742,7 +804,7 @@ export default { ) { this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[ paramsIndex - ] = { + ] = { paramName: "", paramValue: "", isIndex: "", @@ -753,7 +815,7 @@ export default { } this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[ paramsIndex - ] = { + ] = { paramName: params.paramName, paramValue: value, isIndex: params.isIndex, @@ -766,7 +828,7 @@ export default { editSkuPicture(row) { this.showContent = false if (row.images && row.images.length > 0) { - this.previewPicture = row.images[0].url; + this.previewPicture = row.images[0]; } this.selectedSku = row; this.showSkuPicture = true; @@ -794,14 +856,8 @@ export default { }, // 移除已选图片 handleRemove(item, index) { - this.selectedSku.images = this.selectedSku.images.filter( - (i) => i.url !== item.url - ); - if (this.selectedSku.images.length > 0 && index === 0) { - this.previewPicture = this.selectedSku.images[0].url; - } else if (this.selectedSku.images.length < 0) { - this.previewPicture = ""; - } + images.splice(index, 1) + this.previewPicture = ""; }, // 查看商品大图 handleViewGoodsPicture(url) { @@ -811,7 +867,7 @@ export default { // 移除商品图片 handleRemoveGoodsPicture(file) { this.baseInfoForm.goodsGalleryFiles = - this.baseInfoForm.goodsGalleryFiles.filter((i) => i.url !== file.url); + this.baseInfoForm.goodsGalleryFiles.filter((i) => i !== file); }, // 更新sku图片 updateSkuPicture() { @@ -820,13 +876,14 @@ export default { this.skuTableData[_index] = this.selectedSku; }, // sku图片上传成功 - handleSuccess(res, file) { + handleSuccess(res, file, images) { + this.$Spin.hide(); if (file.response) { file.url = file.response.result; - if (this.selectedSku.images) { - this.selectedSku.images.push(file); + if (images) { + images.push(file.url); } else { - this.selectedSku.images = [file]; + images = [file.url]; } this.previewPicture = file.url; } @@ -898,7 +955,7 @@ export default { handleSuccessGoodsPicture(res, file) { if (file.response) { file.url = file.response.result; - this.baseInfoForm.goodsGalleryFiles.push(file); + this.baseInfoForm.goodsGalleryFiles.push(file.url); } }, // 图片格式不正确 @@ -937,7 +994,7 @@ export default { this.selectedSku.images !== undefined && this.selectedSku.images.length > 5; if (check) { - this.$Notice.warning({ title: "图片数量不能大于五张" }); + this.$Notice.warning({title: "图片数量不能大于五张"}); return false; } }, @@ -947,12 +1004,12 @@ export default { API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then( (response) => { this.brandList = response; - if(type === 'localRefresh') { + if (type === 'localRefresh') { this.$Message.success("刷新成功"); } } ).catch(() => { - if(type === 'localRefresh') { + if (type === 'localRefresh') { this.$Message.error("刷新失败,请重试"); } }); @@ -967,7 +1024,7 @@ export default { } if (type === 'localRefresh' && res.success) { this.$Message.success("刷新成功"); - } else if(type === 'localRefresh') { + } else if (type === 'localRefresh') { this.$Message.error("刷新失败,请重试"); } }); @@ -1008,7 +1065,7 @@ export default { response.result.recommend ? (response.result.recommend = 1) : (response.result.recommend = 0); - this.baseInfoForm = { ...this.baseInfoForm, ...response.result }; + this.baseInfoForm = {...this.baseInfoForm, ...response.result}; this.baseInfoForm.release = 1; //即使是被放入仓库,修改的时候也会显示会立即发布 this.categoryId = response.result.categoryPath.split(",")[2]; @@ -1018,7 +1075,7 @@ export default { ) { this.baseInfoForm.goodsGalleryFiles = response.result.goodsGalleryList.map((i) => { - return { url: i }; + return i; }); } @@ -1056,7 +1113,7 @@ export default { this.baseInfoForm.categoryPath = cateId.toString(); } this.firstData.goodsType && - (this.baseInfoForm.goodsType = this.firstData.goodsType); + (this.baseInfoForm.goodsType = this.firstData.goodsType); /** 查询商品参数 */ this.GET_GoodsParams(); }, @@ -1074,6 +1131,11 @@ export default { // alertQuantity: e.alertQuantity, weight: e.weight, }; + if (e.goodsGalleryList && e.goodsGalleryList.length >= 1) { + this.openImage = true + } else { + this.openImage = false + } e.specList.forEach((u) => { if (u.specName === "images") { sku.images = u.specImage; @@ -1091,6 +1153,7 @@ export default { id: u.specValueId, name: u.specName, value: u.specValue || "", + images: e.goodsGalleryList || [] }, ], }); @@ -1104,6 +1167,7 @@ export default { id: u.specValueId, name: u.specName, value: u.specValue || "", + images: e.goodsGalleryList || [] }); } if (!sk.spec_id && u.specName === "specId") { @@ -1182,7 +1246,7 @@ export default { } // 写入对象,下标,具体对象 this.$set(this.skuInfo, this.skuInfo.length, { - spec_values: [{ name: "", value: "" }], + spec_values: [{name: "", value: "", images: []}], name: "", }); @@ -1214,19 +1278,19 @@ export default { }, // 正则验证(中文超过10个英文数字超过20个) zz(len, value) { - for(let i=0; i= 10) { this.$Message.error("规格值不能大于10个!"); return; } let beforeLength = item.spec_values.length; - this.$set(item.spec_values, item.spec_values.length, { + let itemValue = { name: item.name, - value: "", - }); + value: this.newSkuValues[$index], + }; + if (this.openImage) { + itemValue.images = [] + } else { + itemValue.images = this.baseInfoForm.goodsGalleryFiles + } + this.$set(item.spec_values, item.spec_values.length, itemValue); if (item.spec_values.length > 1) { let index = beforeLength; let filterSkuInfo = this.skuInfo.filter((i) => i.name !== item.name); @@ -1395,7 +1469,7 @@ export default { index = 1; for (let i = 0; i < totalLength; i++) { let find = cloneObj(this.skuTableData[index - 1]); - find[item.name] = ""; + find[item.name] = this.newSkuValues[$index]; find.id = ""; find.price && (find.price = ""); find.sn && (find.sn = ""); @@ -1410,7 +1484,7 @@ export default { } else { for (let i = 0; i < totalLength; i++) { let find = cloneObj(this.skuTableData[index - 1]); - find[item.name] = ""; + find[item.name] = this.newSkuValues[$index]; find.id = ""; find.price && (find.price = ""); find.sn && (find.sn = ""); @@ -1425,6 +1499,7 @@ export default { } } this.baseInfoForm.regeneratorSkuFlag = true; + this.newSkuValues[$index] = ""; } }, handleClearSku() { @@ -1510,10 +1585,6 @@ export default { title: "货号", slot: "sn", }, - { - title: "图片", - slot: "images", - } ); this.skuTableColumn = pushData; @@ -1734,6 +1805,7 @@ export default { } let skuInfoNames = this.skuInfo.map((n) => n.name); submit.skuList = []; + let containEmptyImage = false; this.skuTableData.map((sku) => { let skuCopy = { cost: 1, @@ -1741,8 +1813,20 @@ export default { quantity: sku.quantity, // alertQuantity: sku.alertQuantity, sn: sku.sn, - images: sku.images, + images: [], }; + if (this.openImage) { + this.skuInfo[0].spec_values.forEach(item => { + if (!item.images || item.images.length === 0) { + containEmptyImage = true; + return; + } + if (item.value === sku[this.skuInfo[0].name]) { + skuCopy.images = item.images + } + }) + + } if (sku.weight) { skuCopy.weight = sku.weight; } @@ -1757,9 +1841,14 @@ export default { } submit.skuList.push(skuCopy); }); + if (containEmptyImage) { + this.$Message.error("开启规格图片,所有规格图片不能为空!"); + this.submitLoading = false; + return; + } if (submit.goodsGalleryFiles.length > 0) { submit.goodsGalleryList = submit.goodsGalleryFiles.map( - (i) => i.url + (i) => i ); } /** 参数校验 **/ @@ -1801,7 +1890,7 @@ export default { this.baseInfoForm.skuList = this.skuTableData; if (this.baseInfoForm.goodsGalleryFiles.length > 0) { this.baseInfoForm.goodsGalleryList = - this.baseInfoForm.goodsGalleryFiles.map((i) => i.url); + this.baseInfoForm.goodsGalleryFiles.map((i) => i); } this.baseInfoForm.categoryName = []; this.baseInfoForm.saveType = "TEMPLATE"; @@ -1843,23 +1932,23 @@ export default { API_GOODS.saveDraftGoods(this.baseInfoForm).then((res) => { if (res.success) { this.$Message.info("保存成功!"); - this.$router.push({ name: "template-goods" }); + this.$router.push({name: "template-goods"}); } }); }, - GET_ShipTemplate(type){ - // 获取物流模板 - API_Shop.getShipTemplate().then((res) => { - if (res.success) { - this.logisticsTemplate = res.result; - } - if (type === 'localRefresh' && res.success) { - this.$Message.success("刷新成功"); - } else if(type === 'localRefresh') { - this.$Message.error("刷新失败,请重试"); - } - }); - } + GET_ShipTemplate(type) { + // 获取物流模板 + API_Shop.getShipTemplate().then((res) => { + if (res.success) { + this.logisticsTemplate = res.result; + } + if (type === 'localRefresh' && res.success) { + this.$Message.success("刷新成功"); + } else if (type === 'localRefresh') { + this.$Message.error("刷新失败,请重试"); + } + }); + } }, mounted() { this.accessToken = { @@ -1933,10 +2022,12 @@ export default { .mb-10 { margin-bottom: 10px; } -.view-video{ + +.view-video { margin: 0 10px; } -.refresh-icon{ + +.refresh-icon { margin-left: 10px; } From 83beb81a3b71967c4c62f32e09357d329c085898 Mon Sep 17 00:00:00 2001 From: misworga831 Date: Mon, 22 Jan 2024 14:39:43 +0800 Subject: [PATCH 36/36] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E6=97=A7?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=9B=BE=E7=89=87=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/goodsDetail/ShowGoods.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index fe8d6d15..38b5c966 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -354,7 +354,7 @@ export default { count: 1, // 商品数量 imgIndex: 0, // 展示图片下标 currentSelceted: [], // 当前商品sku - imgList: [{ url: "" }], // 商品图片列表 + imgList: [], // 商品图片列表 skuDetail: { specList: [], }, // sku详情 @@ -580,12 +580,13 @@ export default { swiperGoodsImg() { this.skuDetail.specList.forEach((e) => { if (e.specName === "images") { - this.imgList = this.skuDetail.goodsGalleryList; + this.imgList = this.skuDetail.goodsGalleryList.filter(i => i.indexOf("\"url\":") === -1 && i.indexOf("\"status\":") === -1); } }); if (!this.imgList) { this.imgList = [this.skuDetail.original]; } + console.log(this.imgList); }, },