306132416@qq.com 4 years ago
parent
commit
c956a3d236
1 changed files with 4 additions and 6 deletions
  1. 4 6
      front-page/fission-page.html

+ 4 - 6
front-page/fission-page.html

@@ -72,6 +72,7 @@
 
 <script>
    const apiUrl = 'http://fission.xazhima.com/api/api.php';
+   const thisUrl = 'http://fission.xazhima.com/front-page/fission-page.html';
     new Vue({
         el:'#myApp',
         data:{
@@ -94,10 +95,10 @@
                     console.log('show share modal');
                     this.isShareFlag = true;
                     wx.ready(function () {
-                        wx.onMenuShareAppMessage({
+                        wx.updateAppMessageShareData({
                             title: '语言训练认知图片大全',				// 分享标题
                             desc: '已有239218领取成功',				// 分享描述
-                            link: '',				// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+                            link: thisUrl,				// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                             imgUrl: this.headSrc,				// 分享图标
                             //    type: 'link',				// 分享类型:music | video | link,默认为:link
                             //     dataUrl: '',			// 如果type为:music | video,则要提供数据,默认为:空
@@ -108,9 +109,6 @@
                                     this.isShareFlag = false;
                                 }
                             },
-                            cancel: function(){
-                                console.log('share cancel')
-                            },
                         })
                     })
 
@@ -168,7 +166,7 @@
                     nonceStr : param.nonceStr,
                     signature: param.signature,
                     jsApiList: [
-                        'onMenuShareAppMessage'
+                        'updateAppMessageShareData'
                     ]
                 });
             },