Commit d5ceb5a91f9595610dbeda99c23c0c8494045f41

Authored by yvan.ni
1 parent 9868d1e0

分享的问题的优化

packageC/pages/presell/list/list.js
@@ -68,6 +68,14 @@ Page({ @@ -68,6 +68,14 @@ Page({
68 if (room_user_share) getApp().globalData.room_user_share = room_user_share; 68 if (room_user_share) getApp().globalData.room_user_share = room_user_share;
69 } 69 }
70 70
  71 +
  72 + if(this.data.act_id){
  73 + getApp().promiseGet("/api/weshop/marketing/marketingPresellForm/get/"+os.stoid+"/"+this.data.act_id,{}).then(res=>{
  74 + if(res.data.code==0)
  75 + th.data.pre_act=res.data.data
  76 + })
  77 + }
  78 +
71 }, 79 },
72 onShow: function (t) { 80 onShow: function (t) {
73 var userInfo=getApp().globalData.userInfo; 81 var userInfo=getApp().globalData.userInfo;
@@ -260,8 +268,16 @@ Page({ @@ -260,8 +268,16 @@ Page({
260 } 268 }
261 269
262 var url = "/packageC/pages/presell/list/list"; 270 var url = "/packageC/pages/presell/list/list";
  271 +
  272 + if(this.data.act_id){
  273 + url += "?act_id=" + this.data.act_id;
  274 + }
263 if (getApp().globalData.user_id) { 275 if (getApp().globalData.user_id) {
264 - url += "&first_leader=" + getApp().globalData.user_id; 276 +
  277 + if(url.indexOf("?")==-1)
  278 + url += "?first_leader=" + getApp().globalData.user_id;
  279 + else
  280 + url += "&first_leader=" + getApp().globalData.user_id;
265 } 281 }
266 //-- 如果房间分享,且不是会员分享的 -- 282 //-- 如果房间分享,且不是会员分享的 --
267 if (getApp().globalData.room_id && 283 if (getApp().globalData.room_id &&
@@ -271,13 +287,18 @@ Page({ @@ -271,13 +287,18 @@ Page({
271 url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1"; 287 url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1";
272 } 288 }
273 289
274 - var ob = {  
275 - title: "预售列表", path: url,  
276 - }; 290 + var ob={};
  291 + if(this.data.pre_act){
  292 + ob = { title: this.data.pre_act.share_title, path: url,imageUrl:os.imghost+this.data.pre_act.share_img };
  293 + }else{
277 294
278 - if(img){  
279 - ob.imageUrl=img; 295 + ob = { title: "预售列表", path: url, };
  296 + if(img){
  297 + ob.imageUrl=img;
  298 + }
280 } 299 }
  300 +
  301 +
281 return ob; 302 return ob;
282 } 303 }
283 304