Commit 139da953a5e3cf2e8bd82752f1a26788523f90e0
1 parent
ba1dd705
预约优化
Showing
3 changed files
with
75 additions
and
69 deletions
packageA/pages/my_service/appment_main.js
@@ -113,7 +113,9 @@ Page({ | @@ -113,7 +113,9 @@ Page({ | ||
113 | "storageId": storageId, | 113 | "storageId": storageId, |
114 | "storeId": storeId, | 114 | "storeId": storeId, |
115 | "userId": userId, | 115 | "userId": userId, |
116 | - "validay": validay | 116 | + "validay": validay, |
117 | + "isxz": 1 | ||
118 | + | ||
117 | } | 119 | } |
118 | var data = JSON.stringify(json); | 120 | var data = JSON.stringify(json); |
119 | wx.request({ | 121 | wx.request({ |
@@ -135,42 +137,42 @@ Page({ | @@ -135,42 +137,42 @@ Page({ | ||
135 | var temp_url = "/api/wx/open/app/user/sendSubscribeMsg"; //模版接口 | 137 | var temp_url = "/api/wx/open/app/user/sendSubscribeMsg"; //模版接口 |
136 | var userinfo = getApp().globalData.userInfo; | 138 | var userinfo = getApp().globalData.userInfo; |
137 | var name = d.userInfo.nickname; | 139 | var name = d.userInfo.nickname; |
138 | - var json = { | ||
139 | - // "formId": formid, | ||
140 | - "keyWord": [{ | ||
141 | - "keyword": res.data.data.ServiceName | ||
142 | - }, | ||
143 | - { | ||
144 | - "keyword": time.substring(0, 16) | ||
145 | - }, { | ||
146 | - "keyword": res.data.data.BeauticianName | ||
147 | - }, { | ||
148 | - "keyword": res.data.data.StorageName | ||
149 | - }, { | ||
150 | - "keyword": res.data.data.Address | ||
151 | - } | ||
152 | - ], | ||
153 | - "page": "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, | ||
154 | - "storeId": a.stoid, | ||
155 | - "typeId": "1011", | ||
156 | - "userId": th.data.options.userid | ||
157 | - }; | ||
158 | - var data = JSON.stringify(json); | ||
159 | - //调用发送预约成功模版接口 | ||
160 | - wx.request({ | ||
161 | - url: th.data.inurl + temp_url, | ||
162 | - data: data, | ||
163 | - method: 'post', | ||
164 | - header: { | ||
165 | - 'content-type': 'application/json' | ||
166 | - }, // 设置请求的 header | ||
167 | - success: function(data) {} | ||
168 | - }) | ||
169 | - setTimeout(function() { | 140 | + // var json = { |
141 | + // // "formId": formid, | ||
142 | + // "keyWord": [{ | ||
143 | + // "keyword": res.data.data.ServiceName | ||
144 | + // }, | ||
145 | + // { | ||
146 | + // "keyword": time.substring(0, 16) | ||
147 | + // }, { | ||
148 | + // "keyword": res.data.data.BeauticianName | ||
149 | + // }, { | ||
150 | + // "keyword": res.data.data.StorageName | ||
151 | + // }, { | ||
152 | + // "keyword": res.data.data.Address | ||
153 | + // } | ||
154 | + // ], | ||
155 | + // "page": "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, | ||
156 | + // "storeId": a.stoid, | ||
157 | + // "typeId": "1011", | ||
158 | + // "userId": th.data.options.userid | ||
159 | + // }; | ||
160 | + // var data = JSON.stringify(json); | ||
161 | + // //调用发送预约成功模版接口 | ||
162 | + // wx.request({ | ||
163 | + // url: th.data.inurl + temp_url, | ||
164 | + // data: data, | ||
165 | + // method: 'post', | ||
166 | + // header: { | ||
167 | + // 'content-type': 'application/json' | ||
168 | + // }, // 设置请求的 header | ||
169 | + // success: function(data) {} | ||
170 | + // }) | ||
171 | + | ||
170 | wx.redirectTo({ | 172 | wx.redirectTo({ |
171 | url: "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, | 173 | url: "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, |
172 | }); | 174 | }); |
173 | - }, 1000); | 175 | + |
174 | } else { | 176 | } else { |
175 | getApp().my_warnning(res.data.msg, 0, th); | 177 | getApp().my_warnning(res.data.msg, 0, th); |
176 | th.settime(); | 178 | th.settime(); |
@@ -237,40 +239,42 @@ Page({ | @@ -237,40 +239,42 @@ Page({ | ||
237 | wx.showLoading({ | 239 | wx.showLoading({ |
238 | title: '加载中', | 240 | title: '加载中', |
239 | }) | 241 | }) |
240 | - if (th.ver(version, '7.0.4') >= 0) { | ||
241 | - //获取模版id | ||
242 | - getApp().request.promiseGet(temp_url, { | ||
243 | - data: { | ||
244 | - store_id: a.stoid, | ||
245 | - typeid: "1011" | ||
246 | - } | ||
247 | - }).then(res => { | ||
248 | - if (res.data.code == 0 && res.data.data.pageData.length > 0) { | ||
249 | - template_id = res.data.data.pageData[0].template_id; | ||
250 | - // //授权订阅 | ||
251 | - wx.requestSubscribeMessage({ | ||
252 | - tmplIds: [template_id], | ||
253 | - success(res) { | ||
254 | - th.success(); | ||
255 | - }, | ||
256 | - fail(res) { | ||
257 | - th.success(); | ||
258 | - } | ||
259 | - }) | ||
260 | - } else { | ||
261 | - th.success(); | ||
262 | - } | ||
263 | - }) | ||
264 | - } else { | ||
265 | - // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示 | ||
266 | - wx.showModal({ | ||
267 | - title: '提示', | ||
268 | - content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' | ||
269 | - }) | ||
270 | - th.setData({ | ||
271 | - is_sub: 0 | ||
272 | - }) | ||
273 | - } | 242 | + |
243 | + th.success(); | ||
244 | + // if (th.ver(version, '7.0.4') >= 0) { | ||
245 | + // //获取模版id | ||
246 | + // getApp().request.promiseGet(temp_url, { | ||
247 | + // data: { | ||
248 | + // store_id: a.stoid, | ||
249 | + // typeid: "1011" | ||
250 | + // } | ||
251 | + // }).then(res => { | ||
252 | + // if (res.data.code == 0 && res.data.data.pageData.length > 0) { | ||
253 | + // template_id = res.data.data.pageData[0].template_id; | ||
254 | + // // //授权订阅 | ||
255 | + // wx.requestSubscribeMessage({ | ||
256 | + // tmplIds: [template_id], | ||
257 | + // success(res) { | ||
258 | + // th.success(); | ||
259 | + // }, | ||
260 | + // fail(res) { | ||
261 | + // th.success(); | ||
262 | + // } | ||
263 | + // }) | ||
264 | + // } else { | ||
265 | + // th.success(); | ||
266 | + // } | ||
267 | + // }) | ||
268 | + // } else { | ||
269 | + // // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示 | ||
270 | + // wx.showModal({ | ||
271 | + // title: '提示', | ||
272 | + // content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' | ||
273 | + // }) | ||
274 | + // th.setData({ | ||
275 | + // is_sub: 0 | ||
276 | + // }) | ||
277 | + // } | ||
274 | 278 | ||
275 | } | 279 | } |
276 | }, | 280 | }, |
packageA/pages/my_service/beauty_deta.js
@@ -369,6 +369,7 @@ Page({ | @@ -369,6 +369,7 @@ Page({ | ||
369 | "remark": "更改预约时间", | 369 | "remark": "更改预约时间", |
370 | "states": 0, | 370 | "states": 0, |
371 | "storeId": a.stoid, | 371 | "storeId": a.stoid, |
372 | + "isxz": 1 | ||
372 | }; | 373 | }; |
373 | var data = JSON.stringify(json); | 374 | var data = JSON.stringify(json); |
374 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 | 375 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 |
packageA/pages/my_service/tment_details.js
@@ -36,7 +36,8 @@ Page({ | @@ -36,7 +36,8 @@ Page({ | ||
36 | var json = { | 36 | var json = { |
37 | "number": number, | 37 | "number": number, |
38 | "storeId": a.stoid, | 38 | "storeId": a.stoid, |
39 | - "states": states | 39 | + "states": states, |
40 | + "isxz": 1 | ||
40 | }; | 41 | }; |
41 | var data = JSON.stringify(json); | 42 | var data = JSON.stringify(json); |
42 | var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 | 43 | var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 |