zhujindu 11 months ago
parent
commit
8971d86d47
1 changed files with 17 additions and 0 deletions
  1. 17 0
      src/views/home/index.vue

+ 17 - 0
src/views/home/index.vue

@@ -86,6 +86,23 @@ export default {
     }
   },
   created() {
+    getTicketFun(['onMenuShareAppMessage']).then(() => {
+      this.wx.ready(() => {
+        this.wx.onMenuShareAppMessage({
+          title: '企业微信',
+          desc: '让每个企业都有自己的微信',
+          link: 'https://work.weixin.qq.com/',
+          imgUrl:
+            'https://res.mail.qq.com/node/ww/wwmng/style/images/index_share_logo$13c64306.png',
+          success() {
+            // 用户确认分享后回调
+          },
+          cancel() {
+            // 用户取消分享后回调
+          },
+        });
+      });
+    });
     getTicketFun(['onMenuShareAppMessage'], 'agentConfig').then(() => {});
     this.getDict();
   },