From c768d20f2256ba40ebf6bc1be984c667d6bc7a11 Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期五, 27 十二月 2024 14:52:59 +0800 Subject: [PATCH] 添加分享功能 --- images/logo2.jpg | 0 pages/home/home.js | 14 ++++++++++++++ pages/home/home.json | 3 ++- 3 files changed, 16 insertions(+), 1 deletions(-) diff --git a/images/logo2.jpg b/images/logo2.jpg new file mode 100644 index 0000000..6ac16db --- /dev/null +++ b/images/logo2.jpg Binary files differ diff --git a/pages/home/home.js b/pages/home/home.js index cd54a3f..b20556c 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -697,5 +697,19 @@ const minutes = date.getMinutes().toString().padStart(2, '0'); const seconds = date.getSeconds().toString().padStart(2, '0'); return `${hours}:${minutes}:${seconds}`; + }, + onShareAppMessage: function (options) { + // 璁剧疆鍒嗕韩鍐呭 + return { + title: '澶х鐏屾簤鍔╂墜', // 鍒嗕韩鏍囬 + path: '/pages/home/home', // 鍒嗕韩璺緞锛岃璺緞闇�瑕佹槸褰撳墠灏忕▼搴忓瓨鍦ㄧ殑椤甸潰璺緞 + imageUrl: '/images/logo2.jpg', // 鍒嗕韩鍥炬爣锛屽彲浠ユ槸缃戠粶鍥剧墖璺緞鎴栨湰鍦板浘鐗囪矾寰� + success: function (res) { + // 鍒嗕韩鎴愬姛鐨勫洖璋冨嚱鏁� + }, + fail: function (res) { + // 鍒嗕韩澶辫触鐨勫洖璋冨嚱鏁� + } + }; } }) \ No newline at end of file diff --git a/pages/home/home.json b/pages/home/home.json index beab603..9c9f058 100644 --- a/pages/home/home.json +++ b/pages/home/home.json @@ -12,5 +12,6 @@ "scope.camera": { "desc": "浣跨敤鎽勫儚澶存壂鎻忎簩缁寸爜" } - } + }, + "enableShareAppMessage":true } \ No newline at end of file -- Gitblit v1.8.0