From f4d0d610cb407d170a6c9f7f736c5abe5ed0d550 Mon Sep 17 00:00:00 2001 From: jianweie code Date: Thu, 20 Jun 2024 21:22:03 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E9=A1=B5=E9=9D=A2=E8=AE=BE=E8=AE=A1=E3=80=90=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E7=BB=84=E4=BB=B6=E3=80=91=E5=A2=9E=E5=8A=A0=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=88=B0=E5=85=B6=E4=BB=96=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E7=9A=84=E4=B8=8B=E6=8B=89=E8=AE=BE=E7=BD=AE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CoreShop/common/mixins/mixinsHelper.js | 13 +++++++++++++ .../CoreShop/common/setting/constVarsHelper.js | 3 ++- CoreCms.Net.Web.Admin/wwwroot/lib/custom/js/main.js | 3 ++- .../wwwroot/views/shop/pages/design.html | 6 ++++-- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CoreCms.Net.Uni-App/CoreShop/common/mixins/mixinsHelper.js b/CoreCms.Net.Uni-App/CoreShop/common/mixins/mixinsHelper.js index ddba7b6b..ec29f8ac 100644 --- a/CoreCms.Net.Uni-App/CoreShop/common/mixins/mixinsHelper.js +++ b/CoreCms.Net.Uni-App/CoreShop/common/mixins/mixinsHelper.js @@ -305,6 +305,19 @@ module.exports = { } else if (type == navLinkType.shopCategory) { //商品分类 this.$u.route('/pages/category/list/list', { id: val }); + } else if (type == navLinkType.wxMiNiProgram) { + //跳转微信小程序 + console.log("跳转微信小程序"); + uni.navigateToMiniProgram({ + appId: val, + path: '', + extraData: {}, + success(res) { + console.log("跳转小程序成功", res); + }, fail(res) { + console.log("跳转小程序失败", res); + } + }) } else { this.$u.route(val); } diff --git a/CoreCms.Net.Uni-App/CoreShop/common/setting/constVarsHelper.js b/CoreCms.Net.Uni-App/CoreShop/common/setting/constVarsHelper.js index 521bb079..6c1d0a37 100644 --- a/CoreCms.Net.Uni-App/CoreShop/common/setting/constVarsHelper.js +++ b/CoreCms.Net.Uni-App/CoreShop/common/setting/constVarsHelper.js @@ -132,6 +132,7 @@ export const navLinkType = { article: 3,// "文章" articleCategory: 4,// "文章分类", intelligentForms: 5,// "智能表单" - shopCategory: 6// "商品分类" + shopCategory: 6,// "商品分类" + wxMiNiProgram: 7// "跳转小程序Appid" }; diff --git a/CoreCms.Net.Web.Admin/wwwroot/lib/custom/js/main.js b/CoreCms.Net.Web.Admin/wwwroot/lib/custom/js/main.js index 57df8fea..11bb0c44 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/lib/custom/js/main.js +++ b/CoreCms.Net.Web.Admin/wwwroot/lib/custom/js/main.js @@ -652,6 +652,7 @@ Vue.component('select-link', { changeSelect: function () { this.$emit('update:type', this.selectType) this.$emit("update:id", '') + this.$emit("update:linkUrl", '') }, updateLinkValue: function () { this.$emit("update:id", this.linkUrl) @@ -866,7 +867,7 @@ Vue.component('layout-config', { coreHelper.Post(getDesign, { id: id }, function (e) { if (e.code === 0) { //console.log(e); - linkType = { "1": "URL链接", "2": "商品", "6": "商品分类", "3": "文章", "4": "文章分类", "5": "智能表单" }; + linkType = { "1": "URL链接", "2": "商品", "6": "商品分类", "3": "文章", "4": "文章分类", "5": "智能表单", "7": "小程序AppId" }; that.pageCode = e.data.model.code; that.brandList = e.data.brandList; that.pageConfig = e.data.pageConfig; diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/shop/pages/design.html b/CoreCms.Net.Web.Admin/wwwroot/views/shop/pages/design.html index 007e4075..f7dc3179 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/shop/pages/design.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/shop/pages/design.html @@ -1218,8 +1218,7 @@
- +
@@ -1240,6 +1239,9 @@
+
+ +