起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1669|回复: 2

[处理中1] 在IOS中,微信分享在有的文章页正常,有的文章没反应?

[复制链接]

7

主题

22

帖子

64

积分

初级会员

Rank: 2

积分
64
QQ
发表于 2016-10-20 17:05:41 | 显示全部楼层 |阅读模式
在IOS中,微信分享在有的文章页正常,有的文章没反应

1

主题

3232

帖子

1174

积分

金牌会员

Rank: 6Rank: 6

积分
1174
QQ
发表于 2016-10-20 18:43:15 | 显示全部楼层
文章页是什么?普通的静态页面,都是一样的啊?
在问题解决后,希望大家可以吧解决方法也分享一下,这样可以让更多的X5开发者共同进步,谢谢大家的知识共享
回复 支持 反对

使用道具 举报

7

主题

22

帖子

64

积分

初级会员

Rank: 2

积分
64
QQ
 楼主| 发表于 2016-10-21 15:49:16 | 显示全部楼层
闰土 发表于 2016-10-20 18:43
文章页是什么?普通的静态页面,都是一样的啊?
  1. //分享到微信联系人
  2.         Model.prototype.weixinContcatClick = function(event){
  3.                  function success(result) {
  4. //                         alert(JSON.stringify(result));
  5.                          justep.Util.hint("恭喜您,分享成功!");
  6.                  }
  7.                  function error(result) {
  8.                          justep.Util.hint(JSON.stringify(result));
  9.                  }
  10.                  var data = this.comp('postData');
  11.                  
  12.                  //url 处理
  13.                  var urlArray = window.location.href.split('#');
  14.                  var path = urlArray[0].replace(/index/,'detail');
  15.                  var webpageUrl = path + '?article_id=' + this.comp("postData").getValue("fID");
  16.                  
  17.                  navigator.weixin.share({
  18.                         message : {
  19.                     title : this.comp("postData").getValue("fName") ? this.comp("postData").getValue("fName") : "分享到微信 ",
  20.                     description : this.comp("postData").getValue("fOmit") ? this.comp("postData").getValue("fOmit") : "分享到微信",
  21.                     mediaTagName : "Media Tag Name(optional)",
  22.                     thumb : this.comp("postData").getValue("fImg") ? this.comp("postData").getValue("fImg") : "",
  23.                     media : {
  24.                             webpageUrl : webpageUrl
  25.                     }
  26.                         },
  27.                         scene : navigator.weixin.Scene.SESSION
  28.                  },success, error);
  29.         };
  30.        
  31.         //分享到微信朋友圈
  32.         Model.prototype.weixinShareBtnClick = function(event){
  33.                 var self = this;
  34.                 if (!navigator.weixin) {
  35.                         justep.Util.hint("请安装最新版本(含插件)体验!");
  36.                         return;
  37.                 }
  38.                 //url 处理
  39.                 var urlArray = window.location.href.split('#');
  40.                 var path = urlArray[0].replace(/index/,'detail');
  41.                 var webpageUrl = path + '?article_id=' + this.comp("postData").getValue("fID");
  42.                 var weixin = navigator.weixin;       
  43.                 weixin.share({
  44.                         message: {
  45.                                 title : this.comp("postData").getValue("fName") ? this.comp("postData").getValue("fName") : "分享到微信 ",
  46.                     description : this.comp("postData").getValue("fOmit") ? this.comp("postData").getValue("fOmit") : "分享到微信",
  47.                     mediaTagName : "Media Tag Name(optional)",
  48.                     thumb : this.comp("postData").getValue("fImg") ? this.comp("postData").getValue("fImg") : "",
  49.                                 media:{
  50.                                         webpageUrl : webpageUrl
  51.                                 },
  52.                         },
  53.                         scene : weixin.Scene.TIMELINE
  54.                         },function() {
  55.                                 justep.Util.hint("恭喜您,分享成功!");
  56.                         },function(reason){
  57.                                 justep.Util.hint(reason);
  58.                         });
  59.                 };
复制代码

使用的仿网易的APP开发,其中的文章页增加了分享,在IOS中,微信分享在有的文章详情页可以正常分享,有的页面点击后没有反应;安卓中是正常的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-9 23:57 , Processed in 0.063554 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表