提交 6ec34a3b 编写于 作者: J jianbo

加入 wx.showShareMenu支持转发到朋友圈

上级 2844beae
...@@ -18,20 +18,17 @@ var wxRequest = require('../../utils/wxRequest.js') ...@@ -18,20 +18,17 @@ var wxRequest = require('../../utils/wxRequest.js')
import config from '../../utils/config.js' import config from '../../utils/config.js'
var pageCount = config.getPageCount; var pageCount = config.getPageCount;
var webSiteName= config.getWebsiteName;
var domain =config.getDomain
Page({ Page({
data: { data: {
title: '最新评论列表', title: '最新评论列表',
showerror: "none", showerror: "none",
showallDisplay: "block", showallDisplay: "block",
readLogs: [], readLogs: []
webSiteName:webSiteName,
domain:domain
}, },
onShareAppMessage: function () { onShareAppMessage: function () {
var title = "分享"+webSiteName+"的最新评论"; var title = "分享"+config.getWebsiteName+"的最新评论";
var path = "pages/comments/comments"; var path = "pages/comments/comments";
return { return {
title: title, title: title,
...@@ -58,6 +55,14 @@ Page({ ...@@ -58,6 +55,14 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
var self = this; var self = this;
wx.showShareMenu({
      withShareTicket:true,
      menus:['shareAppMessage','shareTimeline'],
success:function(e)
{
//console.log(e);
}
})
self.fetchCommentsData(); self.fetchCommentsData();
}, },
//获取文章列表数据 //获取文章列表数据
......
...@@ -100,6 +100,14 @@ Page({ ...@@ -100,6 +100,14 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
var self = this; var self = this;
wx.showShareMenu({
      withShareTicket:true,
      menus:['shareAppMessage','shareTimeline'],
success:function(e)
{
//console.log(e);
}
})
self.getEnableComment(); self.getEnableComment();
self.fetchDetailData(options.id); self.fetchDetailData(options.id);
Auth.setUserInfoData(self); Auth.setUserInfoData(self);
......
...@@ -109,6 +109,14 @@ Page({ ...@@ -109,6 +109,14 @@ Page({
onLoad: function (options) { onLoad: function (options) {
var self = this; var self = this;
wx.showShareMenu({
      withShareTicket:true,
      menus:['shareAppMessage','shareTimeline'],
success:function(e)
{
//console.log(e);
}
})
this.fetchPostsData("1"); this.fetchPostsData("1");
}, },
......
...@@ -114,6 +114,14 @@ Page({ ...@@ -114,6 +114,14 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
var self = this; var self = this;
wx.showShareMenu({
      withShareTicket:true,
      menus:['shareAppMessage','shareTimeline'],
success:function(e)
{
//console.log(e);
}
})
self.fetchTopFivePosts(); self.fetchTopFivePosts();
self.fetchPostsData(self.data); self.fetchPostsData(self.data);
......
...@@ -139,6 +139,14 @@ Page({ ...@@ -139,6 +139,14 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
var self = this; var self = this;
wx.showShareMenu({
      withShareTicket:true,
      menus:['shareAppMessage','shareTimeline'],
success:function(e)
{
//console.log(e);
}
})
// 设置插屏广告 // 设置插屏广告
this.setInterstitialAd(); this.setInterstitialAd();
if (options.categoryID && options.categoryID != 0) { if (options.categoryID && options.categoryID != 0) {
......
...@@ -35,6 +35,15 @@ Page({ ...@@ -35,6 +35,15 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '专题' title: '专题'
}); });
wx.showShareMenu({
      withShareTicket:true,
      menus:['shareAppMessage','shareTimeline'],
success:function(e)
{
//console.log(e);
}
})
this.fetchCategoriesData(); this.fetchCategoriesData();
......
...@@ -8,19 +8,25 @@ ...@@ -8,19 +8,25 @@
"minified": true, "minified": true,
"newFeature": true, "newFeature": true,
"coverView": true, "coverView": true,
"nodeModules": true,
"autoAudits": false, "autoAudits": false,
"scopeDataCheck": false,
"uglifyFileName": true,
"checkInvalidKey": true, "checkInvalidKey": true,
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"uglifyFileName": true "useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.6.6", "libVersion": "2.11.3",
"appid": "wx39075d0bde24f9f7", "appid": "wx39075d0bde24f9f7",
"projectname": "%22%E5%AE%88%E6%9C%9B%E8%BD%A9%22%E7%BD%91%E7%AB%99%E5%B0%8F%E7%A8%8B%E5%BA%8F", "projectname": "%22%E5%AE%88%E6%9C%9B%E8%BD%A9%22%E7%BD%91%E7%AB%99%E5%B0%8F%E7%A8%8B%E5%BA%8F",
"simulatorType": "wechat", "simulatorType": "wechat",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册