123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 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(){
- }
- })
|