diff --git a/pages/index/index.js b/pages/index/index.js index c3ed2fb..4d5baa0 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -55,6 +55,7 @@ Page({ name: '', showAuthModal: false, showOneKeyLoginModal: false, + showAddToHomeModal: false, userInfo: {}, needPhoneAuth: false, testMode: true, @@ -2276,6 +2277,25 @@ Page({ url: '/pages/cooperation/index' }) }, + + // 显示添加桌面引导框 + showAddToHomeModal: function () { + this.setData({ + showAddToHomeModal: true + }); + }, + + // 隐藏添加桌面引导框 + hideAddToHomeModal: function () { + this.setData({ + showAddToHomeModal: false + }); + }, + + // 阻止事件冒泡 + stopPropagation: function (e) { + e.stopPropagation(); + }, // 跳转到货源管理页面 navigateToGoods: function () { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 8e032bc..30e1f71 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -183,12 +183,40 @@ 🚻 我们 - - 🚻 + + 添加桌面 + + + + + 添加到桌面 + × + + + 为了方便您下次使用,请将小程序添加到手机桌面: + + 1 + 点击右上角的【...】 + + + 2 + 在弹出菜单中选择【添加到桌面】 + + + 3 + 返回桌面即可快速访问 + + + + + + + +