|
@@ -29,14 +29,7 @@ Page({ |
|
@@ -29,14 +29,7 @@ Page({ |
|
29
|
* 生命周期函数--监听页面显示
|
29
|
* 生命周期函数--监听页面显示
|
|
30
|
*/
|
30
|
*/
|
|
31
|
onShow: function () {
|
31
|
onShow: function () {
|
|
32
|
- App.Reserve.Detail({
|
|
|
|
33
|
- openid: getApp().openid,
|
|
|
|
34
|
- rid: this.id
|
|
|
|
35
|
- }).then(res => {
|
|
|
|
36
|
- this.setData({
|
|
|
|
37
|
- detail:this.formatDatail(res.data)
|
|
|
|
38
|
- })
|
|
|
|
39
|
- })
|
32
|
+ this.getDetail();
|
|
40
|
},
|
33
|
},
|
|
41
|
|
34
|
|
|
42
|
/**
|
35
|
/**
|
|
@@ -59,7 +52,16 @@ Page({ |
|
@@ -59,7 +52,16 @@ Page({ |
|
59
|
onPullDownRefresh: function () {
|
52
|
onPullDownRefresh: function () {
|
|
60
|
|
53
|
|
|
61
|
},
|
54
|
},
|
|
62
|
-
|
55
|
+ getDetail(){
|
|
|
|
56
|
+ App.Reserve.Detail({
|
|
|
|
57
|
+ openid: getApp().openid,
|
|
|
|
58
|
+ rid: this.id
|
|
|
|
59
|
+ }).then(res => {
|
|
|
|
60
|
+ this.setData({
|
|
|
|
61
|
+ detail:this.formatDatail(res.data)
|
|
|
|
62
|
+ })
|
|
|
|
63
|
+ })
|
|
|
|
64
|
+ },
|
|
63
|
formatDatail(detail){
|
65
|
formatDatail(detail){
|
|
64
|
detail.rdateStr=util.unixtoTime(detail.rdate,'MM月DD日 WW HH:II');
|
66
|
detail.rdateStr=util.unixtoTime(detail.rdate,'MM月DD日 WW HH:II');
|
|
65
|
detail.tableFirst=detail.tables[0].name;
|
67
|
detail.tableFirst=detail.tables[0].name;
|
|
@@ -72,6 +74,16 @@ Page({ |
|
@@ -72,6 +74,16 @@ Page({ |
|
72
|
detail.cusman_phone='15877556369';
|
74
|
detail.cusman_phone='15877556369';
|
|
73
|
detail.cusman_account='wx:vking';
|
75
|
detail.cusman_account='wx:vking';
|
|
74
|
}
|
76
|
}
|
|
|
|
77
|
+ detail.hasCanSuccess=false;
|
|
|
|
78
|
+ if(detail.customers.length>0){
|
|
|
|
79
|
+ let openid=getApp().openid;
|
|
|
|
80
|
+ detail.customers.forEach(item=>{
|
|
|
|
81
|
+ if(openid==item.openid){
|
|
|
|
82
|
+ detail.hasCanSuccess=true;
|
|
|
|
83
|
+ return true;
|
|
|
|
84
|
+ }
|
|
|
|
85
|
+ })
|
|
|
|
86
|
+ }
|
|
75
|
return detail;
|
87
|
return detail;
|
|
76
|
},
|
88
|
},
|
|
77
|
showManager(){
|
89
|
showManager(){
|
|
@@ -88,5 +100,19 @@ Page({ |
|
@@ -88,5 +100,19 @@ Page({ |
|
88
|
}
|
100
|
}
|
|
89
|
})
|
101
|
})
|
|
90
|
},
|
102
|
},
|
|
|
|
103
|
+ userinfo(){
|
|
|
|
104
|
+ if(!this.data.detail.hasCanSuccess){
|
|
|
|
105
|
+ App.Reserve.SetRelaSuccess({
|
|
|
|
106
|
+ rid:this.id,
|
|
|
|
107
|
+ openid:getApp().openid
|
|
|
|
108
|
+ }).then(res=>{
|
|
|
|
109
|
+ this.getDetail();
|
|
|
|
110
|
+ })
|
|
|
|
111
|
+ }else{
|
|
|
|
112
|
+ wx.navigateTo({
|
|
|
|
113
|
+ url:'invite?id='+this.id,
|
|
|
|
114
|
+ });
|
|
|
|
115
|
+ }
|
|
|
|
116
|
+ },
|
|
91
|
|
117
|
|
|
92
|
}) |
118
|
}) |