Authored by 郝肖肖

分享url

@@ -22,6 +22,18 @@ function shareBase(options) { @@ -22,6 +22,18 @@ function shareBase(options) {
22 22
23 defOption = $.extend(defOption, options); 23 defOption = $.extend(defOption, options);
24 24
  25 + if (defOption.image && defOption.image.substr(0, 2) === '//') {
  26 + defOption.image = 'http:' + defOption.image;
  27 + }
  28 +
  29 + if (defOption.weixinUrl && defOption.weixinUrl.substr(0, 2) === '//') {
  30 + defOption.weixinUrl = 'http:' + defOption.weixinUrl;
  31 + }
  32 +
  33 + if (defOption.url && defOption.url.substr(0, 2) === '//') {
  34 + defOption.url = 'http:' + defOption.url;
  35 + }
  36 +
25 if ($.inArray(defOption.channel, shareChannels) === -1) { 37 if ($.inArray(defOption.channel, shareChannels) === -1) {
26 alert('不存在的分享平台!'); 38 alert('不存在的分享平台!');
27 return false; 39 return false;