diff --git a/pages/template/index.js b/pages/template/index.js index 3bd7694..8a3e50c 100644 --- a/pages/template/index.js +++ b/pages/template/index.js @@ -11,7 +11,7 @@ var t = getApp(), Page({ data: { url: os.imghost, - temp_id:0, + temp_id:0, }, onLoad: function(e) { @@ -45,13 +45,12 @@ Page({ var data = res.data.data; if (data) { var temp_data = data; - wx.setNavigationBarTitle({ title: temp_data.page_title, }); - var t_arr = JSON.parse(temp_data.json_str); th.setData({ + share_title:temp_data.page_title, template_arr: t_arr, isTemplate: 1, bgcolor_t: temp_data.bkcolor @@ -98,6 +97,26 @@ Page({ }, + /** + * 用户分享朋友圈 + */ + async onShareTimeline(){ + getApp().getConfig(await function(e){ + this.setData({ + store_config:e + }) + }.bind(this)) + var {share_title,temp_id,store_config} = this.data; + // var url= `pages/template/index?sence=${temp_id}`; + var ob = { + title:share_title, + // path: url, + query:`sence=${temp_id}`, + imageUrl:this.data.url+store_config.store_logo, + }; + console.log(ob); + return ob; +}, //---加载更多是靠这个函数---- onReachBottom: function() { if(getApp().globalData.func_list)