From 8fe550f83fbd6eda71fa02e23f8380b4b918b943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Sat, 3 May 2025 12:36:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B7=E5=BC=8F=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=BE=E7=A4=BA=E5=95=86=E5=93=81=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../think-plugs-static/stc/public/static/extra/script.js | 8 ++++++++ public/static/extra/script.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/plugin/think-plugs-static/stc/public/static/extra/script.js b/plugin/think-plugs-static/stc/public/static/extra/script.js index 6d64fc6e8..de5665e21 100644 --- a/plugin/think-plugs-static/stc/public/static/extra/script.js +++ b/plugin/think-plugs-static/stc/public/static/extra/script.js @@ -45,4 +45,12 @@ $(function () { window.showTableImage = function (image, circle, size, title) { return $.layTable.showImage(image, circle, size, title); }; + + // 显示商品规格 + window.showSpec = function (spec) { + let names = []; + return layui.each(spec.split(';;'), function (i, vv) { + names.push(vv.split('::').pop()); + }), names.join(' '); + } }); \ No newline at end of file diff --git a/public/static/extra/script.js b/public/static/extra/script.js index 6d64fc6e8..de5665e21 100644 --- a/public/static/extra/script.js +++ b/public/static/extra/script.js @@ -45,4 +45,12 @@ $(function () { window.showTableImage = function (image, circle, size, title) { return $.layTable.showImage(image, circle, size, title); }; + + // 显示商品规格 + window.showSpec = function (spec) { + let names = []; + return layui.each(spec.split(';;'), function (i, vv) { + names.push(vv.split('::').pop()); + }), names.join(' '); + } }); \ No newline at end of file