Page({ dever: getApp().dever, product: null, data: { content: "" }, onLoad: function (options) { var that = this; var callback = { success: function (data, res) { that.product = data.product; var temp = that.dever.html('content', data.product.content, that); that.setData({ content: temp }) } } that.dever.request('product.api.view',{ signature: '', id: options.id }, callback); }, /** * 分享 */ onShareAppMessage: function (options){ wx.showShareMenu({ withShareTicket: true, success: function(res){ //TODO }, fail: function(res){ //TODO } }) //options.from可以用来判断是从自定义button打开的转发页面,还是从右上角的打开的转发页面。 }, /** * 立即购买 */ doBuy: function(){ } })