Commit 6f1d75f82c0a56a9bd9e48ab7998140307f82cad

Authored by vking
1 parent ce3ee73d

fix desk bug

@@ -40,9 +40,13 @@ Page({ @@ -40,9 +40,13 @@ Page({
40 PubSub.on('arrangeDesk',(desk)=>{ 40 PubSub.on('arrangeDesk',(desk)=>{
41 this.arrangeDesk(desk) 41 this.arrangeDesk(desk)
42 }) 42 })
  43 + PubSub.on('reflush',(desk)=>{
  44 + this.getDetail(opt.id);
  45 + })
43 }, 46 },
44 onUnload(){ 47 onUnload(){
45 PubSub.off('arrangeDesk') 48 PubSub.off('arrangeDesk')
  49 + PubSub.off('reflush')
46 }, 50 },
47 onShow: function () { 51 onShow: function () {
48 this.notice = this.selectComponent('#notice'); 52 this.notice = this.selectComponent('#notice');
@@ -211,13 +215,19 @@ Page({ @@ -211,13 +215,19 @@ Page({
211 }) 215 })
212 }, 216 },
213 gotoModify() { 217 gotoModify() {
214 - let url='./b_addnew' 218 + let url
215 if(this.detailData.type==1){ 219 if(this.detailData.type==1){
216 url='./online_update' 220 url='./online_update'
  221 + wx.navigateTo({
  222 + url: url+'?id=' + this.data.bookInfo.id
  223 + })
  224 + }else{
  225 + url='./b_addnew'
  226 + wx.redirectTo({
  227 + url: url+'?id=' + this.data.bookInfo.id
  228 + })
217 } 229 }
218 - wx.redirectTo({  
219 - url: url+'?id=' + this.data.bookInfo.id  
220 - }) 230 +
221 }, 231 },
222 cancelReserve() { 232 cancelReserve() {
223 this.selectComponent('#cancel').show(); 233 this.selectComponent('#cancel').show();
@@ -171,8 +171,12 @@ Page({ @@ -171,8 +171,12 @@ Page({
171 }); 171 });
172 }, 172 },
173 gotoDetail(){ 173 gotoDetail(){
174 - wx.redirectTo({  
175 - url: '/pack-book/pages/book/b_detail?id=' + this.detail.id  
176 - }); 174 + if(this.detail.type==1){//在线预订
  175 + wx.navigateBack();
  176 + }else{
  177 + wx.redirectTo({
  178 + url: '/pack-book/pages/book/b_detail?id=' + this.detail.id
  179 + });
  180 + }
177 } 181 }
178 }) 182 })
@@ -429,7 +429,8 @@ Page({ @@ -429,7 +429,8 @@ Page({
429 }) 429 })
430 this.checkedTables={}; 430 this.checkedTables={};
431 App.Reserve.Detail({rid: _id, openid: ''}, 'clear') 431 App.Reserve.Detail({rid: _id, openid: ''}, 'clear')
432 - wx.navigateTo({ 432 + PubSub.emit('reflush')
  433 + wx.redirectTo({
433 url: util.http_build_query({id:_id,tplid:1},'b_invitation'), 434 url: util.http_build_query({id:_id,tplid:1},'b_invitation'),
434 }); 435 });
435 } else { 436 } else {